Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the calculation of **rho** in step_lm() seems wrong #148

Open
QiMingZhenFan opened this issue Feb 2, 2024 · 2 comments
Open

the calculation of **rho** in step_lm() seems wrong #148

QiMingZhenFan opened this issue Feb 2, 2024 · 2 comments

Comments

@QiMingZhenFan
Copy link

Thanks for the wonderful work!!

When I read the source code, I was confused by the calculation of rho in this line. I'll paste it here.

double rho = (y0 - yi) / (d.dot(lm_lambda_ * d - b));

However, because we want to evaluate the similarity between the original model and the approximate model, I think the correct formula should be as follows:

double rho = (y0 - yi) / (d.dot((H + lm_lambda_ * Eigen::Matrix<double, 6, 6>::Identity()) * d + 2 * b)) * (-1.0);

I will attach my proof here.

screenshot-20240202-175119

@koide3
Copy link
Owner

koide3 commented Feb 4, 2024

Thank you for reporting this issue.
I simply implemented the algorithm appear in Fig.1 in this paper, and I suppose rho is derived with some approximations. Although the formula you provided may be better, I'm not very sure. Note that this part brings only a very small difference in convergence speed.

@QiMingZhenFan
Copy link
Author

QiMingZhenFan commented Feb 4, 2024

Thanks for the reply! Seems I should have a look at that paper :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants