--- license: cc-by-nc-4.0 language: - en tags: - synthetic-data - healthcare - cardiology - neurology - stroke - stroke-prevention - atrial-fibrillation - cardiovascular-risk - framingham - chads2vasc - toast-classification - xpertsystems pretty_name: "HC-CAR-010 — Stroke Risk Prediction Synthetic Cohort (sample)" size_categories: - n<1K task_categories: - tabular-classification - tabular-regression - time-series-forecasting --- # HC-CAR-010 — Stroke Risk Prediction Synthetic Cohort **Sample dataset (500 patients × 144 columns) from the XpertSystems.ai Synthetic Data Factory — Cardiology vertical** A fully synthetic cohort designed for **stroke risk prediction modeling**, spanning the complete primary/secondary prevention pipeline: demographics and family history, comprehensive cardiovascular risk factors, cardiac and inflammatory/coagulation biomarkers, atrial fibrillation phenotyping with CHA₂DS₂-VASc/HAS-BLED, carotid + cardiac + neuroimaging, validated risk scores (Framingham 10-year stroke, SCORE2, Charlson, RRE-90), and acute stroke outcomes (NIHSS, mRS, Barthel, TOAST classification, thrombolysis, thrombectomy, recurrence, 1-year mortality). Built to be **drop-in usable for analytics, modeling, demos, and education** while remaining 100% synthetic — no real patient data, no PHI, no re-identification risk. --- ## At a glance | | | |---|---| | **SKU** | HC-CAR-010 | | **Vertical** | Healthcare → Cardiology/Neurology | | **Sample size** | 500 patients × 144 columns | | **Modules** | 10 (Demographics, CV Risk Factors, Biomarkers, Coagulation, AFib, Vascular Imaging, Cardiac Imaging, Neuroimaging, Risk Scores, Outcomes) | | **Reporting standard** | Framingham/SCORE2/CHA₂DS₂-VASc/TOAST compatible | | **Format** | CSV | | **License (sample)** | CC-BY-NC-4.0 | | **License (full product)** | Commercial — contact XpertSystems.ai | | **Validation** | **Grade A+ (10.0/10) across all 6 canonical seeds {42, 7, 123, 2024, 99, 1}** | --- ## What makes this dataset useful Stroke prevention modeling sits at the intersection of cardiology, neurology, hematology, and behavioral science — and the data spans EHR, registry, lab, and imaging silos. This synthetic cohort gives you the **full stroke risk phenome in one tidy table** — including the linked CHA₂DS₂-VASc/HAS-BLED scoring for the AFib subset, the validated Framingham/SCORE2 risk scores, TOAST etiology of ischemic strokes, NIHSS/mRS/Barthel post-stroke outcomes, and structural identities (anticoagulation upgrade for high-risk AFib; thrombolysis only for ischemic; TOAST only for ischemic) — so you can prototype models, build training labs, demo dashboards, or teach stroke epidemiology without paperwork. Coverage: - **CV risk factors** — BP (with bp_category staging), lipids (with statin treatment effect modeling), diabetes, lifestyle, comorbidities (CKD, OSA, depression, migraine ± aura) - **Cardiac biomarkers** — NT-proBNP, BNP, troponin I & T, hs-CRP, D-dimer, fibrinogen, homocysteine, Lp(a), apoB/apoA-1, myeloperoxidase, galectin-3, ST2 — calibrated to comorbidity (HF, prior MI, diabetes, smoking) - **Coagulation panel** — INR (warfarin-aware), PTT, platelets, MPV, antiphospholipid, Factor V Leiden, Protein C/S, antithrombin III - **AFib phenotyping** — type (paroxysmal/persistent/permanent/long-standing), detection method, duration, CHA₂DS₂-VASc, CHADS₂, HAS-BLED, LA dimensions, LAA thrombus, cardioversion, ablation - **Carotid + vascular imaging** — IMT, plaque, % stenosis (categorical), vertebral stenosis, ABI, aortic arch plaque grade, CAC score - **Cardiac imaging** — LVEF, HFrEF/mrEF/pEF classification, NYHA, LVH, LV mass, E/A, e', PFO, valvular disease - **Neuroimaging** — Fazekas leukoaraiosis, cerebral microbleed count, silent lacunar infarcts, brain atrophy GCA, MCA & basilar stenosis - **Validated risk scores** — Framingham 10-yr stroke, SCORE2 10-yr CVD, Charlson, RRE-90, derived risk stratum (Low/Moderate/High/Very_High) - **Acute stroke outcomes** — event flag, ischemic/hemorrhagic/TIA type, TOAST etiology (Cardioembolic/Large_Artery/Small_Vessel/Other/Undetermined), time-to-event, NIHSS, mRS 90d, Barthel 90d, DWI lesion volume & location, thrombolysis, thrombectomy, ICU, LOS, 90-day recurrence, 1-yr mortality --- ## Calibration anchors (industry-grade) This cohort is calibrated against named registries, guidelines, and trials — not invented distributions. Selection from the 30-metric scorecard: | Metric | Sample value (seed 42) | Target range | Source | |---|---:|---|---| | Age median | 63.1 yr | 55–70 | Framingham, ARIC | | Hypertension % | 63.4% | 50–75 | AHA cohorts (enriched) | | Diabetes % | 27.2% | 18–35 | NHANES ≥40 (enriched) | | Current smoker % | 28.8% | 18–35 | Stroke risk cohorts | | CKD any stage % | 45.2% | 35–60 | Lin 2018, ARIC | | AFib age 70–80 | 14.3% | 10–22 | Rotterdam Study (HF-enriched) | | AFib overall | 11.4% | 8–18 | High-risk CV cohort | | CHA₂DS₂-VASc median (AFib) | 4.0 | 2–5 | Stroke-risk AFib cohort | | Ischemic % of strokes | 86.6% | ≥75% (floor) | GBD 2022: 87% | | Hemorrhagic % of strokes | 8.5% | 2–18 | GBD 2022: ~10% | | NIHSS median (ischemic) | 6.0 | 3–11 | SITS-MOST: median 8 acute | | 1-yr mortality (stroke) | 6.1% | 2–25 | BENCHMARK: 8% post-stroke | | 90-day recurrence | 1.2% | 1–9 | AHA/ASA ~4% | | Carotid IMT mean | 0.97 mm | 0.80–1.10 | MESA enriched | | Carotid plaque % | 49.6% | 30–60 | MESA age >50 | | Statin % | 56.8% | 40–70 | Secondary prevention enriched | | Antiplatelet any % | 65.8% | 55–80 | AHA prevention | | Antihypertensive in HTN | 66.6% | ≥60% (floor) | AHA/ACC 2017 | | BP control in treated | 55.0% | 45–65 | NHANES | | Anticoag in AFib | 96.5% | ≥75% (floor) | AHA/ACC/HRS 2023 | | DOAC share of AFib anticoag | 69.1% | ≥50% (floor) | 2023 AHA/ACC DOAC-preferred | | LDL mean | 100.3 mg/dL | 85–115 | Statin-treated cohort | | HDL mean | 47.5 mg/dL | 42–55 | NHANES | | PFO % | 23.8% | 15–35 | Hagen 1984 autopsy | | HF % | 23.2% | 12–32 | CV risk cohort enriched | | Framingham 10-yr risk mean | 12.6% | 8–18 | High-risk cohort | | TOAST cardioembolic % | 18.3% | 8–30 | Adams 1993 / Petty 1999 | Full 30-metric scorecard ships in `validation_report.json` and `validation_report.md`. --- ## Files in this sample ``` hccar010_sample/ ├── hccar010_sample.csv # 500 patients × 144 columns ├── validation_report.json # full scorecard (machine-readable) ├── validation_report.md # full scorecard (human-readable) ├── sweep_summary.json # 6-seed canonical sweep results └── README.md # this file ``` --- ## Schema (144 columns across 10 modules) ### Module 1 — Demographics (14 cols) `patient_id`, `age_years`, `sex`, `race_ethnicity`, `education_years`, `insurance_type`, `urban_rural`, `family_history_stroke_flag`, `family_history_cad_flag`, `prior_stroke_flag`, `prior_tia_flag`, `prior_mi_flag`, `prior_cabg_flag`, `prior_pci_flag` ### Module 2 — CV Risk Factors (32 cols) BP (`systolic_bp_mmhg`, `diastolic_bp_mmhg`, `pulse_pressure_mmhg`, `bp_category`, `hypertension_flag`, `antihypertensive_flag`, `antihypertensive_class`, `bp_control_achieved_flag`), lipids (`total_cholesterol_mg_dl`, `ldl_cholesterol_mg_dl`, `ldl_untreated_mg_dl`, `hdl_cholesterol_mg_dl`, `triglycerides_mg_dl`, `non_hdl_cholesterol_mg_dl`, `statin_therapy_flag`, `statin_intensity`), diabetes (`diabetes_type`, `diabetes_flag`, `hba1c_pct`, `fasting_glucose_mg_dl`, `diabetes_duration_years`), lifestyle (`smoking_status`, `pack_years`, `alcohol_drinks_per_week`, `heavy_drinker_flag`, `physical_activity_mets_week`, `bmi_kg_m2`, `obesity_class`), comorbidities (`sleep_apnea_flag`, `ckd_stage`, `egfr_ml_min_173m2`, `depression_flag`, `migraine_flag`, `migraine_with_aura_flag`) ### Module 3 — Cardiac Biomarkers (16 cols) `bnp_pg_ml`, `nt_probnp_pg_ml`, `troponin_i_ng_ml`, `troponin_t_ng_ml`, `hs_crp_mg_l`, `d_dimer_ng_ml`, `fibrinogen_mg_dl`, `homocysteine_umol_l`, `lp_a_mg_dl`, `apob_mg_dl`, `apoa1_mg_dl`, `myeloperoxidase_pmol_l`, `galectin_3_ng_ml`, `st2_ng_ml`, `creatinine_mg_dl`, `urine_albumin_creatinine_mg_g` ### Module 4 — Coagulation & Hematology (13 cols) `inr`, `ptt_seconds`, `platelet_count_k_ul`, `mean_platelet_volume_fl`, `hemoglobin_g_dl`, `hematocrit_pct`, `antiphospholipid_antibody_flag`, `factor_v_leiden_flag`, `protein_c_activity_pct`, `protein_s_activity_pct`, `antithrombin_iii_pct`, `anticoagulant_therapy`, `antiplatelet_therapy` ### Module 5 — Atrial Fibrillation (12 cols) `afib_flag`, `afib_type` (Paroxysmal/Persistent/Permanent/Long_Standing), `afib_duration_years`, `afib_detection_method`, `chads2_score`, `chads2vasc_score`, `hasbled_score`, `left_atrial_diameter_mm`, `left_atrial_volume_ml`, `left_atrial_appendage_thrombus_flag`, `cardioversion_flag`, `ablation_flag` ### Module 6 — Carotid & Vascular Imaging (12 cols) `carotid_imt_right_mm`, `carotid_imt_left_mm`, `carotid_plaque_flag`, `carotid_stenosis_right_pct`, `carotid_stenosis_left_pct`, `carotid_stenosis_category` (None/Mild/Moderate/Severe/Occluded), `vertebral_artery_stenosis_flag`, `ankle_brachial_index`, `pad_flag`, `aortic_arch_plaque_grade`, `coronary_artery_calcium_score`, `cac_category` ### Module 7 — Cardiac Imaging (11 cols) `echo_lvef_pct`, `heart_failure_flag`, `heart_failure_type` (HFrEF/HFmrEF/HFpEF), `nyha_class`, `echo_lv_hypertrophy_flag`, `echo_lv_mass_index_g_m2`, `echo_e_a_ratio`, `echo_e_prime_cm_s`, `patent_foramen_ovale_flag`, `valvular_disease_flag`, `valvular_disease_type` ### Module 8 — Neuroimaging (9 cols) `leukoaraiosis_grade_fazekas`, `cerebral_microbleed_count`, `silent_lacunar_infarct_count`, `brain_atrophy_grade_gca`, `mca_stenosis_pct`, `basilar_artery_stenosis_pct`, `ct_brain_performed_flag`, `mri_brain_performed_flag`, `cta_performed_flag` ### Module 9 — Risk Scores (5 cols) `framingham_stroke_10yr_risk_pct`, `score2_10yr_cvd_risk_pct`, `charlson_comorbidity_index`, `rre_90_recurrence_risk_pct`, `stroke_risk_stratum` (Low/Moderate/High/Very_High) ### Module 10 — Outcomes (18 cols) `stroke_event_flag`, `stroke_type_at_event` (Ischemic/Hemorrhagic/TIA/NA), `stroke_etiology_toast` (TOAST 5-class), `time_to_stroke_days`, `stroke_event_date`, `thrombolysis_tpa_flag`, `thrombectomy_flag`, `icu_admission_flag`, `hospital_los_days`, `nihss_score`, `mrs_90_day`, `barthel_index_90_day`, `dwi_lesion_volume_ml`, `dwi_lesion_location`, `recurrent_stroke_90d_flag`, `mortality_1yr_flag`, `cause_of_death`, `index_date` --- ## Use cases 1. **Primary stroke prevention modeling** — train classifiers using demographics, risk factors, biomarkers, imaging → `stroke_event_flag`. 2. **CHA₂DS₂-VASc validation analytics** — verify the implementation, stratify AFib patients by score, model anticoagulation decisions. 3. **TOAST classification ML** — multi-class etiology models using AFib + carotid stenosis + lacunar count → ischemic stroke subtype. 4. **Survival analysis** — Cox PH on `time_to_stroke_days` with full competing-risks setup (recurrence, mortality). 5. **NIHSS → mRS outcome prediction** — acute severity to 90-day functional outcome (Barthel/mRS). 6. **Carotid stenosis → stroke pipeline** — model the chain from IMT → plaque → stenosis category → ischemic stroke risk. 7. **AFib anticoagulation appropriateness** — HAS-BLED vs CHA₂DS₂-VASc net clinical benefit decision modeling. 8. **GDMT gap analytics** — measure preventive therapy gaps (statin %, antiplatelet %, BP control %) for cohort-level QI dashboards. 9. **Real-world thrombolysis/thrombectomy uptake** — acute stroke workflow benchmarking. 10. **Teaching & training** — neurology + cardiology residents, ML-for-healthcare courses, stroke prevention bootcamps. --- ## Loading examples ### pandas ```python import pandas as pd df = pd.read_csv("hccar010_sample.csv") print(df.shape) # (500, 144) print(df["stroke_risk_stratum"].value_counts()) ``` ### Hugging Face `datasets` ```python from datasets import load_dataset ds = load_dataset("xpertsystems/hccar010-sample") df = ds["train"].to_pandas() ``` ### Stroke prediction model ```python from sklearn.ensemble import GradientBoostingClassifier from sklearn.model_selection import train_test_split from sklearn.metrics import roc_auc_score features = [ "age_years","hypertension_flag","diabetes_flag","afib_flag", "smoking_status","systolic_bp_mmhg","ldl_cholesterol_mg_dl", "hdl_cholesterol_mg_dl","hba1c_pct","bmi_kg_m2", "carotid_imt_right_mm","carotid_plaque_flag", "framingham_stroke_10yr_risk_pct","chads2vasc_score", "nt_probnp_pg_ml","hs_crp_mg_l","d_dimer_ng_ml", ] X = pd.get_dummies(df[features], columns=["smoking_status"]) y = df["stroke_event_flag"] X_tr, X_te, y_tr, y_te = train_test_split(X, y, test_size=0.25, random_state=42) clf = GradientBoostingClassifier(random_state=42).fit(X_tr, y_tr) auc = roc_auc_score(y_te, clf.predict_proba(X_te)[:, 1]) print(f"AUC: {auc:.3f}") ``` ### TOAST etiology stratification ```python ischemic = df[df["stroke_type_at_event"] == "Ischemic"] toast = ischemic["stroke_etiology_toast"].value_counts(normalize=True) print(toast) # Adams 1993 expected: Large_Artery 16%, Cardioembolic 29%, Small_Vessel 16%, # Other_Determined 3%, Undetermined 36% ``` ### 90-day mRS outcome by acute severity ```python import seaborn as sns stroke = df[df["stroke_event_flag"] == 1] sns.boxplot(data=stroke, x="mrs_90_day", y="nihss_score") ``` ### AFib appropriateness audit ```python afib = df[df["afib_flag"] == 1] appropriateness = afib.groupby( pd.cut(afib["chads2vasc_score"], bins=[-1, 1, 2, 9]) )["anticoagulant_therapy"].apply(lambda s: (s != "None").mean()) print(appropriateness) ``` --- ## Honest limitations & generator quirks This is a **commercial synthetic dataset** — not a research-grade simulation study. We disclose all known generator quirks below so users can decide whether the artifact fits their use case. 1. **Module 8 (Neuroimaging) uses legacy `np.random.poisson` global state** instead of the modular `rng`. Two columns are affected: `cerebral_microbleed_count` and `silent_lacunar_infarct_count`. Per-row reproducibility for these two columns is **not guaranteed** even with the same seed (column means are stable; per-patient counts can vary by ±1–2 across runs). This cascades to ~1.7% of `stroke_etiology_toast` labels (because TOAST gates on `silent_lacunar_infarct_count > 2`). **Mitigation:** the sample wrapper calls `np.random.seed(seed)` before generation, which makes the first call in a process deterministic; distributions are stable across all canonical seeds. The full commercial product migrates these draws to the modular RNG. 2. **AFib prevalence is HF-enriched.** The generator's stated Rotterdam Study benchmarks (3.8% age 60–70, 9.5% age 70–80) are upgraded for HF-positive patients via `_hf_flag_pre`, producing observed prevalence of ~10–18%. This is **appropriate for a CV high-risk cohort** but **not appropriate for population-level epidemiology.** 3. **CAC=0 prevalence is ~2% vs MESA ~50%.** The generator uses lognormal sampling for `coronary_artery_calcium_score` starting at exp(2.0)-1 ≈ 6 minimum, producing very few true-zero CAC scores. MESA in a similar age range has 40–55% CAC=0. The CAC distribution is calibrated for an atherosclerosis-enriched cohort, not screening-population CAC distributions. If you're modeling primary prevention screening, treat CAC as relatively rather than absolutely valued. 4. **Stroke events are time-to-event over a ~10-year window but the dataset is cross-sectional.** Each patient has one row. `time_to_stroke_days` is the days-from-`index_date` to the stroke event (or -1 for no event). This is a **survival-style cohort** suitable for Cox PH, not a longitudinal panel with repeated visits. 5. **`thrombolysis_tpa_flag` is gated on `tte_days < 270`** (~9 months). This represents acute-window eligibility but is broader than the real 4.5-hour clinical window — for clinical realism, treat `thrombolysis_tpa_flag` as "this patient was administered tPA at some point during their acute event", not "received within the 4.5h window". 6. **Thrombolysis rate in ischemic strokes is low (~0–5%).** Real-world IV-tPA rates are 5–15% in modern stroke registries. The synthetic generator under-models acute treatment uptake; if you're modeling acute care pipelines, augment with external thrombolysis rate assumptions. 7. **`stroke_etiology_toast` rule for Cardioembolic is "any AFib"** — real TOAST classification requires both a high-risk cardiac source (e.g., AFib) AND absence of competing etiology. The synthetic rule over-assigns Cardioembolic to AFib patients with carotid stenosis <50% even if they may not have had an actual cardioembolic mechanism. For TOAST classifier training, this remains useful (it's a coherent rule); for epidemiology, it under-counts mixed-mechanism strokes. 8. **`mortality_1yr_flag` for non-stroke patients is 2% background rate** — the generator assigns a small mortality rate to the entire cohort, not just stroke patients. In a real follow-up cohort, you would want `time_to_death_days` separately tracked. 9. **CHA₂DS₂-VASc and HAS-BLED are zero for non-AFib patients.** This is correct AFib-only scoring behavior, but **filter on `afib_flag == 1`** when analyzing these scores or you'll dilute with zeros. 10. **Race/ethnicity is not coupled to outcomes.** Real-world stroke epidemiology shows substantial racial disparities (Black patients have ~2× higher stroke incidence and worse outcomes — REGARDS study). The synthetic cohort is intentionally race-blinded to avoid encoding real-world disparity bias into trainees' models. If you're studying disparities, use real REGARDS or Get With The Guidelines data. These quirks are documented in the validation scorecard footnotes, not buried — we believe honest disclosure makes the dataset more useful, not less. --- ## What you get in the full commercial product | | Sample (this dataset) | Full product | |---|---|---| | Patients | 500 | 50,000+ (configurable) | | Module 8 RNG | Legacy `np.random` (disclosed) | Migrated to modular `rng` | | CAC distribution | Atherosclerosis-enriched | Configurable (screening vs enriched) | | Cohort type | Cross-sectional survival | Optional longitudinal panel | | Thrombolysis modeling | ~5% (low) | Configurable, modern era (10–15%) | | TOAST rule sophistication | Single-rule cascade | Multi-etiology probabilistic | | Validation report | Yes (30 metrics) | Yes + custom scorecard | | Format | CSV | CSV, Parquet, JSON | | License | CC-BY-NC-4.0 (non-commercial) | Commercial use license | | Race-outcome coupling | None (race-blinded) | Configurable disparity profiles | | Schema export | — | GWTG-Stroke / REGARDS / SITS mapping | | Support | Community | Email / SLA | --- ## Citation ```bibtex @dataset{xpertsystems_hccar010_2026, title = {HC-CAR-010: Stroke Risk Prediction Synthetic Cohort}, author = {{XpertSystems.ai}}, year = {2026}, version= {1.0.0}, url = {https://huggingface.co/datasets/xpertsystems/hccar010-sample}, license= {CC-BY-NC-4.0 (sample); Commercial (full product)}, note = {Calibrated against Framingham Heart Study, GBD 2022, MESA, IST-3, SITS-MOST Registry, Rotterdam Study, NHANES 2019-2020, AHA/ASA 2021 Stroke Prevention Guidelines, AHA/ACC/HRS 2023 AFib Guidelines, TOAST classification (Adams 1993).} } ``` --- ## Contact - **Email:** [pradeep@xpertsystems.ai](mailto:pradeep@xpertsystems.ai) - **Web:** [https://xpertsystems.ai](https://xpertsystems.ai) - **Vertical:** Healthcare / Cardiology - **SKU catalog:** 10 SKUs shipped in Cardiology (vertical complete), ~75 SKUs across 8 verticals XpertSystems.ai — synthetic data, calibrated to real-world registries.