modbot.training.models.KMeansComponent

class modbot.training.models.KMeansComponent[source]

Bases: object

KMeans model class. With standard model methods.

Methods

fit(data)

Fit model to data

fit_transform(data)

Transform data and fit model

get_optimal_k(df)

Calculate the optimal number of clusters from distortion progress

optimize(comps)

Get optimal number of clusters

transform(data)

Transform data before training

fit(data)[source]

Fit model to data

fit_transform(data)[source]

Transform data and fit model

static get_optimal_k(df)[source]

Calculate the optimal number of clusters from distortion progress

classmethod optimize(comps)[source]

Get optimal number of clusters

transform(data)[source]

Transform data before training