<div dir="ltr"><div><div><div><div>> On Sat, Jan 16, 2016 at 5:40 AM, Kaustubh Patil <span dir="ltr"><<a href="mailto:kaustubh.patil@gmail.com" target="_blank">kaustubh.patil@gmail.com</a>></span> wrote:<br>>
BTW another way to handle imbbalanced data (and perhaps easier to
implement and test) could be assign weights in libvsm. This has to be
done for each partition separately, any ideas on how this can be done?<br>> Thanks<br><br>just to note that this functionality is currently in PyMVPA broken. <a href="https://github.com/PyMVPA/PyMVPA/issues/40">https://github.com/PyMVPA/PyMVPA/issues/40</a><br></div>You might be able to plug SVM from scikitlearn if it works there. <br></div>However, based on my poor understanding on math, statistics and machine learning, class weighting should converge to up-sampling. So up-sample maybe?<br></div>However num2, they are both suboptimal, because you are indeed moving the decision boundary to the minority class, but the angle of the boundary will be wrong, therefore less naive resampling like SMOTE or ROSE is with combination to moving the cutoff value is advised. Unfortunately I cannot find the paper where was it written.<br></div>However num3, everything breaks in high dimensional data. And just moving the cutoff(threshold) value of SVM or similar classifier might be enough <a href="http://www.ncbi.nlm.nih.gov/pubmed/22408190">http://www.ncbi.nlm.nih.gov/pubmed/22408190</a><br><div><div><div><div><div><div><div class="gmail_extra"><br>> On Fri, Jan 15, 2016 at 11:28 PM, Kaustubh Patil <span dir="ltr"><<a href="mailto:kaustubh.patil@gmail.com" target="_blank">kaustubh.patil@gmail.com</a>></span> wrote:<br><div><div><div><div><div><div>> Thanks again Yaroslav.<br></div>> I
agree that the classifier might end up giving 0 or very small balanced
accuracy (or micro accuracy) values but I think thats still a better
measure than using overall accuracy (or macro accuracy). <br><br>what do you mean by balanced accuracy? What I know by that name is the
mean of sensitivity and specificity, or sensitivity + specificity / 2. You are not suppose to get to 0 with that.<br><br>>There are couple of other measures that can be useful for imbalanced datasets:<br></div>> 1. A-mean: arithmetic mean, same as average class-wise accuracy or micro-accuracy<br></div>> 2. G-mean: geometric mean instead of arithmetic mean above<br></div>> 3. F-measure<br></div>> 4. Area under the ROC curve<br><br></div><div>You can also use Cohen's alpha and area under the precision-recall curve.<br></div><div><br></div>> Of
course a better solution would be using a classifier that can handle
imbalanced datasets, as you suggested. I have previously used SVMperf
that can optimize AU-ROC: <a href="https://www.cs.cornell.edu/people/tj/svm_light/svm_perf.html" target="_blank">https://www.cs.cornell.edu/people/tj/svm_light/svm_perf.</a><div class="gmail_quote">> On Fri, Jan 15, 2016 at 11:08 PM, Yaroslav Halchenko <span dir="ltr"><<a href="mailto:debian@onerussian.com" target="_blank">debian@onerussian.com</a>></span> wrote:<br>> another solution is to try a classifier which provides weighting<br>> to the classes, e.g. as GNB with default prior setting does.<br><br></div>You
don't have to weight classes differently, you can just move
cutoff(threshold) value towards the minority class. Or just look at AUC
...<a href="https://www.cs.cornell.edu/people/tj/svm_light/svm_perf.html" target="_blank">html</a><br><br></div><div class="gmail_extra">Choosing a classifier is a different problem than choosing a performance measure. Even if you have a classifier that deals with imbalances nicely, you still need to have a performance measure that makes sense. So not accuracy. <br></div></div></div></div></div></div></div></div>