mne.decoding.get_coef(estimator, attr=’filters_’, inverse_transform=False)[source]

Retrieve the coefficients of an estimator ending with a Linear Model.

This is typically useful to retrieve “spatial filters” or “spatial patterns” of decoding models [R40].


estimator : object | None

An estimator from scikit-learn.

attr : str

The name of the coefficient attribute to retrieve, typically 'filters_' (default) or 'patterns_'.

inverse_transform : bool

If True, returns the coefficients after inverse transforming them with the transformer steps of the estimator.


coef : array

The coefficients.


[R40](1, 2) Haufe, S., Meinecke, F., Gorgen, K., Dahne, S., Haynes, J.-D., Blankertz, B., & Biessmann, F. (2014). On the interpretation of weight vectors of linear models in multivariate neuroimaging. NeuroImage, 87, 96-110. doi:10.1016/j.neuroimage.2013.10.067.