This function calculates permutation feature importance for a Scikit-learn pipeline with a trained classifier as the final step.
calculate_permutation_feature_importance(
pipeline,
X_train,
y_train,
n_repeats = 10L,
random_state = 0L,
njobs = njobs,
pipeline_name,
iter
)
A dataframe containing the feature names and their permutation importance scores, ranked by importance. Each row represents a feature, with columns for feature names, importances, and ranks.
A Scikit-learn pipeline object with a trained classifier as the final step.
A DataFrame containing the training data.
A DataFrame containing the training labels.
An integer specifying the number of times to permute each feature.
An integer specifying the seed for the random number generator.
An integer specifying number of cores to use. Set up by the master GeneSelectR function.
Strings (names of the selected_pipelines list) representing pipeline names that were constructed for the feature selection
An integer that is indicating current iteration of the train-test split