Skip to main content

models.PermutationImportance

The result of permutation_importance.

Usage

Source

models.PermutationImportance(
    features,
    by_split,
    base,
)

Attributes

features: list of str

The labels of the features or groups shuffled.

by_split: list of list of float

by_split[i][j]: on split i, the increase in the score (a loss) when feature j is shuffled, averaged over the repeats.

base: list of float
The score on each split with nothing shuffled.

Attributes

Name Description
importance The mean increase over the splits, per feature.
relative Importance as a percent of the largest, the monograph’s scale.
std_error The splits’ standard deviation over the square root of their

importance

The mean increase over the splits, per feature.

importance


relative

Importance as a percent of the largest, the monograph’s scale.

relative


std_error

The splits’ standard deviation over the square root of their

std_error

number, per feature (NaN for one split).

Methods

Name Description
combine() One result from several over the same features, such as one per
table() One row per feature, most important first: feature,

combine()

One result from several over the same features, such as one per

Usage

Source

combine(results)

fold computed with a design built differently in each fold.


table()

One row per feature, most important first: feature,

Usage

Source

table()

importance, std_error and relative, as a list of dicts.