View source: R/PPclassify_MOD.R
PPclassify_MOD | R Documentation |
predict projection pursuit classification tree
PPclassify_MOD(Tree.result,test.data,true.class=NULL,...)
Tree.result |
PPtreeclass object |
test.data |
the test dataset |
true.class |
true class of test dataset if available |
... |
arguments to be passed to methods |
Predict class for the test set with the fitted projection pursuit classification tree and calculate prediction error.
predict.class predicted class
predict.error number of the prediction errors
Lee, YD, Cook, D., Park JW, and Lee, EK(2013) PPtree: Projection Pursuit Classification Tree, Electronic Journal of Statistics, 7:1369-1386.
data(iris) n <- nrow(iris) tot <- c(1:n) n.train <- round(n*0.9) set.seed(12999) train <- sample(tot,n.train) test <- tot[-train] Tree.result <- PPTreeclass_MOD(formula = Species~.,data = iris[train,],PPmethod = "LDA") PPclassify_MOD(Tree.result,test.data = iris[test,1:4], true.class = iris[test,5])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.