9 releases (5 breaking)

0.7.0 Oct 16, 2023
0.6.1 Dec 3, 2022
0.6.0 Jun 15, 2022
0.5.1 Mar 1, 2022
0.2.1 Nov 29, 2020

#776 in Machine learning

Download history 16/week @ 2024-03-11 16/week @ 2024-03-18 3/week @ 2024-03-25 51/week @ 2024-04-01 9/week @ 2024-04-08 7/week @ 2024-04-22 8/week @ 2024-04-29 2/week @ 2024-05-06 21/week @ 2024-05-20 1/week @ 2024-05-27 9/week @ 2024-06-03 1/week @ 2024-06-10 32/week @ 2024-06-17 11/week @ 2024-06-24

53 downloads per month

MIT/Apache

340KB
6.5K SLoC

Support Vector Machines

linfa-svm provides a pure Rust implementation for support vector machines.

The Big Picture

linfa-svm is a crate in the linfa ecosystem, an effort to create a toolkit for classical Machine Learning implemented in pure Rust, akin to Python's scikit-learn.

Support Vector Machines are one major branch of machine learning models and offer classification or regression analysis of labeled datasets. They seek a discriminant, which seperates the data in an optimal way, e.g. have the fewest numbers of miss-classifications and maximizes the margin between positive and negative classes. A support vector contributes to the discriminant and is therefore important for the classification/regression task. The balance between the number of support vectors and model performance can be controlled with hyperparameters.

Current State

linfa-svm currently provides an implementation of SVM with Sequential Minimal Optimization:

  • Support Vector Classification with C/Nu/one-class
  • Support Vector Regression with Epsilon/Nu

Examples

There is an usage example in the examples/ directory. To run, use:

$ cargo run --release --example winequality

License

Dual-licensed to be compatible with the Rust project.

Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.

Dependencies

~5.5MB
~108K SLoC