How to Use RFE for Feature Selection Flashcards

1
Q

WHAT ARE THE TWO IMPORTANT CONFIGURATION OPTIONS WHEN USING RFE? P192

A

The choice in the number of features to select (n_features_to_select)
The choice of the algorithm used to help choose features. (estimator)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

IS THE PERFORMANCE OF THE RFE STRONGLY DEPENDENT ON n_features_to_select & estimator HYPERPARAMETERS BEING TUNED? P192

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

WHAT DOES “RFE IS A WRAPPER-TYPE FEATURE SELECTION ALGORITHM” MEAN? P193

A

This means that a different machine learning algorithm is given and used in the core of the method, is wrapped by RFE, and used to help select features

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

HOW DOES RFE WORK? P193

A

1-Fitting the given ML algorithm used in the core of the model
2-Ranking features by importance
3-discarding the least important features
4-re-fitting the model and repeating, till the desired number of features remain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

HOW CAN WE FIND OUT WHICH FEATURES WERE CHOSEN BY RFE? P194

A

“support_” attribute. It provides True/False for each feature

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

HOW CAN WE SYNTHESIZE A CLASSIFICATION PROBLEM? CODE P194

A

X, y = make_classification (n_samples=1000, n_features=10, n_informative=5, n_redundant=5, random_state=1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

HOW CAN WE AUTOMATICALLY SELECT THE BEST NUMBER OF FEATURES FOR RFE? P200

A

Using RFECV

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

USING WHICH PARAMETER OF RFECV, CAN WE CHOOSE THE MINIMUM NUMBER OF CHOSEN FEATURES? WHAT IS ITS DEFAULT VALUE? P200

A

min_features_to_select, default=1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

USING WHICH ATTRIBUTE OF RFE AND RFECV CLASSES CAN WE FIND OUT THE RANKING OF FEATURES? P201

A

“ranking_” attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly