PermutationInterpreter

class eipy.interpretation.PermutationInterpreter(EI, metric=None, ensemble_predictor_keys='all', n_repeats=10, n_jobs=1, metric_greater_is_better=True)

Permuation importance based interpreter.

This method utilizes sklearn’s permutation_importance function.

EIEnsembleIntegration class object

Fitted EnsembleIntegration model, i.e. with model_building=True.

metricfunction

sklearn-like metric function. If None, the fmax score is used.

n_repeatsint, default=10

Number of repeats in PermutationImportance.

ensemble_predictor_keys: default=’all’

Ensemble predictor keys used in EnsembleIntegration. If ‘all’ then all ensemble predictors seen by EI are interpreted. Recommended to pass a subset of ensemble_predctor keys as a list.

metric_greater_is_better: default=True

Metric greater is better.

Returns
self

Feature rankings of final ensemble models trained with EnsembleIntegration.

Attributes
ensemble_feature_rankingpandas.DataFrame

Feature rankings for each ensemble method.

LFRpandas.DataFrame

Local feature rankings for each base predictor.

LMRpandas.Dataframe

self.LMR = None

Methods

local_feature_rank(X_dict, y)

Local Feature Ranks (LFRs) for each base predictor

local_model_rank(ensemble_predictor_keys)

Local Model Ranks (LMRs)

rank_product_score(X_dict, y)

Compute feature ranking of ensemble methods using LFR and LMR.

rank_product_score(X_dict, y)

Compute feature ranking of ensemble methods using LFR and LMR.

Parameters
X_dictdict

Dictionary of X modalities. Keys and n_features must match those seen by EnsembleIntegration.fit_base().

yarray of shape (n_samples,)

Target vector relative to X.

Returns
self

Feature ranking of ensemble methods

local_feature_rank(X_dict, y)

Local Feature Ranks (LFRs) for each base predictor

Parameters
X_dictdict

Dictionary of X modalities. Keys and n_features must match those seen by EnsembleIntegration.fit_base().

yarray of shape (n_samples,)

Target vector relative to X.

Returns
self

Local feature ranks.

local_model_rank(ensemble_predictor_keys)

Local Model Ranks (LMRs)

Parameters
ensemble_predictor_keyslist of str

List of ensemble predictor keys that will be used to select ensembles classifiers to interpret.

Returns
self

Local model ranks.