code: def _check_synthetic_dataset(
      X, y, names=None, types=None, clip_low=-2.0, clip_high=2.0
  ):
      n_display = 20
  
      X_imp = _normalize_categoricals(X, types, clip_low, clip_high)
  
      # impute missing values with 0
      missings = np.isnan(X_imp)
      X_imp[missings] = 0.0
  
      for i in range(X.shape[1]):
          print("--------------------")
          if names is not None:
              print(names[i])
  
          col = X_imp[:, i]
          n_zeros = len(col) - np.count_nonzero(col)
          col[col == 0.0] = np.tile(
              [2.2250738585072014e-308, -2.2250738585072014e-308],
              n_zeros // 2 + 1,
          )[:n_zeros]
  
          negatives = col < 0.0
          negatives = (
              str(np.average(col[negatives]))
              if negatives.any()
              else "NONE"
          )
          print("neg_avg: " + negatives)
  
          positives = col > 0.0
          positives = (
              str(np.average(col[positives]))
              if positives.any()
              else "NONE"
          )
          print("pos_avg: " + positives)
  
          col = X[:, i]
          if X.dtype == object and str in set(map(type, col)):
              print("\n".join([str(x) for x in col[:n_display]]))
          elif types is not None and types[i] == "nominal":
              categorical_digits = (
                  len(str(int(np.floor(np.nanmax(col))))) - 1
              )
              print(
                  "\n".join(
                      [
                          f"{x:.{categorical_digits}f}"
                          for x in col[:n_display]
                      ]
                  )
              )
          else:
              print(
                  "\n".join(
                      [
                          f"{x:.5f}".rstrip("0").rstrip(".")
                          for x in col[:n_display]
                      ]
                  )
              )
  
      print("--------------------")
      print("y")
      if y.dtype == np.float64:
          negatives = y < 0.0
          negatives = (
              str(np.average(y[negatives]))
              if negatives.any()
              else "NONE"
          )
          print("neg_avg: " + negatives)
  
          positives = y > 0.0
          positives = (
              str(np.average(y[positives]))
              if positives.any()
              else "NONE"
          )
          print("pos_avg: " + positives)
          print(
              "\n".join(
                  [
                      f"{x:.5f}".rstrip("0").rstrip(".")
                      for x in y[:n_display]
                  ]
              )
          )
      else:
          print("\n".join([str(x) for x in y[:n_display]]))
  
file_path: interpret/python/interpret-core/interpret/utils/_synthetic.py
imports: import numpy
  from itertools import takewhile
  import operator
label_desc: Use image node_id 8 for calling a global function with example usage: _check_synthetic_dataset(X, y, names, types, clip_low, clip_high) without return types