class

Stochasta::GMM::Model

Inherits Reference < Object

Constructors

new(k : Int32, max_iter : Int32 = 100, tolerance : Float64 = 1e-4)
Source

Instance methods

components
Source
components=(components : Array(Component))
Source
fit(data : Array(Array(Float64))) : self

Fits the GMM on the dataset using Expectation-Maximization

Source
k=(k : Int32)
Source
max_iter
Source
max_iter=(max_iter : Int32)
Source
predict(x : Array(Float64)) : Int32

Predicts the most likely cluster (hard assignment) for a given point

Source
predict_probabilities(x : Array(Float64)) : Array(Float64)

Predicts the responsibilities (soft assignments) for a given point

Source
tolerance
Source
tolerance=(tolerance : Float64)
Source