Lecture 14 - Feature Selection Flashcards
What is the curse of dimensionality?
The paradox of the more features you use in your model, the more data you need to help sort though the various permutations.
What does feature selection do?
Helps us quickly identify features that don’t offer predictive power which allows us to iterate faster and with less data so we can experiment more.
Which method of feature selection analyzes the variance of each feature and removes any features that have a low variance.
Variance Threshold
Bike seat example
SelectKBest does what?
Removes all but the k highest scoring features.
It is configurable using any function of (X, y) that returns a set of scores per feature.
Chi2 is
A predefined scoring function that tests the likelihood that the relationship between each variable and the outcome is due to that feature
What is RFE?
Recursive feature elimination
Uses an external estimator that assigns weights to features (coefficients of a linear model).
It selects features by recursively considering smaller and smaller sets of features.
How does RFE work?
It trains an external estimator and then drops the least important features.
How does SelectFromModel differ from RFE?
Select from model using a threshold on the coef or feature_importances_ values instead.