mlpy.knowledgerep.cbr.features.Feature¶
-
class
mlpy.knowledgerep.cbr.features.
Feature
(name, value, **kwargs)[source]¶ Bases:
object
The abstract feature class.
A feature consists of one or more feature values.
Parameters: name : str
The name of the feature (this also serves as the features identifying key).
value : bool or string or int or float or list
The feature value.
Other Parameters: weight : float or list[float]
The weights given to each feature value.
is_index : bool
Flag indicating whether this feature is an index.
retrieval_method : str
The similarity model used for retrieval. Refer to
Feature.retrieval_method
for valid methods.retrieval_method_params : dict
Parameters relevant to the selected retrieval method.
retrieval_algorithm : str
The internal indexing structure of the training data. Refer to
Feature.retrieval_method
for valid algorithms.retrieval_metric : str
The metric used to compute the distances between pairs of points. Refer to
sklearn.neighbors.DistanceMetric
for valid identifiers.retrieval_metric_params : dict
Parameters relevant to the specified metric.
Attributes
is_index
Flag indicating whether this feature is an index. name
The name of the feature (this also serves as the features identifying key). retrieval_algorithm
The internal indexing structure of the training data. retrieval_method
The similarity model used during retrieval. retrieval_method_params
Parameters relevant to the specified retrieval method. retrieval_metric
The metric used to compute the distances between pairs of points. retrieval_metric_params
Parameters relevant to the specified metric. value
The feature value. weight
The weights given to each feature value Methods
compare
(other)Compare this feature to another feature.