text_plain_output_1.png
from sklearn.feature_selection import SelectKBest, f_classif

k = 15
selector = SelectKBest(score_func=f_classif, k=k)
X_train_selected = selector.fit_transform(X_train, y_train)
X_test_selected = selector.transform(X_test)