File Exchange

image thumbnail

Sequential Minimal Optimization (SMO) for SVM

version 1.0.2 (4.81 KB) by Ivan Tinjaca
SVM_SMO Create SVM model with SMO solver and different Kernels (linear, rbf, polynomial, sigmoid)

7 Downloads

Updated 20 Aug 2020

View Version History

View License

Run the example in file svm_test.m
SVM_SMO Create SVM model with SMO solver
matrix x(mxn) contains the training set for m tests and n features
with the corresponding labels vector y(mx1). The SMO solver user the
constants C, tol(tolerance and eps (epsilon). The choice of the kernel
is defined in type ('l' for linear, 'r for rbf, 'p' for polynomial and
's' forsigmoid). Depending on the choice of kernel the additionnal
parameter will be used (gamma, offset and power).
The training result will be given as the alpha coefficients and the b
threshold.
LF_SVM_SMO Predict labels from SVM model with SMO solver
matrix xp(mpxn) contains the testing set for n features
and mp tests. The SVM model consists of the alpha
coefficients, the b threshold, the training set matrix x(mxn)and
labels vector y(mx1). The choice of the kernel is defined in
type ('l' for linear, 'r for rbf, 'p' for polynomial and 's' for
sigmoid). Depending on the choice of kernel the additionnal parameter
will be used (gamma, offset and power).
The prediction result will be given as the labels

Implementation from: Platt, John. "Sequential minimal optimization:
A fast algorithm for training support vector machines." (1998).

Cite As

Ivan Tinjaca (2020). Sequential Minimal Optimization (SMO) for SVM (https://www.mathworks.com/matlabcentral/fileexchange/79337-sequential-minimal-optimization-smo-for-svm), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Dear Ivan, your solution works with 2-class outputs (+1 and -1 in y_predicted). Please, specify that on top. Ty.

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!