TransWikia.com

SVM-Light displays corrupted precision/recall results

Cross Validated Asked by zvisofer on February 24, 2021

I run SVM-Light classifier but the recall/precision row it outputs seem to be 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 I configure to get valid precision and recall?

One Answer

The fact that your model's accuracy is high (95.5%) but its precision/recall are 0 shows your learning problem is highly unbalanced. Your data set likely contains most negative class, ~ 95.5%. As a result your model will classify every examples as negative class and achieve 95.5% accuracy but since there is no examples classified as positive class, model's precision/recall are 0. To avoid that, you need to balance positive/negative class ratio in the training set by sub-sampling negative class or put a high weight on positive class examples.

Answered by Tĩnh Trần on February 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP