I have a data set that number of negative labeled values are 163 times of number of positive labeled values so I have a unbalanced data set. I have tried that:
model = svmtrain(trainLabels, trainFeatures, '-h 0 -b 1 -s 0 -c 10 -w1 163 -w-1 1');
[predicted_label, accuracy, prob_estimates] = svmpredict(testLabels, testFeatures, model, '-b 1');
and accuracy was nearly 99% and I searched and found that: http://agbs.kyb.tuebingen.mpg.de/km/bb/showthread.php?tid=376&page=1 at post #7 it says
have you tried weighting on a smaller scale (ie: <1)
and I changed it to:
model = svmtrain(trainLabels, trainFeatures, '-h 0 -b 1 -s 0 -c 10 -w1 0.5 -w-1 0.003');
[predicted_label, accuracy, prob_estimates] = svmpredict(testLabels, testFeatures, model, '-b 1');
I have still high accuracy every time because of unbalanced data. Any ideas?
PS: I am trying to implement the first challenge of KDD Cup 2008 - Breast Cancer. I want to rank the candidates by decreasing order.
