Learn R Programming

Harvest.Tree (version 1.1)

predict: Predictions from a harvested tree

Description

The function predict computes the prediction of membership from a new data set classified by harvested classification model of training data.

Usage

predict(harfunc.object, data, num.var)

Arguments

harfunc.object
the output of harfunc function.
data
test data
num.var
number of explaining varibles

Value

pred.mat is a data frame stored the information of result of prediction with the following columns:belong the node that data point belongs topossibility the probability of point being in class 1predict the simple perdict based on whether probability is larger than 0.5.

Details

To run the predict function, a trained harvested classification tree formed by harvest function is required.