Struct tangram_linear::TrainOptions[][src]

pub struct TrainOptions {
    pub compute_losses: bool,
    pub early_stopping_options: Option<EarlyStoppingOptions>,
    pub l2_regularization: f32,
    pub learning_rate: f32,
    pub max_epochs: usize,
    pub n_examples_per_batch: usize,
}
Expand description

These are the options passed to Regressor::train, BinaryClassifier::train, and MulticlassClassifier::train.

Fields

compute_losses: bool

If true, the model will include the loss on the training data after each epoch.

early_stopping_options: Option<EarlyStoppingOptions>

Specify options for early stopping. If the value is Some, early stopping will be enabled. If it is None, early stopping will be disabled.

l2_regularization: f32

This is the L2 regularization value to use when updating the model parameters.

learning_rate: f32

This is the learning rate to use when updating the model parameters.

max_epochs: usize

This is the maximum number of epochs to train.

n_examples_per_batch: usize

This is the number of examples to use for each batch of training.

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

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

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.