All Projects → ralfbiedert → ffsvm-rust

ralfbiedert / ffsvm-rust

Licence: MIT license
FFSVM stands for "Really Fast Support Vector Machine"

Programming Languages

rust
11053 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ffsvm-rust

LIBSVM.jl
LIBSVM bindings for Julia
Stars: ✭ 74 (+48%)
Mutual labels:  libsvm
customer churn prediction
零售电商客户流失模型,基于tensorflow,xgboost4j-spark,spark-ml实现LR,FM,GBDT,RF,进行模型效果对比,离线/在线部署方式总结
Stars: ✭ 58 (+16%)
Mutual labels:  libsvm
Tensorflow template application
TensorFlow template application for deep learning
Stars: ✭ 1,851 (+3602%)
Mutual labels:  libsvm
No-Reference-Image-Quality-Assessment-using-BRISQUE-Model
Implementation of the paper "No Reference Image Quality Assessment in the Spatial Domain" by A Mittal et al. in OpenCV (using both C++ and Python)
Stars: ✭ 137 (+174%)
Mutual labels:  libsvm
EasySparse
Sparse learning in TensorFlow using data acquired from Spark.
Stars: ✭ 21 (-58%)
Mutual labels:  libsvm
identification-code
基于LibSVM实现的验证码识别,通过对验证码图片进行二值化、去噪、切割等处理后,对每个字符进行识别。识别过程采用LibSVM来实现。可用于识别网站登录的验证码。
Stars: ✭ 35 (-30%)
Mutual labels:  libsvm

Latest Version Travis-CI Status deps.svg docs MIT

L4L - I am an SVM library who, after a recent breakup, is looking for a fresh start. You should be a packed SIMD library, have 8-16 lanes, and be open-minded about the platforms you support. Stable relationships only. You can contact me here (June 2022).

In One Sentence

You trained a SVM using libSVM, now you want the highest possible performance during (real-time) classification, like games or VR.

Highlights

  • loads almost all libSVM types (C-SVC, ν-SVC, ε-SVR, ν-SVR) and kernels (linear, poly, RBF and sigmoid)
  • produces practically same classification results as libSVM
  • optimized for SIMD and can be mixed seamlessly with Rayon
  • written in 100% Rust
  • allocation-free during classification for dense SVMs
  • 2.5x - 14x faster than libSVM for dense SVMs
  • extremely low classification times for small models (e.g., 128 SV, 16 dense attributes, linear ~ 500ns)
  • successfully used in Unity and VR projects (Windows & Android)

Note: Currently requires Rust nightly (March 2019 and later), because we depend on RFC 2366 (portable SIMD). Once that stabilizes we'll also go stable.

Usage

Train with libSVM (e.g., using the tool svm-train), then classify with ffsvm-rust.

From Rust:

// Replace `SAMPLE_MODEL` with a `&str` to your model.
let svm = DenseSVM::try_from(SAMPLE_MODEL)?;

let mut problem = Problem::from(&svm);
let features = problem.features();

features[0] = 0.55838;
features[1] = -0.157895;
features[2] = 0.581292;
features[3] = -0.221184;

svm.predict_value(&mut problem)?;

assert_eq!(problem.solution(), Solution::Label(42));

Status

  • June 7, 2019: Gave up on 'no unsafe', but gained runtime SIMD selection.
  • March 10, 2019: As soon as we can move away from nightly we'll go beta.
  • Aug 5, 2018: Still in alpha, but finally on crates.io.
  • May 27, 2018: We're in alpha. Successfully used internally on Windows, Mac, Android and Linux on various machines and devices. Once SIMD stabilizes and we can cross-compile to WASM we'll move to beta.
  • December 16, 2017: We're in pre-alpha. It will probably not even work on your machine.

Performance

performance

Classification time vs. libSVM for dense models.

performance

Performance milestones during development.

All performance numbers reported for the DenseSVM. We also have support for SparseSVMs, which are slower for "mostly dense" models, and faster for "mostly sparse" models (and generally on the performance level of libSVM).

See here for details.

Tips

  • For an x-fold performance increase, create a number of Problem structures, and process them with Rayon's par_iter.

FAQ

See here for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].