ncrf.TRFDesign¶
- class ncrf.TRFDesign(basis, tstart, tstep, tstop, basis_std, stim_is_single, stim_dims, stim_names, basis_stride=None, stim_baseline=None, stim_scaling=None, scale=None)¶
Stimulus and basis metadata defining the coefficient space.
Use
from_stim()to derive a design from predictor NDVars.- Parameters:
basis (list[numpy._typing._array_like.NDArray[numpy.float64]]) – Gaussian basis matrices, one per predictor variable.
basis[i]is shape(n_lags, n_atoms): each column is a Gaussian bump centered on a distinct lag.tstart – TRF timing;
tstart/tstophold one value per predictor.tstep – TRF timing;
tstart/tstophold one value per predictor.tstop – TRF timing;
tstart/tstophold one value per predictor.basis_std (float) – Standard deviation of the Gaussian basis functions in seconds.
stim_is_single (bool) – Whether the original stimulus input was a single predictor per segment; controls whether reconstruction returns a bare NDVar or a list.
stim_dims (list[eelbrain._data_obj.Categorial | eelbrain._data_obj.Scalar | eelbrain._data_obj.Space | None]) – Feature dimension for each predictor (
Nonefor scalar predictors).basis_stride (int | None) – Spacing between neighboring basis atoms in samples, as passed to
from_stim().Nonewhen the design was constructed directly with a custombasis, since no single stride describes it then.stim_baseline – Centering and scaling of the covariates, one value per expanded covariate channel, or
Nonewhen that step is not applied.stim_scaling – Centering and scaling of the covariates, one value per expanded covariate channel, or
Nonewhen that step is not applied.scale (Literal['l1', 'l2', 'spectral'] | None) – Which scaling produced
stim_scaling('l1','l2'or'spectral'), orNonewhen the covariates were left unscaled.
Methods
|
Check that |
|
Check that |
|
Expand one value per covariate channel to one value per covariate column. |
|
Derive the design from the predictors of one segment. |
|
Split one value per covariate channel into one item per predictor. |
Attributes
Sum of each covariate column's basis function, one value per column. |
|
Number of basis functions of each expanded covariate channel. |
|
TRF length in samples, one value per predictor. |
|
Total number of Gabor coefficients, i.e. the number of columns of |
|
|
|
Number of expanded covariate channels contributed by each predictor. |
|
|
|