Skip to contents

A LearnerClust for Simple K Means clustering implemented in RWeka::SimpleKMeans(). The predict method uses RWeka::predict.Weka_clusterer() to compute the cluster memberships for new data.

Dictionary

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

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

Meta Information

  • Task type: “clust”

  • Predict Types: “partition”

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

  • Required Packages: mlr3, mlr3cluster, RWeka

Parameters

IdTypeDefaultLevelsRange
Auntypedweka.core.EuclideanDistance-
ClogicalFALSETRUE, FALSE-
fastlogicalFALSETRUE, FALSE-
Iinteger100\([1, \infty)\)
initinteger0\([0, 3]\)
MlogicalFALSETRUE, FALSE-
max_candidatesinteger100\([1, \infty)\)
min_densityinteger2\([1, \infty)\)
Ninteger2\([1, \infty)\)
num_slotsinteger1\([1, \infty)\)
OlogicalFALSETRUE, FALSE-
periodic_pruninginteger10000\([1, \infty)\)
Sinteger10\([0, \infty)\)
t2numeric-1\((-\infty, \infty)\)
t1numeric-1.5\((-\infty, \infty)\)
VlogicalFALSETRUE, FALSE-
output_debug_infologicalFALSETRUE, FALSE-

Super classes

mlr3::Learner -> mlr3cluster::LearnerClust -> LearnerClustSimpleKMeans

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerClustSimpleKMeans$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (requireNamespace("RWeka")) {
  learner = mlr3::lrn("clust.SimpleKMeans")
  print(learner)

  # available parameters:
  learner$param_set$ids()
}
#> <LearnerClustSimpleKMeans:clust.SimpleKMeans>: K-Means (Weka)
#> * Model: -
#> * Parameters: list()
#> * Packages: mlr3, mlr3cluster, RWeka
#> * Predict Types:  [partition]
#> * Feature Types: logical, integer, numeric
#> * Properties: complete, exclusive, partitional
#>  [1] "A"                 "C"                 "fast"             
#>  [4] "I"                 "init"              "M"                
#>  [7] "max_candidates"    "min_density"       "N"                
#> [10] "num_slots"         "O"                 "periodic_pruning" 
#> [13] "S"                 "t2"                "t1"               
#> [16] "V"                 "output_debug_info"