[KongchangAI]
· 2 min read· 1,190 words

Training 15 Blood Glucose Prediction Models on Personal Data: A Hardcore Self-Quantification Experiment

Training 15 Blood Glucose Prediction Models on Personal Data: A Hardcore Self-Quantification Experiment

A developer trained 15 blood glucose prediction models on personal CGM data, showing an engineering template for self-quantification moving from recording to prediction.

A developer shared on Hacker News a project training 15 blood glucose prediction models using personal continuous glucose monitoring (CGM) data, drawing attention to individuals using machine learning to predict their own physiological data. The article notes that CGM makes minute-level glucose curves accessible, but blood glucose is influenced by diet, exercise, medication, and other factors, so prediction based solely on historical series has clear limits. Personal data's advantage is capturing highly personalized patterns, at the cost of limited sample size and high overfitting risk, making cross-validation design particularly critical. The author believes such grassroots experiments have more demonstrative value than popularity, but personal models have no medical diagnostic value; future directions worth exploring include multimodal feature fusion, prediction horizon trade-offs, and explainability.

A developer shared a project on Hacker News' Show HN board: he trained 15 blood glucose prediction models using his personal continuous glucose monitoring (CGM) data. The post itself contains limited information, but it touches on a rising trend—individuals using machine learning tools to build predictive models of their own physiological data, pushing "self-quantification" from recording to prediction.

Screenshot of the original Hacker News post

From Recording to Prediction: The Next Step in Self-Quantification

Over the past few years, the proliferation of continuous glucose monitoring devices has allowed ordinary people to obtain glucose curves at minute-level granularity, no longer relying solely on lagging indicators like fingerstick blood tests and glycated hemoglobin. With data available, the question becomes: can these curves be used to predict the future?

The author's answer is to train models. Fifteen models is no small number—it implies a systematic side-by-side comparison rather than casually running a single regression. For a personal project, this "multi-model benchmarking" approach is itself noteworthy—it treats a medical prediction problem as an engineering problem: preparing data, splitting training and validation sets, and comparing errors across different algorithms.

Continuous glucose monitoring (CGM) uses a tiny sensor implanted under the skin to measure glucose concentration in interstitial fluid every few minutes and transmits the data in real time to a phone or receiver. Unlike traditional fingerstick blood sampling, which only captures discrete time points, CGM generates around-the-clock glucose curves, revealing dynamics that are easily missed such as nocturnal hypoglycemia and postprandial peaks. Clinically, CGM has been used to assess glycemic variability and guide insulin adjustments; in the self-quantification community, it has become a physiological data source that can be exported, analyzed, and modeled. Understanding the sampling frequency, lag, and noise characteristics of CGM data is a prerequisite for judging the feasibility of blood glucose prediction models.

Why Blood Glucose Prediction Is Especially Hard

Blood glucose is not a smooth time series. It is jointly influenced by dietary composition, meal timing, insulin or medication, exercise intensity, sleep, stress, and even individual differences—and many of these variables are simply absent from CGM data. Extrapolating from historical glucose values alone, a model can capture short-term trends but struggles to anticipate the sharp rise caused by a carbohydrate intake.

This explains why the number "15 models" is both a highlight and a limitation: the large number of models shows the author put serious effort into the algorithmic side; but if feature engineering relies only on the glucose series itself, the gap between models may be far smaller than the constraints of the data. What truly determines the ceiling of prediction is often whether meal, insulin, and activity data are included in the inputs.

Overfitting refers to the phenomenon where a model performs well on training data but fails to generalize to new data. In personal blood glucose prediction scenarios, because a single individual's data spans a limited number of days, 15 models can easily memorize incidental fluctuations in the training set rather than true patterns. Cross-validation is a common technique to mitigate overfitting: splitting the time series into multiple segments in chronological order, training on one part and validating on another in turn, thereby more reliably estimating the model's error on unseen data. For strongly time-dependent data like blood glucose, it is also necessary to avoid information leakage caused by random splitting—that is, future data mixed into the training set, which inflates evaluation results.

The Unique Value of Personal Modeling

Compared with academic research, personal projects have their own data advantages. Public diabetes datasets usually have large sample sizes but average out inter-individual differences, whereas a single individual's long-term CGM data can capture highly personalized patterns—one person's response to specific foods, their stable nocturnal glucose range, the delayed effects of exercise. In the author's own words, the models are trained on "his own data," which naturally sidesteps the problem of cross-individual generalization.

The cost is sample size. A single individual's data spans a limited number of days, and 15 models can easily overfit on such data, making the design of cross-validation critical. The original post did not disclose the specific evaluation methodology, which is also what the community typically asks about.

The Spillover Effects of Open Source and Sharing

This post has only a handful of points, but its demonstrative value outweighs its popularity. Making blood glucose prediction into a reproducible personal project means more diabetes patients or health-conscious individuals can try following the approach: export CGM data, construct features, and run a few baseline models. Compared with waiting for commercial products, the experience accumulated through such grassroots experiments is often more direct.

Of course, a clear boundary must be drawn: personally trained prediction models have no medical diagnostic value and cannot replace a doctor's advice. Their significance lies in helping individuals understand their own glucose dynamics, not in making treatment decisions.

Several Directions Worth Watching

Several valuable paths can be extended from such projects. First, multimodal feature fusion: integrating dietary records, insulin doses, and fitness tracker data into the model usually brings qualitative improvements over pure glucose series. Second, the trade-off in prediction horizon: predicting 15 minutes ahead and predicting 60 minutes ahead are entirely different problems—the former is more feasible, the latter more clinically meaningful. Third, explainability: rather than just giving a predicted value, telling users "the model thinks glucose will rise next because of the carbs just consumed" is more helpful for self-management.

The developer's 15 models are a starting point. They demonstrate a template: using publicly available tools and one's own data to turn health prediction from a concept into something you can verify firsthand.

Explainable AI refers to making a model's prediction logic understandable to humans, rather than merely outputting a black-box number. In blood glucose prediction, explainability means the model can indicate which input features (such as carbohydrates from the last meal, insulin dose, recent exercise) contribute most to a predicted rise or fall. Common methods include feature importance ranking, local explanations (such as SHAP values), and attention weight visualization. For personal health management, explainable predictions have more behavioral guidance value than merely accurate predictions, because they help users build a causal intuition of "what causes my blood glucose to change."

One-line Summary

A developer trained 15 blood glucose prediction models on personal CGM data, demonstrating an engineering template for self-quantification moving from recording to prediction.

Paragraph Summary

A developer shared on Hacker News a project training 15 blood glucose prediction models using personal continuous glucose monitoring (CGM) data, sparking interest in individuals using machine learning to predict their own physiological data. The article notes that CGM makes minute-level glucose curves accessible, but blood glucose is influenced by multiple factors such as diet, exercise, and medication, so prediction based solely on historical series has clear limits. The advantage of personal data lies in capturing highly personalized patterns, at the cost of limited sample size and high overfitting risk, making cross-validation design particularly critical. The author believes such grassroots experiments have more demonstrative value than popularity, but personal models have no medical diagnostic value; future directions worth exploring include multimodal feature fusion, prediction horizon trade-offs, and explainability.

#blood glucose prediction#continuous glucose monitoring#CGM#self-quantification#machine learning#personal health data#overfitting#cross-validation
Share:

Related articles