Module std_dev::regression::ols

source ·
Available on crate features regression and ols only.
Expand description

Ordinary least squares implementation.

Implementation details

This implementation uses linear algebra (namely matrix multiplication, transposed matrices & the inverse). For now, I’m not educated enough to understand how to derive it. I’ve linked great resources below.

The implementation in code should be relatively simple to follow.

Linear regression How the linear algebra works

Structs

  • Linear: O(n) Polynomial: O(n*degree), which when using a set degree becomes O(n)

Functions