metrics
metrics
¶
Metrics and analysis utilities for continual learning experiments.
Provides functions for computing tracking error, learning curves, and other metrics useful for evaluating continual learners.
compute_cumulative_error(metrics_history, error_key='squared_error')
¶
Compute cumulative error over time.
Args: metrics_history: List of metric dictionaries from learning loop error_key: Key to extract error values
Returns: Array of cumulative errors at each time step
Source code in src/alberta_framework/utils/metrics.py
compute_running_mean(values, window_size=100)
¶
Compute running mean of values.
Args: values: Array of values window_size: Size of the moving average window
Returns: Array of running mean values (same length as input, padded at start)
Source code in src/alberta_framework/utils/metrics.py
compute_tracking_error(metrics_history, window_size=100)
¶
Compute tracking error (running mean of squared error).
This is the key metric for evaluating continual learners: how well can the learner track the non-stationary target?
Args: metrics_history: List of metric dictionaries from learning loop window_size: Size of the moving average window
Returns: Array of tracking errors at each time step
Source code in src/alberta_framework/utils/metrics.py
extract_metric(metrics_history, key)
¶
Extract a single metric from the history.
Args: metrics_history: List of metric dictionaries key: Key to extract
Returns: Array of values for that metric
Source code in src/alberta_framework/utils/metrics.py
compare_learners(results, metric='squared_error')
¶
Compare multiple learners on a given metric.
Args: results: Dictionary mapping learner name to metrics history metric: Metric to compare
Returns: Dictionary with summary statistics for each learner