Hacker News new | ask | show | jobs
by noud 1181 days ago
I once build a machine learning library from scratch in rust. No external libraries allowed. It could do linear regression, lasso, and ridge. It also contained some statistical inference features, like p-values, AIC, feature selection. Basically chapter 3 of Hastie [1]. It's more difficult than you might think, as you have to figure out how to do efficient matrix manipulations, deal with floating point overflows, multi-threading, unit testing, bench marking, etc.

[1] - https://hastie.su.domains/Papers/ESLII.pdf