plot.dice {ICEbox} | R Documentation |
Create a plot of a dice
object.
Description
Plotting of dice
objects.
Usage
## S3 method for class 'dice'
plot(x, plot_margin = 0.05, frac_to_plot = 1,
plot_sd = TRUE, plot_orig_pts_deriv = TRUE, pts_preds_size = 1.5,
colorvec, color_by = NULL, x_quantile = TRUE, plot_dpdp = TRUE,
rug_quantile = seq(from = 0, to = 1, by = 0.1), ...)
Arguments
x |
Object of class |
plot_margin |
Extra margin to pass to |
frac_to_plot |
If |
plot_sd |
If |
plot_orig_pts_deriv |
If |
pts_preds_size |
Size of points to make if |
colorvec |
Optional vector of colors to use for each curve. |
color_by |
Optional variable name (or column number) in |
x_quantile |
If |
plot_dpdp |
If |
rug_quantile |
If not null, tick marks are drawn on the x-axis corresponding to the vector of quantiles specified by this parameter.
Forced to |
... |
Additional plotting arguments. |
Value
A list with the following elements.
plot_points_indices |
Row numbers of |
legend_text |
If the |
See Also
dice
Examples
## Not run:
require(ICEbox)
require(randomForest)
require(MASS) #has Boston Housing data, Pima
data(Boston) #Boston Housing data
X = Boston
y = X$medv
X$medv = NULL
## build a RF:
bhd_rf_mod = randomForest(X, y)
## Create an 'ice' object for the predictor "age":
bhd.ice = ice(object = bhd_rf_mod, X = X, y = y, predictor = "age", frac_to_build = .1)
# estimate derivatives, then plot.
bhd.dice = dice(bhd.ice)
plot(bhd.dice)
## End(Not run)