mitai-jinkendo/backend/data_layer
Lars ffa99f10fb
All checks were successful
Deploy Development / deploy (push) Successful in 54s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 14s
fix: correct confidence thresholds for 30-89 day range
Bug: 30 days with 29 data points returned 'insufficient' because
it fell into the 90+ day branch which requires >= 30 data points.

Fix: Changed condition from 'days_requested <= 28' to 'days_requested < 90'
so that 8-89 day ranges use the medium-term thresholds:
- high >= 18 data points
- medium >= 12
- low >= 8

This means 30 days with 29 entries now returns 'high' confidence.

Affects: nutrition_avg, and all other medium-term metrics.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 21:03:22 +01:00
..
__init__.py feat: Phase 0c - migrate correlation_metrics to data_layer/correlations (11 functions) 2026-03-28 20:28:26 +01:00
activity_metrics.py fix: add missing statistics import and update focus_weights function 2026-03-28 20:46:21 +01:00
body_metrics.py fix: add missing statistics import and update focus_weights function 2026-03-28 20:46:21 +01:00
correlations.py fix: Phase 0c - update all in-function imports to use data_layer 2026-03-28 20:36:50 +01:00
health_metrics.py feat: Phase 0c - health_metrics.py module complete 2026-03-28 19:15:31 +01:00
nutrition_metrics.py feat: Phase 0c - migrate nutrition_metrics calculations to data_layer (16 functions) 2026-03-28 19:57:13 +01:00
recovery_metrics.py fix: Phase 0c - update all in-function imports to use data_layer 2026-03-28 20:36:50 +01:00
scores.py fix: Phase 0c - update all in-function imports to use data_layer 2026-03-28 20:36:50 +01:00
utils.py fix: correct confidence thresholds for 30-89 day range 2026-03-28 21:03:22 +01:00