En matemáticas , estadística , finanzas , [1] ciencias de la computación , particularmente en aprendizaje automático y problemas inversos , la regularización es el proceso de agregar información para resolver un problema mal planteado o para prevenir el sobreajuste . [2]
La regularización se puede aplicar a funciones objetivas en problemas de optimización mal planteados. El término de regularización, o penalización, impone un costo a la función de optimización para que la solución óptima sea única.
Independientemente del problema o modelo, siempre existe un término de datos, que corresponde a una probabilidad de la medición y un término de regularización que corresponde a un anterior. Combinando ambos utilizando estadísticas bayesianas, se puede calcular un posterior, que incluye ambas fuentes de información y, por lo tanto, estabiliza el proceso de estimación. Al intercambiar ambos objetivos, se elige ser más adictivo a los datos o hacer cumplir la generalización (para evitar el sobreajuste). Existe toda una rama de investigación que se ocupa de todas las posibles regularizaciones. El flujo de trabajo suele ser que uno intenta una regularización específica y luego calcula la densidad de probabilidad que corresponde a esa regularización para justificar la elección. También puede estar motivado físicamente por el sentido común o la intuición, que es más difícil.
En el aprendizaje automático, el término de datos corresponde a los datos de entrenamiento y la regularización es la elección del modelo o modificaciones al algoritmo. Siempre se pretende reducir el error de generalización, es decir, la puntuación de error con el modelo entrenado en el conjunto de evaluación y no con los datos de entrenamiento. [3]
Uno de los primeros usos de la regularización está relacionado con el método de mínimos cuadrados. La densidad de probabilidad calculada es la distribución gaussiana, que ahora se conoce con el nombre de "regularización de Tikhonov".
Clasificación
El aprendizaje empírico de clasificadores (a partir de un conjunto de datos finitos) es siempre un problema indeterminado, porque intenta inferir una función de cualquier dado solo ejemplos .
Un término de regularización (o regularizador) se agrega a una función de pérdida :
dónde es una función de pérdida subyacente que describe el costo de predecir cuando la etiqueta es , como la pérdida de escuadra o la pérdida de bisagra ; y es un parámetro que controla la importancia del plazo de regularización. se elige típicamente para imponer una penalización a la complejidad de . Las nociones concretas de complejidad utilizadas incluyen restricciones de suavidad y límites en la norma del espacio vectorial . [4] [ página necesaria ]
Una justificación teórica para la regularización es que intenta imponer la navaja de Occam a la solución (como se muestra en la figura anterior, donde se puede preferir la función verde, la más simple). Desde un punto de vista bayesiano , muchas técnicas de regularización corresponden a imponer ciertas distribuciones previas a los parámetros del modelo. [5]
La regularización puede servir para múltiples propósitos, incluido el aprendizaje de modelos más simples, inducir a que los modelos sean escasos e introducir una estructura de grupo [ aclaración necesaria ] en el problema de aprendizaje.
La misma idea surgió en muchos campos de la ciencia . Una forma simple de regularización aplicada a ecuaciones integrales ( regularización de Tikhonov ) es esencialmente una compensación entre ajustar los datos y reducir una norma de la solución. Más recientemente, los métodos de regularización no lineal, incluida la regularización de variación total , se han vuelto populares.
Generalización
La regularización se puede motivar como una técnica para mejorar la generalización de un modelo aprendido.
El objetivo de este problema de aprendizaje es encontrar una función que se ajuste o prediga el resultado (etiqueta) que minimice el error esperado en todas las entradas y etiquetas posibles. El error esperado de una función es:
dónde y son los dominios de los datos de entrada y sus etiquetas respectivamente.
Por lo general, en los problemas de aprendizaje, solo está disponible un subconjunto de datos de entrada y etiquetas, medidos con algo de ruido. Por lo tanto, el error esperado es inconmensurable y el mejor sustituto disponible es el error empírico sobre el muestras disponibles:
Sin límites en la complejidad del espacio funcional (formalmente, el espacio de Hilbert del núcleo de reproducción ) disponible, se aprenderá un modelo que incurre en cero pérdidas en el error empírico sustituto. Si las mediciones (por ejemplo, de) se hicieron con ruido, este modelo puede sufrir un sobreajuste y mostrar un error esperado deficiente. La regularización introduce una penalización por explorar ciertas regiones del espacio funcional utilizado para construir el modelo, lo que puede mejorar la generalización.
Regularización de Tikhonov
Estas técnicas llevan el nombre de Andrey Nikolayevich Tikhonov , quien aplicó la regularización a ecuaciones integrales y realizó importantes contribuciones en muchas otras áreas.
Al aprender una función lineal , caracterizado por un vector desconocido tal que , uno puede agregar el -norm del vector a la expresión de pérdida para preferir soluciones con normas menores. La regularización de Tikhonov es una de las formas más comunes. También se conoce como regresión de crestas. Se expresa como:
- ,
dónde representaría muestras utilizadas para entrenamiento.
En el caso de una función general, la norma de la función en su espacio de Hilbert del núcleo de reproducción es:
Como el La norma es diferenciable , el aprendizaje se puede avanzar mediante el descenso de gradientes .
Mínimos cuadrados regularizados por Tikhonov
El problema de aprendizaje con la función de pérdida por mínimos cuadrados y la regularización de Tikhonov se puede resolver analíticamente. Escrito en forma de matriz, el óptimo es aquel para el que el gradiente de la función de pérdida con respecto a es 0.
Por construcción del problema de optimización, otros valores de dar valores mayores para la función de pérdida. Esto se puede verificar examinando la segunda derivada .
Durante el entrenamiento, este algoritmo toma tiempo . Los términos corresponden a la inversión matricial y al cálculo, respectivamente. La prueba lleva hora.
Parada anticipada
La interrupción anticipada puede verse como una regularización en el tiempo. Intuitivamente, un procedimiento de entrenamiento como el descenso de gradientes tiende a aprender funciones cada vez más complejas con iteraciones crecientes. Al regularizar por tiempo, se puede controlar la complejidad del modelo, mejorando la generalización.
La detención anticipada se implementa utilizando un conjunto de datos para el entrenamiento, un conjunto de datos estadísticamente independientes para la validación y otro para las pruebas. El modelo se entrena hasta que el rendimiento en el conjunto de validación ya no mejora y luego se aplica al conjunto de prueba.
Motivación teórica en mínimos cuadrados
Considere la aproximación finita de la serie de Neumann para una matriz invertible A donde:
Esto se puede usar para aproximar la solución analítica de mínimos cuadrados no regularizados, si se introduce γ para asegurar que la norma sea menor que uno.
The exact solution to the unregularized least squares learning problem minimizes the empirical error, but may fail. By limiting T, the only free parameter in the algorithm above, the problem is regularized for time, which may improve its generalization.
The algorithm above is equivalent to restricting the number of gradient descent iterations for the empirical risk
with the gradient descent update:
The base case is trivial. The inductive case is proved as follows:
Regularizadores para escasez
Assume that a dictionary with dimension is given such that a function in the function space can be expressed as:
Enforcing a sparsity constraint on can lead to simpler and more interpretable models. This is useful in many real-life applications such as computational biology. An example is developing a simple predictive test for a disease in order to minimize the cost of performing medical tests while maximizing predictive power.
A sensible sparsity constraint is the norm , defined as the number of non-zero elements in . Solving a regularized learning problem, however, has been demonstrated to be NP-hard.[6]
The norm (see also Norms) can be used to approximate the optimal norm via convex relaxation. It can be shown that the norm induces sparsity. In the case of least squares, this problem is known as LASSO in statistics and basis pursuit in signal processing.
regularization can occasionally produce non-unique solutions. A simple example is provided in the figure when the space of possible solutions lies on a 45 degree line. This can be problematic for certain applications, and is overcome by combining L 1 {\displaystyle L_{1}} with L 2 {\displaystyle L_{2}} regularization in elastic net regularization, which takes the following form:
Elastic net regularization tends to have a grouping effect, where correlated input features are assigned equal weights.
Elastic net regularization is commonly used in practice and is implemented in many machine learning libraries.
Proximal methods
While the L 1 {\displaystyle L_{1}} norm does not result in an NP-hard problem, the L 1 {\displaystyle L_{1}} norm is convex but is not strictly differentiable due to the kink at x = 0. Subgradient methods which rely on the subderivative can be used to solve L 1 {\displaystyle L_{1}} regularized learning problems. However, faster convergence can be achieved through proximal methods.
For a problem such that is convex, continuous, differentiable, with Lipschitz continuous gradient (such as the least squares loss function), and is convex, continuous, and proper, then the proximal method to solve the problem is as follows. First define the proximal operator
and then iterate
The proximal method iteratively performs gradient descent and then projects the result back into the space permitted by .
When is the L 1 {\displaystyle L_{1}} regularizer, the proximal operator is equivalent to the soft-thresholding operator,
This allows for efficient computation.
Group sparsity without overlaps
Groups of features can be regularized by a sparsity constraint, which can be useful for expressing certain prior knowledge into an optimization problem.
In the case of a linear model with non-overlapping known groups, a regularizer can be defined:
- where
This can be viewed as inducing a regularizer over the norm over members of each group followed by an norm over groups.
This can be solved by the proximal method, where the proximal operator is a block-wise soft-thresholding function:
Group sparsity with overlaps
The algorithm described for group sparsity without overlaps can be applied to the case where groups do overlap, in certain situations. This will likely result in some groups with all zero elements, and other groups with some non-zero and some zero elements.
If it is desired to preserve the group structure, a new regularizer can be defined:
For each , is defined as the vector such that the restriction of to the group equals and all other entries of are zero. The regularizer finds the optimal disintegration of into parts. It can be viewed as duplicating all elements that exist in multiple groups. Learning problems with this regularizer can also be solved with the proximal method with a complication. The proximal operator cannot be computed in closed form, but can be effectively solved iteratively, inducing an inner iteration within the proximal method iteration.
Regularizadores para aprendizaje semi-supervisado
When labels are more expensive to gather than input examples, semi-supervised learning can be useful. Regularizers have been designed to guide learning algorithms to learn models that respect the structure of unsupervised training samples. If a symmetric weight matrix is given, a regularizer can be defined:
If encodes the result of some distance metric for points and , it is desirable that . This regularizer captures this intuition, and is equivalent to:
- where is the Laplacian matrix of the graph induced by .
The optimization problem can be solved analytically if the constraint is applied for all supervised samples. The labeled part of the vector is therefore obvious. The unlabeled part of is solved for by:
Note that the pseudo-inverse can be taken because has the same range as .
Regularizadores para el aprendizaje multitarea
In the case of multitask learning, problems are considered simultaneously, each related in some way. The goal is to learn functions, ideally borrowing strength from the relatedness of tasks, that have predictive power. This is equivalent to learning the matrix .
Sparse regularizer on columns
This regularizer defines an L2 norm on each column and an L1 norm over all columns. It can be solved by proximal methods.
Nuclear norm regularization
- where is the eigenvalues in the singular value decomposition of .
Mean-constrained regularization
This regularizer constrains the functions learned for each task to be similar to the overall average of the functions across all tasks. This is useful for expressing prior information that each task is expected to share with each other task. An example is predicting blood iron levels measured at different times of the day, where each task represents an individual.
Clustered mean-constrained regularization
- where is a cluster of tasks.
This regularizer is similar to the mean-constrained regularizer, but instead enforces similarity between tasks within the same cluster. This can capture more complex prior information. This technique has been used to predict Netflix recommendations. A cluster would correspond to a group of people who share similar preferences.
Graph-based similarity
More generally than above, similarity between tasks can be defined by a function. The regularizer encourages the model to learn similar functions for similar tasks.
- for a given symmetric similarity matrix .
Otros usos de la regularización en estadísticas y aprendizaje automático
Bayesian learning methods make use of a prior probability that (usually) gives lower probability to more complex models. Well-known model selection techniques include the Akaike information criterion (AIC), minimum description length (MDL), and the Bayesian information criterion (BIC). Alternative methods of controlling overfitting not involving regularization include cross-validation.
Examples of applications of different methods of regularization to the linear model are:
Model | Fit measure | Entropy measure[4][7] |
---|---|---|
AIC/BIC | ||
Ridge regression[8] | ||
Lasso[9] | ||
Basis pursuit denoising | ||
Rudin–Osher–Fatemi model (TV) | ||
Potts model | ||
RLAD[10] | ||
Dantzig Selector[11] | ||
SLOPE[12] |
Ver también
- Bayesian interpretation of regularization
- Bias–variance tradeoff
- Matrix regularization
- Regularization by spectral filtering
- Regularized least squares
- Lagrange multiplier
Notas
- ^ Kratsios, Anastasis (2020). "Deep Arbitrage-Free Learning in a Generalized HJM Framework via Arbitrage-Regularization Data". Risks: [1]. doi:10.3390/risks8020040.
Term structure models can be regularized to remove arbitrage oppertunities [sic?].
Cite journal requires|journal=
(help) - ^ Bühlmann, Peter; Van De Geer, Sara (2011). "Statistics for High-Dimensional Data". Springer Series in Statistics: 9. doi:10.1007/978-3-642-20192-9. ISBN 978-3-642-20191-2.
If p > n, the ordinary least squares estimator is not unique and will heavily overfit the data. Thus, a form of complexity regularization will be necessary.
Cite journal requires|journal=
(help) - ^ "Deep Learning Book". www.deeplearningbook.org. Retrieved 2021-01-29.
- ^ a b Bishop, Christopher M. (2007). Pattern recognition and machine learning (Corr. printing. ed.). New York: Springer. ISBN 978-0387310732.
- ^ For the connection between maximum a posteriori estimation and ridge regression, see Weinberger, Kilian (July 11, 2018). "Linear / Ridge Regression". CS4780 Machine Learning Lecture 13. Cornell.
- ^ Natarajan, B. (1995-04-01). "Sparse Approximate Solutions to Linear Systems". SIAM Journal on Computing. 24 (2): 227–234. doi:10.1137/S0097539792240406. ISSN 0097-5397.
- ^ Duda, Richard O. (2004). Pattern classification + computer manual : hardcover set (2. ed.). New York [u.a.]: Wiley. ISBN 978-0471703501.
- ^ Arthur E. Hoerl; Robert W. Kennard (1970). "Ridge regression: Biased estimation for nonorthogonal problems". Technometrics. 12 (1): 55–67. doi:10.2307/1267351.
- ^ Tibshirani, Robert (1996). "Regression Shrinkage and Selection via the Lasso" (PostScript). Journal of the Royal Statistical Society, Series B. 58 (1): 267–288. MR 1379242. Retrieved 2009-03-19.
- ^ Li Wang, Michael D. Gordon & Ji Zhu (2006). "Regularized Least Absolute Deviations Regression and an Efficient Algorithm for Parameter Tuning". Sixth International Conference on Data Mining. pp. 690–700. doi:10.1109/ICDM.2006.134.
- ^ Candes, Emmanuel; Tao, Terence (2007). "The Dantzig selector: Statistical estimation when p is much larger than n". Annals of Statistics. 35 (6): 2313–2351. arXiv:math/0506081. doi:10.1214/009053606000001523. MR 2382644.
- ^ Małgorzata Bogdan, Ewout van den Berg, Weijie Su & Emmanuel J. Candes (2013). "Statistical estimation and testing via the ordered L1 norm". arXiv:1310.1969 [stat.ME].CS1 maint: multiple names: authors list (link)
Referencias
- Neumaier, A. (1998). "Solving ill-conditioned and singular linear systems: A tutorial on regularization" (PDF). SIAM Review. 40 (3): 636–666. doi:10.1137/S0036144597321909.