#' @description
For the 2D plots, n_y_quant
is the number of quantiles into which to divide the predicted variable (y). The middle quantiles are grouped specially:
The middle quantile is the first confidence interval of
median_band_pct
(median_band_pct[1]
) around the median. This middle quantile is special because it generally represents no meaningful interaction.The quantiles above and below the middle are extended from the borders of the middle quantile to the regular borders of the other quantiles.
Arguments
- x
ale object. The object of class
ale
containing data to be plotted.- type
character(1). 'ale' for regular ALE plots; 'effects' for an ALE statistic effects plot.
- ...
not used. Inserted to require explicit naming of subsequent arguments.
- relative_y
character(1) in c('median', 'mean', 'zero'). The ALE y values in the plots will be adjusted relative to this value. 'median' is the default. 'zero' will maintain the actual ALE values, which are relative to zero.
- p_alpha
numeric length 2 from 0 to 1. Alpha for "confidence interval" ranges for printing bands around the median for single-variable plots. These are the default values used if
p_values
are provided. Ifp_values
are not provided, thenmedian_band_pct
is used instead. The inner band range will be the median value of y ±p_alpha[2]
of the relevant ALE statistic (usually ALE range or normalized ALE range). For plots with a second outer band, its range will be the median ±p_alpha[1]
. For example, in the ALE plots, for the defaultp_alpha = c(0.01, 0.05)
, the inner band will be the median ± ALE minimum or maximum at p = 0.05 and the outer band will be the median ± ALE minimum or maximum at p = 0.01.- median_band_pct
numeric length 2 from 0 to 1. Alpha for "confidence interval" ranges for printing bands around the median for single-variable plots. These are the default values used if
p_values
are not provided. Ifp_values
are provided, thenmedian_band_pct
is ignored. The inner band range will be the median value of y ±median_band_pct[1]/2
. For plots with a second outer band, its range will be the median ±median_band_pct[2]/2
. For example, for the defaultmedian_band_pct = c(0.05, 0.5)
, the inner band will be the median ± 2.5% and the outer band will be the median ± 25%.- rug_sample_size, min_rug_per_interval
non-negative integer(1). Rug plots are down-sampled to
rug_sample_size
rows otherwise they can be very slow for large datasets. By default, their size is thesample_size
size from theale_obj
parameters. They maintain representativeness of the data by guaranteeing that each of the ALE bins will retain at leastmin_rug_per_interval
elements; usually set to just 1 (default) or 2. To prevent this down-sampling, setrug_sample_size
toInf
.- n_x1_bins, n_x2_bins
positive integer(1). Number of bins for the x1 or x2 axes respectively for interaction plot. These values are ignored if x1 or x2 are not numeric (i.e, if they are logical or factors).
- n_y_quant
positive integer(1). Number of intervals over which the range of y values is divided for the colour bands of the interaction plot. See details.
- seed
See documentation for
ale()
- silent
See documentation for
ale()