mlpy.knowledgerep.cbr.similarity.KMeansSimilarity¶
-
class
mlpy.knowledgerep.cbr.similarity.KMeansSimilarity(n_cluster=None)[source]¶ Bases:
mlpy.knowledgerep.cbr.similarity.ISimilarityThe KMeans similarity model.
The KMeans similarity model determines similarity between the data in the indexing structure and the query data by using the
sklearn.cluster.KMeansalgorithm.Parameters: n_cluster : int
The number of clusters to fit the raw data in.
Methods
build_indexing_structure(data, id_map)Build the indexing structure. compute_similarity(data_point)Computes the similarity.