\(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\R}[1]{ {\rm #1} }\)
fit_info_theory¶
View page sourceAdjusting Prior to Fit The Information Matrix¶
This method is motivated by the Problem with the current method for creating child job priors.
Simplification¶
We consider each rate separately because the prior does not allow for correlation between the different rates.
Notation¶
Notation |
Meaning |
|---|---|
\(r_{i,j}\) |
value of the rate at the i-th age and j-th time |
\(N\) |
number of age points in the rate grid minus 1 |
\(M\) |
number of time points in the rate grid minus 1 |
\(\bar{v}_{i,j}\) |
mean for the rate value at (i,j) |
\(\bar{a}_{i,j}\) |
mean for age forward differences at (i,j) |
\(\bar{t}_{i,j}\) |
mean for time forward differences at (i,j) |
\(v_{i,j}\) |
variance for the rate value at (i,j) |
\(a_{i,j}\) |
variance for age forward differences at (i,j) |
\(t_{i,j}\) |
variance for time forward differences at (i,j) |
\(L(r)\) |
the negative log-likelihood for prior |
\(V(r)\) |
value contribution to \(L(z)\) |
\(A(r)\) |
age contribution to \(L(z)\) |
\(T(r)\) |
time contribution to \(L(z)\) |
Hessian of Prior Negative Log Likelihood¶
The negative log likelihood for the prior, as a function of the rate values, is:
The partials of the negative log likelihood for the prior are given by:
We use the following notation to simplify the expressions below:
The second partials of \(V(r)\) are given by:
The second partials of \(A(r)\) when \(i = N\) are given by:
The second partials of \(A(r)\) when \(i = 0\) are given by:
The second partials of \(A(r)\) when \(0 < i < N\) are given by:
The second partials of \(T(r)\) are given by:
The second partials of \(L(r)\) are given by:
We use \(H( b , s )\) to denote the Hessian of \(L(r)\) , with respect to \(r\), as a function of the prior parameters \(b = \{ b_{i,j} \}\) and \(s = \{ s_{i,j} \}\) ; i.e.,
Problem¶
Given an information matrix \(I\) , determine the parameter matrices \(b\) and \(s\) that minimize
subject to a lower bound of zero and a positive upper bound on the elements of \(b\) and \(s\) .
This is a linear least square problem subject to lower and upper bounds on the variables being optimized. It could be solved using
scipy.optimize.lsq_linear.The objective above is the Frobenius norm squared of the difference between the approximation and the desired information matrix.
The indices where \(| k - i| > 1\) or \(| \ell - j | > 1\) do not need to be included in the summation.
If an element of \(b\) or \(s\) is zero at the solution, the corresponding term is not included in the prior (because its variance is infinite).
The positive upper bound corresponds to a lower limit on the variances in the prior.