View source: R/rf.partial.ci.R
rf.partial.ci | R Documentation |
Plots the partial dependency, and associated confidence intervals, of a random forests regression model
rf.partial.ci(m, x, yname, xname, lci = 0.25, uci = 0.75, delta = FALSE)
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 delta = NULL) |
recordedplot object to recall plot
depends: randomForest
Jeffrey S. Evans <jeffrey_evans@tnc.org>
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.