Usage
lgbm.fi.plot(model, n_best = 50, no_log = TRUE, low = "white",
high = "red", rescaler = "log", is.cv = FALSE, multipresence = TRUE,
plot = TRUE)
Arguments
model
Type: list, data.table, or data.frame. The trained model (with feature importance), or the feature importance table. If a list is provided, the trained model must have had importance set to TRUE during training. Otherwise, compute manually the feature importance via lgbm.fi, and feed the output table to this function argument.
n_best
Type: integer. The maximum amount of features to plot. Defaults to 50.
no_log
Type: boolean. Whether to NOT apply a log10 scale to the plot. Defaults to TRUE.
low
Type: character. The color when the relative gain is 0. Defaults to "white".
high
Type: character. The color when the relative gain is 1. Defaults to "red".
rescaler
Type: character. The transformation of the color scale. Defaults to "log". Choose between "asn", "atanh", "boxcox", "exp", "identity" (linear scale), "log", "log10", "log1p", "log2", "logit", "probability", "probit", "reciprocal", "reverse", "sqrt", or any other ggplot2 transformation object.
is.cv
Type: boolean. Whether the input is issued from a cross-validation or not. Defaults to FALSE.
multipresence
Type: boolean. Whether in a cross-validation, only the features which always appear are kept. Otherwise, they are thrown away for safety. Defaults to TRUE.
plot
Type: boolean. Whether to print a plot. Defaults to TRUE.