I have both binary(0=is not or 1=is) and numerical values in x_train data. The target (y_train) is binary (0=is not or 1=is). What is the best method to do feature selection simultaneously?
I used this code:
from sklearn.feature_selection import f_classif
x_new = SelectKBest(f_classif, k=8).fit_transform(x_train, y_train)
but I am not sure about correctness of the method.
Mahmoud is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.