Skip to main content

Crate libsvm_rs

Crate libsvm_rs 

Source
Expand description

§libsvm-rs

A pure Rust reimplementation of LIBSVM, targeting numerical equivalence and model-file compatibility with the original C++ library.

§Status

Phases 0–4 complete: types, I/O, kernels, cache, prediction, full SMO solver, probability estimates (Platt scaling), and cross-validation. Training works for all 5 SVM types (C-SVC, ν-SVC, one-class, ε-SVR, ν-SVR). See train::svm_train for training, predict::predict for inference, and predict::predict_probability for probabilistic outputs.

§Feature Flags

  • rayon — Enable parallel cross-validation (off by default).

Re-exports§

pub use error::SvmError;
pub use types::*;

Modules§

cache
LRU kernel cache matching the original LIBSVM.
cross_validation
Cross-validation for SVM models.
error
io
I/O routines for LIBSVM problem and model files.
kernel
Kernel functions matching the original LIBSVM.
predict
Prediction functions matching the original LIBSVM.
probability
Probability estimation functions for SVM models.
qmatrix
Q matrix implementations for the SMO solver.
solver
SMO solver for the SVM dual problem.
train
SVM training pipeline.
types

Functions§

set_quiet
Enable or disable quiet mode. When quiet, solver diagnostic messages are suppressed (equivalent to LIBSVM’s -q flag).