Following is my code:-
from sklearn.feature_selection import SelectKBest, chi2, f_regression
X_train_new = SelectKBest(score_func=chi2,k=2000).fit_transform(X_train_2,y_train)
X_cv_new = SelectKBest(score_func=chi2,k=2000).transform(X_cv_2,y_cv)
X_test_new = SelectKBest(score_func=chi2,k=2000).transform(X_test_2,y_test)
X_train_new.shape, X_cv_new.shape, X_test_new.shape
I am trying to select top 2000 features and then apply it for a tfidf featurized train, cv and test data.
While doing the aforementioned I get the "TypeError: transform() takes 2 positional arguments but 3 were given"