I want to run linear regression on a dataset who is too large to be loaded into memory. I intend to simply calculate
$$\left(\sum_{i=1}^n x_ix_i^T\right)^{-1} \cdot \left(\sum_{i=1}^n x_iy_i\right)$$ but one issue is that my input data is all different scales. If the scale is sufficiently small, it's OK as I can simply scale the dataset to lie in $[-1, 1]$ all at once, using.
X = 2 * (X-X.min())/(X.max()-X.min()) - 1
But how can I scale it if I'm doing it iteratively? We won't know the max
and min
apriori.