mlpy.knowledgerep.cbr.engine.CaseMatch

class mlpy.knowledgerep.cbr.engine.CaseMatch(case, key, similarity=None)[source]

Bases: object

Case match information.

Parameters:

case : Case

The matching case.

similarity :

A measure for the similarity to the query case.

Attributes

is_solution (bool) Whether this case match is a solution to the query case or not.
error (float) The error of the prediction.
predicted (bool) Whether the query case could be correctly predicted using this case match.

Methods

get_similarity(key) Retrieve the similarity measure for the feature identified by the key.
set_similarity(key, value) Set the similarity measure for the feature identified by the key.