New answers tagged


Found the answer myself, here I have tried to provide a simple explanation for other people having the same question. Step 1: Get your vectorized matrix print("Final Data-matrix:") print(X_tr.shape, y_train.shape) print(X_cr.shape, y_cv.shape) print(X_te.shape, y_test.shape) Step 2: Train the model with MultinomialNB # Put the optimal alpha value you ...

Top 50 recent answers are included