Gradients & Hessians
Inverse GaussianGradient VectorHessian MatrixRight-CensoringGaussianGradient VectorHessian MatrixRight CensoringLogNormalGradient VectorHessian MatrixRight Censoring
Inverse Gaussian
Gradient Vector
For we have:
For we have:
Since we note that in case , we must use instead of
(Note: In code this case is handled by the fact the u[i] = 1)
Hessian Matrix
We have that as expected.
Right-Censoring
Some mathematical trick to treat the pdf and cdf of the Inverse Gaussian:
Where is the standard normal distribution cdf.
The additional term we add to our cost function when we apply right censoring is:
Where is the standard normal distribution cdf.
Which can be rewritten as
We prefer this formulation since computing exp(2k/mu) alone would be impracticable since the values for may be greater than , moreover there exists valid approximations of exact formulations for the logcdf and logpdf of the normal distribution.
Which can be rewritten as
Then, we can add to the gradient the following terms
(Remember that )
Gaussian
Gradient Vector
For we have:
For we have:
Since we note that in case , instead of we have to use
Hessian Matrix
Consistency check:
We have that as expected.
Right Censoring
The additional term we add to our cost function when we apply right censoring is:
Given that is the standard normal distribution pdf, we know that:
Which yields:
So
The hessian is approximated.
We can use the gaussian distribution parameters as a starting point for the Inverse Gaussian parameters.
We can use and
LogNormal
Gradient Vector
For we have:
For we have:
Since we note that in case , instead of we have to use
Hessian Matrix
Consistency check:
We have that as expected.
Right Censoring
The additional term we add to our cost function when we apply right censoring is:
Given that is the standard normal distribution pdf, we know that:
Which yields:
The hessian is approximated.