Online learning updates a model with each new observation, in constant time and memory, and is scored prequentially: each observation is predicted before it is learned from. Recursive least squares (RLS) updates the weighted least-squares solution β^t=argminb∑s≤tλt−s(ys−xs⊤b)2 by
kt=λ+xt⊤Pt−1xtPt−1xt,β^t=β^t−1+kt(yt−xt⊤β^t−1),Pt=λ1(Pt−1−ktxt⊤Pt−1),
where the forgetting factor λ∈(0,1] discounts old observations; their weights sum to about 1/(1−λ), the estimator’s effective memory.