Visualizations for hierarchical clusters. The argument type controls what kind of plot is drawn. Possible choices are:

• "dend" (default): Dendrograms using ggdendro package.

• "scree": Scree plot that shows the number of possible clusters on the x-axis and the height on the y-axis.

## Usage

# S3 method for LearnerClustHierarchical
autoplot(
object,
type = "dend",
theme = theme_minimal(),
theme_dendro = TRUE,
...
)

## Arguments

object
type

(character(1)):
Type of the plot. See description.

Optionally, pass the task to add labels of observations to a hclust dendrogram. Labels are set via the row names of the task.

theme

(ggplot2::theme())
The ggplot2::theme_minimal() is applied by default to all plots.

theme_dendro

(logical(1))
If TRUE (default), the special dendrogram theme from ggdendro package is used in plot "dend". Set to FALSE to use the theme passed in theme.

...

(ignored).

## Value

ggplot2::ggplot().

## Examples

if (requireNamespace("mlr3")) {
library(mlr3)
library(mlr3cluster)
library(mlr3viz)

learner$train(task) autoplot(learner) # diana clustering learner = lrn("clust.diana") learner$train(task)