class_docstr: 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 :footcite:`HaufeEtAl2014`.
  
  Parameters
  ----------
  model : object | None
      A linear model from scikit-learn with a fit method
      that updates a ``coef_`` attribute.
      If None the model will be LogisticRegression.
  
  Attributes
  ----------
  filters_ : ndarray, shape ([n_targets], n_features)
      If fit, the filters used to decompose the data.
  patterns_ : ndarray, shape ([n_targets], n_features)
      If fit, the patterns used to restore M/EEG signals.
  
  See Also
  --------
  CSP
  mne.preprocessing.ICA
  mne.preprocessing.Xdawn
  
  Notes
  -----
  .. versionadded:: 0.10
  
  References
  ----------
  .. footbibliography::
class_docstr_tok: ["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",":","footcite",":","`","HaufeEtAl2014","`",".","Parameters","--","--","--","--","--","model",":","object","|","None","A","linear","model","from","scikit-learn","with","a","fit","method","that","updates","a","``","coef_","``","attribute",".","If","None","the","model","will","be","LogisticRegression",".","Attributes","--","--","--","--","--","filters_",":","ndarray",",","shape","(","[","n_targets","]",",","n_features",")","If","fit",",","the","filters","used","to","decompose","the","data",".","patterns_",":","ndarray",",","shape","(","[","n_targets","]",",","n_features",")","If","fit",",","the","patterns","used","to","restore","M\/EEG","signals",".","See","Also","--","--","--","--","CSP","mne.preprocessing.ICA","mne.preprocessing.Xdawn","Notes","--","--","-","..","versionadded",":",":","0.10","References","--","--","--","--","--","..","footbibliography",":",":"]
code: def __init__(self, model=None):
      if model is None:
          from sklearn.linear_model import LogisticRegression
  
          model = LogisticRegression(solver="liblinear")
  
      self.model = model
  
imports: import datetime
  import numbers
  import numpy
  from ..fixes import BaseEstimator, _check_fit_params, _get_check_scoring
  from ..parallel import parallel_func
  from ..utils import verbose, warn
label_desc: Use image node_id 1 to create a new LinearModel object from inherited base classes: BaseEstimator with example: obj = LinearModel(model)