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.
class_docstr_tok: ["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: Gets the original data from encoded data.
docstr_tok: ["Gets","the","original","data","from","encoded","data","."]
code: def get_decoded_data(self, data, encoding="one-hot"):
      """Gets the original data from encoded data."""
      if len(data) == 0:
          return data
  
      index = [i for i in range(0, len(data))]
      if encoding == "one-hot":
          if isinstance(data, pd.DataFrame):
              return data
          elif isinstance(data, np.ndarray):
              data = pd.DataFrame(
                  data=data,
                  index=index,
                  columns=self.ohe_encoded_feature_names,
              )
              return data
          else:
              raise ValueError(
                  "data should be a pandas dataframe or a numpy array"
              )
  
      elif encoding == "label":
          data = pd.DataFrame(
              data=data, index=index, columns=self.feature_names
          )
          return data
  
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 24 for calling the PublicData obj's underlying member method code with example usage: obj.get_decoded_data(data, encoding) and returns: data, data, data, data