L

Regularización L2

L2

La regularización L2 es una técnica utilizada para prevenir el sobreajuste en modelos de aprendizaje automático, añadiendo una penalización por pesos grandes.

Regularización L2

L2 Regularización, also known as Ridge Regularization, is a method utilizado en aprendizaje automático and statistics to prevent overfitting of models. Overfitting occurs when a model learns the noise in the datos de entrenamiento en lugar del patrón subyacente, lo que conduce a un rendimiento deficiente en datos no vistos.

En la regularización L2, se añade un término de penalización a la función de pérdida, 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.

El término de regularización L2 se expresa matemáticamente como:

Penalty = λ * Σ(w_i²)

donde:

  • λ (lambda) is the regularization parameter that controls the strength of the penalty.
  • w_i represents each weight en el modelo.

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 nuevos datos.

En general, la regularización L2 ayuda a mejorar el rendimiento del modelo al reducir el riesgo de sobreajuste, lo que conduce a predicciones más robustas.

oEmbed (JSON) + /