Spaces:
Sleeping
Sleeping
Pietro Saveri commited on
Commit ·
fc3731b
1
Parent(s): 4969386
Deploy combined cluster + simulator APIs (FastAPI / HF Docker Space)
Browse files- Dockerfile +45 -0
- README.md +25 -5
- artifacts/clustering/gmm_model.pkl +3 -0
- artifacts/clustering/imputer.pkl +3 -0
- artifacts/clustering/profile_rules.json +1369 -0
- artifacts/clustering/scaler.pkl +3 -0
- artifacts/simulation/feature_meta.json +133 -0
- artifacts/simulation/model_satisfaction.pkl +3 -0
- artifacts/simulation/model_symptoms.pkl +3 -0
- drugs/output/pill_reference_db.csv +10 -0
- requirements.txt +10 -0
- serve.py +425 -0
Dockerfile
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ──────────────────────────────────────────────────────────────────────────────
|
| 2 |
+
# Selene ML APIs — Hugging Face Spaces Dockerfile
|
| 3 |
+
#
|
| 4 |
+
# Serves BOTH the cluster (GMM) and simulator (HistGBM) models in a single
|
| 5 |
+
# FastAPI process on port 7860 (required by HF Spaces).
|
| 6 |
+
#
|
| 7 |
+
# Build & push via push_to_hf.sh — do NOT build from repo root directly.
|
| 8 |
+
# The Dockerfile expects to run with build context = this hf_space/ directory.
|
| 9 |
+
#
|
| 10 |
+
# Local test:
|
| 11 |
+
# docker build -t selene-ml-apis .
|
| 12 |
+
# docker run -p 7860:7860 selene-ml-apis
|
| 13 |
+
# ──────────────────────────────────────────────────────────────────────────────
|
| 14 |
+
|
| 15 |
+
FROM python:3.12-slim
|
| 16 |
+
|
| 17 |
+
WORKDIR /app
|
| 18 |
+
|
| 19 |
+
# ── System deps ───────────────────────────────────────────────────────────────
|
| 20 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 21 |
+
gcc \
|
| 22 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 23 |
+
|
| 24 |
+
# ── Python deps ───────────────────────────────────────────────────────────────
|
| 25 |
+
COPY requirements.txt ./requirements.txt
|
| 26 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 27 |
+
|
| 28 |
+
# ── Model artifacts ───────────────────────────────────────────────────────────
|
| 29 |
+
COPY artifacts/ ./artifacts/
|
| 30 |
+
|
| 31 |
+
# ── Pill reference database ───────────────────────────────────────────────────
|
| 32 |
+
COPY drugs/ ./drugs/
|
| 33 |
+
|
| 34 |
+
# ── Inference server ──────────────────────────────────────────────────────────
|
| 35 |
+
COPY serve.py ./serve.py
|
| 36 |
+
|
| 37 |
+
# ── HF Spaces runs as a non-root user by default — ensure writable cache ──────
|
| 38 |
+
RUN chmod -R 777 /app
|
| 39 |
+
|
| 40 |
+
# ── Runtime ───────────────────────────────────────────────────────────────────
|
| 41 |
+
EXPOSE 7860
|
| 42 |
+
|
| 43 |
+
ENV PORT=7860
|
| 44 |
+
|
| 45 |
+
CMD ["sh", "-c", "uvicorn serve:app --host 0.0.0.0 --port ${PORT} --workers 1 --log-level info"]
|
README.md
CHANGED
|
@@ -1,11 +1,31 @@
|
|
| 1 |
---
|
| 2 |
title: Selene ML APIs
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
-
short_description:
|
| 9 |
---
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: Selene ML APIs
|
| 3 |
+
emoji: 💊
|
| 4 |
+
colorFrom: pink
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
+
short_description: GMM clustering + HistGBM simulation APIs for Selene
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Selene ML APIs
|
| 12 |
+
|
| 13 |
+
Combined FastAPI inference server exposing two models:
|
| 14 |
+
|
| 15 |
+
| Endpoint | Model | Description |
|
| 16 |
+
|---|---|---|
|
| 17 |
+
| `POST /api/v1/cluster/predict` | GMM (k=12) | Assigns patient to a WHO-MEC-informed risk cluster |
|
| 18 |
+
| `POST /api/v1/simulator/simulate` | HistGBM | Predicts 12-month symptom trajectory per pill |
|
| 19 |
+
| `GET /api/v1/health` | — | Combined health check |
|
| 20 |
+
|
| 21 |
+
## Base URL
|
| 22 |
+
|
| 23 |
+
```
|
| 24 |
+
https://pietrosaveri-selene-ml-apis.hf.space
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
## Quick test
|
| 28 |
+
|
| 29 |
+
```bash
|
| 30 |
+
curl https://pietrosaveri-selene-ml-apis.hf.space/api/v1/health
|
| 31 |
+
```
|
artifacts/clustering/gmm_model.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:73e6c44e61093168416a5b3040752c842442efc0ca7f7d3bb7469ea67fe84fbf
|
| 3 |
+
size 13471
|
artifacts/clustering/imputer.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a0becea4469f1c83e4f422cc30ec7b132f111665dfc1c943ae3de3160c94fa14
|
| 3 |
+
size 2107
|
artifacts/clustering/profile_rules.json
ADDED
|
@@ -0,0 +1,1369 @@
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"k": 12,
|
| 3 |
+
"inference_threshold": 0.4,
|
| 4 |
+
"centroid_thresh_cat4": 0.15,
|
| 5 |
+
"centroid_thresh_cat3": 0.25,
|
| 6 |
+
"feature_order": [
|
| 7 |
+
"age",
|
| 8 |
+
"obs_bmi",
|
| 9 |
+
"obs_systolic_bp",
|
| 10 |
+
"obs_diastolic_bp",
|
| 11 |
+
"obs_phq9_score",
|
| 12 |
+
"obs_testosterone",
|
| 13 |
+
"obs_smoker",
|
| 14 |
+
"cond_migraine_with_aura",
|
| 15 |
+
"cond_stroke",
|
| 16 |
+
"cond_mi",
|
| 17 |
+
"cond_dvt",
|
| 18 |
+
"cond_breast_cancer",
|
| 19 |
+
"cond_lupus",
|
| 20 |
+
"cond_thrombophilia",
|
| 21 |
+
"cond_atrial_fibrillation",
|
| 22 |
+
"cond_liver_disease",
|
| 23 |
+
"cond_hypertension",
|
| 24 |
+
"cond_migraine",
|
| 25 |
+
"cond_gallstones",
|
| 26 |
+
"cond_diabetes",
|
| 27 |
+
"cond_prediabetes",
|
| 28 |
+
"cond_epilepsy",
|
| 29 |
+
"cond_chronic_kidney_disease",
|
| 30 |
+
"cond_sleep_apnea",
|
| 31 |
+
"cond_pcos",
|
| 32 |
+
"cond_endometriosis",
|
| 33 |
+
"cond_depression",
|
| 34 |
+
"cond_hypothyroidism",
|
| 35 |
+
"cond_rheumatoid_arthritis",
|
| 36 |
+
"cond_fibromyalgia",
|
| 37 |
+
"cond_osteoporosis",
|
| 38 |
+
"cond_asthma"
|
| 39 |
+
],
|
| 40 |
+
"continuous_features": [
|
| 41 |
+
"age",
|
| 42 |
+
"obs_bmi",
|
| 43 |
+
"obs_systolic_bp",
|
| 44 |
+
"obs_diastolic_bp",
|
| 45 |
+
"obs_phq9_score",
|
| 46 |
+
"obs_testosterone"
|
| 47 |
+
],
|
| 48 |
+
"binary_features": [
|
| 49 |
+
"obs_smoker",
|
| 50 |
+
"cond_migraine_with_aura",
|
| 51 |
+
"cond_stroke",
|
| 52 |
+
"cond_mi",
|
| 53 |
+
"cond_dvt",
|
| 54 |
+
"cond_breast_cancer",
|
| 55 |
+
"cond_lupus",
|
| 56 |
+
"cond_thrombophilia",
|
| 57 |
+
"cond_atrial_fibrillation",
|
| 58 |
+
"cond_liver_disease",
|
| 59 |
+
"cond_hypertension",
|
| 60 |
+
"cond_migraine",
|
| 61 |
+
"cond_gallstones",
|
| 62 |
+
"cond_diabetes",
|
| 63 |
+
"cond_prediabetes",
|
| 64 |
+
"cond_epilepsy",
|
| 65 |
+
"cond_chronic_kidney_disease",
|
| 66 |
+
"cond_sleep_apnea",
|
| 67 |
+
"cond_pcos",
|
| 68 |
+
"cond_endometriosis",
|
| 69 |
+
"cond_depression",
|
| 70 |
+
"cond_hypothyroidism",
|
| 71 |
+
"cond_rheumatoid_arthritis",
|
| 72 |
+
"cond_fibromyalgia",
|
| 73 |
+
"cond_osteoporosis",
|
| 74 |
+
"cond_asthma"
|
| 75 |
+
],
|
| 76 |
+
"all_pill_ids": [
|
| 77 |
+
"EE20_LNG90",
|
| 78 |
+
"EE30_LNG150",
|
| 79 |
+
"EE35_NET500_1000",
|
| 80 |
+
"EE20_NET1000",
|
| 81 |
+
"EE25_35_NGM",
|
| 82 |
+
"EE30_DSG150",
|
| 83 |
+
"EE30_DRSP3",
|
| 84 |
+
"EE20_DRSP3",
|
| 85 |
+
"NET_PO_350"
|
| 86 |
+
],
|
| 87 |
+
"all_combined_ids": [
|
| 88 |
+
"EE20_LNG90",
|
| 89 |
+
"EE30_LNG150",
|
| 90 |
+
"EE35_NET500_1000",
|
| 91 |
+
"EE20_NET1000",
|
| 92 |
+
"EE25_35_NGM",
|
| 93 |
+
"EE30_DSG150",
|
| 94 |
+
"EE30_DRSP3",
|
| 95 |
+
"EE20_DRSP3"
|
| 96 |
+
],
|
| 97 |
+
"profiles": {
|
| 98 |
+
"0": {
|
| 99 |
+
"label": "Profile 0: Rheum. Arthritis + Sleep Apnea",
|
| 100 |
+
"n_patients_train": 14,
|
| 101 |
+
"pct_train": 0.3,
|
| 102 |
+
"blocked_combos": {
|
| 103 |
+
"EE20_LNG90": [
|
| 104 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 21.4%]",
|
| 105 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 42.9%]"
|
| 106 |
+
],
|
| 107 |
+
"EE30_LNG150": [
|
| 108 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 21.4%]",
|
| 109 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 42.9%]"
|
| 110 |
+
],
|
| 111 |
+
"EE35_NET500_1000": [
|
| 112 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 21.4%]",
|
| 113 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 42.9%]"
|
| 114 |
+
],
|
| 115 |
+
"EE20_NET1000": [
|
| 116 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 21.4%]",
|
| 117 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 42.9%]"
|
| 118 |
+
],
|
| 119 |
+
"EE25_35_NGM": [
|
| 120 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 21.4%]",
|
| 121 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 42.9%]"
|
| 122 |
+
],
|
| 123 |
+
"EE30_DSG150": [
|
| 124 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 21.4%]",
|
| 125 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 42.9%]"
|
| 126 |
+
],
|
| 127 |
+
"EE30_DRSP3": [
|
| 128 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 21.4%]",
|
| 129 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 42.9%]"
|
| 130 |
+
],
|
| 131 |
+
"EE20_DRSP3": [
|
| 132 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 21.4%]",
|
| 133 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 42.9%]"
|
| 134 |
+
],
|
| 135 |
+
"NET_PO_350": [
|
| 136 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 21.4%]"
|
| 137 |
+
]
|
| 138 |
+
},
|
| 139 |
+
"all_blocked_ids": [
|
| 140 |
+
"EE20_DRSP3",
|
| 141 |
+
"EE20_LNG90",
|
| 142 |
+
"EE20_NET1000",
|
| 143 |
+
"EE25_35_NGM",
|
| 144 |
+
"EE30_DRSP3",
|
| 145 |
+
"EE30_DSG150",
|
| 146 |
+
"EE30_LNG150",
|
| 147 |
+
"EE35_NET500_1000",
|
| 148 |
+
"NET_PO_350"
|
| 149 |
+
],
|
| 150 |
+
"top_elevated_features": [
|
| 151 |
+
{
|
| 152 |
+
"feature": "cond_rheumatoid_arthritis",
|
| 153 |
+
"label": "Rheum. Arthritis",
|
| 154 |
+
"cluster_mean": 0.3571,
|
| 155 |
+
"pop_mean": 0.0012,
|
| 156 |
+
"elevation": 0.3559
|
| 157 |
+
},
|
| 158 |
+
{
|
| 159 |
+
"feature": "cond_sleep_apnea",
|
| 160 |
+
"label": "Sleep Apnea",
|
| 161 |
+
"cluster_mean": 0.3571,
|
| 162 |
+
"pop_mean": 0.0019,
|
| 163 |
+
"elevation": 0.3552
|
| 164 |
+
},
|
| 165 |
+
{
|
| 166 |
+
"feature": "cond_hypertension",
|
| 167 |
+
"label": "Hypertension",
|
| 168 |
+
"cluster_mean": 0.4286,
|
| 169 |
+
"pop_mean": 0.0933,
|
| 170 |
+
"elevation": 0.3353
|
| 171 |
+
},
|
| 172 |
+
{
|
| 173 |
+
"feature": "cond_endometriosis",
|
| 174 |
+
"label": "Endometriosis",
|
| 175 |
+
"cluster_mean": 0.3571,
|
| 176 |
+
"pop_mean": 0.0663,
|
| 177 |
+
"elevation": 0.2908
|
| 178 |
+
},
|
| 179 |
+
{
|
| 180 |
+
"feature": "cond_breast_cancer",
|
| 181 |
+
"label": "Breast Cancer",
|
| 182 |
+
"cluster_mean": 0.2143,
|
| 183 |
+
"pop_mean": 0.0085,
|
| 184 |
+
"elevation": 0.2058
|
| 185 |
+
},
|
| 186 |
+
{
|
| 187 |
+
"feature": "cond_depression",
|
| 188 |
+
"label": "Depression",
|
| 189 |
+
"cluster_mean": 0.2857,
|
| 190 |
+
"pop_mean": 0.0831,
|
| 191 |
+
"elevation": 0.2026
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"feature": "cond_diabetes",
|
| 195 |
+
"label": "Diabetes",
|
| 196 |
+
"cluster_mean": 0.1429,
|
| 197 |
+
"pop_mean": 0.0221,
|
| 198 |
+
"elevation": 0.1208
|
| 199 |
+
},
|
| 200 |
+
{
|
| 201 |
+
"feature": "cond_migraine",
|
| 202 |
+
"label": "Migraine",
|
| 203 |
+
"cluster_mean": 0.2143,
|
| 204 |
+
"pop_mean": 0.102,
|
| 205 |
+
"elevation": 0.1123
|
| 206 |
+
}
|
| 207 |
+
],
|
| 208 |
+
"centroid": {
|
| 209 |
+
"age": 44.2697,
|
| 210 |
+
"obs_bmi": 28.6286,
|
| 211 |
+
"obs_systolic_bp": 129.3571,
|
| 212 |
+
"obs_diastolic_bp": 87.0,
|
| 213 |
+
"obs_phq9_score": 12.2143,
|
| 214 |
+
"obs_testosterone": 99.8,
|
| 215 |
+
"obs_smoker": 0.0,
|
| 216 |
+
"cond_migraine_with_aura": 0.0714,
|
| 217 |
+
"cond_stroke": 0.0,
|
| 218 |
+
"cond_mi": 0.0,
|
| 219 |
+
"cond_dvt": 0.0,
|
| 220 |
+
"cond_breast_cancer": 0.2143,
|
| 221 |
+
"cond_lupus": 0.0,
|
| 222 |
+
"cond_thrombophilia": 0.0,
|
| 223 |
+
"cond_atrial_fibrillation": 0.0,
|
| 224 |
+
"cond_liver_disease": 0.0,
|
| 225 |
+
"cond_hypertension": 0.4286,
|
| 226 |
+
"cond_migraine": 0.2143,
|
| 227 |
+
"cond_gallstones": 0.0,
|
| 228 |
+
"cond_diabetes": 0.1429,
|
| 229 |
+
"cond_prediabetes": 0.0,
|
| 230 |
+
"cond_epilepsy": 0.0,
|
| 231 |
+
"cond_chronic_kidney_disease": 0.0,
|
| 232 |
+
"cond_sleep_apnea": 0.3571,
|
| 233 |
+
"cond_pcos": 0.0,
|
| 234 |
+
"cond_endometriosis": 0.3571,
|
| 235 |
+
"cond_depression": 0.2857,
|
| 236 |
+
"cond_hypothyroidism": 0.0,
|
| 237 |
+
"cond_rheumatoid_arthritis": 0.3571,
|
| 238 |
+
"cond_fibromyalgia": 0.0,
|
| 239 |
+
"cond_osteoporosis": 0.0,
|
| 240 |
+
"cond_asthma": 0.0
|
| 241 |
+
}
|
| 242 |
+
},
|
| 243 |
+
"1": {
|
| 244 |
+
"label": "Profile 1: Migraine + Depression",
|
| 245 |
+
"n_patients_train": 661,
|
| 246 |
+
"pct_train": 16.1,
|
| 247 |
+
"blocked_combos": {},
|
| 248 |
+
"all_blocked_ids": [],
|
| 249 |
+
"top_elevated_features": [
|
| 250 |
+
{
|
| 251 |
+
"feature": "cond_migraine",
|
| 252 |
+
"label": "Migraine",
|
| 253 |
+
"cluster_mean": 0.463,
|
| 254 |
+
"pop_mean": 0.102,
|
| 255 |
+
"elevation": 0.3609
|
| 256 |
+
},
|
| 257 |
+
{
|
| 258 |
+
"feature": "cond_depression",
|
| 259 |
+
"label": "Depression",
|
| 260 |
+
"cluster_mean": 0.354,
|
| 261 |
+
"pop_mean": 0.0831,
|
| 262 |
+
"elevation": 0.2709
|
| 263 |
+
},
|
| 264 |
+
{
|
| 265 |
+
"feature": "cond_endometriosis",
|
| 266 |
+
"label": "Endometriosis",
|
| 267 |
+
"cluster_mean": 0.2784,
|
| 268 |
+
"pop_mean": 0.0663,
|
| 269 |
+
"elevation": 0.2121
|
| 270 |
+
}
|
| 271 |
+
],
|
| 272 |
+
"centroid": {
|
| 273 |
+
"age": 35.7495,
|
| 274 |
+
"obs_bmi": 27.9714,
|
| 275 |
+
"obs_systolic_bp": 118.9289,
|
| 276 |
+
"obs_diastolic_bp": 78.505,
|
| 277 |
+
"obs_phq9_score": 14.0892,
|
| 278 |
+
"obs_testosterone": 99.8,
|
| 279 |
+
"obs_smoker": 0.0,
|
| 280 |
+
"cond_migraine_with_aura": 0.0,
|
| 281 |
+
"cond_stroke": 0.0,
|
| 282 |
+
"cond_mi": 0.0,
|
| 283 |
+
"cond_dvt": 0.0,
|
| 284 |
+
"cond_breast_cancer": 0.0,
|
| 285 |
+
"cond_lupus": 0.0,
|
| 286 |
+
"cond_thrombophilia": 0.0,
|
| 287 |
+
"cond_atrial_fibrillation": 0.0,
|
| 288 |
+
"cond_liver_disease": 0.0,
|
| 289 |
+
"cond_hypertension": 0.0,
|
| 290 |
+
"cond_migraine": 0.463,
|
| 291 |
+
"cond_gallstones": 0.0,
|
| 292 |
+
"cond_diabetes": 0.0,
|
| 293 |
+
"cond_prediabetes": 0.0,
|
| 294 |
+
"cond_epilepsy": 0.0,
|
| 295 |
+
"cond_chronic_kidney_disease": 0.0,
|
| 296 |
+
"cond_sleep_apnea": 0.0,
|
| 297 |
+
"cond_pcos": 0.0,
|
| 298 |
+
"cond_endometriosis": 0.2784,
|
| 299 |
+
"cond_depression": 0.354,
|
| 300 |
+
"cond_hypothyroidism": 0.0,
|
| 301 |
+
"cond_rheumatoid_arthritis": 0.0,
|
| 302 |
+
"cond_fibromyalgia": 0.0,
|
| 303 |
+
"cond_osteoporosis": 0.0,
|
| 304 |
+
"cond_asthma": 0.0
|
| 305 |
+
}
|
| 306 |
+
},
|
| 307 |
+
"2": {
|
| 308 |
+
"label": "Profile 2: Diabetes + Breast Cancer",
|
| 309 |
+
"n_patients_train": 66,
|
| 310 |
+
"pct_train": 1.6,
|
| 311 |
+
"blocked_combos": {
|
| 312 |
+
"EE20_LNG90": [
|
| 313 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 45.6%]",
|
| 314 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 52.8%]"
|
| 315 |
+
],
|
| 316 |
+
"EE30_LNG150": [
|
| 317 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 45.6%]",
|
| 318 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 52.8%]"
|
| 319 |
+
],
|
| 320 |
+
"EE35_NET500_1000": [
|
| 321 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 45.6%]",
|
| 322 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 52.8%]"
|
| 323 |
+
],
|
| 324 |
+
"EE20_NET1000": [
|
| 325 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 45.6%]",
|
| 326 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 52.8%]"
|
| 327 |
+
],
|
| 328 |
+
"EE25_35_NGM": [
|
| 329 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 45.6%]",
|
| 330 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 52.8%]"
|
| 331 |
+
],
|
| 332 |
+
"EE30_DSG150": [
|
| 333 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 45.6%]",
|
| 334 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 52.8%]"
|
| 335 |
+
],
|
| 336 |
+
"EE30_DRSP3": [
|
| 337 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 45.6%]",
|
| 338 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 52.8%]"
|
| 339 |
+
],
|
| 340 |
+
"EE20_DRSP3": [
|
| 341 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 45.6%]",
|
| 342 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 52.8%]"
|
| 343 |
+
],
|
| 344 |
+
"NET_PO_350": [
|
| 345 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 45.6%]"
|
| 346 |
+
]
|
| 347 |
+
},
|
| 348 |
+
"all_blocked_ids": [
|
| 349 |
+
"EE20_DRSP3",
|
| 350 |
+
"EE20_LNG90",
|
| 351 |
+
"EE20_NET1000",
|
| 352 |
+
"EE25_35_NGM",
|
| 353 |
+
"EE30_DRSP3",
|
| 354 |
+
"EE30_DSG150",
|
| 355 |
+
"EE30_LNG150",
|
| 356 |
+
"EE35_NET500_1000",
|
| 357 |
+
"NET_PO_350"
|
| 358 |
+
],
|
| 359 |
+
"top_elevated_features": [
|
| 360 |
+
{
|
| 361 |
+
"feature": "cond_diabetes",
|
| 362 |
+
"label": "Diabetes",
|
| 363 |
+
"cluster_mean": 0.5283,
|
| 364 |
+
"pop_mean": 0.0221,
|
| 365 |
+
"elevation": 0.5062
|
| 366 |
+
},
|
| 367 |
+
{
|
| 368 |
+
"feature": "cond_breast_cancer",
|
| 369 |
+
"label": "Breast Cancer",
|
| 370 |
+
"cluster_mean": 0.4564,
|
| 371 |
+
"pop_mean": 0.0085,
|
| 372 |
+
"elevation": 0.4479
|
| 373 |
+
},
|
| 374 |
+
{
|
| 375 |
+
"feature": "cond_depression",
|
| 376 |
+
"label": "Depression",
|
| 377 |
+
"cluster_mean": 0.1826,
|
| 378 |
+
"pop_mean": 0.0831,
|
| 379 |
+
"elevation": 0.0995
|
| 380 |
+
},
|
| 381 |
+
{
|
| 382 |
+
"feature": "cond_migraine",
|
| 383 |
+
"label": "Migraine",
|
| 384 |
+
"cluster_mean": 0.1804,
|
| 385 |
+
"pop_mean": 0.102,
|
| 386 |
+
"elevation": 0.0783
|
| 387 |
+
},
|
| 388 |
+
{
|
| 389 |
+
"feature": "cond_hypertension",
|
| 390 |
+
"label": "Hypertension",
|
| 391 |
+
"cluster_mean": 0.1514,
|
| 392 |
+
"pop_mean": 0.0933,
|
| 393 |
+
"elevation": 0.0581
|
| 394 |
+
}
|
| 395 |
+
],
|
| 396 |
+
"centroid": {
|
| 397 |
+
"age": 41.1385,
|
| 398 |
+
"obs_bmi": 27.9912,
|
| 399 |
+
"obs_systolic_bp": 119.2237,
|
| 400 |
+
"obs_diastolic_bp": 79.8144,
|
| 401 |
+
"obs_phq9_score": 14.0063,
|
| 402 |
+
"obs_testosterone": 99.8,
|
| 403 |
+
"obs_smoker": 0.0,
|
| 404 |
+
"cond_migraine_with_aura": 0.0,
|
| 405 |
+
"cond_stroke": 0.0,
|
| 406 |
+
"cond_mi": 0.0,
|
| 407 |
+
"cond_dvt": 0.0,
|
| 408 |
+
"cond_breast_cancer": 0.4564,
|
| 409 |
+
"cond_lupus": 0.0,
|
| 410 |
+
"cond_thrombophilia": 0.0457,
|
| 411 |
+
"cond_atrial_fibrillation": 0.0,
|
| 412 |
+
"cond_liver_disease": 0.0,
|
| 413 |
+
"cond_hypertension": 0.1514,
|
| 414 |
+
"cond_migraine": 0.1804,
|
| 415 |
+
"cond_gallstones": 0.0,
|
| 416 |
+
"cond_diabetes": 0.5283,
|
| 417 |
+
"cond_prediabetes": 0.0,
|
| 418 |
+
"cond_epilepsy": 0.0152,
|
| 419 |
+
"cond_chronic_kidney_disease": 0.0,
|
| 420 |
+
"cond_sleep_apnea": 0.0,
|
| 421 |
+
"cond_pcos": 0.0,
|
| 422 |
+
"cond_endometriosis": 0.0,
|
| 423 |
+
"cond_depression": 0.1826,
|
| 424 |
+
"cond_hypothyroidism": 0.0,
|
| 425 |
+
"cond_rheumatoid_arthritis": 0.0,
|
| 426 |
+
"cond_fibromyalgia": 0.0,
|
| 427 |
+
"cond_osteoporosis": 0.0,
|
| 428 |
+
"cond_asthma": 0.0
|
| 429 |
+
}
|
| 430 |
+
},
|
| 431 |
+
"3": {
|
| 432 |
+
"label": "Profile 3: Hypertension + Diabetes",
|
| 433 |
+
"n_patients_train": 57,
|
| 434 |
+
"pct_train": 1.4,
|
| 435 |
+
"blocked_combos": {
|
| 436 |
+
"EE20_LNG90": [
|
| 437 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 100.0%]",
|
| 438 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 56.0%]"
|
| 439 |
+
],
|
| 440 |
+
"EE30_LNG150": [
|
| 441 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 100.0%]",
|
| 442 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 56.0%]"
|
| 443 |
+
],
|
| 444 |
+
"EE35_NET500_1000": [
|
| 445 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 100.0%]",
|
| 446 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 56.0%]"
|
| 447 |
+
],
|
| 448 |
+
"EE20_NET1000": [
|
| 449 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 100.0%]",
|
| 450 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 56.0%]"
|
| 451 |
+
],
|
| 452 |
+
"EE25_35_NGM": [
|
| 453 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 100.0%]",
|
| 454 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 56.0%]"
|
| 455 |
+
],
|
| 456 |
+
"EE30_DSG150": [
|
| 457 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 100.0%]",
|
| 458 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 56.0%]"
|
| 459 |
+
],
|
| 460 |
+
"EE30_DRSP3": [
|
| 461 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 100.0%]",
|
| 462 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 56.0%]"
|
| 463 |
+
],
|
| 464 |
+
"EE20_DRSP3": [
|
| 465 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 100.0%]",
|
| 466 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 56.0%]"
|
| 467 |
+
]
|
| 468 |
+
},
|
| 469 |
+
"all_blocked_ids": [
|
| 470 |
+
"EE20_DRSP3",
|
| 471 |
+
"EE20_LNG90",
|
| 472 |
+
"EE20_NET1000",
|
| 473 |
+
"EE25_35_NGM",
|
| 474 |
+
"EE30_DRSP3",
|
| 475 |
+
"EE30_DSG150",
|
| 476 |
+
"EE30_LNG150",
|
| 477 |
+
"EE35_NET500_1000"
|
| 478 |
+
],
|
| 479 |
+
"top_elevated_features": [
|
| 480 |
+
{
|
| 481 |
+
"feature": "cond_hypertension",
|
| 482 |
+
"label": "Hypertension",
|
| 483 |
+
"cluster_mean": 1.0,
|
| 484 |
+
"pop_mean": 0.0933,
|
| 485 |
+
"elevation": 0.9067
|
| 486 |
+
},
|
| 487 |
+
{
|
| 488 |
+
"feature": "cond_diabetes",
|
| 489 |
+
"label": "Diabetes",
|
| 490 |
+
"cluster_mean": 0.5604,
|
| 491 |
+
"pop_mean": 0.0221,
|
| 492 |
+
"elevation": 0.5383
|
| 493 |
+
},
|
| 494 |
+
{
|
| 495 |
+
"feature": "cond_endometriosis",
|
| 496 |
+
"label": "Endometriosis",
|
| 497 |
+
"cluster_mean": 0.4028,
|
| 498 |
+
"pop_mean": 0.0663,
|
| 499 |
+
"elevation": 0.3365
|
| 500 |
+
},
|
| 501 |
+
{
|
| 502 |
+
"feature": "cond_epilepsy",
|
| 503 |
+
"label": "Epilepsy",
|
| 504 |
+
"cluster_mean": 0.1051,
|
| 505 |
+
"pop_mean": 0.0211,
|
| 506 |
+
"elevation": 0.0839
|
| 507 |
+
},
|
| 508 |
+
{
|
| 509 |
+
"feature": "cond_migraine_with_aura",
|
| 510 |
+
"label": "Migraine+Aura",
|
| 511 |
+
"cluster_mean": 0.1051,
|
| 512 |
+
"pop_mean": 0.0425,
|
| 513 |
+
"elevation": 0.0626
|
| 514 |
+
}
|
| 515 |
+
],
|
| 516 |
+
"centroid": {
|
| 517 |
+
"age": 41.9285,
|
| 518 |
+
"obs_bmi": 28.7588,
|
| 519 |
+
"obs_systolic_bp": 120.1232,
|
| 520 |
+
"obs_diastolic_bp": 82.194,
|
| 521 |
+
"obs_phq9_score": 12.8248,
|
| 522 |
+
"obs_testosterone": 99.8,
|
| 523 |
+
"obs_smoker": 0.0,
|
| 524 |
+
"cond_migraine_with_aura": 0.1051,
|
| 525 |
+
"cond_stroke": 0.0,
|
| 526 |
+
"cond_mi": 0.0,
|
| 527 |
+
"cond_dvt": 0.0,
|
| 528 |
+
"cond_breast_cancer": 0.0,
|
| 529 |
+
"cond_lupus": 0.0,
|
| 530 |
+
"cond_thrombophilia": 0.0,
|
| 531 |
+
"cond_atrial_fibrillation": 0.0,
|
| 532 |
+
"cond_liver_disease": 0.0,
|
| 533 |
+
"cond_hypertension": 1.0,
|
| 534 |
+
"cond_migraine": 0.0,
|
| 535 |
+
"cond_gallstones": 0.0,
|
| 536 |
+
"cond_diabetes": 0.5604,
|
| 537 |
+
"cond_prediabetes": 0.0,
|
| 538 |
+
"cond_epilepsy": 0.1051,
|
| 539 |
+
"cond_chronic_kidney_disease": 0.0,
|
| 540 |
+
"cond_sleep_apnea": 0.035,
|
| 541 |
+
"cond_pcos": 0.0,
|
| 542 |
+
"cond_endometriosis": 0.4028,
|
| 543 |
+
"cond_depression": 0.0,
|
| 544 |
+
"cond_hypothyroidism": 0.0,
|
| 545 |
+
"cond_rheumatoid_arthritis": 0.0,
|
| 546 |
+
"cond_fibromyalgia": 0.0,
|
| 547 |
+
"cond_osteoporosis": 0.0,
|
| 548 |
+
"cond_asthma": 0.0
|
| 549 |
+
}
|
| 550 |
+
},
|
| 551 |
+
"4": {
|
| 552 |
+
"label": "Profile 4: Thrombophilia + Endometriosis",
|
| 553 |
+
"n_patients_train": 138,
|
| 554 |
+
"pct_train": 3.4,
|
| 555 |
+
"blocked_combos": {
|
| 556 |
+
"EE20_LNG90": [
|
| 557 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 83.3%]"
|
| 558 |
+
],
|
| 559 |
+
"EE30_LNG150": [
|
| 560 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 83.3%]"
|
| 561 |
+
],
|
| 562 |
+
"EE35_NET500_1000": [
|
| 563 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 83.3%]"
|
| 564 |
+
],
|
| 565 |
+
"EE20_NET1000": [
|
| 566 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 83.3%]"
|
| 567 |
+
],
|
| 568 |
+
"EE25_35_NGM": [
|
| 569 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 83.3%]"
|
| 570 |
+
],
|
| 571 |
+
"EE30_DSG150": [
|
| 572 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 83.3%]"
|
| 573 |
+
],
|
| 574 |
+
"EE30_DRSP3": [
|
| 575 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 83.3%]"
|
| 576 |
+
],
|
| 577 |
+
"EE20_DRSP3": [
|
| 578 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 83.3%]"
|
| 579 |
+
]
|
| 580 |
+
},
|
| 581 |
+
"all_blocked_ids": [
|
| 582 |
+
"EE20_DRSP3",
|
| 583 |
+
"EE20_LNG90",
|
| 584 |
+
"EE20_NET1000",
|
| 585 |
+
"EE25_35_NGM",
|
| 586 |
+
"EE30_DRSP3",
|
| 587 |
+
"EE30_DSG150",
|
| 588 |
+
"EE30_LNG150",
|
| 589 |
+
"EE35_NET500_1000"
|
| 590 |
+
],
|
| 591 |
+
"top_elevated_features": [
|
| 592 |
+
{
|
| 593 |
+
"feature": "cond_thrombophilia",
|
| 594 |
+
"label": "Thrombophilia",
|
| 595 |
+
"cluster_mean": 0.8333,
|
| 596 |
+
"pop_mean": 0.0352,
|
| 597 |
+
"elevation": 0.7981
|
| 598 |
+
},
|
| 599 |
+
{
|
| 600 |
+
"feature": "cond_endometriosis",
|
| 601 |
+
"label": "Endometriosis",
|
| 602 |
+
"cluster_mean": 0.1739,
|
| 603 |
+
"pop_mean": 0.0663,
|
| 604 |
+
"elevation": 0.1076
|
| 605 |
+
},
|
| 606 |
+
{
|
| 607 |
+
"feature": "cond_migraine_with_aura",
|
| 608 |
+
"label": "Migraine+Aura",
|
| 609 |
+
"cluster_mean": 0.1449,
|
| 610 |
+
"pop_mean": 0.0425,
|
| 611 |
+
"elevation": 0.1024
|
| 612 |
+
},
|
| 613 |
+
{
|
| 614 |
+
"feature": "cond_epilepsy",
|
| 615 |
+
"label": "Epilepsy",
|
| 616 |
+
"cluster_mean": 0.0942,
|
| 617 |
+
"pop_mean": 0.0211,
|
| 618 |
+
"elevation": 0.0731
|
| 619 |
+
},
|
| 620 |
+
{
|
| 621 |
+
"feature": "cond_depression",
|
| 622 |
+
"label": "Depression",
|
| 623 |
+
"cluster_mean": 0.1377,
|
| 624 |
+
"pop_mean": 0.0831,
|
| 625 |
+
"elevation": 0.0546
|
| 626 |
+
}
|
| 627 |
+
],
|
| 628 |
+
"centroid": {
|
| 629 |
+
"age": 37.0157,
|
| 630 |
+
"obs_bmi": 27.9934,
|
| 631 |
+
"obs_systolic_bp": 118.8628,
|
| 632 |
+
"obs_diastolic_bp": 77.6047,
|
| 633 |
+
"obs_phq9_score": 14.3842,
|
| 634 |
+
"obs_testosterone": 99.8,
|
| 635 |
+
"obs_smoker": 0.0,
|
| 636 |
+
"cond_migraine_with_aura": 0.1449,
|
| 637 |
+
"cond_stroke": 0.0,
|
| 638 |
+
"cond_mi": 0.0,
|
| 639 |
+
"cond_dvt": 0.0,
|
| 640 |
+
"cond_breast_cancer": 0.0,
|
| 641 |
+
"cond_lupus": 0.0,
|
| 642 |
+
"cond_thrombophilia": 0.8333,
|
| 643 |
+
"cond_atrial_fibrillation": 0.0,
|
| 644 |
+
"cond_liver_disease": 0.0,
|
| 645 |
+
"cond_hypertension": 0.0,
|
| 646 |
+
"cond_migraine": 0.1232,
|
| 647 |
+
"cond_gallstones": 0.0,
|
| 648 |
+
"cond_diabetes": 0.0,
|
| 649 |
+
"cond_prediabetes": 0.0,
|
| 650 |
+
"cond_epilepsy": 0.0942,
|
| 651 |
+
"cond_chronic_kidney_disease": 0.0,
|
| 652 |
+
"cond_sleep_apnea": 0.0,
|
| 653 |
+
"cond_pcos": 0.0,
|
| 654 |
+
"cond_endometriosis": 0.1739,
|
| 655 |
+
"cond_depression": 0.1377,
|
| 656 |
+
"cond_hypothyroidism": 0.0,
|
| 657 |
+
"cond_rheumatoid_arthritis": 0.0,
|
| 658 |
+
"cond_fibromyalgia": 0.0,
|
| 659 |
+
"cond_osteoporosis": 0.0,
|
| 660 |
+
"cond_asthma": 0.0
|
| 661 |
+
}
|
| 662 |
+
},
|
| 663 |
+
"5": {
|
| 664 |
+
"label": "Profile 5: Baseline / Low-Risk",
|
| 665 |
+
"n_patients_train": 2403,
|
| 666 |
+
"pct_train": 58.4,
|
| 667 |
+
"blocked_combos": {},
|
| 668 |
+
"all_blocked_ids": [],
|
| 669 |
+
"top_elevated_features": [],
|
| 670 |
+
"centroid": {
|
| 671 |
+
"age": 29.6032,
|
| 672 |
+
"obs_bmi": 26.4091,
|
| 673 |
+
"obs_systolic_bp": 118.7062,
|
| 674 |
+
"obs_diastolic_bp": 78.7045,
|
| 675 |
+
"obs_phq9_score": 13.8926,
|
| 676 |
+
"obs_testosterone": 99.8,
|
| 677 |
+
"obs_smoker": 0.0,
|
| 678 |
+
"cond_migraine_with_aura": 0.0,
|
| 679 |
+
"cond_stroke": 0.0,
|
| 680 |
+
"cond_mi": 0.0,
|
| 681 |
+
"cond_dvt": 0.0,
|
| 682 |
+
"cond_breast_cancer": 0.0,
|
| 683 |
+
"cond_lupus": 0.0,
|
| 684 |
+
"cond_thrombophilia": 0.0,
|
| 685 |
+
"cond_atrial_fibrillation": 0.0,
|
| 686 |
+
"cond_liver_disease": 0.0,
|
| 687 |
+
"cond_hypertension": 0.0,
|
| 688 |
+
"cond_migraine": 0.0,
|
| 689 |
+
"cond_gallstones": 0.0,
|
| 690 |
+
"cond_diabetes": 0.0,
|
| 691 |
+
"cond_prediabetes": 0.0,
|
| 692 |
+
"cond_epilepsy": 0.0,
|
| 693 |
+
"cond_chronic_kidney_disease": 0.0,
|
| 694 |
+
"cond_sleep_apnea": 0.0,
|
| 695 |
+
"cond_pcos": 0.0,
|
| 696 |
+
"cond_endometriosis": 0.0,
|
| 697 |
+
"cond_depression": 0.0,
|
| 698 |
+
"cond_hypothyroidism": 0.0,
|
| 699 |
+
"cond_rheumatoid_arthritis": 0.0,
|
| 700 |
+
"cond_fibromyalgia": 0.0,
|
| 701 |
+
"cond_osteoporosis": 0.0,
|
| 702 |
+
"cond_asthma": 0.0
|
| 703 |
+
}
|
| 704 |
+
},
|
| 705 |
+
"6": {
|
| 706 |
+
"label": "Profile 6: PCOS + Thrombophilia",
|
| 707 |
+
"n_patients_train": 13,
|
| 708 |
+
"pct_train": 0.3,
|
| 709 |
+
"blocked_combos": {
|
| 710 |
+
"EE20_LNG90": [
|
| 711 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 712 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 713 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 46.1%]",
|
| 714 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 30.8%]",
|
| 715 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 38.4%]"
|
| 716 |
+
],
|
| 717 |
+
"EE30_LNG150": [
|
| 718 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 719 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 720 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 46.1%]",
|
| 721 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 30.8%]",
|
| 722 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 38.4%]"
|
| 723 |
+
],
|
| 724 |
+
"EE35_NET500_1000": [
|
| 725 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 726 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 727 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 46.1%]",
|
| 728 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 30.8%]",
|
| 729 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 38.4%]"
|
| 730 |
+
],
|
| 731 |
+
"EE20_NET1000": [
|
| 732 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 733 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 734 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 46.1%]",
|
| 735 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 30.8%]",
|
| 736 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 38.4%]"
|
| 737 |
+
],
|
| 738 |
+
"EE25_35_NGM": [
|
| 739 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 740 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 741 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 46.1%]",
|
| 742 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 30.8%]",
|
| 743 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 38.4%]"
|
| 744 |
+
],
|
| 745 |
+
"EE30_DSG150": [
|
| 746 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 747 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 748 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 46.1%]",
|
| 749 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 30.8%]",
|
| 750 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 38.4%]"
|
| 751 |
+
],
|
| 752 |
+
"EE30_DRSP3": [
|
| 753 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 754 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 755 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 46.1%]",
|
| 756 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 30.8%]",
|
| 757 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 38.4%]"
|
| 758 |
+
],
|
| 759 |
+
"EE20_DRSP3": [
|
| 760 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 761 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 15.4%]",
|
| 762 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 46.1%]",
|
| 763 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 30.8%]",
|
| 764 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 38.4%]"
|
| 765 |
+
],
|
| 766 |
+
"NET_PO_350": [
|
| 767 |
+
"WHO MEC Cat 4: Breast cancer \u2014 all hormonal OCPs contraindicated (WHO MEC Cat 4) [profile prevalence: 15.4%]"
|
| 768 |
+
]
|
| 769 |
+
},
|
| 770 |
+
"all_blocked_ids": [
|
| 771 |
+
"EE20_DRSP3",
|
| 772 |
+
"EE20_LNG90",
|
| 773 |
+
"EE20_NET1000",
|
| 774 |
+
"EE25_35_NGM",
|
| 775 |
+
"EE30_DRSP3",
|
| 776 |
+
"EE30_DSG150",
|
| 777 |
+
"EE30_LNG150",
|
| 778 |
+
"EE35_NET500_1000",
|
| 779 |
+
"NET_PO_350"
|
| 780 |
+
],
|
| 781 |
+
"top_elevated_features": [
|
| 782 |
+
{
|
| 783 |
+
"feature": "cond_pcos",
|
| 784 |
+
"label": "PCOS",
|
| 785 |
+
"cluster_mean": 1.0,
|
| 786 |
+
"pop_mean": 0.0787,
|
| 787 |
+
"elevation": 0.9213
|
| 788 |
+
},
|
| 789 |
+
{
|
| 790 |
+
"feature": "cond_thrombophilia",
|
| 791 |
+
"label": "Thrombophilia",
|
| 792 |
+
"cluster_mean": 0.461,
|
| 793 |
+
"pop_mean": 0.0352,
|
| 794 |
+
"elevation": 0.4258
|
| 795 |
+
},
|
| 796 |
+
{
|
| 797 |
+
"feature": "cond_epilepsy",
|
| 798 |
+
"label": "Epilepsy",
|
| 799 |
+
"cluster_mean": 0.3841,
|
| 800 |
+
"pop_mean": 0.0211,
|
| 801 |
+
"elevation": 0.363
|
| 802 |
+
},
|
| 803 |
+
{
|
| 804 |
+
"feature": "cond_hypertension",
|
| 805 |
+
"label": "Hypertension",
|
| 806 |
+
"cluster_mean": 0.3075,
|
| 807 |
+
"pop_mean": 0.0933,
|
| 808 |
+
"elevation": 0.2142
|
| 809 |
+
},
|
| 810 |
+
{
|
| 811 |
+
"feature": "cond_breast_cancer",
|
| 812 |
+
"label": "Breast Cancer",
|
| 813 |
+
"cluster_mean": 0.1536,
|
| 814 |
+
"pop_mean": 0.0085,
|
| 815 |
+
"elevation": 0.1451
|
| 816 |
+
},
|
| 817 |
+
{
|
| 818 |
+
"feature": "cond_migraine",
|
| 819 |
+
"label": "Migraine",
|
| 820 |
+
"cluster_mean": 0.2314,
|
| 821 |
+
"pop_mean": 0.102,
|
| 822 |
+
"elevation": 0.1294
|
| 823 |
+
},
|
| 824 |
+
{
|
| 825 |
+
"feature": "cond_migraine_with_aura",
|
| 826 |
+
"label": "Migraine+Aura",
|
| 827 |
+
"cluster_mean": 0.1538,
|
| 828 |
+
"pop_mean": 0.0425,
|
| 829 |
+
"elevation": 0.1113
|
| 830 |
+
},
|
| 831 |
+
{
|
| 832 |
+
"feature": "cond_atrial_fibrillation",
|
| 833 |
+
"label": "Afib",
|
| 834 |
+
"cluster_mean": 0.0768,
|
| 835 |
+
"pop_mean": 0.0002,
|
| 836 |
+
"elevation": 0.0766
|
| 837 |
+
}
|
| 838 |
+
],
|
| 839 |
+
"centroid": {
|
| 840 |
+
"age": 35.7037,
|
| 841 |
+
"obs_bmi": 26.0971,
|
| 842 |
+
"obs_systolic_bp": 119.1597,
|
| 843 |
+
"obs_diastolic_bp": 79.3786,
|
| 844 |
+
"obs_phq9_score": 13.6157,
|
| 845 |
+
"obs_testosterone": 84.8096,
|
| 846 |
+
"obs_smoker": 0.0,
|
| 847 |
+
"cond_migraine_with_aura": 0.1538,
|
| 848 |
+
"cond_stroke": 0.0,
|
| 849 |
+
"cond_mi": 0.0,
|
| 850 |
+
"cond_dvt": 0.0,
|
| 851 |
+
"cond_breast_cancer": 0.1536,
|
| 852 |
+
"cond_lupus": 0.0,
|
| 853 |
+
"cond_thrombophilia": 0.461,
|
| 854 |
+
"cond_atrial_fibrillation": 0.0768,
|
| 855 |
+
"cond_liver_disease": 0.0,
|
| 856 |
+
"cond_hypertension": 0.3075,
|
| 857 |
+
"cond_migraine": 0.2314,
|
| 858 |
+
"cond_gallstones": 0.0,
|
| 859 |
+
"cond_diabetes": 0.0,
|
| 860 |
+
"cond_prediabetes": 0.0,
|
| 861 |
+
"cond_epilepsy": 0.3841,
|
| 862 |
+
"cond_chronic_kidney_disease": 0.0,
|
| 863 |
+
"cond_sleep_apnea": 0.0,
|
| 864 |
+
"cond_pcos": 1.0,
|
| 865 |
+
"cond_endometriosis": 0.0,
|
| 866 |
+
"cond_depression": 0.0,
|
| 867 |
+
"cond_hypothyroidism": 0.0,
|
| 868 |
+
"cond_rheumatoid_arthritis": 0.0,
|
| 869 |
+
"cond_fibromyalgia": 0.0,
|
| 870 |
+
"cond_osteoporosis": 0.0,
|
| 871 |
+
"cond_asthma": 0.0
|
| 872 |
+
}
|
| 873 |
+
},
|
| 874 |
+
"7": {
|
| 875 |
+
"label": "Profile 7: Epilepsy",
|
| 876 |
+
"n_patients_train": 65,
|
| 877 |
+
"pct_train": 1.6,
|
| 878 |
+
"blocked_combos": {
|
| 879 |
+
"EE20_LNG90": [
|
| 880 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 95.4%]"
|
| 881 |
+
],
|
| 882 |
+
"EE30_LNG150": [
|
| 883 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 95.4%]"
|
| 884 |
+
],
|
| 885 |
+
"EE35_NET500_1000": [
|
| 886 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 95.4%]"
|
| 887 |
+
],
|
| 888 |
+
"EE20_NET1000": [
|
| 889 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 95.4%]"
|
| 890 |
+
],
|
| 891 |
+
"EE25_35_NGM": [
|
| 892 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 95.4%]"
|
| 893 |
+
],
|
| 894 |
+
"EE30_DSG150": [
|
| 895 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 95.4%]"
|
| 896 |
+
],
|
| 897 |
+
"EE30_DRSP3": [
|
| 898 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 95.4%]"
|
| 899 |
+
],
|
| 900 |
+
"EE20_DRSP3": [
|
| 901 |
+
"WHO MEC Cat 3: Epilepsy / AED interaction \u2014 enzyme-inducing AEDs reduce OCP efficacy (WHO MEC Cat 3 interaction) [profile prevalence: 95.4%]"
|
| 902 |
+
]
|
| 903 |
+
},
|
| 904 |
+
"all_blocked_ids": [
|
| 905 |
+
"EE20_DRSP3",
|
| 906 |
+
"EE20_LNG90",
|
| 907 |
+
"EE20_NET1000",
|
| 908 |
+
"EE25_35_NGM",
|
| 909 |
+
"EE30_DRSP3",
|
| 910 |
+
"EE30_DSG150",
|
| 911 |
+
"EE30_LNG150",
|
| 912 |
+
"EE35_NET500_1000"
|
| 913 |
+
],
|
| 914 |
+
"top_elevated_features": [
|
| 915 |
+
{
|
| 916 |
+
"feature": "cond_epilepsy",
|
| 917 |
+
"label": "Epilepsy",
|
| 918 |
+
"cluster_mean": 0.9538,
|
| 919 |
+
"pop_mean": 0.0211,
|
| 920 |
+
"elevation": 0.9327
|
| 921 |
+
}
|
| 922 |
+
],
|
| 923 |
+
"centroid": {
|
| 924 |
+
"age": 30.9146,
|
| 925 |
+
"obs_bmi": 24.2077,
|
| 926 |
+
"obs_systolic_bp": 119.0554,
|
| 927 |
+
"obs_diastolic_bp": 79.0015,
|
| 928 |
+
"obs_phq9_score": 13.7231,
|
| 929 |
+
"obs_testosterone": 99.8,
|
| 930 |
+
"obs_smoker": 0.0,
|
| 931 |
+
"cond_migraine_with_aura": 0.0,
|
| 932 |
+
"cond_stroke": 0.0,
|
| 933 |
+
"cond_mi": 0.0,
|
| 934 |
+
"cond_dvt": 0.0,
|
| 935 |
+
"cond_breast_cancer": 0.0,
|
| 936 |
+
"cond_lupus": 0.0,
|
| 937 |
+
"cond_thrombophilia": 0.0,
|
| 938 |
+
"cond_atrial_fibrillation": 0.0,
|
| 939 |
+
"cond_liver_disease": 0.0,
|
| 940 |
+
"cond_hypertension": 0.0,
|
| 941 |
+
"cond_migraine": 0.0,
|
| 942 |
+
"cond_gallstones": 0.0,
|
| 943 |
+
"cond_diabetes": 0.0,
|
| 944 |
+
"cond_prediabetes": 0.0,
|
| 945 |
+
"cond_epilepsy": 0.9538,
|
| 946 |
+
"cond_chronic_kidney_disease": 0.0,
|
| 947 |
+
"cond_sleep_apnea": 0.0,
|
| 948 |
+
"cond_pcos": 0.0,
|
| 949 |
+
"cond_endometriosis": 0.0,
|
| 950 |
+
"cond_depression": 0.0,
|
| 951 |
+
"cond_hypothyroidism": 0.0,
|
| 952 |
+
"cond_rheumatoid_arthritis": 0.0,
|
| 953 |
+
"cond_fibromyalgia": 0.0154,
|
| 954 |
+
"cond_osteoporosis": 0.0462,
|
| 955 |
+
"cond_asthma": 0.0
|
| 956 |
+
}
|
| 957 |
+
},
|
| 958 |
+
"8": {
|
| 959 |
+
"label": "Profile 8: PCOS + Hypertension",
|
| 960 |
+
"n_patients_train": 72,
|
| 961 |
+
"pct_train": 1.7,
|
| 962 |
+
"blocked_combos": {
|
| 963 |
+
"EE20_LNG90": [
|
| 964 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 62.5%]"
|
| 965 |
+
],
|
| 966 |
+
"EE30_LNG150": [
|
| 967 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 62.5%]"
|
| 968 |
+
],
|
| 969 |
+
"EE35_NET500_1000": [
|
| 970 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 62.5%]"
|
| 971 |
+
],
|
| 972 |
+
"EE20_NET1000": [
|
| 973 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 62.5%]"
|
| 974 |
+
],
|
| 975 |
+
"EE25_35_NGM": [
|
| 976 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 62.5%]"
|
| 977 |
+
],
|
| 978 |
+
"EE30_DSG150": [
|
| 979 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 62.5%]"
|
| 980 |
+
],
|
| 981 |
+
"EE30_DRSP3": [
|
| 982 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 62.5%]"
|
| 983 |
+
],
|
| 984 |
+
"EE20_DRSP3": [
|
| 985 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 62.5%]"
|
| 986 |
+
]
|
| 987 |
+
},
|
| 988 |
+
"all_blocked_ids": [
|
| 989 |
+
"EE20_DRSP3",
|
| 990 |
+
"EE20_LNG90",
|
| 991 |
+
"EE20_NET1000",
|
| 992 |
+
"EE25_35_NGM",
|
| 993 |
+
"EE30_DRSP3",
|
| 994 |
+
"EE30_DSG150",
|
| 995 |
+
"EE30_LNG150",
|
| 996 |
+
"EE35_NET500_1000"
|
| 997 |
+
],
|
| 998 |
+
"top_elevated_features": [
|
| 999 |
+
{
|
| 1000 |
+
"feature": "cond_pcos",
|
| 1001 |
+
"label": "PCOS",
|
| 1002 |
+
"cluster_mean": 1.0,
|
| 1003 |
+
"pop_mean": 0.0787,
|
| 1004 |
+
"elevation": 0.9213
|
| 1005 |
+
},
|
| 1006 |
+
{
|
| 1007 |
+
"feature": "cond_hypertension",
|
| 1008 |
+
"label": "Hypertension",
|
| 1009 |
+
"cluster_mean": 0.6251,
|
| 1010 |
+
"pop_mean": 0.0933,
|
| 1011 |
+
"elevation": 0.5318
|
| 1012 |
+
},
|
| 1013 |
+
{
|
| 1014 |
+
"feature": "cond_migraine",
|
| 1015 |
+
"label": "Migraine",
|
| 1016 |
+
"cluster_mean": 0.4999,
|
| 1017 |
+
"pop_mean": 0.102,
|
| 1018 |
+
"elevation": 0.3979
|
| 1019 |
+
},
|
| 1020 |
+
{
|
| 1021 |
+
"feature": "cond_diabetes",
|
| 1022 |
+
"label": "Diabetes",
|
| 1023 |
+
"cluster_mean": 0.1806,
|
| 1024 |
+
"pop_mean": 0.0221,
|
| 1025 |
+
"elevation": 0.1585
|
| 1026 |
+
},
|
| 1027 |
+
{
|
| 1028 |
+
"feature": "cond_depression",
|
| 1029 |
+
"label": "Depression",
|
| 1030 |
+
"cluster_mean": 0.125,
|
| 1031 |
+
"pop_mean": 0.0831,
|
| 1032 |
+
"elevation": 0.042
|
| 1033 |
+
},
|
| 1034 |
+
{
|
| 1035 |
+
"feature": "cond_migraine_with_aura",
|
| 1036 |
+
"label": "Migraine+Aura",
|
| 1037 |
+
"cluster_mean": 0.0694,
|
| 1038 |
+
"pop_mean": 0.0425,
|
| 1039 |
+
"elevation": 0.0269
|
| 1040 |
+
}
|
| 1041 |
+
],
|
| 1042 |
+
"centroid": {
|
| 1043 |
+
"age": 40.3692,
|
| 1044 |
+
"obs_bmi": 29.1985,
|
| 1045 |
+
"obs_systolic_bp": 122.9167,
|
| 1046 |
+
"obs_diastolic_bp": 83.6407,
|
| 1047 |
+
"obs_phq9_score": 13.875,
|
| 1048 |
+
"obs_testosterone": 99.2131,
|
| 1049 |
+
"obs_smoker": 0.0,
|
| 1050 |
+
"cond_migraine_with_aura": 0.0694,
|
| 1051 |
+
"cond_stroke": 0.0,
|
| 1052 |
+
"cond_mi": 0.0,
|
| 1053 |
+
"cond_dvt": 0.0,
|
| 1054 |
+
"cond_breast_cancer": 0.0,
|
| 1055 |
+
"cond_lupus": 0.0,
|
| 1056 |
+
"cond_thrombophilia": 0.0,
|
| 1057 |
+
"cond_atrial_fibrillation": 0.0,
|
| 1058 |
+
"cond_liver_disease": 0.0,
|
| 1059 |
+
"cond_hypertension": 0.6251,
|
| 1060 |
+
"cond_migraine": 0.4999,
|
| 1061 |
+
"cond_gallstones": 0.0,
|
| 1062 |
+
"cond_diabetes": 0.1806,
|
| 1063 |
+
"cond_prediabetes": 0.0,
|
| 1064 |
+
"cond_epilepsy": 0.0,
|
| 1065 |
+
"cond_chronic_kidney_disease": 0.0,
|
| 1066 |
+
"cond_sleep_apnea": 0.0,
|
| 1067 |
+
"cond_pcos": 1.0,
|
| 1068 |
+
"cond_endometriosis": 0.0834,
|
| 1069 |
+
"cond_depression": 0.125,
|
| 1070 |
+
"cond_hypothyroidism": 0.0,
|
| 1071 |
+
"cond_rheumatoid_arthritis": 0.0,
|
| 1072 |
+
"cond_fibromyalgia": 0.0,
|
| 1073 |
+
"cond_osteoporosis": 0.0,
|
| 1074 |
+
"cond_asthma": 0.0
|
| 1075 |
+
}
|
| 1076 |
+
},
|
| 1077 |
+
"9": {
|
| 1078 |
+
"label": "Profile 9: PCOS",
|
| 1079 |
+
"n_patients_train": 239,
|
| 1080 |
+
"pct_train": 5.8,
|
| 1081 |
+
"blocked_combos": {},
|
| 1082 |
+
"all_blocked_ids": [],
|
| 1083 |
+
"top_elevated_features": [
|
| 1084 |
+
{
|
| 1085 |
+
"feature": "cond_pcos",
|
| 1086 |
+
"label": "PCOS",
|
| 1087 |
+
"cluster_mean": 1.0,
|
| 1088 |
+
"pop_mean": 0.0787,
|
| 1089 |
+
"elevation": 0.9213
|
| 1090 |
+
}
|
| 1091 |
+
],
|
| 1092 |
+
"centroid": {
|
| 1093 |
+
"age": 34.2504,
|
| 1094 |
+
"obs_bmi": 27.9983,
|
| 1095 |
+
"obs_systolic_bp": 119.6945,
|
| 1096 |
+
"obs_diastolic_bp": 78.7197,
|
| 1097 |
+
"obs_phq9_score": 13.9414,
|
| 1098 |
+
"obs_testosterone": 101.1067,
|
| 1099 |
+
"obs_smoker": 0.0,
|
| 1100 |
+
"cond_migraine_with_aura": 0.0586,
|
| 1101 |
+
"cond_stroke": 0.0,
|
| 1102 |
+
"cond_mi": 0.0,
|
| 1103 |
+
"cond_dvt": 0.0,
|
| 1104 |
+
"cond_breast_cancer": 0.0,
|
| 1105 |
+
"cond_lupus": 0.0,
|
| 1106 |
+
"cond_thrombophilia": 0.0377,
|
| 1107 |
+
"cond_atrial_fibrillation": 0.0,
|
| 1108 |
+
"cond_liver_disease": 0.0,
|
| 1109 |
+
"cond_hypertension": 0.0,
|
| 1110 |
+
"cond_migraine": 0.0,
|
| 1111 |
+
"cond_gallstones": 0.0,
|
| 1112 |
+
"cond_diabetes": 0.0,
|
| 1113 |
+
"cond_prediabetes": 0.0,
|
| 1114 |
+
"cond_epilepsy": 0.0,
|
| 1115 |
+
"cond_chronic_kidney_disease": 0.0,
|
| 1116 |
+
"cond_sleep_apnea": 0.0042,
|
| 1117 |
+
"cond_pcos": 1.0,
|
| 1118 |
+
"cond_endometriosis": 0.0921,
|
| 1119 |
+
"cond_depression": 0.1046,
|
| 1120 |
+
"cond_hypothyroidism": 0.0,
|
| 1121 |
+
"cond_rheumatoid_arthritis": 0.0,
|
| 1122 |
+
"cond_fibromyalgia": 0.0,
|
| 1123 |
+
"cond_osteoporosis": 0.0,
|
| 1124 |
+
"cond_asthma": 0.0
|
| 1125 |
+
}
|
| 1126 |
+
},
|
| 1127 |
+
"10": {
|
| 1128 |
+
"label": "Profile 10: Hypertension + Migraine+Aura",
|
| 1129 |
+
"n_patients_train": 360,
|
| 1130 |
+
"pct_train": 8.7,
|
| 1131 |
+
"blocked_combos": {
|
| 1132 |
+
"EE20_LNG90": [
|
| 1133 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 34.7%]",
|
| 1134 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 68.3%]"
|
| 1135 |
+
],
|
| 1136 |
+
"EE30_LNG150": [
|
| 1137 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 34.7%]",
|
| 1138 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 68.3%]"
|
| 1139 |
+
],
|
| 1140 |
+
"EE35_NET500_1000": [
|
| 1141 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 34.7%]",
|
| 1142 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 68.3%]"
|
| 1143 |
+
],
|
| 1144 |
+
"EE20_NET1000": [
|
| 1145 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 34.7%]",
|
| 1146 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 68.3%]"
|
| 1147 |
+
],
|
| 1148 |
+
"EE25_35_NGM": [
|
| 1149 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 34.7%]",
|
| 1150 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 68.3%]"
|
| 1151 |
+
],
|
| 1152 |
+
"EE30_DSG150": [
|
| 1153 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 34.7%]",
|
| 1154 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 68.3%]"
|
| 1155 |
+
],
|
| 1156 |
+
"EE30_DRSP3": [
|
| 1157 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 34.7%]",
|
| 1158 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 68.3%]"
|
| 1159 |
+
],
|
| 1160 |
+
"EE20_DRSP3": [
|
| 1161 |
+
"WHO MEC Cat 4: Migraine with aura \u2014 estrogen \u2191 ischemic stroke risk (WHO MEC Cat 4) [profile prevalence: 34.7%]",
|
| 1162 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 68.3%]"
|
| 1163 |
+
]
|
| 1164 |
+
},
|
| 1165 |
+
"all_blocked_ids": [
|
| 1166 |
+
"EE20_DRSP3",
|
| 1167 |
+
"EE20_LNG90",
|
| 1168 |
+
"EE20_NET1000",
|
| 1169 |
+
"EE25_35_NGM",
|
| 1170 |
+
"EE30_DRSP3",
|
| 1171 |
+
"EE30_DSG150",
|
| 1172 |
+
"EE30_LNG150",
|
| 1173 |
+
"EE35_NET500_1000"
|
| 1174 |
+
],
|
| 1175 |
+
"top_elevated_features": [
|
| 1176 |
+
{
|
| 1177 |
+
"feature": "cond_hypertension",
|
| 1178 |
+
"label": "Hypertension",
|
| 1179 |
+
"cluster_mean": 0.6832,
|
| 1180 |
+
"pop_mean": 0.0933,
|
| 1181 |
+
"elevation": 0.5899
|
| 1182 |
+
},
|
| 1183 |
+
{
|
| 1184 |
+
"feature": "cond_migraine_with_aura",
|
| 1185 |
+
"label": "Migraine+Aura",
|
| 1186 |
+
"cluster_mean": 0.3473,
|
| 1187 |
+
"pop_mean": 0.0425,
|
| 1188 |
+
"elevation": 0.3048
|
| 1189 |
+
}
|
| 1190 |
+
],
|
| 1191 |
+
"centroid": {
|
| 1192 |
+
"age": 39.0919,
|
| 1193 |
+
"obs_bmi": 28.6819,
|
| 1194 |
+
"obs_systolic_bp": 122.4571,
|
| 1195 |
+
"obs_diastolic_bp": 83.1135,
|
| 1196 |
+
"obs_phq9_score": 14.0809,
|
| 1197 |
+
"obs_testosterone": 99.8,
|
| 1198 |
+
"obs_smoker": 0.0,
|
| 1199 |
+
"cond_migraine_with_aura": 0.3473,
|
| 1200 |
+
"cond_stroke": 0.0,
|
| 1201 |
+
"cond_mi": 0.0,
|
| 1202 |
+
"cond_dvt": 0.0,
|
| 1203 |
+
"cond_breast_cancer": 0.0,
|
| 1204 |
+
"cond_lupus": 0.0,
|
| 1205 |
+
"cond_thrombophilia": 0.0,
|
| 1206 |
+
"cond_atrial_fibrillation": 0.0,
|
| 1207 |
+
"cond_liver_disease": 0.0,
|
| 1208 |
+
"cond_hypertension": 0.6832,
|
| 1209 |
+
"cond_migraine": 0.1028,
|
| 1210 |
+
"cond_gallstones": 0.0,
|
| 1211 |
+
"cond_diabetes": 0.0,
|
| 1212 |
+
"cond_prediabetes": 0.0,
|
| 1213 |
+
"cond_epilepsy": 0.0,
|
| 1214 |
+
"cond_chronic_kidney_disease": 0.0,
|
| 1215 |
+
"cond_sleep_apnea": 0.0,
|
| 1216 |
+
"cond_pcos": 0.0,
|
| 1217 |
+
"cond_endometriosis": 0.0,
|
| 1218 |
+
"cond_depression": 0.1084,
|
| 1219 |
+
"cond_hypothyroidism": 0.0,
|
| 1220 |
+
"cond_rheumatoid_arthritis": 0.0,
|
| 1221 |
+
"cond_fibromyalgia": 0.0,
|
| 1222 |
+
"cond_osteoporosis": 0.0,
|
| 1223 |
+
"cond_asthma": 0.0
|
| 1224 |
+
}
|
| 1225 |
+
},
|
| 1226 |
+
"11": {
|
| 1227 |
+
"label": "Profile 11: Hypertension + Thrombophilia",
|
| 1228 |
+
"n_patients_train": 29,
|
| 1229 |
+
"pct_train": 0.7,
|
| 1230 |
+
"blocked_combos": {
|
| 1231 |
+
"EE20_LNG90": [
|
| 1232 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 41.0%]",
|
| 1233 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 54.8%]",
|
| 1234 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 31.7%]"
|
| 1235 |
+
],
|
| 1236 |
+
"EE30_LNG150": [
|
| 1237 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 41.0%]",
|
| 1238 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 54.8%]",
|
| 1239 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 31.7%]"
|
| 1240 |
+
],
|
| 1241 |
+
"EE35_NET500_1000": [
|
| 1242 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 41.0%]",
|
| 1243 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 54.8%]",
|
| 1244 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 31.7%]"
|
| 1245 |
+
],
|
| 1246 |
+
"EE20_NET1000": [
|
| 1247 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 41.0%]",
|
| 1248 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 54.8%]",
|
| 1249 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 31.7%]"
|
| 1250 |
+
],
|
| 1251 |
+
"EE25_35_NGM": [
|
| 1252 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 41.0%]",
|
| 1253 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 54.8%]",
|
| 1254 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 31.7%]"
|
| 1255 |
+
],
|
| 1256 |
+
"EE30_DSG150": [
|
| 1257 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 41.0%]",
|
| 1258 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 54.8%]",
|
| 1259 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 31.7%]"
|
| 1260 |
+
],
|
| 1261 |
+
"EE30_DRSP3": [
|
| 1262 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 41.0%]",
|
| 1263 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 54.8%]",
|
| 1264 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 31.7%]"
|
| 1265 |
+
],
|
| 1266 |
+
"EE20_DRSP3": [
|
| 1267 |
+
"WHO MEC Cat 4: Hereditary thrombophilia \u2014 VTE risk \u00d78.4 with estrogen (Bloemenkamp Lancet 1995; WHO MEC Cat 4) [profile prevalence: 41.0%]",
|
| 1268 |
+
"WHO MEC Cat 3: Hypertension \u2014 elevated CVD risk with estrogen (WHO MEC Cat 3) [profile prevalence: 54.8%]",
|
| 1269 |
+
"WHO MEC Cat 3: Diabetes \u2014 vascular risk compounded by estrogen (WHO MEC Cat 3) [profile prevalence: 31.7%]"
|
| 1270 |
+
]
|
| 1271 |
+
},
|
| 1272 |
+
"all_blocked_ids": [
|
| 1273 |
+
"EE20_DRSP3",
|
| 1274 |
+
"EE20_LNG90",
|
| 1275 |
+
"EE20_NET1000",
|
| 1276 |
+
"EE25_35_NGM",
|
| 1277 |
+
"EE30_DRSP3",
|
| 1278 |
+
"EE30_DSG150",
|
| 1279 |
+
"EE30_LNG150",
|
| 1280 |
+
"EE35_NET500_1000"
|
| 1281 |
+
],
|
| 1282 |
+
"top_elevated_features": [
|
| 1283 |
+
{
|
| 1284 |
+
"feature": "cond_hypertension",
|
| 1285 |
+
"label": "Hypertension",
|
| 1286 |
+
"cluster_mean": 0.5481,
|
| 1287 |
+
"pop_mean": 0.0933,
|
| 1288 |
+
"elevation": 0.4548
|
| 1289 |
+
},
|
| 1290 |
+
{
|
| 1291 |
+
"feature": "cond_thrombophilia",
|
| 1292 |
+
"label": "Thrombophilia",
|
| 1293 |
+
"cluster_mean": 0.41,
|
| 1294 |
+
"pop_mean": 0.0352,
|
| 1295 |
+
"elevation": 0.3748
|
| 1296 |
+
},
|
| 1297 |
+
{
|
| 1298 |
+
"feature": "cond_diabetes",
|
| 1299 |
+
"label": "Diabetes",
|
| 1300 |
+
"cluster_mean": 0.3167,
|
| 1301 |
+
"pop_mean": 0.0221,
|
| 1302 |
+
"elevation": 0.2946
|
| 1303 |
+
},
|
| 1304 |
+
{
|
| 1305 |
+
"feature": "cond_endometriosis",
|
| 1306 |
+
"label": "Endometriosis",
|
| 1307 |
+
"cluster_mean": 0.3075,
|
| 1308 |
+
"pop_mean": 0.0663,
|
| 1309 |
+
"elevation": 0.2411
|
| 1310 |
+
},
|
| 1311 |
+
{
|
| 1312 |
+
"feature": "cond_asthma",
|
| 1313 |
+
"label": "cond_asthma",
|
| 1314 |
+
"cluster_mean": 0.239,
|
| 1315 |
+
"pop_mean": 0.0017,
|
| 1316 |
+
"elevation": 0.2373
|
| 1317 |
+
},
|
| 1318 |
+
{
|
| 1319 |
+
"feature": "cond_migraine",
|
| 1320 |
+
"label": "Migraine",
|
| 1321 |
+
"cluster_mean": 0.2101,
|
| 1322 |
+
"pop_mean": 0.102,
|
| 1323 |
+
"elevation": 0.1081
|
| 1324 |
+
},
|
| 1325 |
+
{
|
| 1326 |
+
"feature": "cond_migraine_with_aura",
|
| 1327 |
+
"label": "Migraine+Aura",
|
| 1328 |
+
"cluster_mean": 0.0683,
|
| 1329 |
+
"pop_mean": 0.0425,
|
| 1330 |
+
"elevation": 0.0258
|
| 1331 |
+
}
|
| 1332 |
+
],
|
| 1333 |
+
"centroid": {
|
| 1334 |
+
"age": 41.1637,
|
| 1335 |
+
"obs_bmi": 28.6414,
|
| 1336 |
+
"obs_systolic_bp": 125.2266,
|
| 1337 |
+
"obs_diastolic_bp": 88.5452,
|
| 1338 |
+
"obs_phq9_score": 13.8486,
|
| 1339 |
+
"obs_testosterone": 99.8,
|
| 1340 |
+
"obs_smoker": 0.0,
|
| 1341 |
+
"cond_migraine_with_aura": 0.0683,
|
| 1342 |
+
"cond_stroke": 0.0,
|
| 1343 |
+
"cond_mi": 0.0,
|
| 1344 |
+
"cond_dvt": 0.0,
|
| 1345 |
+
"cond_breast_cancer": 0.0,
|
| 1346 |
+
"cond_lupus": 0.0,
|
| 1347 |
+
"cond_thrombophilia": 0.41,
|
| 1348 |
+
"cond_atrial_fibrillation": 0.0,
|
| 1349 |
+
"cond_liver_disease": 0.0,
|
| 1350 |
+
"cond_hypertension": 0.5481,
|
| 1351 |
+
"cond_migraine": 0.2101,
|
| 1352 |
+
"cond_gallstones": 0.0,
|
| 1353 |
+
"cond_diabetes": 0.3167,
|
| 1354 |
+
"cond_prediabetes": 0.0,
|
| 1355 |
+
"cond_epilepsy": 0.0,
|
| 1356 |
+
"cond_chronic_kidney_disease": 0.0,
|
| 1357 |
+
"cond_sleep_apnea": 0.0,
|
| 1358 |
+
"cond_pcos": 0.0,
|
| 1359 |
+
"cond_endometriosis": 0.3075,
|
| 1360 |
+
"cond_depression": 0.0,
|
| 1361 |
+
"cond_hypothyroidism": 0.0,
|
| 1362 |
+
"cond_rheumatoid_arthritis": 0.0,
|
| 1363 |
+
"cond_fibromyalgia": 0.0,
|
| 1364 |
+
"cond_osteoporosis": 0.0,
|
| 1365 |
+
"cond_asthma": 0.239
|
| 1366 |
+
}
|
| 1367 |
+
}
|
| 1368 |
+
}
|
| 1369 |
+
}
|
artifacts/clustering/scaler.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fa46d66f9cadbcc9676eaae4fe512fa77d4582556500eecd98610dc416a9a146
|
| 3 |
+
size 770
|
artifacts/simulation/feature_meta.json
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"feature_names": [
|
| 3 |
+
"age",
|
| 4 |
+
"obs_bmi",
|
| 5 |
+
"obs_systolic_bp",
|
| 6 |
+
"obs_diastolic_bp",
|
| 7 |
+
"obs_phq9_score",
|
| 8 |
+
"obs_testosterone",
|
| 9 |
+
"obs_smoker",
|
| 10 |
+
"cond_migraine_with_aura",
|
| 11 |
+
"cond_stroke",
|
| 12 |
+
"cond_mi",
|
| 13 |
+
"cond_dvt",
|
| 14 |
+
"cond_breast_cancer",
|
| 15 |
+
"cond_lupus",
|
| 16 |
+
"cond_thrombophilia",
|
| 17 |
+
"cond_atrial_fibrillation",
|
| 18 |
+
"cond_liver_disease",
|
| 19 |
+
"cond_hypertension",
|
| 20 |
+
"cond_migraine",
|
| 21 |
+
"cond_gallstones",
|
| 22 |
+
"cond_diabetes",
|
| 23 |
+
"cond_prediabetes",
|
| 24 |
+
"cond_epilepsy",
|
| 25 |
+
"cond_chronic_kidney_disease",
|
| 26 |
+
"cond_sleep_apnea",
|
| 27 |
+
"cond_pcos",
|
| 28 |
+
"cond_endometriosis",
|
| 29 |
+
"cond_depression",
|
| 30 |
+
"cond_hypothyroidism",
|
| 31 |
+
"cond_rheumatoid_arthritis",
|
| 32 |
+
"cond_fibromyalgia",
|
| 33 |
+
"cond_osteoporosis",
|
| 34 |
+
"cond_asthma",
|
| 35 |
+
"med_ever_ocp",
|
| 36 |
+
"pill_type_binary",
|
| 37 |
+
"estrogen_dose_mcg",
|
| 38 |
+
"progestin_dose_mg",
|
| 39 |
+
"progestin_generation",
|
| 40 |
+
"androgenic_score",
|
| 41 |
+
"vte_risk_numeric",
|
| 42 |
+
"month"
|
| 43 |
+
],
|
| 44 |
+
"patient_features": [
|
| 45 |
+
"age",
|
| 46 |
+
"obs_bmi",
|
| 47 |
+
"obs_systolic_bp",
|
| 48 |
+
"obs_diastolic_bp",
|
| 49 |
+
"obs_phq9_score",
|
| 50 |
+
"obs_testosterone",
|
| 51 |
+
"obs_smoker",
|
| 52 |
+
"cond_migraine_with_aura",
|
| 53 |
+
"cond_stroke",
|
| 54 |
+
"cond_mi",
|
| 55 |
+
"cond_dvt",
|
| 56 |
+
"cond_breast_cancer",
|
| 57 |
+
"cond_lupus",
|
| 58 |
+
"cond_thrombophilia",
|
| 59 |
+
"cond_atrial_fibrillation",
|
| 60 |
+
"cond_liver_disease",
|
| 61 |
+
"cond_hypertension",
|
| 62 |
+
"cond_migraine",
|
| 63 |
+
"cond_gallstones",
|
| 64 |
+
"cond_diabetes",
|
| 65 |
+
"cond_prediabetes",
|
| 66 |
+
"cond_epilepsy",
|
| 67 |
+
"cond_chronic_kidney_disease",
|
| 68 |
+
"cond_sleep_apnea",
|
| 69 |
+
"cond_pcos",
|
| 70 |
+
"cond_endometriosis",
|
| 71 |
+
"cond_depression",
|
| 72 |
+
"cond_hypothyroidism",
|
| 73 |
+
"cond_rheumatoid_arthritis",
|
| 74 |
+
"cond_fibromyalgia",
|
| 75 |
+
"cond_osteoporosis",
|
| 76 |
+
"cond_asthma",
|
| 77 |
+
"med_ever_ocp"
|
| 78 |
+
],
|
| 79 |
+
"pill_features": [
|
| 80 |
+
"pill_type_binary",
|
| 81 |
+
"estrogen_dose_mcg",
|
| 82 |
+
"progestin_dose_mg",
|
| 83 |
+
"progestin_generation",
|
| 84 |
+
"androgenic_score",
|
| 85 |
+
"vte_risk_numeric"
|
| 86 |
+
],
|
| 87 |
+
"temporal_features": [
|
| 88 |
+
"month"
|
| 89 |
+
],
|
| 90 |
+
"binary_targets": [
|
| 91 |
+
"sym_nausea",
|
| 92 |
+
"sym_headache",
|
| 93 |
+
"sym_breast_tenderness",
|
| 94 |
+
"sym_spotting",
|
| 95 |
+
"sym_mood_worsened",
|
| 96 |
+
"sym_depression_episode",
|
| 97 |
+
"sym_anxiety",
|
| 98 |
+
"sym_libido_decreased",
|
| 99 |
+
"sym_weight_gain",
|
| 100 |
+
"sym_acne_improved",
|
| 101 |
+
"sym_acne_worsened",
|
| 102 |
+
"sym_hair_loss",
|
| 103 |
+
"sym_cramps_relieved",
|
| 104 |
+
"sym_pcos_improvement",
|
| 105 |
+
"evt_dvt",
|
| 106 |
+
"evt_pe",
|
| 107 |
+
"evt_stroke",
|
| 108 |
+
"still_taking"
|
| 109 |
+
],
|
| 110 |
+
"continuous_targets": [
|
| 111 |
+
"satisfaction_score"
|
| 112 |
+
],
|
| 113 |
+
"androgenic_map": {
|
| 114 |
+
"anti_androgenic": -1,
|
| 115 |
+
"low": 1,
|
| 116 |
+
"moderate": 2,
|
| 117 |
+
"high": 3
|
| 118 |
+
},
|
| 119 |
+
"vte_map": {
|
| 120 |
+
"very_low": 1,
|
| 121 |
+
"low": 2,
|
| 122 |
+
"low_moderate": 3,
|
| 123 |
+
"moderate": 4,
|
| 124 |
+
"high": 5
|
| 125 |
+
},
|
| 126 |
+
"hyperparams": {
|
| 127 |
+
"max_iter": 80,
|
| 128 |
+
"max_leaf_nodes": 31,
|
| 129 |
+
"learning_rate": 0.05,
|
| 130 |
+
"seed": 42
|
| 131 |
+
},
|
| 132 |
+
"training_rows": 444636
|
| 133 |
+
}
|
artifacts/simulation/model_satisfaction.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7cbe087207914887be664f51b7f64d263d9afc1aee0aa0a2ec931381ffdaa93c
|
| 3 |
+
size 124371
|
artifacts/simulation/model_symptoms.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c34e0a8f70f0d6aad0535878654189fd53b80f2d3c28a2d0fbcc0d9b37cdd23
|
| 3 |
+
size 1914916
|
drugs/output/pill_reference_db.csv
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
combo_id,pill_type,estrogen,estrogen_dose_mcg,progestin,progestin_dose_mg,progestin_generation,androgenic_activity,vte_risk_class,notes,known_brand_examples,drugscom_n_reviews,drugscom_avg_rating,kw_mood_changes,kw_depression,kw_libido_decrease,kw_weight_gain,kw_weight_loss,kw_nausea,kw_headache,kw_breast_tenderness,kw_acne_worsened,kw_acne_improved,kw_spotting,kw_heavy_period,kw_light_period,kw_cramps,kw_hair_loss,kw_blood_clot,kw_positive_overall,kw_discontinued,faers_dvt,faers_pe,faers_stroke,faers_mi,faers_depression,faers_headache,faers_nausea,faers_weight_gain,faers_amenorrhea,faers_anxiety,faers_alopecia,faers_libido,faers_total_reports,label_adverse_reactions,label_contraindications,label_warnings,label_boxed_warning
|
| 2 |
+
EE20_LNG90,combined_monophasic,ethinyl estradiol,20,levonorgestrel,0.09,2,moderate,moderate,"Ultra-low-dose pill. Used in Alesse, Aviane, Lutera, Orsythia, Sronyx, Lessina, Aubra","alesse, aviane, lutera, orsythia, sronyx",1112,6.02,0.5324,0.1987,0.1763,0.2068,0.0351,0.1763,0.1592,0.2149,0.1214,0.0117,0.1295,0.0351,0.0441,0.2779,0.0063,0.0171,0.2851,0.2806,8,3,6,0,230,97,135,35,602,208,21,10,9361,"6 ADVERSE REACTIONS The following serious or otherwise important adverse reactions are discussed elsewhere in the labeling: • Ectopic Pregnancy [see Warnings and Precautions ( 5.1 )] • Intrauterine Pregnancy [see Warnings and Precautions ( 5.2 )] • Group A Streptococcal Sepsis (GAS) [see Warnings and Precautions ( 5.3 )] • Pelvic Inflammatory Disease [see Warnings and Precautions ( 5.4 )] • Perforation [see Warnings and Precautions ( 5.5 )] • Expulsion [see Warnings and Precautions ( 5.6 ] • Ovarian Cysts [see Warnings and Precautions ( 5.7 )] • Bleeding Pattern Alterations [see Warnings and Precautions ( 5.8 )] The most common adverse reactions reported (≥ 5% users) were vulvovaginitis, ovarian cysts, abdominal pain/pelvic pain, headache/migraine, acne/seborrhea, dysmenorrhea/uterine spasm, breast pain/breast discomfort, and increased bleeding. ( 6 ) To report SUSPECTED ADVERSE REACTIONS, contact Bayer HealthCare Pharmaceuticals Inc. at 1-888-842-2937 or FDA at 1-800-FDA-1088 or www.fda.gov/medwatch. 6.1 Clinical Trials Experience Because clinical trials are conducted under widely varying conditions, adverse reaction rates observed in the clinical trials of a drug cannot be directly compared to rates in the clinical trials of another drug and may not reflect the rates observed in clinical practice. The data described below reflect exposure of 1,697 healthy 18 to 41-year-old women (mean age 27.8 ± 5.2 years) to Kyleena. These data come from two multi-center contraceptive tria","4 CONTRAINDICATIONS The use of Kyleena is contraindicated when one or more of the following conditions exist: • Pregnancy or suspicion of pregnancy [see Warnings and Precautions ( 5.2 ), Use in Specific Populations ( 8.1 )] • For use as post-coital contraception (emergency contraception) • Congenital or acquired uterine anomaly, including fibroids, that distorts the uterine cavity • Acute pelvic inflammatory disease (PID) or a history of PID unless there has been a subsequent intrauterine pregnancy [see Warnings and Precautions ( 5.4 )] • Postpartum endometritis or infected abortion in the past 3 months • Known or suspected uterine or cervical malignancy • Known or suspected breast cancer or other progestin-sensitive cancer, now or in the past • Uterine bleeding of unknown etiology • Untreated acute cervicitis or vaginitis, including bacterial vaginosis or other lower genital tract infections until infection is controlled • Acute liver disease or liver tumor (benign or malignant) • Conditions associated with increased susceptibility to pelvic infections [see Warnings and Precautions ( 5.4 )] • A previously inserted intrauterine device (IUD) that has not been removed • Hypersensitivity to any component of this product [see Adverse Reactions ( 6.2 ) and Description ( 11.1 )] • Pregnancy or suspicion of pregnancy. Cannot be used for post-coital contraception (emergency contraception) ( 4 ) • Congenital or acquired uterine anomaly if it distorts the uterine cavity ( 4 ) • Acute p",Warnings Allergy alert: Do not use if you have ever had an allergic reaction to levonorgestrel Sexually transmitted diseases (STDs) alert: This product does not protect against HIV/AIDS or other STDs Do not use if you are already pregnant (because it will not work) for regular birth control Ask a doctor or pharmacist before use if you are taking efavirenz (HIV medication) or rifampin (tuberculosis treatment) or medication for seizures (epilepsy). These medications may reduce the effectiveness of levonorgestrel. When using this product you may have menstrual changes tiredness breast pain nausea headache vomiting lower stomach (abdominal) pain dizziness // Warnings Allergy Alert: Do not use if you have ever had an allergic reaction to levonorgestrel Sexually transmitted diseases (STDs) Alert: This product does not protect against HIV/AIDS or other STDs // WARNINGS Allergy alert: Do not use if you have ever had an allergic reaction to levonorgestrel Sexually transmitted diseases (STDs) alert: This product does not protect against HIV/AIDS or other STDs // Warnings Allergy alert: Do not use if you have ever had an allergic reaction to levonorgestrel. Sexually transmitted diseases (STDs) alert: This product does not protect against HIV/AIDS or other STDs Do not use • if you are already pregnant (because it will not work) • for regular birth control Ask a doctor or pharmacist before use if you are taking efavirenz (HIV medication) or rifampin (tuberculosis treatment) or medication ,
|
| 3 |
+
EE30_LNG150,combined_monophasic,ethinyl estradiol,30,levonorgestrel,0.15,2,moderate,moderate,"Standard-dose 2nd-gen. Nordette, Levora, Portia, Cryselle-28, Chateal, Jolessa (extended)","levora, portia, cryselle, chateal, jolessa",5973,6.43,0.3188,0.1388,0.1373,0.155,0.0177,0.1128,0.1169,0.0936,0.0685,0.0099,0.254,0.0522,0.0579,0.4792,0.0166,0.0164,0.302,0.1524,16,17,12,0,293,178,221,105,704,237,52,23,12907,"6 ADVERSE REACTIONS The following serious or otherwise important adverse reactions are discussed elsewhere in the labeling: • Ectopic Pregnancy [see Warnings and Precautions ( 5.1 )] • Intrauterine Pregnancy [see Warnings and Precautions ( 5.2 )] • Group A Streptococcal Sepsis (GAS) [see Warnings and Precautions ( 5.3 )] • Pelvic Inflammatory Disease [see Warnings and Precautions ( 5.4 )] • Perforation [see Warnings and Precautions ( 5.5 )] • Expulsion [see Warnings and Precautions ( 5.6 ] • Ovarian Cysts [see Warnings and Precautions ( 5.7 )] • Bleeding Pattern Alterations [see Warnings and Precautions ( 5.8 )] The most common adverse reactions reported (≥ 5% users) were vulvovaginitis, ovarian cysts, abdominal pain/pelvic pain, headache/migraine, acne/seborrhea, dysmenorrhea/uterine spasm, breast pain/breast discomfort, and increased bleeding. ( 6 ) To report SUSPECTED ADVERSE REACTIONS, contact Bayer HealthCare Pharmaceuticals Inc. at 1-888-842-2937 or FDA at 1-800-FDA-1088 or www.fda.gov/medwatch. 6.1 Clinical Trials Experience Because clinical trials are conducted under widely varying conditions, adverse reaction rates observed in the clinical trials of a drug cannot be directly compared to rates in the clinical trials of another drug and may not reflect the rates observed in clinical practice. The data described below reflect exposure of 1,697 healthy 18 to 41-year-old women (mean age 27.8 ± 5.2 years) to Kyleena. These data come from two multi-center contraceptive tria","4 CONTRAINDICATIONS The use of Kyleena is contraindicated when one or more of the following conditions exist: • Pregnancy or suspicion of pregnancy [see Warnings and Precautions ( 5.2 ), Use in Specific Populations ( 8.1 )] • For use as post-coital contraception (emergency contraception) • Congenital or acquired uterine anomaly, including fibroids, that distorts the uterine cavity • Acute pelvic inflammatory disease (PID) or a history of PID unless there has been a subsequent intrauterine pregnancy [see Warnings and Precautions ( 5.4 )] • Postpartum endometritis or infected abortion in the past 3 months • Known or suspected uterine or cervical malignancy • Known or suspected breast cancer or other progestin-sensitive cancer, now or in the past • Uterine bleeding of unknown etiology • Untreated acute cervicitis or vaginitis, including bacterial vaginosis or other lower genital tract infections until infection is controlled • Acute liver disease or liver tumor (benign or malignant) • Conditions associated with increased susceptibility to pelvic infections [see Warnings and Precautions ( 5.4 )] • A previously inserted intrauterine device (IUD) that has not been removed • Hypersensitivity to any component of this product [see Adverse Reactions ( 6.2 ) and Description ( 11.1 )] • Pregnancy or suspicion of pregnancy. Cannot be used for post-coital contraception (emergency contraception) ( 4 ) • Congenital or acquired uterine anomaly if it distorts the uterine cavity ( 4 ) • Acute p",Warnings Allergy alert: Do not use if you have ever had an allergic reaction to levonorgestrel Sexually transmitted diseases (STDs) alert: This product does not protect against HIV/AIDS or other STDs Do not use if you are already pregnant (because it will not work) for regular birth control Ask a doctor or pharmacist before use if you are taking efavirenz (HIV medication) or rifampin (tuberculosis treatment) or medication for seizures (epilepsy). These medications may reduce the effectiveness of levonorgestrel. When using this product you may have menstrual changes tiredness breast pain nausea headache vomiting lower stomach (abdominal) pain dizziness // Warnings Allergy Alert: Do not use if you have ever had an allergic reaction to levonorgestrel Sexually transmitted diseases (STDs) Alert: This product does not protect against HIV/AIDS or other STDs // WARNINGS Allergy alert: Do not use if you have ever had an allergic reaction to levonorgestrel Sexually transmitted diseases (STDs) alert: This product does not protect against HIV/AIDS or other STDs // Warnings Allergy alert: Do not use if you have ever had an allergic reaction to levonorgestrel. Sexually transmitted diseases (STDs) alert: This product does not protect against HIV/AIDS or other STDs Do not use • if you are already pregnant (because it will not work) • for regular birth control Ask a doctor or pharmacist before use if you are taking efavirenz (HIV medication) or rifampin (tuberculosis treatment) or medication ,
|
| 4 |
+
EE35_NET500_1000,combined_monophasic,ethinyl estradiol,35,norethindrone,0.5,1,moderate,low_moderate,"Classic 35mcg pill. Ortho-Novum, Necon, Nortrel, Norinyl, Sprintec variants, Mononessa","sprintec, mononessa, tri-sprintec, trinessa, estarylla",3081,5.65,0.4632,0.1834,0.174,0.2184,0.0227,0.1762,0.1512,0.1821,0.1032,0.0143,0.1847,0.0587,0.0876,0.2846,0.0101,0.0224,0.2957,0.2756,7,21,16,3,4,6,5,4,11,5,1,0,501,"ADVERSE REACTIONS Adverse reactions reported with the use of POPs include: • Menstrual irregularity is the most frequently reported side effect. • Frequent and irregular bleeding are common, while long duration of bleeding episodes and amenorrhea are less likely. • Headache, breast tenderness, nausea, and dizziness are increased among progestin-only oral contraceptive users in some studies. • Androgenic side effects such as acne, hirsutism, and weight gain occur rarely. The following adverse reactions were also reported in clinical trials or during post-marketing experience: Gastrointestinal Disorders: vomiting, abdominal pain; General Disorders and Administration Site Conditions: fatigue, edema; Psychiatric Disorders: depression, nervousness; Musculoskeletal and Connective Tissue Disorders : pain in extremity; Reproductive System and Breast Disorders: genital discharge; breast pain, menstruation delayed, suppressed lactation, vaginal hemorrhage, menorrhagia, withdrawal bleed when product is stopped; Immune System Disorders: anaphylactic/anaphylactoid reaction, hypersensitivity; Hepatobiliary Disorders: hepatitis, jaundice cholestatic; Skin and Subcutaneous Tissue Disorders: alopecia, rash, rash pruritic. // ADVERSE REACTIONS Adverse reactions reported with the use of POPs include: • Menstrual irregularity is the most frequently reported side effect. • Frequent and irregular bleeding are common, while long duration of bleeding episodes and amenorrhea are less likely. • Headac",CONTRAINDICATIONS Progestin-only oral contraceptives (POPs) should not be used by women who currently have the following conditions: • Known or suspected pregnancy • Known or suspected carcinoma of the breast • Undiagnosed abnormal genital bleeding • Hypersensitivity to any component of this product • Benign or malignant liver tumors • Acute liver disease // CONTRAINDICATIONS Progestin - only oral contraceptives (POPs) should not be used by women who currently have the following conditions: Known or suspected pregnancy Known or suspected carcinoma of the breast Undiagnosed abnormal genital bleeding Hypersensitivity to any component of this product Benign or malignant liver tumors Acute liver disease // CONTRAINDICATIONS Progestin-only oral contraceptives tablets should not be used by women who currently have the following conditions: Known or suspected pregnancy Known or suspected carcinoma of the breast Undiagnosed abnormal genital bleeding Hypersensitivity to any component of this product Benign or malignant liver tumors Acute liver disease // CONTRAINDICATIONS Progestin-only oral contraceptives (POPs) should not be used by women who currently have the following conditions: • Known or suspected pregnancy • Known or suspected carcinoma of the breast. • Undiagnosed abnormal genital bleeding • Hypersensitivity to any component of this product • Benign or malignant liver tumors • Acute liver disease // CONTRAINDICATIONS Progestin-only oral contraceptives tablets should not be u,"WARNINGS Cigarette smoking greatly increases the possibility of suffering heart attacks and strokes. Women who use oral contraceptives are strongly advised not to smoke. Nora-BE does not contain estrogen and, therefore, this insert does not discuss the serious health risks that have been associated with the estrogen component of combined oral contraceptives. The health care provider is referred to the prescribing information of combined oral contraceptives for a discussion of those risks, including, but not limited to, an increased risk of serious cardiovascular disease in women who smoke, carcinoma of the breast and reproductive organs, hepatic neoplasia, and changes in carbohydrate and lipid metabolism. The relationship between progestin-only oral contraceptives and these risks have not been established and there are no studies definitely linking progestin-only pill (POP) use to an increased risk of heart attack or stroke. The physician should remain alert to the earliest manifestation of symptoms of any serious disease and discontinue oral contraceptive therapy when appropriate. 1. Ectopic pregnancy. The incidence of ectopic pregnancies for progestin-only oral contraceptive users is 5 per 1000 woman-years. Up to 10% of pregnancies reported in clinical studies of progestin-only oral contraceptive users are extrauterine. Although symptoms of ectopic pregnancy should be watched for, a history of ectopic pregnancy need not be considered a contraindication to use of this contra",Cigarette smoking greatly increases the possibility of suffering heart attacks and strokes. Women who use oral contraceptives are strongly advised not to smoke. WARNING: Cigarette smoking greatly increases the possibility of suffering heart attacks and strokes. Women who use oral contraceptives are strongly advised not to smoke.
|
| 5 |
+
EE20_NET1000,combined_monophasic,ethinyl estradiol,20,norethindrone acetate,1.0,1,moderate,low_moderate,"Low-estrogen 20mcg with NE acetate. Loestrin, Junel, Microgestin, Gildess, Blisovi, Lo Loestrin Fe","lo loestrin fe, loestrin 24 fe, junel fe 1 / 20, microgestin fe 1 / 20, gildess fe 1 / 20",2575,5.73,0.4649,0.1849,0.1736,0.2237,0.0206,0.1717,0.1394,0.188,0.0959,0.0151,0.1864,0.0575,0.092,0.2757,0.0097,0.0249,0.2963,0.2641,16,22,9,0,11,37,27,16,182,11,20,0,1421,"ADVERSE REACTIONS See WARNINGS and PRECAUTIONS . The following adverse reactions have been observed in women taking progestins: • Breakthrough bleeding • Spotting • Change in menstrual flow • Amenorrhea • Edema • Changes in weight (decreases, increases) • Changes in the cervical squamo-columnar junction and cervical secretions • Cholestatic jaundice • Rash (allergic) with and without pruritus • Melasma or chloasma • Clinical depression • Acne • Breast enlargement/tenderness • Headache/migraine • Urticaria • Abnormalities of liver tests (i.e., AST, ALT, Bilirubin) • Decreased HDL cholesterol and increased LDL/HDL ratio • Mood swings • Nausea • Insomnia • Anaphylactic/anaphylactoid reactions • Thrombotic and thromboembolic events (e.g., deep vein thrombosis, pulmonary embolism, retinal vascular thrombosis, cerebral thrombosis and embolism) • Optic neuritis (which may lead to partial or complete loss of vision) // ADVERSE REACTIONS See WARNINGS and PRECAUTIONS The following adverse reactions have been observed in women taking progestins: Breakthrough bleeding Spotting Change in menstrual flow Amenorrhea Edema Changes in weight (decreases, increases) Changes in the cervical squamo-columnar junction and cervical secretions Cholestatic jaundice Rash (allergic) with and without pruritus Melasma or chloasma Clinical depression Ace Breast enlargement/tenderness Headache/migraine Urticaria Abnormalities of liver tests (i.e., AST, ALT, Bilirubin) Decreased HDL cholesterol and increased ","CONTRAINDICATIONS Known or suspected pregnancy. There is no indication for norethindrone acetate in pregnancy. (See PRECAUTIONS .) Undiagnosed vaginal bleeding Known, suspected or history of cancer of the breast Active deep vein thrombosis, pulmonary embolism or history of these conditions Active or recent (e.g., within the past year) arterial thromboembolic disease (e.g., stroke, myocardial infarction) Impaired liver function or liver disease As a diagnostic test for pregnancy Hypersensitivity to any of the drug components // CONTRAINDICATIONS Known or suspected pregnancy. There is no indication for norethindrone acetate tablets in pregnancy. (See PRECAUTIONS .) Undiagnosed vaginal bleeding Known, suspected or history of cancer of the breast Active deep vein thrombosis, pulmonary embolism or history of these conditions Active or recent (e.g., within the past year) arterial thromboembolic disease (e.g., stroke, myocardial infarction) Impaired liver function or liver disease As a diagnostic test for pregnancy Hypersensitivity to any of the drug components // CONTRAINDICATIONS • Known or suspected pregnancy. There is no indication for norethindrone acetate in pregnancy. (See PRECAUTIONS ). • Undiagnosed vaginal bleeding • Known, suspected or history of cancer of the breast • Active deep vein thrombosis, pulmonary embolism or history of these conditions • Active or recent (e.g., within the past year) arterial thromboembolic disease (e.g., stroke, myocardial infarction) • Impaire","WARNINGS Cardiovascular Disorders Patients with risk factors for arterial vascular disease (e.g., hypertension, diabetes mellitus, tobacco use, hypercholesterolemia, and obesity) and/or venous thromboembolism (e.g., personal history or family history of VTE, obesity, and systemic lupus erythematosus) should be managed appropriately. Visual Abnormalities Discontinue medication pending examination if there is a sudden partial or complete loss of vision or if there is sudden onset of proptosis, diplopia, or migraine. If examination reveals papilledema or retinal vascular lesions, medication should be discontinued. // WARNINGS 1 Cardiovascular disorders Patients with risk factors for arterial vascular disease (e.g., hypertension, diabetes mellitus, tobacco use, hypercholesterolemia, and obesity) and/or venous thromboembolism (e.g., personal history or family history of VTE, obesity, and systemic lupus erythematosus) should be managed appropriately. 2 Visual abnormalities Discontinue medication pending examination if there is a sudden partial or complete loss of vision or if there is sudden onset of proptosis, diplopia, or migraine. If examination reveals papilledema or retinal vascular lesions, medication should be discontinued. // WARNINGS 1. Cardiovascular disorders Patients with risk factors for arterial vascular disease (e.g., hypertension, diabetes mellitus, tobacco use, hypercholesterolemia, and obesity) and/or venous thromboembolism (e.g., personal history or family histor",
|
| 6 |
+
EE25_35_NGM,combined_mono_triphasic,ethinyl estradiol,25,norgestimate,0.215,3,low,moderate,"Good for acne. Ortho Tri-Cyclen, Sprintec, Tri-Sprintec, TriNessa, Tri-Previfem, Mononessa, Estarylla","ethinyl estradiol / norgestimate, sprintec, tri-sprintec, trinessa, tri-previfem",3989,5.91,0.4886,0.2178,0.1624,0.2031,0.0203,0.2743,0.175,0.1948,0.085,0.0198,0.0968,0.0424,0.0331,0.2537,0.0105,0.0158,0.2725,0.2459,10,37,13,0,38,42,90,29,88,38,15,3,2342,"6 ADVERSE REACTIONS The following serious adverse reactions with the use of COCs are discussed elsewhere in labeling: • Serious cardiovascular events and stroke [see Boxed Warning and Warnings and Precautions ( 5.1 )] • Vascular events [see Warnings and Precautions ( 5.1 )] • Liver disease [see Warnings and Precautions ( 5.2 )] The most common adverse reactions reported during clinical trials (≥2%) were: Norgestimate and ethinyl estradiol tablets, 0.25 mg/0.035 mg: headache/migraine, abdominal/gastrointestinal pain, vaginal infection, genital discharge, breast issues (including breast pain, discharge, and enlargement), mood disorders (including depression and mood altered), flatulence, nervousness, rash. ( 6.1 ) Norgestimate and ethinyl estradiol tablets, 0.18 mg/0.035 mg, 0.215 mg/0.035 mg, 0.25 mg/0.035 mg: headache/migraine, breast issues (including breast pain, enlargement, and discharge), vaginal infection, abdominal/gastrointestinal pain, mood disorders (including mood alteration and depression), genital discharge, changes in weight (including weight increased or decreased). ( 6.1 ) To report SUSPECTED ADVERSE REACTIONS, contact Glenmark Pharmaceuticals Inc., USA at 1 (888) 721-7115 or FDA at 1-800-FDA-1088 or www.fda.gov/medwatch. 6.1 Clinical Trial Experience Because clinical trials are conducted under widely varying conditions, adverse reaction rates observed in the clinical trials of a drug cannot be directly compared to rates in the clinical trials of another drug ","4 CONTRAINDICATIONS Tri-Sprintec ® is contraindicated in females who are known to have or develop the following conditions: • A high risk of arterial or venous thrombotic diseases. Examples include women who are known to: o Smoke, if over age 35 [see Boxed Warning and Warnings and Precautions ( )] o Have deep vein thrombosis or pulmonary embolism, now or in the past [see Warnings and Precautions ( )] o Have inherited or acquired hypercoagulopathies [see Warnings and Precautions ( )] o Have cerebrovascular disease [see Warnings and Precautions ( )] o Have coronary artery disease [see Warnings and Precautions ( )] o Have thrombogenic valvular or thrombogenic rhythm diseases of the heart (for example, subacute bacterial endocarditis with valvular disease, or atrial fibrillation) [see Warnings and Precautions ( )] o Have uncontrolled hypertension [see Warnings and Precautions ( )] o Have diabetes mellitus with vascular disease [see Warnings and Precautions ( )] o Have headaches with focal neurological symptoms or migraine headaches with aura [see Warnings and Precautions ( )] ▪ Women over age 35 with any migraine headaches [see Warnings and Precautions ( )] • Liver tumors, benign or malignant, or liver disease [see Warnings and Precautions ( )] • Undiagnosed abnormal uterine bleeding [see Warnings and Precautions ( )] • Current diagnosis of, or history of, breast cancer, which may be hormone-sensitive [see Warnings and Precautions ( )] • Use of Hepatitis C drug combinations conta","WARNINGS Cigarette smoking increases the risk of serious cardiovascular events from combination oral contraceptive use. This risk increases with age, particularly in women over 35 years of age, and with the number of cigarettes smoked. For this reason, combination oral contraceptives, including Tri-Sprintec ® , should not be used by women who are over 35 years of age and smoke. The use of oral contraceptives is associated with increased risks of several serious conditions including myocardial infarction, thromboembolism, stroke, hepatic neoplasia, and gallbladder disease, although the risk of serious morbidity or mortality is very small in healthy women without underlying risk factors. The risk of morbidity and mortality increases significantly in the presence of other underlying risk factors such as hypertension, hyperlipidemias, obesity and diabetes. Practitioners prescribing oral contraceptives should be familiar with the following information relating to these risks. The information contained in this package insert is principally based on studies carried out in patients who used oral contraceptives with higher formulations of estrogens and progestogens than those in common use today. The effect of long-term use of the oral contraceptives with lower formulations of both estrogens and progestogens remains to be determined. Throughout this labeling, epidemiological studies reported are of two types: retrospective or case control studies and prospective or cohort studies. Cas","WARNING: CIGARETTE SMOKING and SERIOUS CARDIOVASCULAR EVENTS Cigarette smoking increases the risk of serious cardiovascular events from combination oral contraceptive (COC) use. This risk increases with age, particularly in women over 35 years of age, and with the number of cigarettes smoked. For this reason, COCs are contraindicated in women who are over 35 years of age and smoke [see Contraindications (4) ] . WARNING: CIGARETTE SMOKING and SERIOUS CARDIOVASCULAR EVENTS See full prescribing information for complete boxed warning. • Tri-Lo-Mili is contraindicated in women over 35 years old who smoke. ( 4 ) • Cigarette smoking increases the risk of serious cardiovascular events from combination oral contraceptives (COC) use. ( 4 ) // WARNING: CIGARETTE SMOKING AND SERIOUS CARDIOVASCULAR EVENTS WARNING: CIGARETTE SMOKING AND SERIOUS CARDIOVASCULAR EVENTS See full prescribing information for complete boxed warning. • Tri-Lo-Marzia is contraindicated in women over 35 years old who smoke. ( 4 ) • Cigarette smoking increases the risk of serious cardiovascular events from combination oral contraceptives (COC) use. ( 4 ) Cigarette smoking increases the risk of serious cardiovascular events from combination oral contraceptive (COC) use. This risk increases with age, particularly in women over 35 years of age, and with the number of cigarettes smoked. For this reason, COCs are contraindicated in women who are over 35 years of age and smoke [see CONTRAINDICATIONS ( 4 )]. // WARNING: CIG"
|
| 7 |
+
EE30_DSG150,combined_monophasic,ethinyl estradiol,30,desogestrel,0.15,3,low,high,"Higher VTE risk than LNG/NET. Apri, Reclipsen, Kariva, Desogen, Ortho-Cept","desogestrel / ethinyl estradiol, apri, reclipsen, kariva, desogen",1176,5.76,0.5068,0.2032,0.2976,0.2202,0.0204,0.1624,0.1667,0.1837,0.0723,0.0298,0.0884,0.0434,0.0281,0.2687,0.0128,0.0323,0.2381,0.2849,19,56,23,2,16,31,42,14,49,17,15,2,2052,"ADVERSE REACTIONS An increased risk of the following serious adverse reactions has been associated with the use of oral contraceptives (see WARNINGS ). Thrombophlebitis and venous thrombosis with or without embolism Arterial thromboembolism Pulmonary embolism Myocardial infarction Cerebral hemorrhage Cerebral thrombosis Hypertension Gallbladder disease Hepatic adenomas or benign liver tumors There is evidence of an association between the following conditions and the use of oral contraceptives: Mesenteric thrombosis Retinal thrombosis The following adverse reactions have been reported in patients receiving oral contraceptives and are believed to be drug-related: Nausea Vomiting Gastrointestinal symptoms (such as abdominal cramps and bloating) Breakthrough bleeding Spotting Change in menstrual flow Amenorrhea Temporary infertility after discontinuation of treatment Edema Melasma which may persist Breast changes: tenderness, enlargement, secretion Change in weight (increase or decrease) Change in cervical erosion and secretion Diminution in lactation when given immediately postpartum Cholestatic jaundice Migraine Allergic reaction, including rash, urticaria, and angioedema Mental depression Reduced tolerance to carbohydrates Vaginal candidiasis Change in corneal curvature (steepening) Intolerance to contact lenses The following adverse reactions have been reported in users of oral contraceptives and a causal association has been neither confirmed nor refuted: Pre-menstrual synd","CONTRAINDICATIONS Oral contraceptives should not be used in women who currently have the following conditions: Thrombophlebitis or thromboembolic disorders A past history of deep vein thrombophlebitis or thromboembolic disorders Cerebral vascular or coronary artery disease Current diagnosis of, or history of, breast cancer, which may be hormone-sensitive Undiagnosed abnormal genital bleeding Cholestatic jaundice of pregnancy or jaundice with prior pill use Hepatic adenomas or carcinomas Are receiving Hepatitis C drug combinations containing ombitasvir/paritaprevir/ritonavir, with or without dasabuvir, due to the potential for ALT elevations (see WARNINGS, Risk of Liver Enzyme Elevations with Concomitant Hepatitis C Treatment ) // CONTRAINDICATIONS Desogestrel and ethinyl estradiol tablets are contraindicated in females who are known to have or develop the following conditions: Thrombophlebitis or thromboembolic disorders A past history of deep vein thrombophlebitis or thromboembolic disorders Known thrombophilic conditions Cerebral vascular or coronary artery disease (current or history) Valvular heart disease with complications Persistent blood pressure values of ≥ 160 mm Hg systolic or ≥ 100 mg Hg diastolic 102 Diabetes with vascular involvement Headaches with focal neurological symptoms Major surgery with prolonged immobilization Current diagnosis of, or history of, breast cancer, which may be hormone-sensitive Carcinoma of the endometrium or other known or suspected estro","WARNINGS The use of oral contraceptives is associated with increased risks of several serious conditions including myocardial infarction, thromboembolism, stroke, hepatic neoplasia, and gallbladder disease, although the risk of serious morbidity or mortality is very small in healthy women without underlying risk factors. The risk of morbidity and mortality increases significantly in the presence of other underlying risk factors such as hypertension, hyperlipidemias, obesity, and diabetes. Practitioners prescribing oral contraceptives should be familiar with the following information relating to these risks. The information contained in this package insert is principally based on studies carried out in patients who used oral contraceptives with formulations of higher doses of estrogens and progestogens than those in common use today. The effect of long-term use of the oral contraceptives with formulations of lower doses of both estrogens and progestogens remains to be determined. Throughout this labeling, epidemiologic studies reported are of two types: retrospective or case control studies and prospective or cohort studies. Case control studies provide a measure of the relative risk of a disease, namely, a ratio of the incidence of a disease among oral contraceptive users to that among non-users. The relative risk does not provide information on the actual clinical occurrence of a disease. Cohort studies provide a measure of attributable risk, which is the difference in the i","WARNING: CIGARETTE SMOKING AND SERIOUS CARDIOVASCULAR EVENTS Cigarette smoking increases the risk of serious cardiovascular events from combination oral contraceptive (COC) use. This risk increases with age, particularly in women over 35 years of age, and with the number of cigarettes smoked. For this reason, COCs, including SIMLIYA TM , are contraindicated in women who are over 35 years of age and smoke (see CONTRAINDICATIONS and WARNINGS ). Cigarette smoking increases the risk of serious cardiovascular side effects from oral contraceptive use. This risk increases with age and with heavy smoking (15 or more cigarettes per day) and is quite marked in women over 35 years of age. Women who use oral contraceptives are strongly advised not to smoke. // WARNING: CARDIOVASCULAR RISK ASSOCIATED WITH SMOKING Cigarette smoking increases the risk of serious cardiovascular events from combination oral contraceptive use. This risk increases with age, particularly in women over 35 years of age, and with the number of cigarettes smoked. For this reason, combination oral contraceptives, including Kalliga TM , should not be used by women who are over 35 years of age and smoke. Do not use Kalliga TM if you smoke cigarettes and are over 35 years old. Smoking increases your risk of serious cardiovascular side effects (heart and blood vessel problems) from combination oral contraceptives, including death from heart attack, blood clots or stroke. This risk increases with age and the number of cig"
|
| 8 |
+
EE30_DRSP3,combined_monophasic,ethinyl estradiol,30,drospirenone,3.0,4,anti_androgenic,high,"Anti-androgenic: good for acne/PCOS but highest thrombosis signal. Yasmin, Ocella, Zarah","drospirenone / ethinyl estradiol, yasmin, ocella, zarah, syeda",1183,6.06,0.5224,0.2265,0.1944,0.2198,0.0397,0.1631,0.1741,0.1564,0.109,0.0338,0.1336,0.049,0.0372,0.2418,0.0152,0.0296,0.3508,0.317,1819,1663,904,20,148,84,46,21,51,540,14,7,18083,"6 ADVERSE REACTIONS The most frequent adverse reactions (≥ 2%) are premenstrual syndrome (13.2%), headache /migraine (10.7%), breast pain/tenderness/discomfort (8.3%), nausea/vomiting (4.5%), abdominal pain/tenderness/discomfort (2.3%), mood changes (2.3%). ( 6.1 ) To report SUSPECTED ADVERSE REACTIONS, contact Lupin Pharmaceuticals Inc. at 1-800-399-2561 or FDA at 1-800-FDA-1088 or www.fda.gov/medwatch The following serious adverse reactions with the use of COCs are discussed elsewhere in the labeling: Serious cardiovascular events and stroke [see BOXED WARNING and WARNINGS AND PRECAUTIONS ( 5.1 ) ] Vascular events [see WARNINGS AND PRECAUTIONS ( 5.1 ) ] Liver disease [see WARNINGS AND PRECAUTIONS ( 5.4 ) ] 6.1 Clinical Trials Experience Because clinical trials are conducted under widely varying conditions, the adverse reaction rates observed cannot be directly compared to rates in other clinical trials and may not reflect the rates observed in practice. The data provided reflect the experience with the use of drospirenone and ethinyl estradiol tablets (3 mg DRSP/0.03 mg EE) in the adequate and well-controlled studies for contraception (N=2,837). The US pivotal clinical study (N=326) was a multicenter, open-label trial in healthy women aged 18 to 35 who were treated for up to 13 cycles. The second pivotal study (N=442)was a multicenter, randomized, open-label comparative European study of drospirenone and ethinyl estradiol tablets vs. 0.150 mg desogestrel/0.03 mg EE conducte","4 CONTRAINDICATIONS Yaz is contraindicated in females who are known to have or develop the following conditions: • Renal impairment • Adrenal insufficiency • A high risk of arterial or venous thrombotic diseases. Examples include women who are known to: • Smoke, if over age 35 [see Boxed Warning and Warnings and Precautions ( 5.1 )] • Have deep vein thrombosis or pulmonary embolism, now or in the past [see Warnings and Precautions ( 5.1 )] • Have cerebrovascular disease [see Warnings and Precautions ( 5.1 )] • Have coronary artery disease [see Warnings and Precautions ( 5.1 )] • Have thrombogenic valvular or thrombogenic rhythm diseases of the heart (for example, subacute bacterial endocarditis with valvular disease, or atrial fibrillation) [see Warnings and Precautions ( 5.1 )] • Have inherited or acquired hypercoagulopathies [see Warnings and Precautions ( 5.1 )] • Have uncontrolled hypertension [see Warnings and Precautions ( 5.6 )] • Have diabetes mellitus with vascular disease [see Warnings and Precautions ( 5.8 )] • Have headaches with focal neurological symptoms or have migraine headaches with or without aura if over age 35 [see Warnings and Precautions ( 5.9 )] • Undiagnosed abnormal uterine bleeding [see Warnings and Precautions ( 5.10 )] • Current diagnosis of, or history of, breast cancer, which may be hormone-sensitive [see Warnings and Precautions ( 5.3 )] • Liver tumors, benign or malignant, or liver disease [see Warnings and Precautions ( 5.4 ) and Use in Speci",,"WARNING: CIGARETTE SMOKING AND SERIOUS CARDIOVASCULAR EVENTS WARNING: CIGARETTE SMOKING AND SERIOUS CARDIOVASCULAR EVENTS See full prescribing information for complete boxed warning • Women over 35 years old who smoke should not use drospirenone and ethinyl estradiol tablets. ( 4 ) • Cigarette smoking increases the risk of serious cardiovascular events from combination oral contraceptive (COC) use. ( 4 ) Cigarette smoking increases the risk of serious cardiovascular events from combination oral contraceptives (COC) use. This risk increases with age, particularly in women over 35 years of age, and with the number of cigarettes smoked. For this reason, COCs should not be used by women who are over 35 years of age and smoke [see Contraindications (4) ] . // WARNING: CIGARETTE SMOKING AND SERIOUS CARDIOVASCULAR EVENTS Cigarette smoking increases the risk of serious cardiovascular events from combined hormonal contraceptive (CHC) use. This risk increases with age, particularly in females over 35 years of age, and with the number of cigarettes smoked. For this reason, CHCs, including NEXTSTELLIS, are contraindicated in females who are over 35 years of age and smoke. [See Contraindications (4) and Warnings and Precautions (5.1) ] WARNING: CIGARETTE SMOKING AND SERIOUS CARDIOVASCULAR EVENTS See full prescribing information for complete boxed warning . Females over 35 years old who smoke should not use NEXTSTELLIS ( 4 ) Cigarette smoking increases the risk of serious cardiovascular ev"
|
| 9 |
+
EE20_DRSP3,combined_monophasic,ethinyl estradiol,20,drospirenone,3.0,4,anti_androgenic,high,"Low-dose DRSP. Yaz, Gianvi, Vestura, Loryna","yaz, gianvi, vestura, loryna, nikki",397,5.82,0.5264,0.2443,0.1914,0.1612,0.0353,0.1108,0.1688,0.1537,0.1134,0.0302,0.1259,0.0453,0.0378,0.194,0.005,0.0403,0.335,0.3149,1866,1696,928,20,152,82,39,22,44,550,14,6,18507,"6 ADVERSE REACTIONS The most frequent adverse reactions (≥ 2%) are premenstrual syndrome (13.2%), headache /migraine (10.7%), breast pain/tenderness/discomfort (8.3%), nausea/vomiting (4.5%), abdominal pain/tenderness/discomfort (2.3%), mood changes (2.3%). ( 6.1 ) To report SUSPECTED ADVERSE REACTIONS, contact Lupin Pharmaceuticals Inc. at 1-800-399-2561 or FDA at 1-800-FDA-1088 or www.fda.gov/medwatch The following serious adverse reactions with the use of COCs are discussed elsewhere in the labeling: Serious cardiovascular events and stroke [see BOXED WARNING and WARNINGS AND PRECAUTIONS ( 5.1 ) ] Vascular events [see WARNINGS AND PRECAUTIONS ( 5.1 ) ] Liver disease [see WARNINGS AND PRECAUTIONS ( 5.4 ) ] 6.1 Clinical Trials Experience Because clinical trials are conducted under widely varying conditions, the adverse reaction rates observed cannot be directly compared to rates in other clinical trials and may not reflect the rates observed in practice. The data provided reflect the experience with the use of drospirenone and ethinyl estradiol tablets (3 mg DRSP/0.03 mg EE) in the adequate and well-controlled studies for contraception (N=2,837). The US pivotal clinical study (N=326) was a multicenter, open-label trial in healthy women aged 18 to 35 who were treated for up to 13 cycles. The second pivotal study (N=442)was a multicenter, randomized, open-label comparative European study of drospirenone and ethinyl estradiol tablets vs. 0.150 mg desogestrel/0.03 mg EE conducte","4 CONTRAINDICATIONS Yaz is contraindicated in females who are known to have or develop the following conditions: • Renal impairment • Adrenal insufficiency • A high risk of arterial or venous thrombotic diseases. Examples include women who are known to: • Smoke, if over age 35 [see Boxed Warning and Warnings and Precautions ( 5.1 )] • Have deep vein thrombosis or pulmonary embolism, now or in the past [see Warnings and Precautions ( 5.1 )] • Have cerebrovascular disease [see Warnings and Precautions ( 5.1 )] • Have coronary artery disease [see Warnings and Precautions ( 5.1 )] • Have thrombogenic valvular or thrombogenic rhythm diseases of the heart (for example, subacute bacterial endocarditis with valvular disease, or atrial fibrillation) [see Warnings and Precautions ( 5.1 )] • Have inherited or acquired hypercoagulopathies [see Warnings and Precautions ( 5.1 )] • Have uncontrolled hypertension [see Warnings and Precautions ( 5.6 )] • Have diabetes mellitus with vascular disease [see Warnings and Precautions ( 5.8 )] • Have headaches with focal neurological symptoms or have migraine headaches with or without aura if over age 35 [see Warnings and Precautions ( 5.9 )] • Undiagnosed abnormal uterine bleeding [see Warnings and Precautions ( 5.10 )] • Current diagnosis of, or history of, breast cancer, which may be hormone-sensitive [see Warnings and Precautions ( 5.3 )] • Liver tumors, benign or malignant, or liver disease [see Warnings and Precautions ( 5.4 ) and Use in Speci",,"WARNING: CIGARETTE SMOKING AND SERIOUS CARDIOVASCULAR EVENTS WARNING: CIGARETTE SMOKING AND SERIOUS CARDIOVASCULAR EVENTS See full prescribing information for complete boxed warning • Women over 35 years old who smoke should not use drospirenone and ethinyl estradiol tablets. ( 4 ) • Cigarette smoking increases the risk of serious cardiovascular events from combination oral contraceptive (COC) use. ( 4 ) Cigarette smoking increases the risk of serious cardiovascular events from combination oral contraceptives (COC) use. This risk increases with age, particularly in women over 35 years of age, and with the number of cigarettes smoked. For this reason, COCs should not be used by women who are over 35 years of age and smoke [see Contraindications (4) ] . // WARNING: CIGARETTE SMOKING AND SERIOUS CARDIOVASCULAR EVENTS Cigarette smoking increases the risk of serious cardiovascular events from combined hormonal contraceptive (CHC) use. This risk increases with age, particularly in females over 35 years of age, and with the number of cigarettes smoked. For this reason, CHCs, including NEXTSTELLIS, are contraindicated in females who are over 35 years of age and smoke. [See Contraindications (4) and Warnings and Precautions (5.1) ] WARNING: CIGARETTE SMOKING AND SERIOUS CARDIOVASCULAR EVENTS See full prescribing information for complete boxed warning . Females over 35 years old who smoke should not use NEXTSTELLIS ( 4 ) Cigarette smoking increases the risk of serious cardiovascular ev"
|
| 10 |
+
NET_PO_350,progestin_only,,0,norethindrone,0.35,1,moderate,very_low,"Safe for smokers, hypertension, migraineurs, breastfeeding. Less effective if not taken consistently.","norethindrone, jolivette, nora-be, ortho micronor, camila",721,5.34,0.3883,0.1401,0.1096,0.2288,0.0166,0.0707,0.2219,0.2455,0.0624,0.0042,0.2094,0.068,0.0652,0.1969,0.0305,0.0374,0.2413,0.19,4,5,3,0,41,54,49,26,53,14,12,9,2248,"ADVERSE REACTIONS Adverse reactions reported with the use of POPs include: • Menstrual irregularity is the most frequently reported side effect. • Frequent and irregular bleeding are common, while long duration of bleeding episodes and amenorrhea are less likely. • Headache, breast tenderness, nausea, and dizziness are increased among progestin-only oral contraceptive users in some studies. • Androgenic side effects such as acne, hirsutism, and weight gain occur rarely. The following adverse reactions were also reported in clinical trials or during post-marketing experience: Gastrointestinal Disorders: vomiting, abdominal pain; General Disorders and Administration Site Conditions: fatigue, edema; Psychiatric Disorders: depression, nervousness; Musculoskeletal and Connective Tissue Disorders : pain in extremity; Reproductive System and Breast Disorders: genital discharge; breast pain, menstruation delayed, suppressed lactation, vaginal hemorrhage, menorrhagia, withdrawal bleed when product is stopped; Immune System Disorders: anaphylactic/anaphylactoid reaction, hypersensitivity; Hepatobiliary Disorders: hepatitis, jaundice cholestatic; Skin and Subcutaneous Tissue Disorders: alopecia, rash, rash pruritic. // ADVERSE REACTIONS Adverse reactions reported with the use of POPs include: • Menstrual irregularity is the most frequently reported side effect. • Frequent and irregular bleeding are common, while long duration of bleeding episodes and amenorrhea are less likely. • Headac",CONTRAINDICATIONS Progestin-only oral contraceptives (POPs) should not be used by women who currently have the following conditions: • Known or suspected pregnancy • Known or suspected carcinoma of the breast • Undiagnosed abnormal genital bleeding • Hypersensitivity to any component of this product • Benign or malignant liver tumors • Acute liver disease // CONTRAINDICATIONS Progestin - only oral contraceptives (POPs) should not be used by women who currently have the following conditions: Known or suspected pregnancy Known or suspected carcinoma of the breast Undiagnosed abnormal genital bleeding Hypersensitivity to any component of this product Benign or malignant liver tumors Acute liver disease // CONTRAINDICATIONS Progestin-only oral contraceptives tablets should not be used by women who currently have the following conditions: Known or suspected pregnancy Known or suspected carcinoma of the breast Undiagnosed abnormal genital bleeding Hypersensitivity to any component of this product Benign or malignant liver tumors Acute liver disease // CONTRAINDICATIONS Progestin-only oral contraceptives (POPs) should not be used by women who currently have the following conditions: • Known or suspected pregnancy • Known or suspected carcinoma of the breast. • Undiagnosed abnormal genital bleeding • Hypersensitivity to any component of this product • Benign or malignant liver tumors • Acute liver disease // CONTRAINDICATIONS Progestin-only oral contraceptives tablets should not be u,"WARNINGS Cigarette smoking greatly increases the possibility of suffering heart attacks and strokes. Women who use oral contraceptives are strongly advised not to smoke. Nora-BE does not contain estrogen and, therefore, this insert does not discuss the serious health risks that have been associated with the estrogen component of combined oral contraceptives. The health care provider is referred to the prescribing information of combined oral contraceptives for a discussion of those risks, including, but not limited to, an increased risk of serious cardiovascular disease in women who smoke, carcinoma of the breast and reproductive organs, hepatic neoplasia, and changes in carbohydrate and lipid metabolism. The relationship between progestin-only oral contraceptives and these risks have not been established and there are no studies definitely linking progestin-only pill (POP) use to an increased risk of heart attack or stroke. The physician should remain alert to the earliest manifestation of symptoms of any serious disease and discontinue oral contraceptive therapy when appropriate. 1. Ectopic pregnancy. The incidence of ectopic pregnancies for progestin-only oral contraceptive users is 5 per 1000 woman-years. Up to 10% of pregnancies reported in clinical studies of progestin-only oral contraceptive users are extrauterine. Although symptoms of ectopic pregnancy should be watched for, a history of ectopic pregnancy need not be considered a contraindication to use of this contra",Cigarette smoking greatly increases the possibility of suffering heart attacks and strokes. Women who use oral contraceptives are strongly advised not to smoke. WARNING: Cigarette smoking greatly increases the possibility of suffering heart attacks and strokes. Women who use oral contraceptives are strongly advised not to smoke.
|
requirements.txt
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Combined inference server dependencies — cluster + simulator models
|
| 2 |
+
# numpy >=2.0 required: simulation artifacts were pickled with numpy 2.x
|
| 3 |
+
|
| 4 |
+
fastapi==0.115.0
|
| 5 |
+
uvicorn[standard]==0.30.6
|
| 6 |
+
pydantic==2.8.0
|
| 7 |
+
scikit-learn==1.6.1
|
| 8 |
+
numpy==2.2.6
|
| 9 |
+
pandas==2.2.3
|
| 10 |
+
joblib==1.5.2
|
serve.py
ADDED
|
@@ -0,0 +1,425 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""
|
| 3 |
+
serve.py — Combined FastAPI inference server for Hugging Face Spaces.
|
| 4 |
+
|
| 5 |
+
Exposes both model APIs on a single port (7860) as required by HF Spaces:
|
| 6 |
+
|
| 7 |
+
POST /api/v1/cluster/predict ← GMM clustering model
|
| 8 |
+
POST /api/v1/simulator/simulate ← HistGBM simulation model
|
| 9 |
+
GET /api/v1/health ← combined health check
|
| 10 |
+
GET / ← root info
|
| 11 |
+
|
| 12 |
+
Artifact layout (relative to this file):
|
| 13 |
+
artifacts/clustering/
|
| 14 |
+
gmm_model.pkl
|
| 15 |
+
scaler.pkl
|
| 16 |
+
imputer.pkl
|
| 17 |
+
profile_rules.json
|
| 18 |
+
artifacts/simulation/
|
| 19 |
+
model_symptoms.pkl
|
| 20 |
+
model_satisfaction.pkl
|
| 21 |
+
feature_meta.json
|
| 22 |
+
drugs/output/pill_reference_db.csv
|
| 23 |
+
"""
|
| 24 |
+
|
| 25 |
+
import json
|
| 26 |
+
import logging
|
| 27 |
+
import math
|
| 28 |
+
import os
|
| 29 |
+
import pickle
|
| 30 |
+
from pathlib import Path
|
| 31 |
+
from typing import Any, Dict, List, Optional
|
| 32 |
+
|
| 33 |
+
import joblib
|
| 34 |
+
import numpy as np
|
| 35 |
+
import pandas as pd
|
| 36 |
+
from fastapi import FastAPI, HTTPException
|
| 37 |
+
from fastapi.middleware.cors import CORSMiddleware
|
| 38 |
+
from pydantic import BaseModel, Field
|
| 39 |
+
|
| 40 |
+
logging.basicConfig(level=logging.INFO)
|
| 41 |
+
logger = logging.getLogger(__name__)
|
| 42 |
+
|
| 43 |
+
_DIR = Path(__file__).resolve().parent
|
| 44 |
+
|
| 45 |
+
# ══════════════════════════════════════════════════════════════════════════════
|
| 46 |
+
# CLUSTER MODEL — artifact loading
|
| 47 |
+
# ══════════════════════════════════════════════════════════════════════════════
|
| 48 |
+
|
| 49 |
+
_CLUSTER_DIR = _DIR / "artifacts" / "clustering"
|
| 50 |
+
|
| 51 |
+
def _load_pkl_cluster(name: str):
|
| 52 |
+
with open(_CLUSTER_DIR / name, "rb") as f:
|
| 53 |
+
return pickle.load(f)
|
| 54 |
+
|
| 55 |
+
logger.info("Loading clustering artifacts from %s …", _CLUSTER_DIR)
|
| 56 |
+
GMM = _load_pkl_cluster("gmm_model.pkl")
|
| 57 |
+
SCALER = _load_pkl_cluster("scaler.pkl")
|
| 58 |
+
IMP_DICT = _load_pkl_cluster("imputer.pkl")
|
| 59 |
+
RULES = json.loads((_CLUSTER_DIR / "profile_rules.json").read_text())
|
| 60 |
+
|
| 61 |
+
FEATURE_ORDER = RULES["feature_order"]
|
| 62 |
+
AVAIL_CONT = IMP_DICT["avail_cont"]
|
| 63 |
+
AVAIL_BIN = IMP_DICT["avail_bin"]
|
| 64 |
+
IMP_CONT = IMP_DICT["continuous"]
|
| 65 |
+
IMP_BIN = IMP_DICT["binary"]
|
| 66 |
+
logger.info("Clustering artifacts loaded — k=%d profiles, %d features", RULES["k"], len(FEATURE_ORDER))
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
def _prepare_cluster_features(patient: dict) -> np.ndarray:
|
| 70 |
+
row = {}
|
| 71 |
+
for feat in FEATURE_ORDER:
|
| 72 |
+
val = patient.get(feat)
|
| 73 |
+
if val is None or (isinstance(val, float) and math.isnan(val)):
|
| 74 |
+
row[feat] = np.nan
|
| 75 |
+
else:
|
| 76 |
+
row[feat] = float(val)
|
| 77 |
+
|
| 78 |
+
df = pd.DataFrame([row], columns=FEATURE_ORDER)
|
| 79 |
+
|
| 80 |
+
cont_arr = IMP_CONT.transform(df[AVAIL_CONT])
|
| 81 |
+
bin_arr = IMP_BIN.transform(df[AVAIL_BIN])
|
| 82 |
+
|
| 83 |
+
df_cont = pd.DataFrame(cont_arr, columns=AVAIL_CONT)
|
| 84 |
+
df_bin = pd.DataFrame(bin_arr, columns=AVAIL_BIN)
|
| 85 |
+
df_full = pd.concat([df_cont, df_bin], axis=1)[FEATURE_ORDER]
|
| 86 |
+
|
| 87 |
+
df_full[AVAIL_CONT] = SCALER.transform(df_full[AVAIL_CONT])
|
| 88 |
+
return df_full.values # shape (1, n_features)
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
# ══════════════════════════════════════════════════════════════════════════════
|
| 92 |
+
# SIMULATOR MODEL — artifact loading
|
| 93 |
+
# ══════════════════════════════════════════════════════════════════════════════
|
| 94 |
+
|
| 95 |
+
_SIM_DIR = _DIR / "artifacts" / "simulation"
|
| 96 |
+
_PILLS_CSV = _DIR / "drugs" / "output" / "pill_reference_db.csv"
|
| 97 |
+
|
| 98 |
+
logger.info("Loading simulation artifacts from %s …", _SIM_DIR)
|
| 99 |
+
SYMPTOMS_MODEL = joblib.load(_SIM_DIR / "model_symptoms.pkl")
|
| 100 |
+
SATISFACTION_MODEL = joblib.load(_SIM_DIR / "model_satisfaction.pkl")
|
| 101 |
+
|
| 102 |
+
with open(_SIM_DIR / "feature_meta.json") as _f:
|
| 103 |
+
META = json.load(_f)
|
| 104 |
+
|
| 105 |
+
FEATURE_NAMES = META["feature_names"]
|
| 106 |
+
PATIENT_FEATURES = META["patient_features"]
|
| 107 |
+
PILL_FEATURES = META["pill_features"]
|
| 108 |
+
BINARY_TARGETS = META["binary_targets"]
|
| 109 |
+
ANDROGENIC_MAP = META["androgenic_map"]
|
| 110 |
+
VTE_MAP = META["vte_map"]
|
| 111 |
+
|
| 112 |
+
logger.info(
|
| 113 |
+
"Simulation artifacts loaded — %d features, %d binary targets",
|
| 114 |
+
len(FEATURE_NAMES), len(BINARY_TARGETS),
|
| 115 |
+
)
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
def _build_pill_lookup() -> Dict[str, Dict[str, float]]:
|
| 119 |
+
try:
|
| 120 |
+
pills_df = pd.read_csv(_PILLS_CSV)
|
| 121 |
+
except FileNotFoundError:
|
| 122 |
+
logger.warning("pill_reference_db.csv not found at %s — empty pill lookup", _PILLS_CSV)
|
| 123 |
+
return {}
|
| 124 |
+
|
| 125 |
+
p = pills_df.copy()
|
| 126 |
+
p["pill_type_binary"] = p["pill_type"].apply(lambda x: 0 if "progestin_only" in str(x) else 1)
|
| 127 |
+
p["androgenic_score"] = p["androgenic_activity"].str.lower().map(ANDROGENIC_MAP).astype(float)
|
| 128 |
+
p["vte_risk_numeric"] = p["vte_risk_class"].str.lower().map(VTE_MAP).astype(float)
|
| 129 |
+
p["progestin_generation"] = pd.to_numeric(p["progestin_generation"], errors="coerce")
|
| 130 |
+
p["progestin_dose_mg"] = pd.to_numeric(p["progestin_dose_mg"], errors="coerce")
|
| 131 |
+
p["estrogen_dose_mcg"] = pd.to_numeric(p["estrogen_dose_mcg"], errors="coerce")
|
| 132 |
+
return p.set_index("combo_id")[PILL_FEATURES].to_dict(orient="index")
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
PILLS_LOOKUP: Dict[str, Dict[str, float]] = _build_pill_lookup()
|
| 136 |
+
logger.info("Pill lookup ready — %d pills", len(PILLS_LOOKUP))
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
def _predict_trajectory(
|
| 140 |
+
patient_row: Dict[str, Any],
|
| 141 |
+
combo_id: str,
|
| 142 |
+
pill_feats_override: Optional[Dict[str, float]] = None,
|
| 143 |
+
n_months: int = 12,
|
| 144 |
+
) -> Dict[str, Any]:
|
| 145 |
+
pill_feats = pill_feats_override or PILLS_LOOKUP.get(combo_id, {})
|
| 146 |
+
if not pill_feats:
|
| 147 |
+
logger.warning("combo_id '%s' not found in pill lookup — pill features will be NaN", combo_id)
|
| 148 |
+
|
| 149 |
+
rows = []
|
| 150 |
+
for m in range(1, n_months + 1):
|
| 151 |
+
row: Dict[str, Any] = {}
|
| 152 |
+
for feat in FEATURE_NAMES:
|
| 153 |
+
if feat == "month":
|
| 154 |
+
row[feat] = float(m)
|
| 155 |
+
elif feat in PILL_FEATURES:
|
| 156 |
+
val = pill_feats.get(feat)
|
| 157 |
+
row[feat] = float(val) if val is not None and not (isinstance(val, float) and math.isnan(val)) else np.nan
|
| 158 |
+
else:
|
| 159 |
+
val = patient_row.get(feat)
|
| 160 |
+
row[feat] = float(val) if val is not None and not (isinstance(val, float) and math.isnan(val)) else np.nan
|
| 161 |
+
rows.append(row)
|
| 162 |
+
|
| 163 |
+
X_traj = pd.DataFrame(rows, columns=FEATURE_NAMES).astype(float).values
|
| 164 |
+
|
| 165 |
+
proba_list = SYMPTOMS_MODEL.predict_proba(X_traj)
|
| 166 |
+
sym_probs = np.column_stack([p[:, 1] for p in proba_list])
|
| 167 |
+
sat_preds = SATISFACTION_MODEL.predict(X_traj)
|
| 168 |
+
|
| 169 |
+
return {
|
| 170 |
+
"combo_id": combo_id,
|
| 171 |
+
"n_months": n_months,
|
| 172 |
+
"months": list(range(1, n_months + 1)),
|
| 173 |
+
"symptom_probs": {tgt: sym_probs[:, i].tolist() for i, tgt in enumerate(BINARY_TARGETS)},
|
| 174 |
+
"satisfaction": sat_preds.tolist(),
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
|
| 178 |
+
_ADVERSE_SYMS = [
|
| 179 |
+
"sym_nausea", "sym_headache", "sym_breast_tenderness", "sym_spotting",
|
| 180 |
+
"sym_mood_worsened", "sym_depression_episode", "sym_anxiety",
|
| 181 |
+
"sym_libido_decreased", "sym_weight_gain", "sym_acne_worsened", "sym_hair_loss",
|
| 182 |
+
]
|
| 183 |
+
_SERIOUS_EVTS = ["evt_dvt", "evt_pe", "evt_stroke"]
|
| 184 |
+
|
| 185 |
+
|
| 186 |
+
def _derive_summary_metrics(symptom_probs: Dict[str, List[float]], satisfaction: List[float]) -> Dict[str, float]:
|
| 187 |
+
still_taking = symptom_probs.get("still_taking", [])
|
| 188 |
+
disc_prob = float(1.0 - still_taking[-1]) if still_taking else 0.5
|
| 189 |
+
|
| 190 |
+
severe_probs = [max(symptom_probs[e]) for e in _SERIOUS_EVTS if symptom_probs.get(e)]
|
| 191 |
+
severe_prob = float(np.mean(severe_probs)) if severe_probs else 0.0
|
| 192 |
+
|
| 193 |
+
adverse_means = [float(np.mean(symptom_probs[s])) for s in _ADVERSE_SYMS if symptom_probs.get(s)]
|
| 194 |
+
mild_score = float(np.mean(adverse_means)) if adverse_means else 0.0
|
| 195 |
+
|
| 196 |
+
effectiveness = float(np.mean(satisfaction) / 10.0) if satisfaction else 0.5
|
| 197 |
+
|
| 198 |
+
return {
|
| 199 |
+
"discontinuation_probability": round(disc_prob, 4),
|
| 200 |
+
"severe_event_probability": round(severe_prob, 6),
|
| 201 |
+
"mild_side_effect_score": round(mild_score, 4),
|
| 202 |
+
"contraceptive_effectiveness": round(effectiveness, 4),
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
# ══════════════════════════════════════════════════════════════════════════════
|
| 207 |
+
# Pydantic schemas
|
| 208 |
+
# ══════════════════════════════════════════════════════════════════════════════
|
| 209 |
+
|
| 210 |
+
class PatientFeatures(BaseModel):
|
| 211 |
+
age: float = Field(..., ge=15, le=60)
|
| 212 |
+
|
| 213 |
+
# WHO MEC Cat 4
|
| 214 |
+
cond_migraine_with_aura: int = Field(0, ge=0, le=1)
|
| 215 |
+
cond_stroke: int = Field(0, ge=0, le=1)
|
| 216 |
+
cond_mi: int = Field(0, ge=0, le=1)
|
| 217 |
+
cond_dvt: int = Field(0, ge=0, le=1)
|
| 218 |
+
cond_breast_cancer: int = Field(0, ge=0, le=1)
|
| 219 |
+
cond_lupus: int = Field(0, ge=0, le=1)
|
| 220 |
+
cond_thrombophilia: int = Field(0, ge=0, le=1)
|
| 221 |
+
cond_atrial_fibrillation: int = Field(0, ge=0, le=1)
|
| 222 |
+
cond_liver_disease: int = Field(0, ge=0, le=1)
|
| 223 |
+
|
| 224 |
+
# WHO MEC Cat 3
|
| 225 |
+
cond_hypertension: int = Field(0, ge=0, le=1)
|
| 226 |
+
cond_migraine: int = Field(0, ge=0, le=1)
|
| 227 |
+
cond_gallstones: int = Field(0, ge=0, le=1)
|
| 228 |
+
cond_diabetes: int = Field(0, ge=0, le=1)
|
| 229 |
+
cond_prediabetes: int = Field(0, ge=0, le=1)
|
| 230 |
+
cond_epilepsy: int = Field(0, ge=0, le=1)
|
| 231 |
+
cond_chronic_kidney_disease: int = Field(0, ge=0, le=1)
|
| 232 |
+
cond_sleep_apnea: int = Field(0, ge=0, le=1)
|
| 233 |
+
|
| 234 |
+
# Indications / comorbidities
|
| 235 |
+
cond_pcos: int = Field(0, ge=0, le=1)
|
| 236 |
+
cond_endometriosis: int = Field(0, ge=0, le=1)
|
| 237 |
+
cond_depression: int = Field(0, ge=0, le=1)
|
| 238 |
+
cond_hypothyroidism: int = Field(0, ge=0, le=1)
|
| 239 |
+
cond_rheumatoid_arthritis: int = Field(0, ge=0, le=1)
|
| 240 |
+
cond_fibromyalgia: int = Field(0, ge=0, le=1)
|
| 241 |
+
cond_osteoporosis: int = Field(0, ge=0, le=1)
|
| 242 |
+
cond_asthma: int = Field(0, ge=0, le=1)
|
| 243 |
+
|
| 244 |
+
# Observations
|
| 245 |
+
obs_bmi: Optional[float] = Field(None, ge=10.0, le=60.0)
|
| 246 |
+
obs_systolic_bp: Optional[float] = Field(None, ge=70.0, le=220.0)
|
| 247 |
+
obs_diastolic_bp: Optional[float] = Field(None, ge=40.0, le=140.0)
|
| 248 |
+
obs_phq9_score: Optional[float] = Field(None, ge=0.0, le=27.0)
|
| 249 |
+
obs_testosterone: Optional[float] = Field(None, ge=0.0, le=300.0)
|
| 250 |
+
obs_smoker: int = Field(0, ge=0, le=1)
|
| 251 |
+
obs_pain_score: float = Field(0.0, ge=0.0, le=10.0)
|
| 252 |
+
|
| 253 |
+
# Medication history
|
| 254 |
+
med_ever_ocp: int = Field(0, ge=0, le=1)
|
| 255 |
+
med_current_combined_ocp: int = Field(0, ge=0, le=1)
|
| 256 |
+
med_current_minipill: int = Field(0, ge=0, le=1)
|
| 257 |
+
has_absolute_contraindication_combined_oc: int = Field(0, ge=0, le=1)
|
| 258 |
+
|
| 259 |
+
class Config:
|
| 260 |
+
extra = "allow"
|
| 261 |
+
|
| 262 |
+
|
| 263 |
+
class ClusterRequest(BaseModel):
|
| 264 |
+
patient: PatientFeatures
|
| 265 |
+
|
| 266 |
+
|
| 267 |
+
class ClusterResponse(BaseModel):
|
| 268 |
+
cluster_profile: str = Field(..., description="e.g. 'cluster_5'")
|
| 269 |
+
cluster_confidence: float = Field(..., ge=0.0, le=1.0)
|
| 270 |
+
|
| 271 |
+
|
| 272 |
+
class SimulatorRequest(BaseModel):
|
| 273 |
+
candidate_pill: Dict[str, Any] = Field(..., description="Pill record with at least 'combo_id'")
|
| 274 |
+
patient: Dict[str, Any] = Field(..., description="Patient feature dict")
|
| 275 |
+
n_months: int = Field(12, ge=1, le=12)
|
| 276 |
+
|
| 277 |
+
class Config:
|
| 278 |
+
extra = "allow"
|
| 279 |
+
|
| 280 |
+
|
| 281 |
+
class SimulatorResponse(BaseModel):
|
| 282 |
+
combo_id: str
|
| 283 |
+
n_months: int
|
| 284 |
+
months: List[int]
|
| 285 |
+
symptom_probs: Dict[str, List[float]]
|
| 286 |
+
satisfaction: List[float]
|
| 287 |
+
|
| 288 |
+
discontinuation_probability: float
|
| 289 |
+
severe_event_probability: float
|
| 290 |
+
mild_side_effect_score: float
|
| 291 |
+
contraceptive_effectiveness: float
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
# ══════════════════════════════════════════════════════════════════════════════
|
| 295 |
+
# FastAPI app
|
| 296 |
+
# ══════════════════════════════════════════════════════════════════════════════
|
| 297 |
+
|
| 298 |
+
app = FastAPI(
|
| 299 |
+
title="Selene ML APIs",
|
| 300 |
+
version="1.0.0",
|
| 301 |
+
description=(
|
| 302 |
+
"Combined inference server for the Selene birth-control recommendation system. "
|
| 303 |
+
"Cluster model (GMM) + Simulator model (HistGBM) — hosted on Hugging Face Spaces."
|
| 304 |
+
),
|
| 305 |
+
)
|
| 306 |
+
|
| 307 |
+
app.add_middleware(
|
| 308 |
+
CORSMiddleware,
|
| 309 |
+
allow_origins=["*"],
|
| 310 |
+
allow_methods=["*"],
|
| 311 |
+
allow_headers=["*"],
|
| 312 |
+
)
|
| 313 |
+
|
| 314 |
+
|
| 315 |
+
# ── Cluster endpoints ──────────────────────────────────────────────────────────
|
| 316 |
+
|
| 317 |
+
@app.post("/api/v1/cluster/predict", response_model=ClusterResponse)
|
| 318 |
+
def cluster_predict(body: ClusterRequest) -> ClusterResponse:
|
| 319 |
+
patient_dict = body.patient.model_dump()
|
| 320 |
+
try:
|
| 321 |
+
X = _prepare_cluster_features(patient_dict)
|
| 322 |
+
except Exception as exc:
|
| 323 |
+
logger.error("Cluster feature prep failed: %s", exc)
|
| 324 |
+
raise HTTPException(status_code=422, detail=f"UNPROCESSABLE_INPUT: {exc}")
|
| 325 |
+
|
| 326 |
+
try:
|
| 327 |
+
probs = GMM.predict_proba(X)[0]
|
| 328 |
+
hard_label = int(np.argmax(probs))
|
| 329 |
+
confidence = float(probs[hard_label])
|
| 330 |
+
except Exception as exc:
|
| 331 |
+
logger.error("GMM inference failed: %s", exc)
|
| 332 |
+
raise HTTPException(status_code=500, detail="MODEL_ERROR: inference failed")
|
| 333 |
+
|
| 334 |
+
profile_name = f"cluster_{hard_label}"
|
| 335 |
+
logger.info("Cluster → %s (conf=%.3f)", profile_name, confidence)
|
| 336 |
+
return ClusterResponse(cluster_profile=profile_name, cluster_confidence=confidence)
|
| 337 |
+
|
| 338 |
+
|
| 339 |
+
# ── Simulator endpoints ────────────────────────────────────────────────────────
|
| 340 |
+
|
| 341 |
+
@app.post("/api/v1/simulator/simulate", response_model=SimulatorResponse)
|
| 342 |
+
def simulator_simulate(body: SimulatorRequest) -> SimulatorResponse:
|
| 343 |
+
pill = body.candidate_pill
|
| 344 |
+
patient = body.patient
|
| 345 |
+
n_months = body.n_months
|
| 346 |
+
|
| 347 |
+
combo_id = (
|
| 348 |
+
pill.get("combo_id")
|
| 349 |
+
or pill.get("set_id")
|
| 350 |
+
or pill.get("pill_id")
|
| 351 |
+
or pill.get("brand_name", "unknown")
|
| 352 |
+
)
|
| 353 |
+
|
| 354 |
+
pill_feats_override: Optional[Dict[str, float]] = None
|
| 355 |
+
if all(f in pill for f in PILL_FEATURES):
|
| 356 |
+
try:
|
| 357 |
+
pill_feats_override = {
|
| 358 |
+
f: float(pill[f]) for f in PILL_FEATURES
|
| 359 |
+
if pill[f] is not None and not (isinstance(pill[f], float) and math.isnan(pill[f]))
|
| 360 |
+
}
|
| 361 |
+
except (TypeError, ValueError):
|
| 362 |
+
pill_feats_override = None
|
| 363 |
+
|
| 364 |
+
try:
|
| 365 |
+
trajectory = _predict_trajectory(patient, combo_id, pill_feats_override, n_months)
|
| 366 |
+
except Exception as exc:
|
| 367 |
+
logger.error("Trajectory inference failed for %s: %s", combo_id, exc, exc_info=True)
|
| 368 |
+
raise HTTPException(status_code=500, detail=f"MODEL_ERROR: {exc}")
|
| 369 |
+
|
| 370 |
+
summary = _derive_summary_metrics(trajectory["symptom_probs"], trajectory["satisfaction"])
|
| 371 |
+
logger.info(
|
| 372 |
+
"Simulated %s n_months=%d disc=%.3f severe=%.5f mild=%.3f eff=%.3f",
|
| 373 |
+
combo_id, n_months,
|
| 374 |
+
summary["discontinuation_probability"],
|
| 375 |
+
summary["severe_event_probability"],
|
| 376 |
+
summary["mild_side_effect_score"],
|
| 377 |
+
summary["contraceptive_effectiveness"],
|
| 378 |
+
)
|
| 379 |
+
|
| 380 |
+
return SimulatorResponse(
|
| 381 |
+
combo_id=trajectory["combo_id"],
|
| 382 |
+
n_months=trajectory["n_months"],
|
| 383 |
+
months=trajectory["months"],
|
| 384 |
+
symptom_probs=trajectory["symptom_probs"],
|
| 385 |
+
satisfaction=trajectory["satisfaction"],
|
| 386 |
+
**summary,
|
| 387 |
+
)
|
| 388 |
+
|
| 389 |
+
|
| 390 |
+
# ── Health endpoints ───────────────────────────────────────────────────────────
|
| 391 |
+
|
| 392 |
+
@app.get("/api/v1/health")
|
| 393 |
+
def health():
|
| 394 |
+
return {
|
| 395 |
+
"status": "ok",
|
| 396 |
+
"models": ["cluster", "simulator"],
|
| 397 |
+
"version": "1.0.0",
|
| 398 |
+
"n_cluster_profiles": RULES["k"],
|
| 399 |
+
"n_pills": len(PILLS_LOOKUP),
|
| 400 |
+
"n_binary_targets": len(BINARY_TARGETS),
|
| 401 |
+
}
|
| 402 |
+
|
| 403 |
+
|
| 404 |
+
@app.get("/health")
|
| 405 |
+
def health_short():
|
| 406 |
+
return {"status": "ok"}
|
| 407 |
+
|
| 408 |
+
|
| 409 |
+
@app.get("/")
|
| 410 |
+
def root():
|
| 411 |
+
return {
|
| 412 |
+
"service": "Selene ML APIs",
|
| 413 |
+
"docs": "/docs",
|
| 414 |
+
"health": "/api/v1/health",
|
| 415 |
+
"endpoints": [
|
| 416 |
+
"POST /api/v1/cluster/predict",
|
| 417 |
+
"POST /api/v1/simulator/simulate",
|
| 418 |
+
],
|
| 419 |
+
}
|
| 420 |
+
|
| 421 |
+
|
| 422 |
+
if __name__ == "__main__":
|
| 423 |
+
import uvicorn
|
| 424 |
+
port = int(os.getenv("PORT", "7860"))
|
| 425 |
+
uvicorn.run("serve:app", host="0.0.0.0", port=port, reload=False)
|