Hacker News new | ask | show | jobs
by 7thaccount 1811 days ago
Thanks for the tip!
1 comments

Just throwing another tip out there: if you're finding yourself having to model anything mildly nonlinear, but find yourself shackled by the linearity constraints of a Mixed Integer Program (MIP), you can use a statistical/ML technique called MARS [1] to regress a piecewise-linear model from your nonlinear data to approximate said nonlinear function. MARS models are essentially models with constant or max functions as basis functions, e.g.

y = a₀ + a₁ max(0, x − b₁) + a₂ max(0, x − b₂) + ...

max(0,x) functions are very easy to model in MIPs.

[1] https://en.wikipedia.org/wiki/Multivariate_adaptive_regressi...

I mostly just do LP & MIP (MILP), but will write this down in case I find a nonlinear need. Thank you!