Plot the variable importance for a BART model with the 25 quantile.

vimpPlot(
  trees,
  type = "prop",
  plotType = "barplot",
  metric = "median",
  combineFact = FALSE
)

Arguments

trees

A data frame created by `extractTreeData` function.

type

What value to return. Either the raw count 'count' or the proportions 'prop' averaged over iterations.

plotType

Which type of plot to return. Either a barplot 'barplot' with the quantiles shown as a line, a point plot with the quantiles shown as a gradient 'point', or a letter-value plot 'lvp'.

metric

Whether to show the 'mean' or 'median' importance values. Note, this has no effect when using plotType = 'lvp'.

combineFact

If a variable is a factor in a data frame, when building the BART model it is replaced with dummies. Note that q dummies are created if q>2 and one dummy is created if q=2, where q is the number of levels of the factor. If combineFact = TRUE, then the importance is calculated for the entire factor by aggregating the dummy variables’ inclusion proportions.

Value

A plot of variable importance.

Examples

if (FALSE) {
df_trees <- extractTreeData(model = my_model, data = my_data)
vimpPlot(trees = df_trees, plotType = 'point')
}