Learn R Programming

Harvest.Tree (version 1.1)

harvest: A harvested classification tree

Description

The main function of the package, aiming at develop the harvest classification tree. Training data input and

Usage

harvest(training, num.var, numeric.info, sig = 0.95)

Arguments

training
original data where 'y' stores classmembership 0 and 1,in the first column, with explanatory variable stores in the second to the last column.
num.var
number of explanatory variables
numeric.info
the vector stores the number of which variable is continuous
sig
significance level (default 0.95)

Value

An object of class "harvest", which is the result of algorithm with the following elements for each nodes(nodes are ordered in sequence of harvesting):rule constriants of the nodetotal total number of data points in the node'1' the number of data points belonging to class 1 in the node'logchange' the improvement of log likelihood of deleting the redundent rules by the algorithm for the node

Details

The function will return the harvested tree model. Missing values are allowed, and they will be treated accordingly. To use the trained tree model to predict, you can use predict function in this package.

Examples

Run this code
data(training)
harvest(training,4,3)

Run the code above in your browser using DataLab