I am using sklearn precision and recall to get those scores. I got an error saying value error. Could anyone tell where am I doing wrong?
My y_test is as follows
443 positive
3615 positive
2030 negative
2993 positive
2870 positive
2907 negative
2215 positive
My Prediction is as follows
['positive' 'positive' 'positive' ..., 'positive' 'positive' 'positive']
Code:
from sklearn.metrics import precision_score
from sklearn.metrics import recall_score
precision_score(y_test, pred)
Error:
ValueError: pos_label=None is not a valid label: array(['negative', 'positive'],
dtype='<U8')