I know that Newton's method has the following formula:
$$f_{t+1} (x)= f_{t}(x)-f'(x)/f''(x)$$
The source code at the end of the post seems to use the following construction instead: $$f_{t+1} (x)= f_{t}(x)-f'(x)/(f''(x)* c +f'(x))$$
I wanted to figure out the property of this optimization, but I cannot look up what this is because I do not know if this thing has a name for it. What is this modified newton's method called?
The below is the source code and I marked where the newton method occurs.
double alhood(double a, double ss, int D, int K)
{ return(D * (lgamma(K * a) - K * lgamma(a)) + (a - 1) * ss); }
double d_alhood(double a, double ss, int D, int K)
{ return(D * (K * digamma(K * a) - K * digamma(a)) + ss); }
double d2_alhood(double a, int D, int K)
{ return(D * (K * K * trigamma(K * a) - K * trigamma(a))); }
double opt_alpha(double ss, int D, int K)
{
double a, log_a, init_a = 100;
double f, df, d2f;
int iter = 0;
log_a = log(init_a);
do
{
iter++;
a = exp(log_a);
if (isnan(a))
{
init_a = init_a * 10;
printf("warning : alpha is nan; new init = %5.5f\n", init_a);
a = init_a;
log_a = log(a);
}
f = alhood(a, ss, D, K);
df = d_alhood(a, ss, D, K);
d2f = d2_alhood(a, D, K);
log_a = log_a - df/(d2f * a + df); ####<-------HERE
printf("alpha maximization : %5.5f %5.5f\n", f, df);
}
while ((fabs(df) > NEWTON_THRESH) && (iter < MAX_ALPHA_ITER));
return(exp(log_a));
}
Note that your iteration reads $$ \ln(a_+)=\ln(a)-\frac{f'(a)}{f''(a)·a+f'(a)} $$ when ultimately you want to find solutions to $f'(a)=0$.
Set $x=\ln(a)$, and consider the function $$g(x)=f'(e^x)·e^{α·x}.$$ The derivative of $g$ is $$g'(x)=f''(e^x)·e^{(1+α)·x}+α·f'(e^x)·e^{α·x}$$ and the corresponding Newton method $$ x_+=x-\frac{f'(e^x)}{f''(e^x)·e^x+α·f'(e^x)}\ \text{ or }\ \ln(a_+)=\ln(a)-\frac{f'(a)}{f''(a)·a+α·f'(a)} $$ Since the additional factor is always positive the root set does not change, $0=g(\ln a)$ has the same solutions as $0=f'(a)$. The formula from the algorithm results for $α=1$.