class

Logarithm::AdvancedEarlyStopping

Inherits Logarithm::EarlyStopping < Reference < Object

Advanced early stopping with multiple criteria.

This class extends basic early stopping with additional stopping criteria such as maximum training time, minimum improvement rate, and plateau detection.

Constructors

new(patience : Int32 = 10, min_delta : Float64 = 0.0, restore_best_weights : Bool = false, max_time : Time::Span | Nil = nil, min_improvement_rate : Float64 | Nil = nil, plateau_threshold : Float64 | Nil = nil)
Source

Instance methods

advanced_stats

Calculate training statistics including time and improvement metrics.

Source
loss_history

Get loss history for analysis.

Source
max_time
Source
min_improvement_rate
Source
plateau_threshold
Source
reset

Reset the advanced early stopping state.

Source
should_stop?(current_loss : Float64, current_weights : String | Nil = nil) : Bool

Enhanced stopping check with multiple criteria.

Source