PEC-CSS / slowmokit

Library which can be used for machine learning in C++.
https://pec-css.github.io/slowmokit/
GNU General Public License v2.0
16 stars 16 forks source link

Implemented precision and recall for a multiclass classifier #38 #82

Closed YashitaBansal closed 1 year ago

YashitaBansal commented 1 year ago

Input: vector<int> prediction = {0, 1, 2, 1, 0, 2, 1, 0, 1, 2} vector<int> actual = {0, 0, 2, 1, 0, 2, 1, 0, 1, 2}

Output: PRECISION Class 0 precision: 1 Class 1 precision: 0.8 Class 2 precision: 1

RECALL Class 0 recall: 1 Class 1 recall: 0.8 Class 2 recall: 1