brainmass.FitResult#
- class brainmass.FitResult(*, backend, best_loss, best_params, history, n_steps, prediction=None, optimizer=None, raw=None, model=None)#
Outcome of a
Fitter.fit()call.- backend#
The optimizer backend that produced this result (
'grad'/'nevergrad'/'scipy').- Type:
- best_params#
{name: value}of the trainable parameters at the best-seen point, in the constrained (physical) space (i.e.Param.value()).- Type:
- history#
Per-iteration loss. For
gradthis is one entry per optimization step; forscipyit is the best loss per restart; fornevergradit is the loss of every evaluated candidate.
- n_steps#
Number of optimization iterations actually run (may be less than the requested
n_stepsif a callback requested early stopping).- Type:
- prediction#
The model prediction at the best-seen point (objective path), else
None.- Type:
Any or None
- optimizer#
The underlying
braintools.optimoptimizer object.- Type:
Any
- raw#
Backend-specific raw result (a SciPy
OptimizeResultforscipy, the best-parameter mapping fornevergrad,Noneforgrad).- Type:
Any
- model#
The fitted model, holding the best-seen parameters.
- Type:
brainstate.nn.Module
- __init__(*, backend, best_loss, best_params, history, n_steps, prediction=None, optimizer=None, raw=None, model=None)[source]#
Methods
__init__(*, backend, best_loss, best_params, ...)