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.

Set the Nu value for classification

The Nu value should lie in range [0, 1] and sets the relation between support vectors and solution performance.

Set the C value for regression

Set the Nu-Eps value for regression

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The checked hyperparameters

Error type resulting from failed hyperparameter checking

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.