class_docstr: A data interface for public data. This class is an interface to DiCE explainers
  and contains methods to transform user-fed raw data into the format a DiCE explainer
  requires, and vice versa.
docstr: Init method
  
  :param dataframe: The train dataframe used by explainer method.
  :param continuous_features: List of names of continuous features. The remaining features are categorical features.
  :param outcome_name: Outcome feature name.
  :param permitted_range (optional): Dictionary with feature names as keys and permitted range in list as values.
                                     Defaults to the range inferred from training data.
  :param continuous_features_precision (optional): Dictionary with feature names as keys and precisions as values.
  :param data_name (optional): Dataset name
code: def __init__(self, params):
      """Init method
  
      :param dataframe: The train dataframe used by explainer method.
      :param continuous_features: List of names of continuous features. The remaining features are categorical features.
      :param outcome_name: Outcome feature name.
      :param permitted_range (optional): Dictionary with feature names as keys and permitted range in list as values.
                                         Defaults to the range inferred from training data.
      :param continuous_features_precision (optional): Dictionary with feature names as keys and precisions as values.
      :param data_name (optional): Dataset name
      """
      self._validate_and_set_outcome_name(params=params)
      self._validate_and_set_dataframe(params=params)
      self._validate_and_set_continuous_features(params=params)
  
      self.feature_names = [
          name
          for name in self.data_df.columns.tolist()
          if name != self.outcome_name
      ]
  
      self.number_of_features = len(self.feature_names)
  
      if (
          len(
              set(self.continuous_feature_names)
              - set(self.feature_names)
          )
          != 0
      ):
          raise UserConfigValidationException(
              "continuous_features contains some feature names which are not part of columns in dataframe"
          )
  
      self.categorical_feature_names = [
          name
          for name in self.data_df.columns.tolist()
          if name
          not in self.continuous_feature_names + [self.outcome_name]
      ]
  
      self.categorical_feature_indexes = [
          self.data_df.columns.get_loc(name)
          for name in self.categorical_feature_names
          if name in self.data_df
      ]
  
      self._validate_and_set_continuous_features_precision(
          params=params
      )
      self.data_df = self._set_feature_dtypes(
          self.data_df,
          self.categorical_feature_names,
          self.continuous_feature_names,
      )
  
      self._validate_and_set_permitted_range(params=params)
      self._validate_and_set_data_name(params=params)
  
imports: import logging
  from collections import defaultdict
  import numpy
  import pandas
  from raiutils.exceptions import UserConfigValidationException
  from sklearn.preprocessing import LabelEncoder
  from dice_ml.data_interfaces.base_data_interface import _BaseData
  from dice_ml.utils.exception import SystemException
label_desc: Use image node_id 1 to create a new PublicData object from inherited base classes: _BaseData with example: obj = PublicData(params)