mlpy.knowledgerep.cbr.similarity.CosineSimilarity.build_indexing_structure¶
-
CosineSimilarity.
build_indexing_structure
(data, id_map)[source]¶ Build the indexing structure.
The cosine_similarity function from
sklearn.metrics.pairwise
takes the raw data as input. Thus the data remains as is and no special indexing structure is implemented.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.