mne.decoding.TimeDelayingRidge¶
- class mne.decoding.TimeDelayingRidge(tmin, tmax, sfreq, alpha=0.0, reg_type='ridge', fit_intercept=True, n_jobs=1, edge_correction=True)[source]¶
Ridge regression of data with time delays.
- Parameters
- tmin
int
|float
The starting lag, in seconds (or samples if
sfreq
== 1). Negative values correspond to times in the past.- tmax
int
|float
The ending lag, in seconds (or samples if
sfreq
== 1). Positive values correspond to times in the future. Must be >= tmin.- sfreq
float
The sampling frequency used to convert times into samples.
- alpha
float
The ridge (or laplacian) regularization factor.
- reg_type
str
|list
Can be “ridge” (default) or “laplacian”. Can also be a 2-element list specifying how to regularize in time and across adjacent features.
- fit_interceptbool
If True (default), the sample mean is removed before fitting.
- n_jobs
int
|str
The number of jobs to use. Can be an int (default 1) or
'cuda'
.New in version 0.18.
- edge_correctionbool
If True (default), correct the autocorrelation coefficients for non-zero delays for the fact that fewer samples are available. Disabling this speeds up performance at the cost of accuracy depending on the relationship between epoch length and model duration. Only used if
estimator
is float or None.New in version 0.18.
- tmin
See also
Notes
This class is meant to be used with
mne.decoding.ReceptiveField
by only implicitly doing the time delaying. For reasonable receptive field and input signal sizes, it should be more CPU and memory efficient by using frequency-domain methods (FFTs) to compute the auto- and cross-correlations.Methods
__hash__
(/)Return hash(self).
fit
(X, y)Estimate the coefficients of the linear model.
get_params
([deep])Get parameters for this estimator.
predict
(X)Predict the output.
set_params
(**params)Set the parameters of this estimator.
- fit(X, y)[source]¶
Estimate the coefficients of the linear model.
- Parameters
- Returns
- selfinstance of
TimeDelayingRidge
Returns the modified instance.
- selfinstance of
- set_params(**params)[source]¶
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each component of a nested object.- Parameters
- **params
dict
Parameters.
- **params
- Returns
- instinstance
The object.