docstr: Train model according to :attr:`extra_params['fit']` (if appropriate) on training data
docstr_tok: ["Train","model","according","to",":","attr",":","`","extra_params","[","'fit","'","]","`","(","if","appropriate",")","on","training","data"]
code: def fit(self):
      """Train model according to :attr:`extra_params['fit']` (if appropriate) on training data"""
      expected_fit_parameters = list(
          inspect.signature(self.model.fit).parameters
      )
      fit_kwargs = {}
      if "verbose" in expected_fit_parameters:
          fit_kwargs["verbose"] = False
      if (
          "silent" in expected_fit_parameters
          and "verbose" not in fit_kwargs
      ):
          fit_kwargs["silent"] = True
  
      fit_kwargs = dict(
          fit_kwargs,
          **{
              k: v
              for k, v in self.extra_params.get("fit", {}).items()
              if k not in ["X", "y"]
          },
      )
  
      try:
          self.model = self.model.fit(
              self.train_input, self.train_target, **fit_kwargs
          )
      except (TypeError, sklearn_utils.DataConversionWarning):
          self.model = self.model.fit(
              self.train_input.values,
              self.train_target.values,
              **fit_kwargs,
          )
  
imports: from hyperparameter_hunter.sentinels import locate_sentinels
  from hyperparameter_hunter.settings import G
  from contextlib import suppress
  import inspect
  import sys
  import warnings
  import sklearn.utils
label_desc: Use image node_id 3 for calling the Model obj's underlying member method code with example usage: obj.fit() without return types