Description Usage Arguments Examples
Plots a Heatmap-tyle display showingVariable Importance and Variable Interaction
1 2 3 4 5 6 7 8 9 10 11 12 |
plotly |
If TRUE then an interactive plot is displayed. |
top |
Returns the first part of the interaction matrix and resulting plot. Similar to head() function. |
title |
Adds title to the plot. |
intPal |
A colorspace colour palette to display the interaction values. |
impPal |
A colorspace colour palette to display the importance values. |
fitlimsInt |
Specifies the fit range for the color map for interaction strength. |
fitlimsImp |
Specifies the fit range for the color map for importance. |
angle |
The angle to display the x-axis labels. |
... |
Not currently implemented. |
mat |
A matrix of values to be plotted. Either added by the user or created using the prepFunc() function. |
minInt |
Minimum interaction strength to be displayed on the legend. |
maxInt |
Maximum interaction strength to be displayed on the legend. |
minImp |
Minimum importance value to be displayed on the legend. |
maxImp |
Maximum importance value to be displayed on the legend. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Load in the data:
aq <- data.frame(airquality)
aq <- na.omit(aq)
# Run an mlr ranger model:
library(mlr3)
library(mlr3learners)
library(ranger)
aq <- na.omit(airquality)
aq_Task <- TaskRegr$new(id = "airQ", backend = aq, target = "Ozone")
aq_lrn <- lrn("regr.ranger", importance = "permutation")
aq_Mod <- aq_lrn$train(aq_Task)
# Create matrix
myMat <- vividMatrix(task = aq_Task, model = aq_Mod)
# Create plot:
plot(myMat, type = "heatMap")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.