{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/factorguide-io/json-schema/factorguide-io-diagnose-response-schema.json",
  "title": "DiagnoseResponse",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/factorguide-io-openapi.json#/components/schemas/DiagnoseResponse",
  "properties": {
    "i": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        }
      ],
      "title": "I"
    },
    "j": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        }
      ],
      "title": "J"
    },
    "ic": {
      "type": "number",
      "title": "Ic"
    },
    "ic_type": {
      "type": "string",
      "title": "Ic Type",
      "default": "marginal_correlation"
    },
    "risk_constitutive": {
      "type": "number",
      "title": "Risk Constitutive"
    },
    "risk_inductive": {
      "type": "number",
      "title": "Risk Inductive"
    },
    "zone": {
      "type": "integer",
      "title": "Zone"
    },
    "extrapolated": {
      "type": "boolean",
      "title": "Extrapolated",
      "default": false
    },
    "extrapolation_warning": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Extrapolation Warning"
    },
    "sign_detectability": {
      "anyOf": [
        {
          "$ref": "#/$defs/SignDetectabilityPair"
        },
        {
          "type": "null"
        }
      ]
    },
    "note": {
      "type": "string",
      "title": "Note",
      "default": "IC is computed from the provided coupling_value (marginal). For partial correlation IC accounting for all other variables, use /navigate with the full matrix."
    }
  },
  "type": "object",
  "required": [
    "i",
    "j",
    "ic",
    "risk_constitutive",
    "risk_inductive",
    "zone"
  ],
  "$defs": {
    "DetectionCostClass": {
      "type": "string",
      "enum": [
        "free",
        "cheap",
        "marginal",
        "expensive"
      ],
      "title": "DetectionCostClass"
    },
    "SignDetectabilityPair": {
      "properties": {
        "i": {
          "type": "string",
          "title": "I"
        },
        "j": {
          "type": "string",
          "title": "J"
        },
        "ic": {
          "type": "number",
          "title": "Ic"
        },
        "variance_ratio": {
          "type": "number",
          "title": "Variance Ratio"
        },
        "k_eff": {
          "type": "number",
          "title": "K Eff"
        },
        "even_odd_gap": {
          "type": "number",
          "title": "Even Odd Gap"
        },
        "sign_detectable": {
          "type": "boolean",
          "title": "Sign Detectable"
        },
        "signed_ic": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Signed Ic"
        },
        "detection_cost_class": {
          "$ref": "#/$defs/DetectionCostClass"
        }
      },
      "type": "object",
      "required": [
        "i",
        "j",
        "ic",
        "variance_ratio",
        "k_eff",
        "even_odd_gap",
        "sign_detectable",
        "detection_cost_class"
      ],
      "title": "SignDetectabilityPair"
    }
  }
}