mlpy.knowledgerep.cbr.similarity.KMeansSimilarity.build_indexing_structure

KMeansSimilarity.build_indexing_structure(data, id_map)[source]

Build the indexing structure.

Build the indexing structure by fitting the data into n_cluster clusters.

Parameters:

data : ndarray[ndarray[float]]

The raw data points to be indexed.

id_map : dict[int, int]

The mapping from the data points to their case ids.