I have binary classification in which one of the classes is almost 0.1 size of the other class.
I am using sklearn to create a model and evaluate it. I am using these two functions:
print(precision_recall_fscore_support(y_real,y_pred))
out:
(array([0.99549296, 0.90222222]), # precision of the first class and the second class
array([0.98770263, 0.96208531]), # recall of the first class and the second class
array([0.99158249, 0.93119266]), # F1 score of the first class and the second class
array([1789, 211])) # instances of the first class and the second class
Which returns the precison,recal,fscore and support for each class
print(precision_score(y_real,y_pred),recall_score(y_real,y_pred))
out:
0.90222222 , 0.96208531 # precsion and recall of the model
Which returns the precision and recall of the prediction.
Why the precsion and recall function returns exactly the same value of the class with the less instances (here the class with 211 instances)?