LASSO ve sırt gibi cezalandırılmış regresyon tahmin edicilerinin, belirli öncelikleri olan Bayesci tahmin edicilere karşılık geldiği söylenir.
Evet doğru. Günlük olabilirlik fonksiyonunun maksimize edilmesini ve parametreler üzerinde bir ceza fonksiyonunu içeren bir optimizasyon problemimiz olduğunda, bu, ceza fonksiyonunun önceki bir çekirdeğin logaritması olduğu kabul edilen posterior maksimizasyona eşdeğerdir. † Bunu görmek için, bir ceza fonksiyonu olduğunu varsayın w bir ayarlama parametresi kullanılarak †wλ . Bu durumlarda nesnel işlev şu şekilde yazılabilir:
Hx(θ|λ)=ℓx(θ)−w(θ|λ)=ln(Lx(θ)⋅exp(−w(θ|λ)))=ln(Lx(θ)π(θ|λ)∫Lx(θ)π(θ|λ)dθ)+const=lnπ(θ|x,λ)+const,
burada önceki π(θ|λ)∝exp(−w(θ|λ)) . Burada, optimizasyondaki ayar parametresinin önceki dağıtımda sabit bir hiperparametre olarak kabul edildiğini gözlemleyin. Sabit bir ayarlama parametresi ile klasik optimizasyon yapıyorsanız, bu, sabit bir hiper parametresi ile Bayes optimizasyonu yapmaya eşdeğerdir. LASSO ve Ridge regresyonu için ceza fonksiyonları ve karşılık gelen önceki eşdeğerleri:
LASSO RegressionRidge Regressionπ(θ|λ)π(θ|λ)=∏k=1mLaplace(0,1λ)=∏k=1mλ2⋅exp(−λ|θk|),=∏k=1mNormal(0,12λ)=∏k=1mλ/π−−−√⋅exp(−λθ2k).
Önceki yöntem, regresyon katsayılarını mutlak büyüklüklerine göre cezalandırır; bu, daha önce sıfırda yer alan bir Laplace dayatmaya eşdeğerdir. İkinci yöntem, regresyon katsayılarını kare büyüklüklerine göre cezalandırır; bu, daha önce sıfır olarak yerleştirilmiş normal bir empoze etmeye eşdeğerdir.
Şimdi bir frekansçı ayar parametresini çapraz doğrulamayla optimize edecektir. Bunu yapmanın bir Bayesian eşdeğeri var mı ve hiç kullanılıyor mu?
So long as the frequentist method can be posed as an optimisation problem (rather than say, including a hypothesis test, or something like this) there will be a Bayesian analogy using an equivalent prior. Just as the frequentists may treat the tuning parameter λ as unknown and estimate this from the data, the Bayesian may similarly treat the hyperparameter λ as unknown. In a full Bayesian analysis this would involve giving the hyperparameter its own prior and finding the posterior maximum under this prior, which would be analogous to maximising the following objective function:
Hx(θ,λ)=ℓx(θ)−w(θ|λ)−h(λ)=ln(Lx(θ)⋅exp(−w(θ|λ))⋅exp(−h(λ)))=ln(Lx(θ)π(θ|λ)π(λ)∫Lx(θ)π(θ|λ)π(λ)dθ)+const=lnπ(θ,λ|x)+const.
This method is indeed used in Bayesian analysis in cases where the analyst is not comfortable choosing a specific hyperparameter for their prior, and seeks to make the prior more diffuse by treating it as unknown and giving it a distribution. (Note that this is just an implicit way of giving a more diffuse prior to the parameter of interest θ.)
(Comment from statslearner2 below) I'm looking for numerical equivalent MAP estimates. For instance, for a fixed penalty Ridge there is a gaussian prior that will give me the MAP estimate exactly equal the ridge estimate. Now, for k-fold CV ridge, what is the hyper-prior that would give me the MAP estimate which is similar to the CV-ridge estimate?
Before proceeding to look at K-fold cross-validation, it is first worth noting that, mathematically, the maximum a posteriori (MAP) method is simply an optimisation of a function of the parameter θ and the data x. If you are willing to allow improper priors then the scope encapsulates any optimisation problem involving a function of these variables. Thus, any frequentist method that can be framed as a single optimisation problem of this kind has a MAP analogy, and any frequentist method that cannot be framed as a single optimisation of this kind does not have a MAP analogy.
In the above form of model, involving a penalty function with a tuning parameter, K-fold cross-validation is commonly used to estimate the tuning parameter λ. For this method you partition the data vector x into K sub-vectors x1,...,xK. For each of sub-vector k=1,...,K you fit the model with the "training" data x−k and then measure the fit of the model with the "testing" data xk. Her bir uyumda, model parametreleri için bir tahminci alırsınız, bu da size test verilerinin tahminlerini verir, bu da daha sonra bir "kayıp" ölçüsü vermek için gerçek test verileriyle karşılaştırılabilir:
EstimatorPredictionsTesting lossθ^(x−k,λ),x^k(x−k,λ),Lk(x^k,xk|x−k,λ).
The loss measures for each of the K "folds" can then be aggregated to get an overall loss measure for the cross-validation:
L(x,λ)=∑kLk(x^k,xk|x−k,λ)
One then estimates the tuning parameter by minimising the overall loss measure:
λ^≡λ^(x)≡arg min λL(x,λ).
We can see that this is an optimisation problem, and so we now have two seperate optimisation problems (i.e., the one described in the sections above for θ, and the one described here for λ). Since the latter optimisation does not involve θ, we can combine these optimisations into a single problem, with some technicalities that I discuss below. To do this, consider the optimisation problem with objective function:
Hx(θ,λ)=ℓx(θ)−w(θ|λ)−δL(x,λ),
where δ>0 is a weighting value on the tuning-loss. As δ→∞ the weight on optimisation of the tuning-loss becomes infinite and so the optimisation problem yields the estimated tuning parameter from K-fold cross-validation (in the limit). The remaining part of the objective function is the standard objective function conditional on this estimated value of the tuning parameter. Now, unfortunately, taking δ=∞ screws up the optimisation problem, but if we take δ to be a very large (but still finite) value, we can approximate the combination of the two optimisation problems up to arbitrary accuracy.
From the above analysis we can see that it is possible to form a MAP analogy to the model-fitting and K-fold cross-validation process. This is not an exact analogy, but it is a close analogy, up to arbitrarily accuracy. It is also important to note that the MAP analogy no longer shares the same likelihood function as the original problem, since the loss function depends on the data and is thus absorbed as part of the likelihood rather than the prior. In fact, the full analogy is as follows:
Hx(θ,λ)=ℓx(θ)−w(θ|λ)−δL(x,λ)=ln(L∗x(θ,λ)π(θ,λ)∫L∗x(θ,λ)π(θ,λ)dθ)+const,
where L∗x(θ,λ)∝exp(ℓx(θ)−δL(x,λ)) and π(θ,λ)∝exp(−w(θ|λ)), with a fixed (and very large) hyper-parameter δ.
† This gives an improper prior in cases where the penalty does not correspond to the logarithm of a sigma-finite density.