Created
July 13, 2020 18:28
-
-
Save Ayushijain09/81c0eaf79672887363540f4ef2a8205a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.feature_selection import SelectKBest | |
from sklearn.feature_selection import chi2 | |
X_train = X_train.astype(int) | |
chi2_features = SelectKBest(chi2 , k=12) | |
X_kbest_features = chi2_features.fit_transform(X_train, y_train) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment