evalml.model_understanding.calculate_permutation_importance_one_column¶
-
evalml.model_understanding.
calculate_permutation_importance_one_column
(pipeline, X, y, col_name, objective, n_repeats=5, fast=True, precomputed_features=None, random_seed=0)[source]¶ Calculates permutation importance for one column in the original dataframe.
- Parameters
pipeline (PipelineBase or subclass) – Fitted pipeline.
X (pd.DataFrame) – The input data used to score and compute permutation importance.
y (pd.Series) – The target data.
col_name (str, int) – The column in X to calculate permutation importance for.
objective (str, ObjectiveBase) – Objective to score on.
n_repeats (int) – Number of times to permute a feature. Defaults to 5.
fast (bool) – Whether to use the fast method of calculating the permutation importance or not. Defaults to True.
precomputed_features (pd.DataFrame) – Precomputed features necessary to calculate permutation importance using the fast method. Defaults to None.
random_seed (int) – Seed for the random number generator. Defaults to 0.
- Returns
Mean feature importance scores over a number of shuffles.
- Return type
float