Kann mich jemand auf einen (rekursiven) Online-Algorithmus für die Tikhonov-Regularisierung (regularisierte kleinste Quadrate) hinweisen?
In einer Offline-Einstellung würde ich Verwendung meines ursprünglichen Datensatzes berechnen, wobei unter Verwendung der n-fachen Kreuzvalidierung gefunden wird. Ein neuer Wert kann für ein gegebenes x mit y = x ^ T \ hat \ beta vorhergesagt werden .λyxy=xT β
In einer Online-Umgebung zeichne ich ständig neue Datenpunkte. Wie kann ich updaten? wenn ich neue zusätzliche Datenmuster zeichne, ohne eine vollständige Neuberechnung des gesamten Datensatzes durchzuführen (Original + Neu)?
Antworten:
SeiM−1n=(XXT+λI)−1 , dann
Nach der Woodbury-Formel haben wir
As a result,
Polyak averaging indicates you can useηn=n−α
to approximate M−1n1+xTnM−1nxn with α ranges from 0.5 to 1 . You may try in your case to select the best α for your recursion.
I think it also works if you apply a batch gradient algorithm:
quelle
A point that no one has addressed so far is that it generally doesn't make sense to keep the regularization parameterλ constant as data points are added. The reason for this is that ∥Xβ−y∥2 will typically grow linearly with the number of data points, while the regularization term ∥λβ∥2 won't.
quelle
Perhaps something like Stochastic gradient descent could work here. Computeβ^ using your equation above on the initial dataset, that will be your starting estimate. For each new data point you can perform one step of gradient descent to update your parameter estimate.
quelle
In linear regression, one possibility is updating the QR decomposition ofX directly, as explained here. I guess that, unless you want to re-estimate λ after each new datapoint has been added, something very similar can be done with ridge regression.
quelle
Here is an alternative (and less complex) approach compared to using the Woodbury formula. Note thatXTX and XTy can be written as sums. Since we are calculating things online and don't want the sum to blow up, we can alternatively use means (XTX/n and XTy/n ).
If you writeX and y as :
we can write the online updates toXTX/n and XTy/n (calculated up to the t -th row) as:
Your online estimate ofβ then becomes
Note that this also helps with the interpretation ofλ remaining constant as you add observations!
This procedure is how https://github.com/joshday/OnlineStats.jl computes online estimates of linear/ridge regression.
quelle