predict.forest: Predict method for random decision forest classifier fits

Description Usage Arguments Examples

View source: R/predict.forest.r

Description

Predict method for random decision forest classifier fits

Usage

1
2
## S4 method for signature 'forest'
predict(object, newdata, ...)

Arguments

object

Object of class inheriting from "forest-class".

newdata

A data frame in which to look for variables with which to predict.

...

further arguments passed to or from other methods.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  data(easy_2var_data)

  fforest = grow.forest(Y~X1+X2, data=easy_2var_data, 
    min_node_obs=5, max_depth=10,
    numsamps=90, numvars=1, numboots=5)

  xnew = data.frame(
    X1 = c(0.06, 0.05, 0.05, 0.01, 0.09, 0.05, 0.05,-1000, 1000),
    X2 = c(0.03, 0.02, 0.05, 0.03, 0.04,-1000, 1000, 0.04, 0.03)
    )

  fforest_ynewhat = predict(fforest, xnew)

ParallelForest documentation built on May 29, 2017, 5:45 p.m.