{
  "kind": "synthetic-demonstration",
  "seed": 42,
  "records": 600,
  "features": [
    "age",
    "gestational_week",
    "bmi",
    "haemoglobin",
    "vegetarian",
    "iron_history",
    "folic_acid_history",
    "calcium_history"
  ],
  "train_count": 480,
  "test_count": 120,
  "sklearn_version": "1.7.2",
  "missing_values": 0,
  "duplicates": 0,
  "stratification": "Iron demo label only; other target class counts are reported separately.",
  "metric_definition": "Mean of binary positive-class metrics across the three artificial targets; accuracy averaged across targets.",
  "limitations": [
    "All records and labels are generated, not observed patients.",
    "Labels reproduce arbitrary noisy equations, not diagnosed deficiencies or supplementation recommendations.",
    "One fixed holdout split; no tuning, external validation, calibration or confidence intervals.",
    "Results demonstrate learning synthetic patterns only; they do not establish clinical validity.",
    "The AI assessment is a separate educational language-model feature and does not use these classifiers."
  ],
  "label_equations": [
    "iron: 0.8*(11-haemoglobin) + 0.5*vegetarian - 0.7*iron_history + noise > 0",
    "folic acid: 0.07*(16-week) + 0.4*vegetarian - 0.9*folic_acid_history + noise > 0",
    "calcium: 0.05*(week-20) + 0.08*(23-bmi) - 0.8*calcium_history + noise > 0; noise ~ Normal(0,0.9)"
  ],
  "distribution": [
    {
      "target": "iron_demo_label",
      "positive": 280,
      "negative": 320,
      "train_positive": 224,
      "test_positive": 56
    },
    {
      "target": "folic_acid_demo_label",
      "positive": 172,
      "negative": 428,
      "train_positive": 140,
      "test_positive": 32
    },
    {
      "target": "calcium_demo_label",
      "positive": 202,
      "negative": 398,
      "train_positive": 161,
      "test_positive": 41
    }
  ],
  "models": [
    {
      "name": "Majority baseline",
      "accuracy": 0.6416666666666666,
      "precision": 0.0,
      "recall": 0.0,
      "f1": 0.0,
      "targets": [
        {
          "target": "iron_demo_label",
          "accuracy": 0.5333333333333333,
          "precision": 0.0,
          "recall": 0.0,
          "f1": 0.0,
          "confusion": [
            [
              64,
              0
            ],
            [
              56,
              0
            ]
          ]
        },
        {
          "target": "folic_acid_demo_label",
          "accuracy": 0.7333333333333333,
          "precision": 0.0,
          "recall": 0.0,
          "f1": 0.0,
          "confusion": [
            [
              88,
              0
            ],
            [
              32,
              0
            ]
          ]
        },
        {
          "target": "calcium_demo_label",
          "accuracy": 0.6583333333333333,
          "precision": 0.0,
          "recall": 0.0,
          "f1": 0.0,
          "confusion": [
            [
              79,
              0
            ],
            [
              41,
              0
            ]
          ]
        }
      ]
    },
    {
      "name": "Logistic regression",
      "accuracy": 0.7888888888888889,
      "precision": 0.7182860998650472,
      "recall": 0.6052555168408827,
      "f1": 0.6522933223653661,
      "targets": [
        {
          "target": "iron_demo_label",
          "accuracy": 0.8083333333333333,
          "precision": 0.7894736842105263,
          "recall": 0.8035714285714286,
          "f1": 0.7964601769911505,
          "confusion": [
            [
              52,
              12
            ],
            [
              11,
              45
            ]
          ]
        },
        {
          "target": "folic_acid_demo_label",
          "accuracy": 0.7833333333333333,
          "precision": 0.6153846153846154,
          "recall": 0.5,
          "f1": 0.5517241379310345,
          "confusion": [
            [
              78,
              10
            ],
            [
              16,
              16
            ]
          ]
        },
        {
          "target": "calcium_demo_label",
          "accuracy": 0.775,
          "precision": 0.75,
          "recall": 0.5121951219512195,
          "f1": 0.6086956521739131,
          "confusion": [
            [
              72,
              7
            ],
            [
              20,
              21
            ]
          ]
        }
      ]
    },
    {
      "name": "Gradient boosting",
      "accuracy": 0.7555555555555555,
      "precision": 0.6483091787439613,
      "recall": 0.5228295586527293,
      "f1": 0.5740681858328918,
      "targets": [
        {
          "target": "iron_demo_label",
          "accuracy": 0.8083333333333333,
          "precision": 0.8,
          "recall": 0.7857142857142857,
          "f1": 0.7927927927927928,
          "confusion": [
            [
              53,
              11
            ],
            [
              12,
              44
            ]
          ]
        },
        {
          "target": "folic_acid_demo_label",
          "accuracy": 0.725,
          "precision": 0.4782608695652174,
          "recall": 0.34375,
          "f1": 0.4,
          "confusion": [
            [
              76,
              12
            ],
            [
              21,
              11
            ]
          ]
        },
        {
          "target": "calcium_demo_label",
          "accuracy": 0.7333333333333333,
          "precision": 0.6666666666666666,
          "recall": 0.43902439024390244,
          "f1": 0.5294117647058824,
          "confusion": [
            [
              70,
              9
            ],
            [
              23,
              18
            ]
          ]
        }
      ]
    }
  ]
}
