PartialDependencePlot: Partial Dependence Plot

View source: R/PartialDependenceplot.R

PartialDependencePlotR Documentation

Partial Dependence Plot

Description

Partial Dependence Plot

Usage

PartialDependencePlot(
  data = NULL,
  FeatureNames = NULL,
  FittedModelObject = NULL,
  j = 20
)

Arguments

data

A data.frame that contains the study’s features and the outcome.

FeatureNames

A vector with the names of features to plot.

FittedModelObject

A fitted model object.

j

A numerical value that indicates the size of the equally spaced values for the feature of interest.

Value

This function returns a plot where X axis presents the values for each feature and Y axis illustrates the predicted proportion of correct answer to the item.

Examples


colnames(training)[14] <- "perf"
ensemblist <- TreeModels(traindata = training,
methodlist = c("dt","rf"),checkprogress = TRUE)

PartialDependencePlot(data = training,
FeatureNames = colnames(training[-c(4,14)]),
FittedModelObject = ensemblist$ModelObject$rpart, j = 30)

PartialDependencePlot(data = training,
FeatureNames = colnames(training[-c(4,14)]),
FittedModelObject = ensemblist$ModelObject$ranger, j = 20)


LOGANTree documentation built on June 23, 2022, 1:06 a.m.