Live data from Hacker News

I Solved a 7-Day Calculation Problem in a Weekend

medium.com

21–23 of 23 posts

Re: I Solved a 7-Day Calculation Problem in a Weekend

#21

Tbh, I'm really not sure why something like this should take 15 seconds to compute. That's roughly a few trillion floating point ops for a problem that has been solvable for decades. I have trouble imagining any reasonable model for mapping price -> sales needing that much compute. Also, fwiw, I really wouldn't expect clients slider clicks to follow a normal distribution. A normal distribution occurs when you have th…

Yeah, this is like if you asked your friend how much more productive they think coffee makes them, and they replied with a four hundred thousand degree polynomial over the milliliter. Reality is never that predictable; reasonable people can recognize when they have run out of significant digits. Something has gone severely wrong in your data-modeling, your invocation of the model, or both. If it actually is doing compute for 15s, then to the extent that this works, it is wrapping a vastly simpler function, which I would suggest you graph and use going forward instead. It will save you the runtime, its outputs will be more reliable, and you will get actual insights.

Re: I Solved a 7-Day Calculation Problem in a Weekend

#22
post #16
post #13

This is one of those junior engineer moments where they technically did perceive a problem and solve it, but you wish they had just come and asked for some advice first.

Don’t dangle the man - enrich him with your advice!

Well the details in the article are sparse, but given what we are told, it seems highly likely that instead of using their ML model directly, they could use their ML model to fit a regression or a piecewise polynomial (eg a linear interpolation or spline) over the result. So the user input is not driving the ML model it is simply an input into a polynomial giving a calculation that is trivial for a modern computer.

Then they wouldn’t even need to cache anything and the result would be instantaneous with no real loss of accuracy.

Post reply on HN