docstr: Init method
  
  :param model: trained ML Model.
  :param model_path: path to trained model.
  :param backend: ML framework. For frameworks other than TensorFlow or PyTorch,
                  or for implementations other than standard DiCE
                  (https://arxiv.org/pdf/1905.07697.pdf),
                  provide both the module and class names as module_name.class_name.
                  For instance, if there is a model interface class "SklearnModel"
                  in module "sklearn_model.py" inside the subpackage dice_ml.model_interfaces,
                  then backend parameter should be "sklearn_model.SklearnModel".
  :param func: function transformation required for ML model. If func is None, then func will be the identity function.
  :param kw_args: Dictionary of additional keyword arguments to pass to func. DiCE's data_interface is appended to the
                  dictionary of kw_args, by default.
docstr_tok: ["Init","method",":","param","model",":","trained","ML","Model",".",":","param","model_path",":","path","to","trained","model",".",":","param","backend",":","ML","framework",".","For","frameworks","other","than","TensorFlow","or","PyTorch",",","or","for","implementations","other","than","standard","DiCE","(","https",":","\/\/arxiv.org\/pdf\/1905.07697.pdf",")",",","provide","both","the","module","and","class","names","as","module_name.class_name",".","For","instance",",","if","there","is","a","model","interface","class","``","SklearnModel","''","in","module","``","sklearn_model.py","''","inside","the","subpackage","dice_ml.model_interfaces",",","then","backend","parameter","should","be","``","sklearn_model.SklearnModel","''",".",":","param","func",":","function","transformation","required","for","ML","model",".","If","func","is","None",",","then","func","will","be","the","identity","function",".",":","param","kw_args",":","Dictionary","of","additional","keyword","arguments","to","pass","to","func",".","DiCE","'s","data_interface","is","appended","to","the","dictionary","of","kw_args",",","by","default","."]
code: def __init__(
      self,
      model=None,
      model_path="",
      backend="",
      func=None,
      kw_args=None,
  ):
      """Init method
  
      :param model: trained ML Model.
      :param model_path: path to trained model.
      :param backend: ML framework. For frameworks other than TensorFlow or PyTorch,
                      or for implementations other than standard DiCE
                      (https://arxiv.org/pdf/1905.07697.pdf),
                      provide both the module and class names as module_name.class_name.
                      For instance, if there is a model interface class "SklearnModel"
                      in module "sklearn_model.py" inside the subpackage dice_ml.model_interfaces,
                      then backend parameter should be "sklearn_model.SklearnModel".
      :param func: function transformation required for ML model. If func is None, then func will be the identity function.
      :param kw_args: Dictionary of additional keyword arguments to pass to func. DiCE's data_interface is appended to the
                      dictionary of kw_args, by default.
  
      """
      self.model = model
      self.model_path = model_path
      self.backend = backend
      # calls FunctionTransformer of scikit-learn internally
      # (https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.FunctionTransformer.html)
      self.transformer = DataTransfomer(func, kw_args)
  
file_path: DiCE/dice_ml/model_interfaces/base_model.py
imports: import pickle
  import numpy
  from dice_ml.constants import ModelTypes
  from dice_ml.utils.exception import SystemException
  from dice_ml.utils.helpers import DataTransfomer
label_desc: Use image node_id 1 to create a new BaseModel object  with example: obj = BaseModel(model, model_path, backend, func, kw_args)