diff --git a/scikits/learn/svm/base.py b/scikits/learn/svm/base.py index afe86ded53048cac49b2f2a1649bbd56587d9eaa..1a4a8f348a0b2aeb339f182d81855031a801f2bc 100644 --- a/scikits/learn/svm/base.py +++ b/scikits/learn/svm/base.py @@ -276,10 +276,14 @@ class BaseLibSVM(BaseEstimator): self.support_, self.label_, self.probA_, self.probB_) - # libsvm has the convention of returning negative values for - # rightmost labels, so we invert the sign since our label_ is - # sorted by increasing order - return -dec_func + + if self.impl != 'one_class': + # libsvm has the convention of returning negative values for + # rightmost labels, so we invert the sign since our label_ is + # sorted by increasing order + return -dec_func + else: + return dec_func @property def coef_(self):