mlpy.knowledgerep.cbr.features.BoolFeature¶
-
class
mlpy.knowledgerep.cbr.features.BoolFeature(name, value, **kwargs)[source]¶ Bases:
mlpy.knowledgerep.cbr.features.FeatureThe boolean feature.
The boolean feature is represented by a scalar.
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_methodfor 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_methodfor valid algorithms.retrieval_metric : str
The metric used to compute the distances between pairs of points. Refer to
sklearn.neighbors.DistanceMetricfor valid identifiers.retrieval_metric_params : dict
Parameters relevant to the specified metric.
Raises: ValueError :
If the feature values is not of type boolean.
Attributes
is_indexFlag indicating whether this feature is an index. nameThe name of the feature (this also serves as the features identifying key). retrieval_algorithmThe internal indexing structure of the training data. retrieval_methodThe similarity model used during retrieval. retrieval_method_paramsParameters relevant to the specified retrieval method. retrieval_metricThe metric used to compute the distances between pairs of points. retrieval_metric_paramsParameters relevant to the specified metric. valueThe feature value. weightThe weights given to each feature value Methods
compare(other)Compare this feature to another feature.