ffsvm 0.4.0

A libSVM compatible support vector machine, but 10x faster, for real-time classification, like games or VR.
docs.rs failed to build ffsvm-0.4.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: ffsvm-0.9.1

:ext-relative: {outfilesuffix}

image:https://travis-ci.org/ralfbiedert/ffsvm-rust.svg?branch=master["Build Status", link="https://travis-ci.org/ralfbiedert/ffsvm-rust"] image:https://img.shields.io/badge/license-MIT-blue.svg["License", link="LICENSE"]

= In One Sentence

You trained a binary non-sparse RBF-C-SVM using https://github.com/cjlin1/libsvm[libSVM], now you want the highest possible performance during (real-time) classification, like games or VR.

= Highlights

= Principal Usage

Train with https://github.com/cjlin1/libsvm[libSVM] (e.g., using the tool svm-train), then classify with ffsvm-rust.

From Rust:

[source,rust]

// Get your libSVM model string from wherever and parse it. let model_str: &str = include_str!("model.libsvm"); let model = ModelFile::try_from(model_str).unwrap();

// Produce actual SVM from raw model, and a problem let csvm = RbfCSVM::try_from(&model).unwrap(); let mut problem = Problem::from(&csvm);

// Set the features of this problem we want to classify. problem.features = vec![ 0.3093766, 0.0, 0.0, 0.0, 0.0, 0.1764706, 0.1137485 ];

// (We also have methods to classify multiple in parallel w. Rayon ...) csvm.predict_value(&mut problem);

// Results should match libSVM assert_eq!(0, problem.label);

From C / FFI:

Please see https://github.com/ralfbiedert/ffsvm-rust[FFSVM-FFI]

= Status

  • 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

image::docs/performance_relative.v3.png[]

Classification time vs. libSVM.

image::docs/performance_history.v3.png[]

Performance milestones during development.

link:docs/performance{ext-relative}[See here for details.]

= FAQ

link:docs/FAQ{ext-relative}[See here for details.]