Plot Variable Attribution Explanations

# S3 method for predict_parts
plot(x, ...)

Arguments

x

an object of the class predict_parts

...

other parameters described below

Value

An object of the class ggplot.

Plot options

break_down

  • max_features maximal number of features to be included in the plot. default value is 10

  • min_max a range of OX axis. By default NA, therefore it will be extracted from the contributions of x. But it can be set to some constants, useful if these plots are to be used for comparisons.

  • add_contributions if TRUE, variable contributions will be added to the plot.

  • shift_contributions number describing how much labels should be shifted to the right, as a fraction of range. By default equal to 0.05.

  • vcolors If NA (default), DrWhy colors are used.

  • vnames a character vector, if specified then will be used as labels on OY axis. By default NULL.

  • digits number of decimal places (round) or significant digits (signif) to be used.

  • rounding_function a function to be used for rounding numbers.

  • plot_distributions if TRUE then distributions of conditional propotions will be plotted. This requires keep_distributions=TRUE in the break_down, local_attributions, or local_interactions.

  • baseline if numeric then veritical line starts in baseline.

  • title a character. Plot title. By default "Break Down profile".

  • subtitle a character. Plot subtitle. By default NULL - then subtitle is set to "created for the XXX, YYY model", where XXX, YYY are labels of given explainers.

  • max_vars alias for the max_features parameter.

shap

  • show_boxplots logical if TRUE (default) boxplot will be plotted to show uncertanity of attributions.

  • vcolors If NA (default), DrWhy colors are used.

  • max_features maximal number of features to be included in the plot. default value is 10

  • max_vars alias for the max_features parameter.

oscillations

  • bar_width width of bars. By default 10