Metrics
Radiate provides a number of built-in metrics that can be used to evaluate the performance of the GeneticEngine
. These metrics can be used to
monitor the progress of the engine, compare different runs, and tune hyperparameters. Radiate defines a metric as:
#[derive(Clone, PartialEq)]
pub enum Metric {
Value(&'static str, Statistic),
Time(&'static str, TimeStatistic),
Distribution(&'static str, Distribution),
Operations(&'static str, Statistic, TimeStatistic),
}
Value
- Represents a single value metric with a name and aStatistic
.Time
- Represents a time metric with a name and aTimeStatistic
.Distribution
- Represents a distribution metric with a name and aDistribution
.Operations
- Represents a metric that combines aStatistic
and aTimeStatistic
where theStatistic
represents the number of operations performed and theTimeStatistic
represents the time taken to perform those operations.
Statistic
The Statistic
exposes a number of different statistical measures that can be used to summarize the data, such as, last_value
, count
, min
, max
, mean
, sum
, variance
, std_dev
, skewness
, and kurtosis
.
TimeStatistic
Similarly, the TimeStatistic
exposes the same measures, however the data is assumed to be time-based. As such, the results are expressed as a Duration::from_secs_f32(value)
.
Distribution
The Distribution
metric is used to represent a distribution of values. The distribution is stored as a Vec<f32>
and produces the same statistical measures as the Statistic
and TimeStatistic
with the exception of last_value
which is changed to last_sequence
.
Example
Just as a quick demo, here is the output of the GeneticEngine
's MetricSet
from the simple_nn example in the radiate-examples in the gh repo.