# A Digital Twins Machine Learning Model for Forecasting Disease Progression in Stroke Patients
## 5 Results  
Projected trajectories were estimated for the test set of 122 patients (Figure 1). Baseline demographics are displayed in (Table 2)  
Several results support that the real and simulated data were essentially indistinguishable from each other. T-tests comparing a number of covariate distributions between the real and simulated data found highly insignificant \(p\)-values (\(p>0.5\) for all), indicating that the simulated and real data had indistinguishable covariate distributions (Figure 2). Further, when trained to distinguish between the simulated and real patient data, the logistic regression-based adversary model displayed near-random performance for discrimination of real patient data. Across the five folds of data, the model demonstrated an average AUC\({}_{\text{adversary}}\) of 0.50 \(\pm\) 0.01 (Supplementary Figure S1). \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Characteristic** & **N** & **\%** \\ \hline Age & 18–29 & 13 & 1.10\% \\  & 30–44 & 56 & 4.60\% \\  & 45–64 & 424 & 34.90\% \\  & 65–79 & 455 & 37.40\% \\  & \(\geq\)80 & 268 & 22.00\% \\ \hline Sex & Female & 617 & 50.70\% \\  & Male & 599 & 49.30\% \\ \hline Race/Ethnicity & White & 763 & 62.70\% \\  & Black/African American & 274 & 22.50\% \\  & Hispanic/Latino & 76 & 6.20\% \\  & Unknown Race & 57 & 4.70\% \\  & Asian & 45 & 3.70\% \\  & American Indian/Alaska Native & 1 & 0.10\% \\ \hline Medical History & HIV and AIDS & 137 & 11.30\% \\  & Hypertension & 964 & 79.30\% \\  & Peripheral vascular disease & 135 & 11.10\% \\  & Chronic Heart failure & 334 & 27.50\% \\  & Prior TIA and ischemic stroke & 333 & 27.40\% \\  & Tobacco use & 493 & 40.50\% \\  & Dyslipidemia & 730 & 60.00\% \\  & Chronic Kidney Disease & 732 & 60.20\% \\  & Hepatic Cirrhosis & 49 & 4.00\% \\  & Psychiatric disorder (other than & 336 & 27.60\% \\  & substance use disorder) & & \\  & Dementia & 134 & 11.00\% \\  & Alcohol use disorder & 62 & 5.10\% \\  & Other substance use disorders & 229 & 18.80\% \\  & History of Organ Transplant & 246 & 20.20\% \\  & Diabetes Mellitus & 651 & 53.50\% \\  & Chronic Obstructive Pulmonary & 213 & 17.50\% \\  & Disease & & \\  & Pneumonia & 124 & 10.20\% \\  & Cancer & 430 & 35.40\% \\ \hline \hline \end{tabular} Abbreviations used: HIV: human immunodeficiency virus; AIDS: acquired immunodeficiency syndrome; TIA: transient ischemic attack.  
\end{table} 
Table 2: Clinical and demographic characteristics of the study population. Figure 1: Patient inclusion diagram. Figure 2: Time window vectors from the test set were fed into the model and compared with their generated counterparts. The real and simulated data was then compared on each feature using a \(t\)-test to gauge the closeness of the distributions; \(p\)-values for the test are reported in the figure. We also examined several correlations between aspects of the real and simulated data to further assess how well the simulated data mimicked the genuine patient data (Figure 3). When the log-transformed means of each feature were compared between the real and simulated data, we observed a slope of 1.0 and a Pearson's correlation coefficient of 1.0. Log-transformed feature standard deviations were slightly less strongly correlated, with a slope of 0.96 and a correlation coefficient of 0.99. When examining the correlations of feature correlations across several lag times, we also found evidence of strong correlations between the real and simulated data. At lags of 0, 90, and 180 days, we observed slopes of 0.99 (R\({}^{2}\) = 1.00), 0.97 (R\({}^{2}\) = 0.99), and 0.96 (R\({}^{2}\) = 0.99), respectively. In addition to strong correlations, the slope of near 1.0 for all pairs of measures indicated that the magnitude of values in the real and simulated data were nearly identical.