feature_explanations ========================================================= .. py:module:: evalml.model_understanding.feature_explanations .. autoapi-nested-parse:: Human Readable Pipeline Explanations. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: :nosignatures: evalml.model_understanding.feature_explanations.get_influential_features evalml.model_understanding.feature_explanations.readable_explanation Contents ~~~~~~~~~~~~~~~~~~~ .. py:function:: get_influential_features(imp_df, max_features=5, min_importance_threshold=0.05, linear_importance=False) Finds the most influential features as well as any detrimental features from a dataframe of feature importances. :param imp_df: DataFrame containing feature names and associated importances. :type imp_df: pd.DataFrame :param max_features: The maximum number of features to include in an explanation. Defaults to 5. :type max_features: int :param min_importance_threshold: The minimum percent of total importance a single feature can have to be considered important. Defaults to 0.05. :type min_importance_threshold: float :param linear_importance: When True, negative feature importances are not considered detrimental. Defaults to False. :type linear_importance: bool :returns: Lists of feature names corresponding to heavily influential, somewhat influential, and detrimental features, respectively. :rtype: (list, list, list) .. py:function:: readable_explanation(pipeline, X=None, y=None, importance_method='permutation', max_features=5, min_importance_threshold=0.05, objective='auto') Outputs a human-readable explanation of trained pipeline behavior. :param pipeline: The pipeline to explain. :type pipeline: PipelineBase :param X: If importance_method is permutation, the holdout X data to compute importance with. Ignored otherwise. :type X: pd.DataFrame :param y: The holdout y data, used to obtain the name of the target class. If importance_method is permutation, used to compute importance with. :type y: pd.Series :param importance_method: The method of determining feature importance. One of ["permutation", "feature"]. Defaults to "permutation". :type importance_method: str :param max_features: The maximum number of influential features to include in an explanation. This does not affect the number of detrimental features reported. Defaults to 5. :type max_features: int :param min_importance_threshold: The minimum percent of total importance a single feature can have to be considered important. Defaults to 0.05. :type min_importance_threshold: float :param objective: If importance_method is permutation, the objective to compute importance with. Ignored otherwise, defaults to "auto". :type objective: str, ObjectiveBase :raises ValueError: if any arguments passed in are invalid or the pipeline is not fitted.