class CrystalML::Clustering::KMeans

Included Modules

Defined in:

clustering/k_means.cr

Constructors

Instance Method Summary

Instance methods inherited from module CrystalML::Clusterer

predict(data : Tensor(Float64, CPU(Float64))) : Array(Int32)
predict(data : Array(Array(Float64)) | Crysda::DataFrame) : Array(Int32)
predict

Instance methods inherited from class CrystalML::UnsupervisedEstimator

fit(data : Tensor(Float64, CPU(Float64)))
fit(data : Array(Array(Float64)) | Crysda::DataFrame)
fit

Constructor Detail

def self.new(n_clusters : Int32 = 8, max_iters : Int32 = 300, tolerance : Float64 = 0.0001) #

[View source]

Instance Method Detail

def centroids : Tensor(Float64, CPU(Float64)) #

[View source]
def fit(data : Tensor(Float64, CPU(Float64))) #

[View source]
def max_iters : Int32 #

[View source]
def max_iters=(max_iters : Int32) #

[View source]
def n_clusters : Int32 #

[View source]
def n_clusters=(n_clusters : Int32) #

[View source]
def predict(data : Tensor(Float64, CPU(Float64))) : Array(Int32) #

[View source]
def tolerance : Float64 #

[View source]
def tolerance=(tolerance : Float64) #

[View source]