pub struct Svm<F: Float, T> {
    pub alpha: Vec<F>,
    pub rho: F,
    /* private fields */
}
Expand description

Fitted Support Vector Machines model

This is the result of the SMO optimizer and contains the support vectors, quality of solution and optionally the linear hyperplane.

Fields

alpha: Vec<F>rho: F

Implementations

Returns the number of support vectors

This function returns the number of support vectors which have an influence on the decision outcome greater than zero.

Sums the inner product of sample and every one of the support vectors.

Parameters
  • sample: the input sample
Returns

The sum of all inner products of sample and every one of the support vectors, scaled by their weight.

Panics

If the shape of sample is not compatible with the shape of the support vectors

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

Display solution

In order to understand the solution of the SMO solver the objective, number of iterations and required support vectors are printed here.

Formats the value using the given formatter. Read more

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

This method tests for !=.

Predict a probability with a feature vector

Predict a probability with a feature vector

Predict a probability with a feature vector

Predict a probability with a feature vector

Predict a probability with a feature vector

Predict a probability with a feature vector

Predict a probability with a feature vector Classify observations

This function takes a number of features and predicts target probabilities that they belong to the positive class.

Predict something in place

Create targets that predict_inplace works with.

Classify observations

This function takes a number of features and predicts target probabilities that they belong to the positive class.

Predict something in place

Create targets that predict_inplace works with.

Classify observations

This function takes a number of features and predicts target probabilities that they belong to the positive class.

Predict something in place

Create targets that predict_inplace works with.

Classify observations

This function takes a number of features and predicts target probabilities that they belong to the positive class.

Predict something in place

Create targets that predict_inplace works with.

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

Converts the given value to a String. 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.