I am trying to use reduce the dimensionality of my features before using Multinomial NB classifier. Now the thing is, Multinomial NB does not take negative values in X_train. One of the suggestions I found online is to use MinMaxScaler to scale the SVD output to range (0,1) but I am not sure how feasible that is. (Dealing with negative values in sklearn MultinomialNB).
How can I use the TruncatedSVD output as an input to Multinomial NB classifier? Thanks!
Edit: Sample code below.
vectorizer = TfidfVectorizer()
X = vectorizer.fit_transform(df[col])
#After applying Truncated SVD
transformer = TruncatedSVD()
X_red = pd.DataFrame(transformer.fit_transform(X))
The dataset X_red has negative values which I can not use in a Multimonial NB later.