predict-RFNode: predict-RFNode

Description Usage Arguments Value

Description

Return the prediction from the current node if it is a leaf node, otherwise it will recursively call its children according to the 'splitFeature' and 'splitValue'.

Usage

1
2
3
## S4 method for signature 'RFNode'
predict(object, feature.new, x, y, se = NULL, avgfunc,
  categoricalFeatureCols)

Arguments

object

A 'RFNode“ object.

feature.new

A data frame of testing predictors.

x

A data frame of all training predictors.

y

A vector of all training responses.

avgfunc

An averaging function to average observations in the node. The function is used for prediction. The input of this function should be a dataframe of predictors 'x' and a vector of outcomes 'y'. The output is a scalar. The default function is to take the mean of vector 'y'.

categoricalFeatureCols

A list of index for all categorical data. Used for trees to detect categorical columns.

Value

A vector of predicted responses.


soerenkuenzel/hte documentation built on June 12, 2018, 4:26 p.m.