calculate_permutation_feature_importance {GeneSelectR} | R Documentation |
Calculate Permutation Feature Importance
Description
This function calculates permutation feature importance for a Scikit-learn pipeline with a trained classifier as the final step.
Usage
calculate_permutation_feature_importance(
pipeline,
X_train,
y_train,
n_repeats = 10L,
random_state = 0L,
njobs = njobs,
pipeline_name,
iter
)
Arguments
pipeline |
A Scikit-learn pipeline object with a trained classifier as the final step. |
X_train |
A DataFrame containing the training data. |
y_train |
A DataFrame containing the training labels. |
n_repeats |
An integer specifying the number of times to permute each feature. |
random_state |
An integer specifying the seed for the random number generator. |
njobs |
An integer specifying number of cores to use. Set up by the master GeneSelectR function. |
pipeline_name |
Strings (names of the selected_pipelines list) representing pipeline names that were constructed for the feature selection |
iter |
An integer that is indicating current iteration of the train-test split |
Value
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.