plot.rulelist | R Documentation |
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 class 'rulelist'
plot(x, thres_cluster_rows = 1000, dist_metric = "jaccard", ...)
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 ( |
... |
Arguments to be passed to pheatmap::pheatmap |
Number of clusters is set to min(number of unique rows in the row_nbr X rule_nbr matrix and thres_cluster_rows)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.