cjlin1 / libsvm

LIBSVM -- A Library for Support Vector Machines
https://www.csie.ntu.edu.tw/~cjlin/libsvm/
BSD 3-Clause "New" or "Revised" License
4.54k stars 1.64k forks source link

Confuse about “dual variables constraint" of OneClassSVM #157

Closed TsaiYunLin closed 4 years ago

TsaiYunLin commented 4 years ago

Hi, I read the paper "Estimating the Support of a High-Dimensional Distribution" about one-class-svm which provided on the webpage.

I noticed that the dual variables have a constraint that ∑_i α_i =1.

But when I tried to use and call clf._dualcoef (interface implemented by sklearn which directed to dual variables of libsvm), I found that the sum of the dual variables would not be 1.

Did I miss any detail about it?

Thanks

cjlin1 commented 4 years ago

libsvm scales the dual problem of one-class svm. See eq 8 of https://www.csie.ntu.edu.tw/~cjlin/papers/libsvm.pdf

On 2019-12-11 23:33, KevinTsai wrote:

Hi, I read the paper "Estimating the Support of a High-Dimensional Distribution" about one-class-svm which provided on the webpage.

I noticed that the dual variables have a constraint that ∑_i α_i =1.

But when I tried to use and call clf._dualcoef (INTERFACE IMPLEMENTED BY SKLEARN WHICH DIRECTED TO DUAL VARIABLES OF LIBSVM), I found that the sum of the dual variables would not be 1.

Did I miss any detail about it?

Thanks

-- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/cjlin1/libsvm/issues/157?email_source=notifications\u0026email_token=ABI3BHS6TXRWZNL5SARQWKDQYHSM7A5CNFSM4JZ2GZWKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H77AJFQ", "url": "https://github.com/cjlin1/libsvm/issues/157?email_source=notifications\u0026email_token=ABI3BHS6TXRWZNL5SARQWKDQYHSM7A5CNFSM4JZ2GZWKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H77AJFQ", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Links:

[1] https://github.com/cjlin1/libsvm/issues/157?email_source=notifications&email_token=ABI3BHS6TXRWZNL5SARQWKDQYHSM7A5CNFSM4JZ2GZWKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H77AJFQ [2] https://github.com/notifications/unsubscribe-auth/ABI3BHR5KLBWIPDSQNJ7IC3QYHSM7ANCNFSM4JZ2GZWA

TsaiYunLin commented 4 years ago

Thank you so much.