feat: Phase 0b - Calculation Engine for 120+ Goal-Aware Placeholders
- body_metrics.py: K1-K5 calculations (weight trend, FM/LBM, circumferences, recomposition, body score) - nutrition_metrics.py: E1-E5 calculations (energy balance, protein adequacy, macro consistency, nutrition score) - activity_metrics.py: A1-A8 calculations (training volume, intensity, quality, ability balance, load monitoring) - recovery_metrics.py: Improved Recovery Score v2 (HRV, RHR, sleep, regularity, load balance) - correlation_metrics.py: C1-C7 calculations (lagged correlations, plateau detection, driver panel) - scores.py: Meta-scores with Dynamic Focus Areas v2.0 integration All calculations include: - Data quality assessment - Confidence levels - Dynamic weighting by user's focus area priorities - Support for custom goals via goal_utils integration Next: Placeholder integration in placeholder_resolver.py
This commit is contained in:
1 parent
56933431f6
commit
09e6a5fbfb
7 files changed
+3480
No files matched your search
@@ -0,0 +1,48 @@
|
||||
"""
|
||||
Calculation Engine for Phase 0b - Goal-Aware Placeholders
|
||||
|
||||
This package contains all metric calculation functions for:
|
||||
- Body metrics (K1-K5 from visualization concept)
|
||||
- Nutrition metrics (E1-E5)
|
||||
- Activity metrics (A1-A8)
|
||||
- Recovery metrics (S1)
|
||||
- Correlations (C1-C7)
|
||||
- Scores (Goal Progress Score with Dynamic Focus Areas)
|
||||
|
||||
All calculations are designed to work with Dynamic Focus Areas v2.0.
|
||||
"""
|
||||
|
||||
from .body_metrics import *
|
||||
from .nutrition_metrics import *
|
||||
from .activity_metrics import *
|
||||
from .recovery_metrics import *
|
||||
from .correlation_metrics import *
|
||||
from .scores import *
|
||||
|
||||
__all__ = [
|
||||
# Body
|
||||
'calculate_weight_7d_median',
|
||||
'calculate_weight_28d_slope',
|
||||
'calculate_fm_28d_change',
|
||||
'calculate_lbm_28d_change',
|
||||
'calculate_body_progress_score',
|
||||
|
||||
# Nutrition
|
||||
'calculate_energy_balance_7d',
|
||||
'calculate_protein_g_per_kg',
|
||||
'calculate_nutrition_score',
|
||||
|
||||
# Activity
|
||||
'calculate_training_minutes_week',
|
||||
'calculate_activity_score',
|
||||
|
||||
# Recovery
|
||||
'calculate_recovery_score_v2',
|
||||
|
||||
# Correlations
|
||||
'calculate_lag_correlation',
|
||||
|
||||
# Meta Scores
|
||||
'calculate_goal_progress_score',
|
||||
'calculate_data_quality_score',
|
||||
]
|
||||
Reference in new issue
Block a user