PPtreeViz (version 2.0.3)

predict.PPtreeclass: predict PPtree

Description

predict projection pursuit classification tree

Usage

# S3 method for PPtreeclass
predict(object, newdata = NULL, Rule = 1, ...)

Arguments

object

a fitted object of class inheriting from "PP.Tree.class"

newdata

the test dataset

Rule

split rule 1: mean of two group means 2: weighted mean of two group means - weight with group size 3: weighted mean of two group means - weight with group sd 4: weighted mean of two group means - weight with group se 5: mean of two group medians 6: weighted mean of two group medians - weight with group size 7: weighted mean of two group median - weight with group IQR 8: weighted mean of two group median - weight with group IQR and size

...

arguments to be passed to methods

Details

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

References

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

Examples

Run this code
# NOT RUN {
data(iris)
n <- nrow(iris)
tot <- c(1:n)
n.train <- round(n*0.9)
train <- sample(tot,n.train)
test <- tot[-train]
Tree.result <- PPTreeclass(Species~., data=iris[train,],"LDA")
predict(Tree.result)
# }

Run the code above in your browser using DataLab