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

predict.classif.DD

Predicts from a fitted classif.DD object.


Description

Classifier of functional (and multivariate) data by DD–classifier.

Usage

## S3 method for class 'classif.DD'
predict(object, new.fdataobj = NULL, type = "class", ...)

Arguments

object

Object object estimated by classif.DD.

new.fdataobj

By default, new p functional explanatory dataset or new mulitvariate data of data.frame class

type

!=”predictive”, for each row of data shows the probability of each group membership.

...

Further arguments passed to or from other methods.

Details

Returns the groups or classes predicted using a previously trained model.

Value

  • group.predVector of groups or classes predicted

  • prob.groupFor each functional data shows the probability of each group membership.

Author(s)

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

References

Li, J., P.C., Cuesta-Albertos, J.A. and Liu, R. DD–Classifier: Nonparametric Classification Procedure Based on DD-plot. Journal of the American Statistical Association (2012), Vol. 107, 737–753.

See Also

See also classif.DD .

Examples

## Not run: 
# DD-classif for multivariate data 
data(iris)
iris<-iris[1:100,]
ii<-sample(1:100,80)
group.train<-factor(iris[ii,5])
x.train<-iris[ii,1:4]
out1=classif.DD(group.train,x.train,depth="MhD",classif="lda")
out2=classif.DD(group.train,x.train,depth="MhD",classif="glm")
summary(out1)
summary(out2)
x.test<-iris[-ii,1:4]
pred1=predict(out1,x.test)
pred2=predict(out2,x.test)
group.test<-iris[-ii,5]
table(pred1,group.test)
table(pred2,group.test)

# DD-classif for Functional data
data(phoneme)
mlearn<-phoneme[["learn"]]
glearn<-phoneme[["classlearn"]]

#	ESTIMATION 
out1=classif.DD(glearn,mlearn,depth="FM",classif="glm")
summary(out1)
#	PREDICTION 
mtest<-phoneme[["test"]]
gtest<-phoneme[["classtest"]]
pred1=predict(out1,mtest)
table(pred1,gtest)

## 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.