pub struct SVM<K: Kernel> {
    pub optim_iters: usize,
    /* private fields */
}
Expand description

Support Vector Machine

Fields

optim_iters: usize

Number of iterations for training.

Implementations

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

Formats the value using the given formatter. Read more

The default Support Vector Machine.

The defaults are:

  • ker = SquaredExp::default()
  • lambda = 0.3
  • optim_iters = 100
Returns the “default value” for a type. Read more

Train the model using the Pegasos algorithm and predict the model output from new data.

Predict output from inputs.
Train the model using inputs and targets.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.