Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

classif.depth

Classifier from Functional Data


Description

Classification of functional data using maximum depth.

Usage

classif.depth(
  group,
  fdataobj,
  newfdataobj,
  depth = "RP",
  par.depth = list(),
  CV = "none"
)

Arguments

group

Factor of length n

fdataobj

fdata, matrix or data.frame class object of train data.

newfdataobj

fdata, matrix or data.frame class object of test data.

depth

Type of depth function from functional data:

  • FM: Fraiman and Muniz depth.

  • mode: modal depth.

  • RT: random Tukey depth.

  • RP: random project depth.

  • RPD: double random project depth.

par.depth

List of parameters for depth.

CV

=“none” group.est=group.pred, =TRUE group.est is estimated by cross-validation, =FALSE group.est is estimated.

Value

  • group.est Vector of classes of train sample data.

  • group.pred Vector of classes of test sample data.

  • prob.classification Probability of correct classification by group.

  • max.prob Highest probability of correct classification.

  • fdataobj fdata class object.

  • group Factor of length n.

Author(s)

Febrero-Bande, M. and Oviedo de la Fuente, M.

References

Cuevas, A., Febrero-Bande, M. and Fraiman, R. (2007). Robust estimation and classification for functional data via projection-based depth notions. Computational Statistics 22, 3, 481-496.

Examples

## Not run: 
data(phoneme)
mlearn<-phoneme[["learn"]]
mtest<-phoneme[["test"]]
glearn<-phoneme[["classlearn"]]
gtest<-phoneme[["classtest"]]

a1<-classif.depth(glearn,mlearn,depth="RP")
table(a1$group.est,glearn)
a2<-classif.depth(glearn,mlearn,depth="RP",CV=TRUE)
a3<-classif.depth(glearn,mlearn,depth="RP",CV=FALSE)
a4<-classif.depth(glearn,mlearn,mtest,"RP")
a5<-classif.depth(glearn,mlearn,mtest,"RP",CV=TRUE)     
table(a5$group.est,glearn)
a6<-classif.depth(glearn,mlearn,mtest,"RP",CV=FALSE)
table(a6$group.est,glearn)

## End(Not run)

fda.usc

Functional Data Analysis and Utilities for Statistical Computing

v2.0.2
GPL-2
Authors
Manuel Febrero Bande [aut], Manuel Oviedo de la Fuente [aut, cre], Pedro Galeano [ctb], Alicia Nieto [ctb], Eduardo Garcia-Portugues [ctb]
Initial release
2020-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.