4
$\begingroup$

I'm looking for a Python package for a LS-SVM or a way to tune a normal SVM from scikit-learn to a Least-Squares Support Vector Machine for a classification problem.

The goal of a SVM is to maximize the margin while softly penalizing points that lie on the wrong side of the margin boundary. The function that is used is a Quadratic Programming (OP) problem.

A LS-SVM which defines a least squares cost function and replaces the inequality contraints with equality constraints and is a Linear Programming (LP) problem.

Wikipedia: LS-VSM

Does someone ever tried something like that and can help me?

$\endgroup$
  • $\begingroup$ I've implemented a version using numpy an scipy, it can be found on this jupyter notebook in one of my Github repos: github.com/RomuloDrumond/LSSVM/blob/master/LSSVM.ipynb $\endgroup$ – Rômulo Drumond Jul 26 '19 at 2:58
  • $\begingroup$ I am adding an answer as I do not have the reputation to comment. @Hans, I am wondering whether you ever managed to find an implementation of an LS-SVM regressor in Python? It does not appear that FukuML has what you (and I) are looking for. $\endgroup$ – Geodatsci Jan 7 at 10:10
  • $\begingroup$ but how to call this algorithms? $\endgroup$ – Amar Jindal Jan 17 at 5:24
3
$\begingroup$

There is a package called FukuML.

In their description (Version 0.4.1) they write:

  • Support Vector Machine
    • Primal Hard Margin Support Vector Machine Binary Classification Learning Algorithm
    • Dual Hard Margin Support Vector Machine Binary Classification Learning Algorithm
    • Polynomial Kernel Support Vector Machine Binary Classification Learning Algorithm
    • Gaussian Kernel Support Vector Machine Binary Classification Learning Algorithm
    • Soft Polynomial Kernel Support Vector Machine Binary Classification Learning Algorithm
    • Soft Gaussian Kernel Support Vector Machine Binary Classification Learning Algorithm
    • Polynomial Kernel Support Vector Machine Multi Classification Learning Algorithm
    • Gaussian Kernel Support Vector Machine Multi Classification Learning Algorithm
    • Soft Polynomial Kernel Support Vector Machine Multi Classification Learning Algorithm
    • Soft Gaussian Kernel Support Vector Machine Multi Classification Learning Algorithm
    • Probabilistic Support Vector Machine Learning Algorithm
    • Least Squares Support Vector Machine Binary Classification Learning Algorithm
    • Least Squares Support Vector Machine Multi Classification Learning Algorithm
    • Support Vector Regression Learning Algorithm

As you can see, they have the feature you're after.

enter image description here

| improve this answer | |
$\endgroup$
  • $\begingroup$ But does it have a least squares support vector machine regression algorithm? $\endgroup$ – Hans Dec 7 '18 at 22:22
  • $\begingroup$ Yes, it does. Look at the last item in the list. $\endgroup$ – Royi Jun 26 '19 at 9:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.