ELI5 top-level API — ELI5 0.15.0 documentation (original) (raw)

The following functions are exposed to a top level, e.g.eli5.explain_weights.

explain_weights(estimator, **kwargs)[source]

explain_weights(estimator: BaseEstimator, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(ovr: OneVsRestClassifier, **kwargs)

explain_weights(clf: RidgeClassifierCV, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(clf: RidgeClassifier, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(clf: LinearSVC, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(clf: Perceptron, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(clf: PassiveAggressiveClassifier, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(clf: SGDClassifier, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(clf: LogisticRegressionCV, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(clf: LogisticRegression, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(clf: OneClassSVM, *args, **kwargs)

explain_weights(clf: NuSVC, *args, **kwargs)

explain_weights(clf: SVC, *args, **kwargs)

explain_weights(estimator: AdaBoostRegressor, vec=None, top=20, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None)

explain_weights(estimator: AdaBoostClassifier, vec=None, top=20, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None)

explain_weights(estimator: GradientBoostingRegressor, vec=None, top=20, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None)

explain_weights(estimator: GradientBoostingClassifier, vec=None, top=20, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None)

explain_weights(estimator: ExtraTreesRegressor, vec=None, top=20, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None)

explain_weights(estimator: ExtraTreesClassifier, vec=None, top=20, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None)

explain_weights(estimator: RandomForestRegressor, vec=None, top=20, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None)

explain_weights(estimator: RandomForestClassifier, vec=None, top=20, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None)

explain_weights(estimator: DecisionTreeRegressor, vec=None, top=20, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, **export_graphviz_kwargs)

explain_weights(estimator: DecisionTreeClassifier, vec=None, top=20, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, **export_graphviz_kwargs)

explain_weights(reg: NuSVR, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(reg: SVR, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(reg: TheilSenRegressor, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(reg: SGDRegressor, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(reg: RidgeCV, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(reg: Ridge, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(reg: PassiveAggressiveRegressor, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(reg: OrthogonalMatchingPursuitCV, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(reg: OrthogonalMatchingPursuit, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(reg: LinearSVR, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(reg: LinearRegression, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(reg: LassoCV, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(reg: Lars, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(reg: HuberRegressor, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(reg: ElasticNetCV, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(reg: ElasticNet, vec=None, top=20, target_names=None, targets=None, feature_names=None, coef_scale=None, feature_re=None, feature_filter=None)

explain_weights(estimator: Pipeline, feature_names=None, **kwargs)

explain_weights(estimator: PermutationImportance, vec=None, top=20, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None)

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

explain_weights()

Return an explanation of estimator parameters (weights).

explain_weights() is not doing any work itself, it dispatches to a concrete implementation based on estimator type.

Parameters:

Returns:

ExplanationExplanation result. Use one of the formatting functions fromeli5.formatters to print it in a human-readable form.

Explanation instances have repr which works well with IPython notebook, but it can be a better idea to useeli5.show_weights() instead of eli5.explain_weights()if you work with IPython: eli5.show_weights() allows to customize formatting without a need to import eli5.formatters functions.

explain_prediction(estimator, doc, **kwargs)[source]

explain_prediction(estimator: BaseEstimator, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(clf: OneVsRestClassifier, doc, **kwargs)

explain_prediction(clf: RidgeClassifierCV, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(clf: RidgeClassifier, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(clf: LinearSVC, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(clf: Perceptron, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(clf: PassiveAggressiveClassifier, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(clf: SGDClassifier, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(clf: LogisticRegressionCV, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(clf: LogisticRegression, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(clf: OneClassSVM, doc, *args, **kwargs)

explain_prediction(clf: SVC, doc, *args, **kwargs)

explain_prediction(clf: NuSVC, doc, *args, **kwargs)

explain_prediction(reg: NuSVR, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: SVR, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: TheilSenRegressor, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: SGDRegressor, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: RidgeCV, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: Ridge, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: PassiveAggressiveRegressor, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: OrthogonalMatchingPursuitCV, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: OrthogonalMatchingPursuit, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: LinearSVR, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: LinearRegression, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: LassoCV, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: Lars, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: HuberRegressor, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: ElasticNetCV, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: ElasticNet, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(clf: RandomForestClassifier, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(clf: GradientBoostingClassifier, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(clf: ExtraTreesClassifier, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(clf: DecisionTreeClassifier, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: RandomForestRegressor, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: GradientBoostingRegressor, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: ExtraTreesRegressor, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction(reg: DecisionTreeRegressor, doc, vec=None, top=None, top_targets=None, target_names=None, targets=None, feature_names=None, feature_re=None, feature_filter=None, vectorized=False)

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction()

explain_prediction(logprobs: ChoiceLogprobs, doc=None)

explain_prediction(completion: ChatCompletion, doc=None)

explain_prediction(client: OpenAI, doc: str | list[dict], *, model: str, **kwargs)

Return an explanation of an estimator prediction.

explain_prediction() is not doing any work itself, it dispatches to a concrete implementation based on estimator type.

Parameters:

Returns:

ExplanationExplanation result. Use one of the formatting functions fromeli5.formatters to print it in a human-readable form.

Explanation instances have repr which works well with IPython notebook, but it can be a better idea to useeli5.show_prediction() instead of eli5.explain_prediction()if you work with IPython: eli5.show_prediction() allows to customize formatting without a need to import eli5.formattersfunctions.

show_weights(estimator, **kwargs)[source]

Return an explanation of estimator parameters (weights) as an IPython.display.HTML object. Use this function to show classifier weights in IPython.

show_weights() accepts alleli5.explain_weights() arguments and alleli5.formatters.html.format_as_html()keyword arguments, so it is possible to get explanation and customize formatting in a single call.

Parameters: