class_docstr: A linear value function (baseline) based on features.
  
  Args:
      env_spec (garage.envs.env_spec.EnvSpec): Environment specification.
      reg_coeff (float): Regularization coefficient.
      name (str): Name of baseline.
docstr: Fit regressor based on paths.
  
  Args:
      paths (list[dict]): Sample paths.
docstr_tok: ["Fit","regressor","based","on","paths",".","Args",":","paths","(","list","[","dict","]",")",":","Sample","paths","."]
code: def fit(self, paths):
      """Fit regressor based on paths.
  
      Args:
          paths (list[dict]): Sample paths.
  
      """
      featmat = np.concatenate([self._features(path) for path in paths])
      returns = np.concatenate([path["returns"] for path in paths])
      reg_coeff = self._reg_coeff
      for _ in range(5):
          self._coeffs = np.linalg.lstsq(
              featmat.T.dot(featmat)
              + reg_coeff * np.identity(featmat.shape[1]),
              featmat.T.dot(returns),
              rcond=-1,
          )[0]
          if not np.any(np.isnan(self._coeffs)):
              break
          reg_coeff *= 10
  
file_path: garage/src/garage/np/baselines/linear_feature_baseline.py
imports: import numpy
  from garage.np.baselines.baseline import Baseline
label_desc: Use image node_id 5 for calling the LinearFeatureBaseline obj's underlying member method code with example usage: obj.fit(paths) without return types