code: def fit(self, Y):
      self.Y = np.asarray(Y, np.float64)
      iter(self)
      self.results = super().fit(self.family.link.initialize(Y))
      self.results.mu = self.family.link.inverse(self.results.predicted)
      self.scale = self.results.scale = self.estimate_scale()
  
      while self.cont():
          self.results = next(self)
          self.scale = self.results.scale = self.estimate_scale()
  
      return self.results
  
file_path: nipy/nipy/algorithms/statistics/models/glm.py
imports: import numpy
  from .None import family
  from .regression import WLSModel
label_desc: Use image node_id 7 for calling the Model obj's underlying member method code with example usage: obj.fit(Y) and returns: self