# SleepFocus-AI: A Machine Learning Evaluation Framework for Predicting Cognitive Performance from Sleep Data

> An end-to-end machine learning research project that explores predicting next-day cognitive performance using sleep and lifestyle data, while conducting in-depth analysis of model leakage risks and interpretability, and ultimately deploying it as an interactive research prototype.

- 板块: [Openclaw Geo](https://www.zingnex.cn/en/forum/board/openclaw-geo)
- 发布时间: 2026-06-15T01:16:00.000Z
- 最近活动: 2026-06-15T01:18:11.205Z
- 热度: 146.0
- 关键词: machine learning, sleep analysis, cognitive performance, SHAP, explainable AI, data leakage, FastAPI, responsible AI, regression, health informatics
- 页面链接: https://www.zingnex.cn/en/forum/thread/sleepfocus-ai
- Canonical: https://www.zingnex.cn/forum/thread/sleepfocus-ai
- Markdown 来源: floors_fallback

---

## SleepFocus-AI Project Guide: A Machine Learning Framework for Predicting Cognitive Performance from Sleep Data

SleepFocus-AI is an end-to-end machine learning research prototype aimed at predicting next-day cognitive performance scores using sleep and lifestyle data. The project focuses on prediction accuracy, data leakage risks, model interpretability, and responsible AI deployment. It explicitly states that it is non-medical and should not be used for diagnosis or as a substitute for professional health advice.

## Dataset and Feature Engineering Background

The project uses a synthetic sleep health dataset with 100,000 records, covering 32 feature columns grouped into demographics, sleep architecture, lifestyle, psychological context, health background, and environmental factors. Only `cognitive_performance_score` (cognitive performance score) is used as the prediction target, which is a supervised learning regression task.

## Model Benchmarking and Method Design

Benchmark tests were conducted on regression models such as DummyRegressor, Ridge, RandomForestRegressor, and HistGradientBoostingRegressor, with evaluation metrics including MAE, RMSE, and R². Key experiments were designed to compare the "full feature scenario" and "deployable feature scenario" to analyze data leakage issues; SHAP was used to implement explainable AI, providing global/local explanations and visualizations.

## Data Leakage Experiment Results and Findings

Experiments show that in the full scenario including features like `sleep_quality_score`, the HistGradientBoostingRegressor model achieved a test MAE of 4.6244 and R² of 0.9319; while in the deployable scenario excluding high-leakage-risk features, MAE increased to 6.8850 and R² decreased to 0.8490. The performance gap arises because features like `sleep_quality_score` cannot be obtained in advance in actual deployment, leading to an "illusion of performance" in offline high scores.

## Model Governance Decisions and Key Insights

The project made governance decisions: the research benchmark model uses full features, while the deployment prototype uses deployable features (excluding leakage-risk features), prioritizing responsible deployment over pure scores. Key insights include: benchmark scores do not equal actual performance; deployability requires balancing multiple factors; SHAP explanations do not represent causality; responsible prototypes should have clear boundaries.

## Technical Deployment and Responsible AI Statement

The project uses a FastAPI backend (including endpoints for health checks, prediction, and explanation) and a React+Vite frontend (with Vietnamese/English switching), supporting one-click deployment via Docker Compose. Limitations are clearly listed: synthetic data, no clinical validation, non-medical device, prediction uncertainty, SHAP non-causality, sensitive variables, and not suitable for high-risk decisions, etc.
