ncrf.NCRFEstimator¶
- class ncrf.NCRFEstimator(lead_field=None, noise_covariance=None, noise_channels=None)¶
Estimator for neuro-current response functions (NCRFs).
Construct with
from_lead_field()from a lead field and noise covariance, then callfit()with aRegressionDatainstance to obtain anNCRFFit.The estimator stores its inputs in full; the whitened
ForwardModelis derived byfit()for exactly the channels of the data being fit, since whitening is not separable per channel.- Parameters:
lead_field (eelbrain._data_obj.NDVar | None) – Full forward solution with
sensorandsourcedimensions and an optionalspacedimension for free orientation.noise_covariance (numpy._typing._array_like.NDArray[numpy.float64] | None) – Sensor-space noise covariance for
noise_channels, in their order.noise_channels (collections.abc.Sequence[str] | None) – Channel names of
noise_covariance, in its order: a subset of the lead field’s channels. Alignment to the data’s channels happens by name when the forward model is derived.
Notes
Use
RegressionData.from_data()to prepare the M/EEG and predictor segments, initialize this estimator with the matching forward inputs, and callfit()with a configuredSolver. The returnedNCRFFitkeeps the reusable model separate from solver-specific fitted state.Derived forward models are cached by channel set, so repeated fits to data with the same channels share one. The estimator’s inputs are treated as immutable; replace the estimator rather than modifying them.
Methods
|
Fit a configured solver to a regression dataset. |
|
Construct from a lead-field |
Attributes