0

I am building a binary classification model. In this model, there are nine features, categorical and continuous. Some of these features are label encoded or one hot encoded, while the continuous ones are standardized and normalized.

The model was working fine until I got to this part:

# Import the modules from `sklearn.metrics`
from sklearn.metrics import confusion_matrix, precision_score, recall_score, f1_score, cohen_kappa_score

# recall
recall_score(y_test, y_pred)

I got the error below.

ValueError: Classification metrics can't handle a mix of binary and continuous targets

I don't understand as this is clearly a classification problem and I am totally new at this. Can someone please help me?

Hichem BOUSSETTA
  • 1,791
  • 1
  • 21
  • 27
robinster
  • 21
  • 5
  • Possible duplicate of [Accuracy Score ValueError: Can't Handle mix of binary and continuous target](https://stackoverflow.com/questions/38015181/accuracy-score-valueerror-cant-handle-mix-of-binary-and-continuous-target) – Edeki Okoh Apr 05 '19 at 18:44
  • Please show a sample of your `y_test` and `y_pred`, as well as *how exactly* you produce `y_pred` (model etc). – desertnaut Apr 06 '19 at 21:55

0 Answers0