Struct rusty_machine::learning::svm::SVM
[−]
[src]
pub struct SVM<K: Kernel> { pub optim_iters: usize, // some fields omitted }
Support Vector Machine
Fields
optim_iters: usize
Number of iterations for training.
Methods
impl<K: Kernel> SVM<K>
[src]
fn new(ker: K, lambda: f64) -> SVM<K>
Constructs an untrained SVM with specified kernel and lambda which determins the hardness of the margin.
Examples
use rusty_machine::learning::svm::SVM; use rusty_machine::learning::toolkit::kernel::SquaredExp; let _ = SVM::new(SquaredExp::default(), 0.3);
Trait Implementations
impl<K: Debug + Kernel> Debug for SVM<K>
[src]
impl Default for SVM<SquaredExp>
[src]
The default Support Vector Machine.
The defaults are:
ker
=SquaredExp::default()
lambda
=0.3
optim_iters
=100
fn default() -> SVM<SquaredExp>
Returns the "default value" for a type. Read more
impl<K: Kernel> SupModel<Matrix<f64>, Vector<f64>> for SVM<K>
[src]
Train the model using the Pegasos algorithm and predict the model output from new data.