mlpy.knowledgerep.cbr.engine.Case¶
-
class
mlpy.knowledgerep.cbr.engine.Case(cid, name=None, description=None, features=None)[source]¶ Bases:
objectThe representation of a case in the case base.
A case is composed of one or more
Feature.Parameters: cid : int
The case’s unique identifier.
name : str
The name for the case.
description : str
Text describing the case, optional.
features : dict
A list of features describing the case.
Attributes
idThe case’s unique identifier. Methods
add_feature(name, _type, value, **kwargs)Add a new feature. compute_similarity(other)Computes how similar two cases are. get_features(names)Return sorted collection of features with the specified name. get_indexed()Return sorted collection of all indexed features. get_retrieval_method(names)Returns the retrieval method for the given features. get_retrieval_params(names)Return the retrieval parameters for the given features. next()