Learn R Programming

fda.usc (version 0.9.5)

classif.kernel.fb: Kernel classifier from Functional Data Training by basis representation

Description

Fits Nonparametric Supervised Classification for Functional Data Training using a basis representation.

Usage

classif.kernel.fb(fdataobj,group,h=NULL,metric=metric.lp,
type.basis="bspline",par.basis=list(rangeval=NULL,nbasis=NULL),...)

Arguments

fdataobj
fdata class object.
group
Vector group of length n. The vector should be a factor, if not a factor becomes a factor.
h
Vector of smoothing parameter or bandwidht.
metric
Metric function, by default metric.lp.
type.basis
Character string which determines type of basis. By default "bspline".
par.basis
List of parameters for create.basis
...
Further arguments passed to or from other methods. Arguments to be passed for metric.lp o other metric function.

Value

  • fdataobjfdata class object.
  • groupVector group of length n (as a factor).
  • group.estEstimated vector groups.
  • max.probHighest probability of correct classification.
  • h.optOptimal smoothing parameter or bandwidht estimated.
  • prob.classificationProbability of correct classification by group.
  • prob.groupMatrix of estimated class probabilities. For each functional point shows the probability of each possible group membership.
  • basis.optOptimal number of basis.
  • basis.obj.optOptimal basis object.
  • DMatrix of distances between objects.
  • coefsCoefficient array of Functional Data object, Data2fd.
  • misclassificationVector of probability of misclassification by number of neighbors knn.
  • num.basisVector of number of basis considered.
  • hVector of smoothing parameter or bandwidth.
  • CA call of function classif.kernel.fb.

Details

Classification is done using a kernel estimation after a representation in a basis using Data2fd function of fda package. Different types of metric funtions and type of basis (see create.basis) can be used.

References

Ferraty, F. and Vieu, P. (2006). Nonparametric functional data analysis. Springer Series in Statistics, New York. Ferraty, F. and Vieu, P. (2006). NPFDA in practice. Free access on line at http://www.lsp.ups-tlse.fr/staph/npfda/ Ramsay, James O., and Silverman, Bernard W. (2006), Functional Data Analysis, 2nd ed., Springer, New York. Ramsay, James O., and Silverman, Bernard W. (2002), Applied Functional Data Analysis, Springer, New York.

See Also

See Also as predict.classif.fd

Examples

Run this code
data(phoneme)
mlearn<-phoneme[["learn"]]
glearn<-phoneme[["classlearn"]]
vbasis<-seq(7,27,len=3)
h<-2^(seq(0,3))
out<-classif.kernel.fb(mlearn,glearn,h=h,par.basis=list(nbasis=vbasis))
out$prob.classification
1-out$misclassification

Run the code above in your browser using DataLab