Skip to content

Upgrade weight algorithms to industry standards (MacroFactor-level) - #95

Merged
alexgalkin94 merged 2 commits into
mainfrom
claude/optimize-resource-usage-njJv8
Jan 17, 2026
Merged

alexgalkin94 merged 2 commits into
mainfrom
claude/optimize-resource-usage-njJv8

Conversation

@github-actions

Copy link
Copy Markdown

Automatically created PR for branch claude/optimize-resource-usage-njJv8

EWMA (Exponentially Weighted Moving Average):
- Replace simple 7-day average with EWMA (α=0.1)
- Today: 10% weight, yesterday: 9%, etc. (≈20-day equivalent)
- Dips immediately reflected, bloating naturally decays
- Used by MacroFactor, Hacker's Diet, scientific literature

TDEE calculation fixes:
- Use actual DATE ranges instead of entry counts
- Compare last 14 days trend vs previous 14 days trend
- Align calorie data with same 28-day window as weight trend
- Use EWMA trend values for accurate weekly loss calculation

Expected weight line improvements:
- Use average of days 7-14 as baseline (after water weight)
- Avoids inflated trajectory from initial water loss
- Falls back to first weight if not enough data yet

Updated info sheet with accurate algorithm explanations
@vercel

vercel Bot commented Jan 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
testing-claude-code Ready Ready Preview, Comment Jan 17, 2026 0:49am

@alexgalkin94
alexgalkin94 merged commit 8ff744d into main Jan 17, 2026
3 of 4 checks passed

This branch was successfully deployed

1 active deployment
Preview — e14518e6 Deployed Jan 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants