1. Home >
  2. Blog >
  3. Blog Detail

Classifier.fit(x_train y_train)

Aug 20, 2018 fit_classifier(X_train, y_train) to fit your classifier you would use . classifier.fit(X_train, y_train) instead. You'll get the same error when trying to predict your test data. You need to change . predicted = predict(X_test) to . predicted = classifier.predict(X_test) Your Confusionmatrix should get your labels, not your test data:

Do you want a customized solution?

Click avatar to contact us
Hi,may I help you with products, price, etc?
Chat Online