plot_pd: Plot partial dependence from random forests

Description Usage Arguments Value Examples

Description

Plot partial dependence from random forests

Usage

1
plot_pd(pd, facet = NULL)

Arguments

pd

object of class c("pd", "data.frame") as returned by partial_dependence

facet

a character vector indicating the variable that should be used to facet on if interaction is plotted. If not specified the variable with less unique values is chosen.

Value

a ggplot2 object

Examples

1
2
3
4
5
6
library(randomForest)
library(edarf)
data(iris)
fit = randomForest(Species ~ ., iris)
pd = partial_dependence(fit, "Petal.Width", data = iris)
plot_pd(pd)

Example output

randomForest 4.6-14
Type rfNews() to see new features/changes/bug fixes.

edarf documentation built on May 2, 2019, 2:39 a.m.