allInt: allInt

Description Usage Arguments Examples

View source: R/allInteractions.R

Description

Plots a Heatmap-tyle display showing Variable Importance and Variable Interaction.

Usage

1
allInt(mat, type = "lollipop", top = 0, ...)

Arguments

mat

A matrix of values to be plotted. Either added by the user or created using the prepFunc() function.

type

The type of plot to display, either "lollipop", "barplot", or "circleBar".

top

A value set by the user to only display the top x amount variables.

...

Not currently implemented

Examples

 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 mlr3 ranger model:
library(mlr3)
library(mlr3learners)
library(ranger)
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 <- prepFunc(task = aq_Task, learner = aq_lrn, model = aq_Mod)


# Create plot:
allInt(myMat)

AlanInglis/vivid documentation built on July 9, 2020, 1:53 a.m.