class_docstr: A data interface for private data with meta information.
class_docstr_tok: ["A","data","interface","for","private","data","with","meta","information","."]
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 collections
  import logging
  import sys
  from collections import defaultdict
  import numpy
  import pandas
  from sklearn.preprocessing import LabelEncoder
  from dice_ml.data_interfaces.base_data_interface import _BaseData
label_desc: Use image node_id 19 for calling the PrivateData obj's underlying member method code with example usage: obj.get_decoded_data(data, encoding) and returns: data, data, data, data