get_feature_importances {GeneSelectR} | R Documentation |
Get Feature Importances
Description
This function extracts feature importances from a Scikit-learn pipeline that has a Gradient Boosting Classifier as the final step.
Usage
get_feature_importances(pipeline, X_train, pipeline_name, iter)
Arguments
pipeline |
A Scikit-learn pipeline object with a Gradient Boosting Classifier as the final step. |
X_train |
A DataFrame containing the training data. |
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 selected feature names and their importances, ranked by importance, or NULL if the classifier does not have the appropriate attributes or the feature selector does not have the 'get_support' or 'support_' method. Each row represents a feature, with columns for feature names, importances, and ranks.