Regulatory Pathways for Medical AI
Module: Healthcare AI | Difficulty: Advanced
Clinical Validation
Positive Predictive Value
Regulatory Pathway Comparison
| Pathway | Timeline | Requirements | Post-Market |
|---|---|---|---|
| FDA 510(k) | 3-6 months | Substantial equivalence | MDR reporting |
| FDA De Novo | 6-12 months | Novel device | MDR + PMA |
| FDA PMA | 12-18 months | Clinical trials | Annual reports |
| CE MDR | 6-18 months | Clinical evaluation | Vigilance |
| Health Canada | 6-12 months | License application | MDR reporting |
import numpy as np
def compute_clinical_metrics(tp, fp, tn, fn):
sensitivity = tp / (tp + fn) if (tp + fn) > 0 else 0
specificity = tn / (tn + fp) if (tn + fp) > 0 else 0
ppv = tp / (tp + fp) if (tp + fp) > 0 else 0
npv = tn / (tn + fn) if (tn + fn) > 0 else 0
accuracy = (tp + tn) / (tp + fp + tn + fn)
f1 = 2 * tp / (2 * tp + fp + fn) if (2 * tp + fp + fn) > 0 else 0
return {
'sensitivity': sensitivity,
'specificity': specificity,
'ppv': ppv,
'npv': npv,
'accuracy': accuracy,
'f1': f1
}
def compute_confidence_interval(metric, n, z=1.96):
se = np.sqrt(metric * (1 - metric) / n)
return max(0, metric - z * se), min(1, metric + z * se)
def sample_size_calculation(p1, p2, alpha=0.05, power=0.8):
from scipy import stats
z_alpha = stats.norm.ppf(1 - alpha / 2)
z_beta = stats.norm.ppf(power)
p_avg = (p1 + p2) / 2
n = (z_alpha * np.sqrt(2 * p_avg * (1 - p_avg)) +
z_beta * np.sqrt(p1 * (1 - p1) + p2 * (1 - p2)))**2 / (p1 - p2)**2
return int(np.ceil(n))
metrics = compute_clinical_metrics(tp=450, fp=50, tn=480, fn=20)
print(f'Clinical metrics: {metrics}')
ci = compute_confidence_interval(metrics['sensitivity'], n=520)
print(f'Sensitivity 95% CI: ({ci[0]:.3f}, {ci[1]:.3f})')
n = sample_size_calculation(p1=0.90, p2=0.85)
print(f'Required sample size: {n}')
Research Insight: The regulatory landscape for medical AI is evolving rapidly. The FDA's proposed framework for AI/ML-based Software as a Medical Device (SaMD) introduces the concept of a 'predetermined change control plan' that allows manufacturers to update algorithms without requiring new submissions for each modification. This approach balances innovation with patient safety.