class_docstr: Base class for LIME Scikit-Image wrapper
  
  
  Args:
      target_fn: callable function or class instance
      target_params: dict, parameters to pass to the target_fn
  
  
  'target_params' takes parameters required to instanciate the
      desired Scikit-Image class/model
class_docstr_tok: ["Base","class","for","LIME","Scikit-Image","wrapper","Args",":","target_fn",":","callable","function","or","class","instance","target_params",":","dict",",","parameters","to","pass","to","the","target_fn","'target_params","'","takes","parameters","required","to","instanciate","the","desired","Scikit-Image","class\/model"]
docstr: Checks for mistakes in 'parameters'
  
  Args :
      parameters: dict, parameters to be checked
  
  Raises :
      ValueError: if any parameter is not a valid argument for the target function
          or the target function is not defined
      TypeError: if argument parameters is not iterable
   
docstr_tok: ["Checks","for","mistakes","in","'parameters'","Args",":","parameters",":","dict",",","parameters","to","be","checked","Raises",":","ValueError",":","if","any","parameter","is","not","a","valid","argument","for","the","target","function","or","the","target","function","is","not","defined","TypeError",":","if","argument","parameters","is","not","iterable"]
code: def _check_params(self, parameters):
      """Checks for mistakes in 'parameters'
  
      Args :
          parameters: dict, parameters to be checked
  
      Raises :
          ValueError: if any parameter is not a valid argument for the target function
              or the target function is not defined
          TypeError: if argument parameters is not iterable
      """
      a_valid_fn = []
      if self.target_fn is None:
          if callable(self):
              a_valid_fn.append(self.__call__)
          else:
              raise TypeError(
                  "invalid argument: tested object is not callable,\
                   please provide a valid target_fn"
              )
      elif isinstance(self.target_fn, types.FunctionType) or isinstance(
          self.target_fn, types.MethodType
      ):
          a_valid_fn.append(self.target_fn)
      else:
          a_valid_fn.append(self.target_fn.__call__)
  
      if not isinstance(parameters, str):
          for p in parameters:
              for fn in a_valid_fn:
                  if has_arg(fn, p):
                      pass
                  else:
                      raise ValueError(
                          "{} is not a valid parameter".format(p)
                      )
      else:
          raise TypeError(
              "invalid argument: list or dictionnary expected"
          )
  
file_path: lime/lime/wrappers/scikit_image.py
imports: import types
  from lime.utils.generic_utils import has_arg
  from skimage.segmentation import felzenszwalb, slic, quickshift
label_desc: Use image node_id 2 for calling the BaseWrapper obj's underlying member method code with example usage: obj._check_params(parameters) without return types