pub fn update(&mut self, value: f32) -> bool {
		let stopping_metric = value;
		let result = if let Some(previous_stopping_metric) = self.previous_stopping_metric {
			if stopping_metric > previous_stopping_metric
				|| f32::abs(stopping_metric - previous_stopping_metric) < self.tolerance
			{
				self.num_rounds_no_improve += 1;
				self.num_rounds_no_improve >= self.max_rounds_no_improve
			} else {
				self.num_rounds_no_improve = 0;
				false
			}
		} else {
			false
		};
		self.previous_stopping_metric = Some(stopping_metric);
		result
	}
/// Update with the next epoch's task metrics. Returns true if training should stop.
Update with the next epoch's task metrics. Returns true if training should stop.
Update with the next epoch ' s task metrics . Returns true if training should stop .
pub fn update(&mut self, value: f32) -> bool {
		let stopping_metric = value;
		let result = if let Some(previous_stopping_metric) = self.previous_stopping_metric {
			if stopping_metric > previous_stopping_metric
				|| f32::abs(stopping_metric - previous_stopping_metric) < self.tolerance
			{
				self.num_rounds_no_improve += 1;
				self.num_rounds_no_improve >= self.max_rounds_no_improve
			} else {
				self.num_rounds_no_improve = 0;
				false
			}
		} else {
			false
		};
		self.previous_stopping_metric = Some(stopping_metric);
		result
	}
pub fn update ( & mut self , value : f32 ) -> bool { let stopping_metric = value ; let result = if let Some ( previous_stopping_metric ) = self . previous_stopping_metric { if stopping_metric > previous_stopping_metric || f32 :: abs ( stopping_metric - previous_stopping_metric ) < self . tolerance { self . num_rounds_no_improve += 1 ; self . num_rounds_no_improve >= self . max_rounds_no_improve } else { self . num_rounds_no_improve = 0 ; false } } else { false } ; self . previous_stopping_metric = Some ( stopping_metric ) ; result }
Update with the next epoch's task metrics.
Update with the next epoch ' s task metrics .
&mut self
value
f32