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 the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for TrainOptions
impl Send for TrainOptions
impl Sync for TrainOptions
impl Unpin for TrainOptions
impl UnwindSafe for TrainOptions
Blanket Implementations
Mutably borrows from an owned value. Read more