Struct linfa_svm::hyperparams::SvmParams [−][src]
pub struct SvmParams<F: Float, T>(_);
Implementations
Create hyper parameter set
This creates a SvmParams
and sets it to the default values:
- C values of (1, 1)
- Eps of 1e-7
- No shrinking
- Linear kernel
Set stopping condition
This parameter controls the stopping condition. It checks whether the sum of gradients of the max violating pair is below this threshold and then stops the optimization proces.
Shrink active variable set
This parameter controls whether the active variable set is shrinked or not. This can speed up the optimization process, but may degredade the solution performance.
Set the kernel to use for training
This parameter specifies a mapping of input records to a new feature space by means
of the distance function between any couple of points mapped to such new space.
The SVM then applies a linear separation in the new feature space that may result in
a non linear partitioning of the original input space, thus increasing the expressiveness of
this model. To use the “base” SVM model it suffices to choose a Linear
kernel.
Set the platt params for probability calibration
Sets the model to use the Gaussian kernel. For this kernel the
distance between two points is computed as: d(x, x') = exp(-norm(x - x')/eps)
Sets the model to use the Polynomial kernel. For this kernel the
distance between two points is computed as: d(x, x') = (<x, x'> + costant)^(degree)
Sets the model to use the Linear kernel. For this kernel the
distance between two points is computed as : d(x, x') = <x, x'>
Set the C value for positive and negative samples.
Trait Implementations
type Checked = SvmValidParams<F, L>
type Checked = SvmValidParams<F, L>
The checked hyperparameters
Checks the hyperparameters and returns a reference to the checked hyperparameters if successful Read more
Checks the hyperparameters and returns the checked hyperparameters if successful
Calls check()
and unwraps the result