class_docstr: An interface class to different ML Model implementations.
docstr: Init method
  
  :param model: trained ML model.
  :param model_path: path to trained ML model.
  :param backend: "TF1" ("TF2") for TensorFLow 1.0 (2.0), "PYT" for PyTorch implementations,
                  "sklearn" for Scikit-Learn implementations of standard
                  DiCE (https://arxiv.org/pdf/1905.07697.pdf). For all other frameworks and
                  implementations, provide a dictionary with "model" and "explainer" as keys,
                  and include module and class names as values in the form module_name.class_name.
                  For instance, if there is a model interface class "XGBoostModel" in module "xgboost_model.py"
                  inside the subpackage dice_ml.model_interfaces, and dice interface class "DiceXGBoost"
                  in module "dice_xgboost" inside dice_ml.explainer_interfaces, then backend parameter
                  should be {"model": "xgboost_model.XGBoostModel", "explainer": dice_xgboost.DiceXGBoost}.
  :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","ML","model",".",":","param","backend",":","``","TF1","''","(","``","TF2","''",")","for","TensorFLow","1.0","(","2.0",")",",","``","PYT","''","for","PyTorch","implementations",",","``","sklearn","''","for","Scikit-Learn","implementations","of","standard","DiCE","(","https",":","\/\/arxiv.org\/pdf\/1905.07697.pdf",")",".","For","all","other","frameworks","and","implementations",",","provide","a","dictionary","with","``","model","''","and","``","explainer","''","as","keys",",","and","include","module","and","class","names","as","values","in","the","form","module_name.class_name",".","For","instance",",","if","there","is","a","model","interface","class","``","XGBoostModel","''","in","module","``","xgboost_model.py","''","inside","the","subpackage","dice_ml.model_interfaces",",","and","dice","interface","class","``","DiceXGBoost","''","in","module","``","dice_xgboost","''","inside","dice_ml.explainer_interfaces",",","then","backend","parameter","should","be","{","``","model","''",":","``","xgboost_model.XGBoostModel","''",",","``","explainer","''",":","dice_xgboost.DiceXGBoost","}",".",":","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=BackEndTypes.Tensorflow1,
      model_type=ModelTypes.Classifier,
      func=None,
      kw_args=None,
  ):
      """Init method
  
      :param model: trained ML model.
      :param model_path: path to trained ML model.
      :param backend: "TF1" ("TF2") for TensorFLow 1.0 (2.0), "PYT" for PyTorch implementations,
                      "sklearn" for Scikit-Learn implementations of standard
                      DiCE (https://arxiv.org/pdf/1905.07697.pdf). For all other frameworks and
                      implementations, provide a dictionary with "model" and "explainer" as keys,
                      and include module and class names as values in the form module_name.class_name.
                      For instance, if there is a model interface class "XGBoostModel" in module "xgboost_model.py"
                      inside the subpackage dice_ml.model_interfaces, and dice interface class "DiceXGBoost"
                      in module "dice_xgboost" inside dice_ml.explainer_interfaces, then backend parameter
                      should be {"model": "xgboost_model.XGBoostModel", "explainer": dice_xgboost.DiceXGBoost}.
      :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.
      """
      if backend not in BackEndTypes.ALL:
          warnings.warn(
              "{0} backend not in supported backends {1}".format(
                  backend, ",".join(BackEndTypes.ALL)
              ),
              stacklevel=2,
          )
  
      if model_type not in ModelTypes.ALL:
          raise UserConfigValidationException(
              "{0} model type not in supported model types {1}".format(
                  model_type, ",".join(ModelTypes.ALL)
              )
          )
  
      self.model_type = model_type
      if model is None and model_path == "":
          raise ValueError(
              "should provide either a trained model or the path to a model"
          )
      else:
          self.decide_implementation_type(
              model, model_path, backend, func, kw_args
          )
  
imports: import warnings
  from raiutils.exceptions import UserConfigValidationException
  from dice_ml.constants import BackEndTypes, ModelTypes
label_desc: Use image node_id 1 to create a new Model object  with example: obj = Model(model, model_path, backend, model_type, func, kw_args)