Hacker News new | past | comments | ask | show | jobs | submit login

Good progress! I understand blurring the y-axis, though I'm curious about how large those up/down swings are. Have you considered using an exponentially-weighted average to smooth out the noise in the measurements?

It's just $ f(x_n) = f(x_{n-1}) * (1 - alpha) + x_n * alpha , f(x_0) = x_0 $ where 0 < alpha < 1 (lower values give a smoother graph but lags more)

Here's a quick sketch of how to do it in gnuplot without having to preprocess the data:

    # Getting previous values via https://stackoverflow.com/a/25753509/5921362
    
    alpha = 0.1
    prev = 0
    shift(x) = (prev = x)
    ewma(prev, cur) = shift(prev * (1 - alpha) + cur * alpha)
    
    plot data using 1:2 with p,\
         data using 1:(prev < 1 ? shift($2) : ewma(prev, $2)) with l



Since I'm really not that careful during non-diet days (some foods such as home-made chicken pot pies or pizzas etc.) can result in "significant" gains (2-3%) and other items my gf sometimes brings over (potato chips; ice cream; ...). Short answer: that week-to-week swing ranges ~4.5% of overall body weight. I try to limit (within reason) processed synthetic fake foods like margarine, Canola (lifeless, NaOH/heat-treated, hexane-extracted, bleached, deoderized "food") in favor of known-sourced, i.e. non-fake EVOO (look for the oleocanthal-induced burn at the back of the throat: http://www.sciencedaily.com/releases/2011/01/110118180514.ht...), butter, etc. I make my own bread, yogurt -- again for control of what goes into them. But overall, not obsessed with any of that. I like to keep it simple; those preparations take minutes not hours ... :-p

* [How It's Made - Canola Oil](https://www.youtube.com/watch?v=omjWmLG0EAs)

Detrimental health effects:

* [Canola oil linked to worsened memory and learning ability in Alzheimer's](https://www.sciencedaily.com/releases/2017/12/171207141624.h...)

* [Effect of canola oil consumption on memory, synapse and neuropathology in the triple transgenic mouse model of Alzheimer’s disease](https://www.nature.com/articles/s41598-017-17373-3)

Edit: thank you for the plotting comments (I heart these: I love all things tech, programmatic, bio*); I just wanted a quick way to see my overall progress over time. I enter my morning weight (digital scale) daily, and occasionally plot it (Ctrl-Alt-T shortcut to terminal; "gp" bashrc alias to run that plot command, "qq" to quit the terminal). ;-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: