docstr: Init method
  
  :param data_interface: an interface class to access data related params.
  :param model_interface: an interface class to access trained ML model.
docstr_tok: ["Init","method",":","param","data_interface",":","an","interface","class","to","access","data","related","params",".",":","param","model_interface",":","an","interface","class","to","access","trained","ML","model","."]
code: def __init__(self, data_interface, model_interface):
      """Init method
  
      :param data_interface: an interface class to access data related params.
      :param model_interface: an interface class to access trained ML model.
  
      """
      self.total_random_inits = 0
      super().__init__(
          data_interface
      )  # initiating data related parameters
  
      # initializing model variables
      self.model = model_interface
      self.model.load_model()  # loading pickled trained model if applicable
      self.model.transformer.feed_data_params(data_interface)
      self.model.transformer.initialize_transform_func()
  
      # As DiCE KD uses one-hot-encoding
      # temp data to create some attributes like encoded feature names
      temp_ohe_data = self.model.transformer.transform(
          self.data_interface.data_df.iloc[[0]]
      )
      self.data_interface.create_ohe_params(temp_ohe_data)
  
      # loading trained model
      self.model.load_model()
  
      # number of output nodes of ML model
      if self.model.model_type == ModelTypes.Classifier:
          self.num_output_nodes = self.model.get_num_output_nodes2(
              self.data_interface.data_df[0:1][
                  self.data_interface.feature_names
              ]
          )
  
      self.predicted_outcome_name = (
          self.data_interface.outcome_name + "_pred"
      )
  
file_path: DiCE/dice_ml/explainer_interfaces/dice_KD.py
imports: import copy
  import timeit
  import numpy
  import pandas
  from dice_ml import diverse_counterfactuals
  from dice_ml.constants import ModelTypes
  from dice_ml.explainer_interfaces.explainer_base import ExplainerBase
label_desc: Use image node_id 1 to create a new DiceKD object from inherited base classes: ExplainerBase with example: obj = DiceKD(data_interface, model_interface)