Model Pipeline - Feature selection methods
This pipeline shows how feature selection helps pick the most useful data columns before training a model. It removes less important features to make the model simpler and better.
Jump into concepts and practice - no test required
This pipeline shows how feature selection helps pick the most useful data columns before training a model. It removes less important features to make the model simpler and better.
Loss
0.7 |****
0.6 |***
0.5 |**
0.4 |*
0.3 |*
1 2 3 4 5 Epochs| Epoch | Loss ↓ | Accuracy ↑ | Observation |
|---|---|---|---|
| 1 | 0.65 | 0.60 | Model starts learning with moderate loss and accuracy |
| 2 | 0.50 | 0.72 | Loss decreases and accuracy improves as model learns |
| 3 | 0.40 | 0.80 | Model continues to improve with lower loss and higher accuracy |
| 4 | 0.35 | 0.83 | Training converges with steady improvement |
| 5 | 0.30 | 0.86 | Final epoch shows best performance with lowest loss |
SelectKBest feature selection method?VarianceThreshold(threshold=0.1) on a dataset with shape (100, 5) where only 3 features have variance above 0.1?from sklearn.feature_selection import RFE from sklearn.linear_model import LogisticRegression model = LogisticRegression() rfe = RFE(model, n_features_to_select=2) rfe.fit(X, y) selected = rfe.transform(X) print(selected.shape)If
X has shape (50, 4), but the output shape is (50, 4), what is the likely error?