Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

viviHeatmap

viviHeatmap


Description

Plots a Heatmap showing variable importance on the diagonal and variable interaction on the off-diagonal.

Usage

viviHeatmap(
  mat,
  intPal = rev(colorspace::sequential_hcl(palette = "Blues 3", n = 100)),
  impPal = rev(colorspace::sequential_hcl(palette = "Reds 3", n = 100)),
  intLims = NULL,
  impLims = NULL,
  angle = NULL
)

Arguments

mat

A matrix, such as that returned by vivi, of values to be plotted.

intPal

A vector of colours to show interactions, for use with scale_fill_gradientn.

impPal

A vector of colours to show importance, for use with scale_fill_gradientn.

intLims

Specifies the fit range for the color map for interaction strength.

impLims

Specifies the fit range for the color map for importance.

angle

The angle to display the x-axis labels.

Value

A heatmap plot showing variable importance on the diagonal and variable interaction on the off-diagonal.

Examples

library(ranger)
aq <- na.omit(airquality)
rF <- ranger(Ozone ~ ., data = aq, importance = "permutation")
myMat <- vivi(fit = rF, data = aq, response = "Ozone")
viviHeatmap(myMat)

vivid

Variable Importance and Variable Interaction Displays

v0.1.0
GPL (>= 2)
Authors
Alan Inglis [aut, cre], Andrew Parnell [aut], Catherine Hurley [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.