xnn.common.benchmark.metrics#
Error metrics for benchmarking, plus prediction collection.
A name -> callable registry mirrors the model registry (see
models.registry) so new metrics are added without touching the core, and
user-defined metrics register the same way. The built-in metrics are MAE, MSE
and RMSE; each takes two flat tensors (pred, target) and returns a Python
float.
collect_predictions() runs a model over a data loader once and returns
the paired prediction/target tensors for each requested target quantity
(energy / forces / stress), which score() then reduces with
the selected metrics. Energy is scored per atom – the same size-extensive
normalization the training loss uses (see train.losses.weighted_loss).
Functions
List the names of all currently registered metrics. |
|
|
Run |
|
Look up a registered metric by name. |
|
Import a |
|
Mean absolute error, |
|
Mean squared error, |
|
Return a decorator registering an error metric under |
|
Root mean squared error, |
|
Reduce prediction/target pairs to a flat |