L2-Regularisierung
L2 Regularisierung, also known as Ridge Regularization, is a method im maschinellen Lernen and statistics to prevent overfitting of models. Overfitting occurs when a model learns the noise in the Trainingsdaten anstelle des zugrunde liegenden Musters, was zu schlechten Leistungen bei ungesehenen Daten führt.
Bei der L2-Regularisierung wird der Strafterm zu der Verlustfunktion, which is the function used to measure how well the model’s predictions match the actual outcomes. Specifically, the penalty is proportional to the square of the magnitude of the coefficients (weights) of the model. This means that larger weights contribute more to the penalty, effectively discouraging the model from fitting the training data too closely.
Der L2-Regularisierungsterm wird mathematisch ausgedrückt als:
Penalty = λ * Σ(w_i²)
wobei:
λ(lambda) is the regularization parameter that controls the strength of the penalty.w_irepresents each weight im Modell dar.
By adjusting the value of λ, practitioners can find a balance between fitting the training data well and keeping the model simple, which enhances its ability to generalize to neue Daten.
Insgesamt hilft die L2-Regularisierung dabei, Verbesserung der Modellleistung das Risiko des Overfittings zu verringern, was zu robusteren Vorhersagen führt.