featurize_explanations#
- datarobotx.featurize_explanations(X)#
Featurizes a dataframe of explanations into strength values by feature.
Utility to melt and pivot prediction explanations so that each column corresponds to a feature and each value to an explanation strength.
- Parameters:
df (pd.DataFrame) – A dataframe with prediction explanations. Assumes dataframe has its explanations in wide form, with at least one of: [feature_name, actual_value, strength, qualitative_strength] for each prediction
- Returns:
A dataframe of explanation strengths for each feature
- Return type:
pd.DataFrame