Skip to contents

A LearnerClust for agglomerative hierarchical clustering implemented in stats::hclust(). Difference Calculation is done by stats::dist()

Dictionary

This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn():

mlr_learners$get("clust.hclust")
lrn("clust.hclust")

Meta Information

  • Task type: “clust”

  • Predict Types: “partition”

  • Feature Types: “logical”, “integer”, “numeric”

  • Required Packages: mlr3, mlr3cluster, 'stats'

Parameters

IdTypeDefaultLevelsRange
methodcharactercompleteward.D, ward.D2, single, complete, average, mcquitty, median, centroid-
membersuntyped-
distmethodcharactereuclideaneuclidean, maximum, manhattan, canberra, binary, minkowski-
diaglogicalFALSETRUE, FALSE-
upperlogicalFALSETRUE, FALSE-
pnumeric2\((-\infty, \infty)\)
kinteger2\([1, \infty)\)

Super classes

mlr3::Learner -> mlr3cluster::LearnerClust -> LearnerClustHclust

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerClustHclust$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (requireNamespace("stats")) {
  learner = mlr3::lrn("clust.hclust")
  print(learner)

  # available parameters:
  learner$param_set$ids()
}
#> <LearnerClustHclust:clust.hclust>: Agglomerative Hierarchical Clustering
#> * Model: -
#> * Parameters: k=2, distmethod=euclidean
#> * Packages: mlr3, mlr3cluster, stats
#> * Predict Types:  [partition]
#> * Feature Types: logical, integer, numeric
#> * Properties: complete, exclusive, hierarchical
#> [1] "method"     "members"    "distmethod" "diag"       "upper"     
#> [6] "p"          "k"