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 precision of continuous features in the data.
docstr_tok: ["``","Gets","the","precision","of","continuous","features","in","the","data","."]
code: def get_decimal_precisions(self, output_type="list"):
      """ "Gets the precision of continuous features in the data."""
      # if the precision of a continuous feature is not given, we use the maximum precision of the modes to capture the
      # precision of majority of values in the column.
      precisions_dict = defaultdict(int)
      precisions = [0] * len(self.feature_names)
      for ix, col in enumerate(self.continuous_feature_names):
          if (self.continuous_features_precision is not None) and (
              col in self.continuous_features_precision
          ):
              precisions[ix] = self.continuous_features_precision[col]
              precisions_dict[col] = self.continuous_features_precision[
                  col
              ]
          elif (
              self.data_df[col].dtype == np.float32
              or self.data_df[col].dtype == np.float64
          ):
              modes = self.data_df[col].mode()
              maxp = len(
                  str(modes[0]).split(".")[1]
              )  # maxp stores the maximum precision of the modes
              for mx in range(len(modes)):
                  prec = len(str(modes[mx]).split(".")[1])
                  if prec > maxp:
                      maxp = prec
              precisions[ix] = maxp
              precisions_dict[col] = maxp
      if output_type == "list":
          return precisions
      elif output_type == "dict":
          return precisions_dict
  
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 23 for calling the PublicData obj's underlying member method code with example usage: obj.get_decimal_precisions(output_type) and returns: precisions, precisions_dict