class

Stochasta::KMedoids::Model

Inherits Reference < Object

Constructors

new(k : Int32, max_iter : Int32 = 100)
Source

Instance methods

assignments
Source
assignments=(assignments : Array(Int32))
Source
fit(data : Array(Array(Float64))) : self

Fits the dataset and assigns clusters

Source
k=(k : Int32)
Source
max_iter
Source
max_iter=(max_iter : Int32)
Source
medoids
Source
medoids=(medoids : Array(Array(Float64)))
Source
predict(point : Array(Float64)) : Int32

Predict cluster of a new point

Source