Fits Nonparametric Supervised Classification for Functional Data.
classif.np(group,fdataobj,h=NULL,Ker=AKer.norm,metric,
type.CV = GCV.S,type.S=S.NW,par.CV=list(trim=0),par.S=list(),...)
classif.knn(group,fdataobj,knn=NULL,metric,type.CV = GCV.S,
par.CV=list(cv = TRUE, trim = 0),par.S=list(),...)
classif.kernel(group,fdataobj,h=NULL,Ker=AKer.norm,metric,
type.CV = GCV.S,par.CV=list(trim=0),par.S=list(),...)
Factor of length n
fdata
class object.
Vector of smoothing parameter or bandwidth.
Vector of number of nearest neighbors considered.
Type of kernel used.
Metric function, by default metric.lp
.
Type of cross-validation. By default generalized cross-validation GCV.S
method.
Type of smothing matrix S
. By default S
is calculated by Nadaraya-Watson kernel estimator (S.NW
).
List of parameters for type.CV
: trim
, the alpha of the trimming and draw=TRUE
.
List of parameters for type.S
: w
, the weights.
fdata
class object.
Factor of length n
.
Estimated vector groups
Matrix of predicted class probabilities. For each functional point shows the probability of each possible group membership.
Highest probability of correct classification.
Optimal smoothing parameter or bandwidht estimated.
Matrix of distances of the optimal quantile distance hh.opt
.
Probability of correct classification by group.
Vector of probability of misclassification by number of neighbors knn
.
Vector of smoothing parameter or bandwidht.
A call of function classif.kernel
.
Make the group classification of a training dataset using kernel or KNN estimation: Kernel
.
Different types of metric funtions can be used.
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/
See Also as predict.classif
# NOT RUN {
data(phoneme)
mlearn<-phoneme[["learn"]]
glearn<-phoneme[["classlearn"]]
h=9:19
out=classif.np(glearn,mlearn,h=h)
summary.classif(out)
#round(out$prob.group,4)
# }
Run the code above in your browser using DataCamp Workspace