Skip to contents

Given the specified 'center.at' values of the Interpreter object, this function centers all of the plots in the Interpreter object of the specified type of plot.

Usage

center.preds(object, features = NULL, plot.type, feats.2d = NULL)

Arguments

object

The Interpreter object to use

features

A vector of names for the 1-D features we want to center

plot.type

The type of plot that the user wants to center the predictions of. should be one of either "ICE", "PDP.1D", or "PDP.2D"

feats.2d

A 2-column dataframe or matrix that gives the first variable in in the first column, and the second variable in the next. The number of rows is equal to the number of 2-D PDPs one would like to center.

Value

A list of centered data frame/matrix of values for the plot

Details

center.preds

Note

This function is mainly used to examine the exact values in the plot if the plot is centered. Note that this function should only be called after calling one of the various predict functions that matches the 'plot.type' parameter with 'save' equal to TRUE.