pyreal.explanation_types.feature_value_based.FeatureValueBased#
- class pyreal.explanation_types.feature_value_based.FeatureValueBased(feature_names, predictions, grid)[source]#
A type wrapper for feature value-based DataFrame type outputs from explanation algorithms.
- __init__(feature_names, predictions, grid)[source]#
Set the wrapped explanation to explanation and values to values and validate :param explanation: wrapped explanation :type explanation: object :param values: Values corresponding with the object being explained :type values: DataFrame of shape (n_instances, n_features) or None :param other_properties: Other information relevant to the explanation :type other_properties: dict
Methods
__init__
(feature_names, predictions, grid)Set the wrapped explanation to explanation and values to values and validate :param explanation: wrapped explanation :type explanation: object :param values: Values corresponding with the object being explained :type values: DataFrame of shape (n_instances, n_features) or None :param other_properties: Other information relevant to the explanation :type other_properties: dict
apply_feature_descriptions
(feature_descriptions)Wrapper method for renaming features.
get
()Get the explanation wrapped by this type.
get_all
()Get the explanation and wrapped values as a tuple.
get_explanation
()Get the explanation wrapped by this type
get_values
()Return the values associated with the explanation
update_explanation
(new_explanation[, ...])Sets this object's explanation to the new value.
update_values
(values[, inplace])Updates this objects values, and validates
validate
()Validate that self.explanation is a valid FeatureValueExplanation :returns: None
validate_other_properties
()Validate that any additional properties are valid
validate_values
()Validate that self.values are valid values for this Explanation.