ncrf.ChampLassoFit

class ncrf.ChampLassoFit(theta, history, gamma, sigma_b)

Fitted state produced by ChampLasso.

Parameters:
  • theta (numpy._typing._array_like.NDArray[numpy.float64]) – Coefficients of the TRFs over the Gaussian basis atoms, shape (n_sources, n_coefficients) with one column per basis atom and stimulus channel (see TRFDesign.n_coefficients). This is not the response function itself: the covariates were projected onto the basis before fitting, so the TRF is recovered by multiplying the coefficients with the basis. Use ncrf.NCRF.h (or ncrf.NCRF.h_scaled for original stimulus units) to get the expanded response functions.

  • history (ncrf._solvers.champ_lasso.ChampLassoHistory) – Per-iteration record of the quantities selected with ChampLasso(store=...).

  • gamma (list[numpy._typing._array_like.NDArray[numpy.float64]]) – Per-segment source covariance estimates, each an array of shape (n_sources, dc, dc) holding the covariance of every source’s orientation components (dc is 1 for fixed orientation).

  • sigma_b (list[numpy._typing._array_like.NDArray[numpy.float64]]) – Per-segment estimates of the sensor covariance of the whitened data under the model, i.e. the whitened noise covariance plus the lead field projection of gamma. These weight the residual in score().

Methods

score(forward, data)

ChampLasso's likelihood objective on whitened data, and its residual term.

Attributes

history

gamma

sigma_b

theta