PPclassify_MOD: predict PPtree

View source: R/PPclassify_MOD.R

PPclassify_MODR Documentation

predict PPtree

Description

predict projection pursuit classification tree

Usage

PPclassify_MOD(Tree.result,test.data,true.class=NULL,...)

Arguments

Tree.result

PPtreeclass object

test.data

the test dataset

true.class

true class of test dataset if available

...

arguments to be passed to methods

Details

Predict class for the test set with the fitted projection pursuit classification tree and calculate prediction error.

Value

predict.class predicted class

predict.error number of the prediction errors

References

Lee, YD, Cook, D., Park JW, and Lee, EK(2013) PPtree: Projection Pursuit Classification Tree, Electronic Journal of Statistics, 7:1369-1386.

Examples

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])


natydasilva/PPtreeExt documentation built on Aug. 10, 2022, 9:32 p.m.