Health Data Should Stay on Your Machine
Every health dashboard I looked at wanted to ship my data to some cloud service. Heart rate, blood pressure, sleep patterns, all of it going to servers I do not control. For something as personal as health metrics, that felt fundamentally wrong. So I built HealthPulse AI with a hard constraint: 100% offline. No cloud, no API keys, no telemetry. Your health data stays on your machine. Period.
The Ensemble
The core prediction model is a soft voting ensemble combining Random Forest (60% weight) and Logistic Regression (40% weight). RF handles the nonlinear interactions between vitals that LR cannot capture, things like the combined effect of high resting heart rate and poor sleep quality that is riskier than either factor alone. LR provides a calibrated probability baseline that keeps the ensemble's confidence estimates honest.
The model takes 7 day rolling averages across 11 health metrics and predicts a risk category: Low, Moderate, or High. Rolling averages are important here. A single bad night of sleep or one elevated blood pressure reading is noise. Seven day trends are signal. The feature engineering emphasizes temporal patterns over point in time snapshots because that is how health risk actually works.
Six Visualization Tabs
The Streamlit dashboard has six Plotly powered tabs. The main overview shows your risk prediction with confidence intervals and the contributing factors ranked by importance. The vitals tab plots each metric over time with trend lines and anomaly highlighting. The sleep analyzer tab breaks down sleep quality patterns and correlates them with next day metrics. There are dedicated tabs for cardiovascular trends, activity patterns, and a comprehensive report view.
I spent more time on the visualizations than on the model, and I think that was the right call. A perfectly accurate model that shows you a single "Moderate Risk" label is less useful than a good enough model that shows you exactly which metrics are trending in the wrong direction and how they relate to each other. The Plotly charts are interactive, so you can zoom into specific date ranges, hover for exact values, and compare multiple metrics on the same time axis.
The Extra Tools
Beyond the core risk prediction, HealthPulse includes a BMI calculator, a calorie needs estimator, and a PDF report generator. The PDF report is designed for sharing with a doctor. It includes a summary of risk trends, flagged anomalies, and the raw data in a clean table format. I wanted this to be something you could print and bring to an appointment, not just a dashboard you stare at alone.
Why Not a Deep Learning Model
With only 11 input features and relatively straightforward feature interactions, a Random Forest plus Logistic Regression ensemble is the right tool. A neural network would be harder to interpret, slower to train on new data, and would not meaningfully outperform the ensemble on this problem size. The RF also gives you feature importances for free, which directly powers the "contributing factors" visualization. Try getting that out of a transformer without bolting on SHAP or attention visualization hacks.
The whole thing is Docker ready. Pull the image, run it, open your browser. No Python environment to manage, no dependency conflicts, no "works on my machine" issues. Health monitoring should be as easy to set up as installing an app, not a devops project.