mne.decoding.LinearModel#
- class mne.decoding.LinearModel(model=None)[source]#
Compute and store patterns from linear models.
The linear model coefficients (filters) are used to extract discriminant neural sources from the measured data. This class computes the corresponding patterns of these linear filters to make them more interpretable [1].
- Parameters:
- modelobject |
None
A linear model from scikit-learn with a fit method that updates a
coef_
attribute. If None the model will be LogisticRegression.
- modelobject |
- Attributes:
Methods
fit
(X, y, **fit_params)Estimate the coefficients of the linear model.
Get metadata routing of this object.
get_params
([deep])Get parameters for this estimator.
set_params
(**params)Set the parameters of this estimator.
Notes
New in v0.10.
References
- fit(X, y, **fit_params)[source]#
Estimate the coefficients of the linear model.
Save the coefficients in the attribute
filters_
and computes the attributepatterns_
.- Parameters:
- Returns:
- selfinstance of
LinearModel
Returns the modified instance.
- selfinstance of
- get_metadata_routing()[source]#
Get metadata routing of this object.
Please check User Guide on how the routing mechanism works.
- Returns:
- routing
MetadataRequest
A
MetadataRequest
encapsulating routing information.
- routing
Examples using mne.decoding.LinearModel
#
Linear classifier on sensor data with plot patterns and filters