Sequential Logistic Regression
Bayesian 형식으로 표현된 logistic regression 의 likelihood 는 다음과 같다.
- 은 sigmoid function:
- 는 binary response variable (
0은 노출 그리고1은 클릭) - : context vector
parameter 의 prior distribution 는 Gaussian pdf 를 따른다고 한다면, posterior 는 다음과 같이 계산된다.
Sequential Logisitc Regression 은 매 time step 마다 example 들을 입력받는다고 할때, Gaussian posterior 확률 분포 를 계산하는 것이 목적이다 (여기서 는 time step 에 받은 context 및 reward)
학습 방안
Logistic regression 은 non-linear 하기 때문에 true posterior 를 계산하는 것은 analytically not feasible 하다. 그래서 아래와 같은 방법들로 posterior 를 approximate 하는 접근 방법을 택한다.
Laplace Approximation
Laplace approximation 은 S-L approximation 으로 표현되며, prior mean () 을 중심으로 하는 log-likelihood 를 local quadratic approximation 으로 표현한다. 그리고 해당 Log-likelihood 의 solution 을 Newton-Raphson method > Second-order method 방식을 통해 찾아낸다.
이 방식은 adjustable 한 parameter 가 없기 때문에 variational 한 방식보다 간단하지만, posterior 추정에 덜 정확한 결과를 낸다는 실험적인 내용이 있다.
Update Equation (ver. 1)
위의 식 유도는 다음을 참고할 것: generalized linear model - Why using Newton’s method for logistic regression optimization is called iterative re-weighted least squares? - Cross Validated
Update Equation (ver. 2)
첫번째 식에 Sherman–Morrison formula 를 적용하면 두번째 식을 얻을 수 있다.
Variational Approximation
를 varitional approximation 으로 치환하여 posterior 의 parameter 는 Gaussian 으로 남기고, posterior 계산은 각 observations 을 통해 evidence 를 순차적으로 계산함으로써 계산할 수 있다.
우선 variational transformation 은 다음과 같이 이루어진다
- 이고, 이다.
- 는 variational parameter 이다.
Update Equations
- 는 context vector
(크시) 의 경우 다음과 같이 업데이트 할 수 있다.
- a multivariate normal approximation to the posterior density
-
어떤 posterior 를 mean 이고 covariance matrix 이 Gaussian approximation 으로 보이면 다음과 같음
- 는 의 prior variance 라고 한다.
- 는 direct estimate 로, 다음과 같이 계산된다
Related
References
- Sequential Updating of Conditional Probabilities on Directed Graphical Structures
- Sequential Bayesian computation of logistic regression models
- A variational approach to Bayesian logistic regression models and their extensions
- 개인적으로 가장 잘 정리된 내용인것 같음
- Dynamic Logistic Regression
- https://stats.stackexchange.com/questions/81740/recursive-online-regularised-least-squares-algorithm