Learn R Programming

DALEXtra (version 0.2.1)

group_variables: Groups numeric features into aspects

Description

Divides correlated features into groups, called aspects. Division is based on correlation cutoff level.

Usage

group_variables(
  x,
  p = 0.5,
  clust_method = "complete",
  draw_tree = FALSE,
  draw_abline = TRUE
)

Arguments

x

dataframe with only numeric columns

p

correlation value for cut-off level

clust_method

the agglomeration method to be used, see hclust methods

draw_tree

if TRUE, function plots tree that illustrates grouping

draw_abline

if TRUE, function plots vertical line at cut-off level

Value

list of aspects

Examples

Run this code
# NOT RUN {
library("DALEX")
dragons_data <- dragons[,c(2,3,4,7,8)]
group_variables(dragons_data, p = 0.7, clust_method = "complete")

# }

Run the code above in your browser using DataLab