-
Notifications
You must be signed in to change notification settings - Fork 29
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
REPS / C-REPS dual function gradient #70
Comments
I don't know exactly what was the reason for that any more. Would be interesting to find out if the numerical solution is more stable or slower though. It shouldn't be too difficult to change the implementation to use the analytical solution. If you have any insight, please let us know. I will leave this issue open for now. |
I'll change the implementation and see how it affects performance and stability. When I have some insights I'll get back to you. |
Hey @AlexanderFabisch, I have done some tests comparing the performance of using the numerical vs analytical computation of the gradient of the dual function, and it seems that:
Regarding stability I have had no problems during my testing. For all the exponentials I've subtracted the maximum value so the implementation should be relatively safe. A clean implementation without any of the testing functions can be found here. Feel free to validate my results and tell me if you want me to pull request. |
That seems to be surprising to me. I would expect that it is faster because the optimizer will otherwise call the objective function multiple times to estimate the gradient. Also can't reproduce this:
Looks great.
Maybe @jmetzen remembers why we didn't implement the analytical solution?
A pull request would be awesome. Maybe we can also put some test scripts to the benchmark folder. |
That is also what I expected so I am a bit puzzled by why that is sometimes not the case.
Do you mean benchmarks for numerical vs analytical or for REPS / C-REPS in general? |
You can add those scripts that you implemented to compare the numerical and analytical gradient so that they are not lost. |
We use the analytical version of both gradients in the master now. |
When minimizing the dual function in REPS / C-REPS, why is the gradient approximated numerically rather than using the analytical expressions provided here? Is this for numerical stability?
The text was updated successfully, but these errors were encountered: