ncrf.NCRFFit

class ncrf.NCRFFit(model, *, solver, solver_fit, scores, voxelwise_explained_variance, cv_results, execution_context)

Report produced by NCRFEstimator.fit().

Bundles the fitted NCRF with the training-set evaluation and the fitting provenance. Model-level predictive quantities live on model; solver-specific state lives on solver_fit.

model

The fitted NCRF with TRF reconstruction, prediction, and evaluation methods.

solver

Immutable solver configuration used for the fit.

solver_fit

Solver-specific fitted state and iteration history (for ChampLasso, solver_fit.history).

scores

Scores of the fitted model on the training data, keyed by name. All of them are computed in whitened sensor space and merge two sources:

  • The solver-independent model metrics from NCRF.evaluate(), explained_variance and l2_error, which compare the model’s predictions with the observed sensor data.

  • Solver-specific scores from the score method of the solver’s fit class, typically the solver’s own objective, which can depend on fitted state beyond the TRF. For ChampLasso these are cross_fit and weighted_l2_error; ChampLassoFit.score() defines them.

Because they are computed on the data the model was fitted to, these scores describe the goodness of fit rather than predictive performance. The same scores computed on held-out data are in CVResult, and NCRF.evaluate() scores the model metrics on an arbitrary dataset.

voxelwise_explained_variance

Source-wise contributions to explained variance on the training data (None unless requested at fit time).

execution_context

When, how long and in which environment the model was fitted (see NCRFExecutionContext).

Notes

Cross-validation scores are retained when the solver’s search cross-validates, and are summarized by cv_info(). The configuration the search settled on is solver itself (for ChampLasso, solver.mu).

Methods

cv_info()

Summarize stored cross-validation scores in a table.