shapeworks::EarlyStoppingConfig
Configuration for early stopping criteria.
#include <EarlyStoppingConfig.h>
Public Attributes
| Name | |
|---|---|
| bool | enabled |
| int | frequency how often (in iterations) to check the stopping criterion |
| int | window_size number of past values to consider in relative difference or EMA |
| double | threshold |
| EarlyStoppingStrategy | strategy strategy used for determining early stopping. |
| double | ema_alpha higher value of alpha give more weight to recent iterations |
| bool | enable_logging |
| std::string | logger_name |
| int | warmup_iters to prevent premature stoppin |
Public Attributes Documentation
variable enabled
cpp
bool enabled = false;
variable frequency
cpp
int frequency = 100;
how often (in iterations) to check the stopping criterion
variable window_size
cpp
int window_size = 5;
number of past values to consider in relative difference or EMA
variable threshold
cpp
double threshold = 0.0001;
Threshold for stopping: For RelativeDifference: use ~1e-4 or smaller. For EMA: use ~1e-1 or smaller.
variable strategy
cpp
EarlyStoppingStrategy strategy = EarlyStoppingStrategy::RelativeDifference;
strategy used for determining early stopping.
variable ema_alpha
cpp
double ema_alpha = 0.2;
higher value of alpha give more weight to recent iterations
variable enable_logging
cpp
bool enable_logging = false;
variable logger_name
cpp
std::string logger_name = "early_stopping_log_stats";
variable warmup_iters
cpp
int warmup_iters = 1000;
to prevent premature stoppin
Updated on 2026-03-31 at 16:02:10 +0000