predict.classif.DD

Predicts from a fitted classif.DD object.

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

Keywords
classif
Usage
# S3 method for 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.

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 .

Aliases
  • predict.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)
# }
Documentation reproduced from package fda.usc, version 2.0.1, License: GPL-2

Community examples

Looks like there are no examples yet.