rf.partial.ci: Random Forests regression partial dependency plot with...

Description Usage Arguments Value Note Author(s) Examples

View source: R/rf.partial.ci.R

Description

Plots the partial dependency, and associated confidence intervals, of a random forests regression model

Usage

1
2
rf.partial.ci(m, x, yname, xname, lci = 0.25, uci = 0.75,
  delta = FALSE)

Arguments

m

randomForest regression object

x

data.frame or matrix of independent variables used to build model

yname

Name of the dependent variable

xname

Name of the independent variable for calculating partial dependence

lci

Percentile of predictions to plot as the lower bound.

uci

Percentile of predictions to plot as the upper bound.

delta

Plot change in prediction between the independent variable and simulated values (Default = NULL)

Value

recordedplot object to recall plot

Note

depends: randomForest

Author(s)

Jeffrey S. Evans <jeffrey_evans@tnc.org>

Examples

1
2
3
4
5
6
7
8
9
 library(randomForest)
 data(airquality)
 airquality <- na.omit(airquality)
 rf.ozone <- randomForest(y=airquality[,"Ozone"], airquality[,2:ncol(airquality)])

 par(mfrow=c(2,2))
   for(i in c("Solar.R", "Wind", "Temp", "Day")){
     rf.partial.ci(m=rf.ozone, x=airquality, yname="Ozone", xname=i, delta=TRUE) 
   } 

rfUtilities documentation built on Oct. 3, 2019, 9:04 a.m.