Visualize dendrograms for hierarchical clusterers using the package factoextra.

Note that learner-specific plots are experimental and subject to change.

# S3 method for LearnerClustHierarchical
autoplot(object, ...)

Arguments

object

(mlr3cluster::LearnerClustAgnes | mlr3cluster::LearnerClustDiana).

...

(any): Additional arguments, passed down to function factoextra::fviz_dend() in package factoextra.

Value

ggplot2::ggplot() object.

Examples

library(mlr3) library(mlr3cluster) library(mlr3viz) task = mlr_tasks$get("usarrests") # agnes clustering learner = mlr_learners$get("clust.agnes") learner$train(task) autoplot(learner)
# diana clustering learner = mlr_learners$get("clust.diana") learner$train(task) autoplot(learner, k = learner$param_set$values$k, rect_fill = TRUE, rect = TRUE, rect_border = "red")