docstr: Fit the model on the training data
  
  Parameters
  ----------
  X: array-like, shape (n_samples, n_features)
  y : array-like, shape (n_samples,)
  
  Returns
  -------
  self : object
docstr_tok: ["Fit","the","model","on","the","training","data","Parameters","--","--","--","--","--","X",":","array-like",",","shape","(","n_samples",",","n_features",")","y",":","array-like",",","shape","(","n_samples",",",")","Returns","--","--","--","-","self",":","object"]
code: def fit(self, X, y=None):
      """Fit the model on the training data
  
      Parameters
      ----------
      X: array-like, shape (n_samples, n_features)
      y : array-like, shape (n_samples,)
  
      Returns
      -------
      self : object
      """
      X = self._check_array(X)
  
      solver_kwargs = self._get_solver_kwargs()
  
      self._coef = algorithms._solvers[self.solver](
          X, y, **solver_kwargs
      )
      if self.fit_intercept:
          self.coef_ = self._coef[:-1]
          self.intercept_ = self._coef[-1]
      else:
          self.coef_ = self._coef
          self.intercept_ = 0.0
      return self
  
imports: import textwrap
  from dask_glm import algorithms, families
  from dask_glm.utils import accuracy_score, add_intercept, dot, exp, poisson_deviance, sigmoid
  from sklearn.base import BaseEstimator
  from ..metrics import r2_score
  from ..utils import check_array
  from .utils import lr_prob_stack
label_desc: Use image node_id 4 for calling the _GLM obj's underlying member method code with example usage: obj.fit(X, y) and returns: self