Urgent.News

What's breaking now, across thousands of outlets.

Tech

Turning noisy bathroom-scale data into a projected date: SMA vs. EMA vs. linear regression

Body weight is a terrible time series. On a single morning it can swing by a kilogram or more because of water, salt, glycogen and whatever is still in your gut. Yet the question everyone actually asks is a forecasting question: "At this rate, when do I hit my goal?" I built a free goal-weight date calculator ( Weight Forecast , part of Life Forecast) and had to pick how to turn noisy weigh-ins…

Three common methods were tested to predict weight loss progress from daily bathroom scale readings: simple moving average (SMA), exponentially smoothed moving average (EMA), and linear regression. Each approach has its own strengths and weaknesses when it comes to forecasting when a target weight can be reached.

The SMA method calculates the average weight over the past seven days. This gives a straightforward average that falls about three days behind the current weight. However, every point in the window is given equal weight, so older data drops off quickly and the average is not very responsive to recent changes.

The EMA applies a smoothing factor of 10% to each day's weight, gradually adjusting the trend. This allows the average to move more smoothly and reduces the impact of a single outlier. However, with a smoothing factor of 0.1, the EMA lags behind the actual weight loss and responds slowly to steady progress. It's better for checking if one is still on track, but less useful for pinpointing a specific date.

Linear regression fitted a straight line through the last few data points to estimate the daily weight change. By extending this line to the goal weight, a date when the target weight will be reached can be calculated. The SMA and EMA methods don't provide a direct rate of change, while regression does. However, regression assumes a constant rate of change, which may not hold true as weight loss progresses and becomes slower. Outliers can also skew the regression line more than the other methods.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How we made battles deterministic and server-verified in a Telegram mini-game

We are building Seraph Legion, an angel-collector RPG that runs inside Telegram as a Mini App. This is a writeup of the most interesting engineering decision in the project: how battles work , and…

  • Battles are deterministic and server-verified to prevent cheating
  • Seeded random number generator ensures identical results with same inputs
  • Most write operations now server-verified after exploit prevention

Show DEV: I built a cozy Christmas village game in Godot, solo

Hi DEV, I'm the solo developer of Christmas Town, a free iPhone game where you decorate your own house, yard and Christmas tree in a snowy village.

  • Creator built solo Christmas Town game in Godot
  • iPhone game allows personalizing homes, yards, trees
  • Game features cozy decorating, shared town square

Co-op Bank customers hit by Sunday banking outage as App, USSD fail

Co-operative Bank of Kenya customers on Sunday, November 15, 2026, reported difficulties accessing their accounts and conducting transactions after the lender confirmed a technical disruption…

  • Co-operative Bank of Kenya experienced a Sunday outage on November 15, 2026
  • Customers could not access MCo-opCash app or USSD platform 667#
  • Bank acknowledged issue, support team working to restore services

How to Sync Billing Data to Prisma Postgres (Stripe, QuickBooks, Xero & Paddle)

Sync Stripe, QuickBooks, Xero or Paddle into Prisma Postgres. Which connection string to use, how a batched sync counts operations, and what it costs.

  • Prisma Postgres bills per operation, not query duration, making it cost-effective for batch syncs
  • Recommended pooled connection string for background workers like scheduled syncs
  • Sync of 375 Stripe paymentintents costs only 15 operations, demonstrating efficiency

Docker Compose build must be a string, in CI

Docker Compose build must be a string is the schema validator naming one branch of a rule with two, and following it literally will send you to rewrite a mapping that was never the problem.

  • "Docker Compose build must be a string" error occurs
  • Invalid key type or mapping branch causes the error
  • Validate Compose files in CI to prevent the error

Ctrl+A Only Copied a Third of the Page, So I Built a Chrome Extension

I was trying to save a lesson from an interactive course into my notes. You know the type. Slides you click through, cards you flip to see the answer, boxes that open up when you tap them, plus the…

  • Developer created Chrome extension to copy hidden content from web pages
  • Script traverses every text node on the page to extract all content
  • Extension outputs rough markdown for easy pasting into note-taking apps

More from Sunday 15 November →