get_feature_importances | R Documentation |
This function extracts feature importances from a Scikit-learn pipeline that has a Gradient Boosting Classifier as the final step.
get_feature_importances(pipeline, X_train, pipeline_name, iter)
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 |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.