Plots a heatmap with rule_nbr's on x-side and clusters of row_nbr's on y-side of a binary matrix with 1 if a rule is applicable for a row.

# S3 method for rulelist
plot(x, thres_cluster_rows = 1000, dist_metric = "jaccard", ...)

Arguments

x

A rulelist

thres_cluster_rows

(positive integer) Maximum number of rows beyond which a x-side dendrogram is not computed

dist_metric

(string or function, default: "jaccard") Distance metric for y-side (rule_nbr) passed to method argument of proxy::dist

...

Arguments to be passed to pheatmap::pheatmap

Details

Number of clusters is set to min(number of unique rows in the row_nbr X rule_nbr matrix and thres_cluster_rows)

Examples

library("magrittr")
att = modeldata::attrition
tidy_c5 =
  C50::C5.0(Attrition ~., data = att, rules = TRUE) %>%
  tidy() %>%
  set_validation_data(att, "Attrition") %>%
  set_keys(NULL)

plot(tidy_c5)