machine learning - SVM-Light displays corrupted precision/recall results -
i run svm-light classifier recall/precision row outputs seem corrupted:
reading model...ok. (20 support vectors read) classifying test examples..100..200..done runtime (without io) in cpu-seconds: 0.00 accuracy on test set: 95.50% (191 correct, 9 incorrect, 200 total) precision/recall on test set: 0.00%/0.00%
what should configure valid precision , recall?
for example, if classifier predicting "-1" -- negative class; test dataset, however, contains 191 "-1" , 9 "+1" golden labels, 191 of them correctly classified , 9 of them incorrect.
true positives : 0 (tp) true negatives : 191 (tn) false negatives: 9 (fn) false positives: 0 (fp) thus: tp 0 precision = ----------- = --------- = undefined tp + fp 0 + 0 tp 0 recall = ----------- = --------- = 0 tp + fn 0 + 9
from formula above, know long tp zero, precision/recall either 0 or undefined.
to debug, should output (for each test example) golden label , predicted label know issue is.
Comments
Post a Comment