mlpy.knowledgerep.cbr.engine.CaseBaseEntry.compute_similarity

CaseBaseEntry.compute_similarity(data_point, **kwargs)[source]

Computes the similarity.

Computes the similarity between the data point and each entry in the similarity model’s indexing structure.

Parameters:

data_point : list[float]

The data point to each entry in the similarity model is compared to.

Returns:

list[Stat] :

The similarity statistics of all entries in the model’s indexing structure.

Other Parameters:
 

cases : dict[int, Case]

The complete case base from which to build the indexing structure used by the similarity model.

data : ndarray[ndarray[float]]

If this keyword is set, the cases in the case base are ignored and the data entries specified in this variable are used to build the indexing structure.

names : str or list[str]

The feature name(s) relevant for the similarity computation. This field is only required if the cases for building the indexing structure comes from the cases field.

id_map : dict[int, int]

The mapping from the data stored in the data field to their case ids. This field is only required if the data for building the indexing structure comes from the data field.