[][src]Struct liblinear::ParameterBuilder

pub struct ParameterBuilder { /* fields omitted */ }

Builder for LibLinearParameter.

Methods

impl ParameterBuilder[src]

pub fn solver_type(&mut self, solver_type: SolverType) -> &mut Self[src]

Set solver type.

Default: L2R_LR

pub fn stopping_criterion(&mut self, epsilon: f64) -> &mut Self[src]

Set tolerance of termination criterion.

Default: 0.01

pub fn constraints_violation_cost(&mut self, cost: f64) -> &mut Self[src]

Set cost of constraints violation.

Default: 1.0

pub fn regression_loss_sensitivity(&mut self, p: f64) -> &mut Self[src]

Set tolerance margin in regression loss function of SVR. Not used for classification problems.

Default: 0.1

pub fn cost_penalty_weights(
    &mut self,
    cost_penalty_weights: Vec<f64>
) -> &mut Self
[src]

Set weights to adjust the cost of constraints violation for specific classes.

Useful when training classifiers on unbalanced input data or with asymmetric mis-classification cost.

pub fn cost_penalty_labels(
    &mut self,
    cost_penalty_labels: Vec<i32>
) -> &mut Self
[src]

Set classes that correspond to the weights used to adjust the cost of constraints violation.

Each weight corresponds to a label at the same index.

pub fn initial_solutions(&mut self, init_solutions: Vec<f64>) -> &mut Self[src]

Set initial solution specification for solvers L2R_LR and/or L2R_L2LOSSES_SVC.

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]