Predicts from a fitted classif.DD object.
Classifier of functional (and multivariate) data by DD–classifier.
## S3 method for class 'classif.DD' predict(object, new.fdataobj = NULL, type = "class", ...)
object |
Object |
new.fdataobj |
By default, new p functional explanatory dataset or new
mulitvariate data of |
type |
!=”predictive”, for each row of data shows the probability of each group membership. |
... |
Further arguments passed to or from other methods. |
Returns the groups or classes predicted using a previously trained model.
group.predVector of groups or classes predicted
prob.groupFor each functional data shows the probability of each group membership.
Febrero-Bande, M., and Oviedo de la Fuente, M.
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 classif.DD
.
## 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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.