Module 7 Lab: Privacy and public-health governance

Module 7 Lab: Privacy and public-health governance#

Draft a governance memo.

Lab Context#

This lab uses synthetic patient-level risk factors including utilization, chronic-condition count, access burden, and prior intervention as a safe proxy for the course setting. It is not a substitute for institutional data, but it lets you practice the reasoning, metrics, and documentation pattern before working with real records.

Lab Tasks#

  1. Run the baseline analysis.

  2. Identify the decision the metric supports.

  3. Change one threshold, score weight, or input assumption.

  4. Compare the result before and after your change.

  5. Record one deployment risk that the synthetic data cannot reveal.

import numpy as np
import matplotlib.pyplot as plt

rng = np.random.default_rng(7)
n = 120
feature_a = rng.normal(0, 1, n)
feature_b = rng.normal(0, 1, n)
feature_c = rng.normal(0, 1, n)
linear_score = 0.9*feature_a - 0.5*feature_b + 0.35*feature_c
probability = 1 / (1 + np.exp(-linear_score))
label = (probability > np.quantile(probability, 0.58)).astype(int)

baseline_pred = (feature_a > np.median(feature_a)).astype(int)
model_pred = (linear_score > np.median(linear_score)).astype(int)
baseline_acc = float((baseline_pred == label).mean())
model_acc = float((model_pred == label).mean())

plt.figure(figsize=(6, 3))
plt.scatter(feature_a, feature_b, c=label, cmap="viridis", s=24)
plt.xlabel("feature_a")
plt.ylabel("feature_b")
plt.title("Module 7 Lab: Privacy and public-health governance")
plt.tight_layout()

{"baseline_accuracy": baseline_acc, "model_accuracy": model_acc, "improvement": model_acc - baseline_acc}
{'baseline_accuracy': 0.7666666666666667,
 'model_accuracy': 0.9166666666666666,
 'improvement': 0.1499999999999999}
../_images/5dac7192b04f0eaa4b2b10f6bb64ff226703ecbff20aa8d974e86f2bc6df49a5.png
reflection = {
    "what_changed": "",
    "metric_before": "",
    "metric_after": "",
    "interpretation": "",
    "synthetic_data_limit": "",
    "next_real_world_evidence_needed": "",
}
reflection
{'what_changed': '',
 'metric_before': '',
 'metric_after': '',
 'interpretation': '',
 'synthetic_data_limit': '',
 'next_real_world_evidence_needed': ''}