Data Bias Detection Output Table Schema

The Data Bias Detection Output Table provides the schema for data bias detection output. The output data is written to a table specified by the user in the job request. This is a mandatory input. This table is created by Oracle Machine Learning Service and its format depends on the job type.

Output Data Format: The output data is written to the user specified output tables. This table is created by Oracle Machine Learning Services. The output table name is in the form of <jobName>_<outputData>. For example, if the jobName is DATA_BIAS_JOB and outputData is ADULT_BIAS_RESULT, then the output table name is DATA_BIAS_JOB_ADULT_BIAS_RESULT.

Note:

Access to data sources is managed by database privileges.

Table - Data Bias Detection Output Table Schema

Columns Types Description
FEATURE_NAME VARCHAR2 The name of the features included in the sensitiveFeatures parameter.
RESULT CLOB A JSON string containing the Class Imbalance (CI), Statistical Parity (SP), and Conditional Demographic Disparity (CDD).

Here are sample JSON schema for categorical and numerical variables:

Categorical variable and pairwiseMode=0

{
  "$schema": "http://json-schema.org/categorical-simple/schema#",
  "type": "object",
  "properties": {
    "metric": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "group": {
            "type": "string"
          },
          "CI": {
            "type": "number"
          },
          "SP": {
            "type": "number"
          }
        }
      }
    },
    "cdd": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "strata": {
            "type": "string"
          },
          "result": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "group_a": {
                  "type": "string"
                },
                "CDD": {
                  "type": "number"
                },
                "detail": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "subgroup": {
                        "type": "string"
                      },
                      "DD": {
                        "type": "number"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "reweighing_matrix": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "group": {
            "type": "string"
          },
          "group_a_pos_weight": {
            "type": "number"
          },
          "non_group_a_pos_weight": {
            "type": "number"
          },
          "group_a_neg_weight": {
            "type": "number"
          },
          "non_group_a_neg_weight": {
            "type": "number"
          }
        }
      }
    }
  }
}

Numeric variable and pairwiseMode=0

{
  "$schema": "http://json-schema.org/numerical-simple/schema#",
  "type": "object",
  "properties": {
    "metric": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "bin_upper_boundary_a": {
            "type": [
              "number",
              "null"
            ]
          },
          "CI": {
            "type": "number"
          },
          "SP": {
            "type": "number"
          }
        }
      }
    },
    "cdd": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "strata": {
            "type": "string"
          },
          "result": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "bin_upper_boundary_a": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "CDD": {
                  "type": "number"
                },
                "detail": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "subgroup_bin_upper_boundary": {
                        "type": "string"
                      },
                      "DD": {
                        "type": "number"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "reweighing_matrix": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "bin_upper_boundary_a": {
            "type": [
              "number",
              "null"
            ]
          },
          "group_a_pos_weight": {
            "type": "number"
          },
          "non_group_a_pos_weight": {
            "type": "number"
          },
          "group_a_neg_weight": {
            "type": "number"
          },
          "non_group_a_neg_weight": {
            "type": "number"
          }
        }
      }
    }
  }
}

pairwiseMode=1

{
  "$schema": "http://json-schema.org/paiwise/schema#",
  "type": "object",
  "properties": {
    "metric": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "group_a": {
            "type": "string"
          },
          "group_b": {
            "type": "string"
          },
          "CI": {
            "type": "number"
          },
          "SP": {
            "type": "number"
          }
        }
      }
    },
    "cdd": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "strata": {
            "type": "string"
          },
          "result": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "group_a": {
                  "type": "string"
                },
                "group_b": {
                  "type": "string"
                },
                "CDD": {
                  "type": "number"
                },
                "detail": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "subgroup": {
                        "type": "string"
                      },
                      "DD": {
                        "type": "number"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "reweighing_matrix": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "group_a": {
            "type": "string"
          },
          "group_b": {
            "type": "string"
          },
          "group_a_pos_weight": {
            "type": "number"
          },
          "group_b_pos_weight": {
            "type": "number"
          },
          "group_a_neg_weight": {
            "type": "number"
          },
          "group_b_neg_weight": {
            "type": "number"
          }
        }
      }
    }
  }
}