Loading...

Clusters#


Base Class#

cluster.Clustering(clusters[, p, clusters_names])

InMemoryModel implementation of clustering algorithms.

Methods:

Clustering.get_attributes()

Returns the model attributes.

Clustering.predict(X)

Predicts clusters using the input matrix.

Clustering.predict_proba(X)

Predicts the probability of each input to belong to the model clusters.

Clustering.predict_proba_sql(X)

Returns the SQL code needed to deploy the model probabilities.

Clustering.predict_sql(X)

Returns the SQL code needed to deploy the model using its attributes.

Clustering.set_attributes(**kwargs)

Sets the model attributes.

Clustering.transform(X)

Transforms and returns the distance to each cluster.

Clustering.transform_sql(X)

Transforms and returns the SQL distance to each cluster.

Attributes:

Clustering.object_type

Must be overridden in child class


K-Means#

cluster.KMeans(clusters[, p])

InMemoryModel implementation of KMeans.

Methods:

KMeans.get_attributes()

Returns the model attributes.

KMeans.predict(X)

Predicts clusters using the input matrix.

KMeans.predict_proba(X)

Predicts the probability of each input to belong to the model clusters.

KMeans.predict_proba_sql(X)

Returns the SQL code needed to deploy the model probabilities.

KMeans.predict_sql(X)

Returns the SQL code needed to deploy the model using its attributes.

KMeans.set_attributes(**kwargs)

Sets the model attributes.

KMeans.transform(X)

Transforms and returns the distance to each cluster.

KMeans.transform_sql(X)

Transforms and returns the SQL distance to each cluster.

Attributes:

KMeans.object_type

Must be overridden in child class


K-Prototypes#

cluster.KPrototypes(clusters[, p, gamma, ...])

InMemoryModel implementation of KPrototypes.

Methods:

KPrototypes.get_attributes()

Returns the model attributes.

KPrototypes.predict(X)

Predicts clusters using the input matrix.

KPrototypes.predict_proba(X)

Predicts the probability of each input to belong to the model clusters.

KPrototypes.predict_proba_sql(X)

Returns the SQL code needed to deploy the model probabilities.

KPrototypes.predict_sql(X)

Returns the SQL code needed to deploy the model using its attributes.

KPrototypes.set_attributes(**kwargs)

Sets the model attributes.

KPrototypes.transform(X)

Transforms and returns the distance to each cluster.

KPrototypes.transform_sql(X)

Transforms and returns the SQL distance to each cluster.

Attributes:

KPrototypes.object_type

Must be overridden in child class


Bisecting K-Means#

cluster.BisectingKMeans(clusters, ...[, ...])

InMemoryModel implementation of BisectingKMeans.

Methods:

BisectingKMeans.get_attributes()

Returns the model attributes.

BisectingKMeans.plot_tree([pic_path])

Draws the input tree.

BisectingKMeans.predict(X)

Predicts using the BisectingKMeans model.

BisectingKMeans.predict_proba(X)

Predicts the probability of each input to belong to the model clusters.

BisectingKMeans.predict_proba_sql(X)

Returns the SQL code needed to deploy the model probabilities.

BisectingKMeans.predict_sql(X)

Returns the SQL code needed to deploy the BisectingKMeans model using its attributes.

BisectingKMeans.set_attributes(**kwargs)

Sets the model attributes.

BisectingKMeans.to_graphviz([round_score, ...])

Returns the code for a Graphviz tree.

BisectingKMeans.transform(X)

Transforms and returns the distance to each cluster.

BisectingKMeans.transform_sql(X)

Transforms and returns the SQL distance to each cluster.

Attributes:

BisectingKMeans.object_type

Must be overridden in child class


Nearest Centroid#

cluster.NearestCentroid(clusters, classes[, p])

InMemoryModel implementation of NearestCentroid algorithm.

Methods:

NearestCentroid.get_attributes()

Returns the model attributes.

NearestCentroid.predict(X)

Predicts clusters using the input matrix.

NearestCentroid.predict_proba(X)

Predicts the probability of each input to belong to the model clusters.

NearestCentroid.predict_proba_sql(X)

Returns the SQL code needed to deploy the model probabilities.

NearestCentroid.predict_sql(X)

Returns the SQL code needed to deploy the model using its attributes.

NearestCentroid.set_attributes(**kwargs)

Sets the model attributes.

NearestCentroid.transform(X)

Transforms and returns the distance to each cluster.

NearestCentroid.transform_sql(X)

Transforms and returns the SQL distance to each cluster.

Attributes:

NearestCentroid.object_type

Must be overridden in child class