Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Don't worry, I'm not using the app's suggestions blindly (or at all, currently). But yeah the SmartCGMS authors disclaimed as much - you're using it on your own risk.

This is probably also why apps like LibreLink don't provide predictions but only show historical data - easier to not get sued if you don't give the user advice that could kill them?

Re models, differential equations and finding minima: I do agree genetic algo is a bit wonky, and the greedy random walk at the bottom was able to get similar results. Do you have some resources for optimizing a N_51 x N_51 x N_51 x N_51 -> R+ unknown black-box function? My googling led me to eg. Metropolis-Hastings algorithm, but I don't currently get it (the translation to the probability domain escapes me). You're mentioning shooting method and bisection, I'll take a look at those.



So Metropolis-Hastings for example is a probabilistic algorithm. You don't need a probabilistic algorithm. (Well, you do when you want to estimate your physiological parameters, the Bayesian stuff and so on, but that is a whole separate can of worms). I didn't look too carefully at your objective function but it looked continuous - small perturbations in input mean small changes in the objective function. Like hypoglycemic readings, you can easily calculate "how hypoglyemic" rather than a yes/no. Naturally there are places where the objective function isn't continuous and that's where you have to do a discrete-style search, but when it's mostly continuous there are well-known numerical methods. Like check out https://docs.scipy.org/doc/scipy/reference/optimize.html, it isn't necessarily what you need but looking up the Wikipedia pages of the method names will be helpful. I've also found ChatGPT knows an insane amount of math, I wouldn't trust it to write a specific algorithm but it can give intelligent comparisons and list similar algorithms.

What I was saying is I don't think N_51 is the right way to model a dose. I would model it as a real number in the interval [0,50]. I would still round whatever the model gave to what I could actually measure out decently, but within the model I would not use discrete numbers.


Oh and regarding probabilistic stuff, I have been playing with PyMC, it seems eminently usable. There is some slightly more specialized software like Stan, and it is certainly worth looking at some Stan tutorials if you don't know anything about probabilistic programming, but PyMC is hackable and modular in a way that Stan is not. There is also tensorflow-probability but I couldn't get it to work, it seems not as active as PyMC. Haven't read it but I found https://github.com/CamDavidsonPilon/Probabilistic-Programmin... and that's probably going to be my coffee table reading for the next few days.


> Do you have some resources for optimizing a N_51 x N_51 x N_51 x N_51 -> R+ unknown black-box function?

Maybe Bayesian optimization? That's often how hyperparameter optimization is done in machine learning, but that has the additional constraint that each computation of the loss function is very expensive.

In general the term "black-box optimization" is the right search term, or "derivative-free optimization" which is what Wikipedia calls it.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: