You have a dataset with a large number of features. How would you use Scikit-learn to select the most important features for model training?

  • Use feature selection techniques like Recursive Feature Elimination (RFE) with Scikit-learn's feature selection classes such as RFE or SelectKBest. These methods help identify the most relevant features based on their contribution to model performance.
  • Use Scikit-learn's DecisionTreeClassifier to identify important features, which is not the standard approach for feature selection.
  • Use Scikit-learn's GridSearchCV to perform hyperparameter tuning, which doesn't directly address feature selection.
  • Use Scikit-learn's StandardScaler to scale the features, but this doesn't perform feature selection.
Scikit-learn offers various feature selection techniques, and one of the commonly used methods is Recursive Feature Elimination (RFE), which helps identify and select the most important features for model training.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *