-
Notifications
You must be signed in to change notification settings - Fork 128
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
Can theseus return negative cost? #501
Comments
Hi @Jeff09. Most of our optimizations methods assume a nonlinear least squares formulation, and won't work with a different cost function aggregation metric. That being said, you can try our differentiable CEM solver, which supports other error metrics. You can change the default sum of squares by passing a different value here. Let me know if this helps. |
Hi @luisenp , Thank you for your advice. I have tried to change the default sum of squares to just sum of error vector. I can get the negative cost by using the sum vector function. However, it seems the optimizer is not working as it should be. The optimizer is not decreasing the cost but increasing the cost. By the way, I'm using The error after 1st iteration is following. I have two questions regarding this.
Thank you so much. |
There's not error happened when I tried I have tried DCEM and it looks not optimization happens. It only shows the 0th iteration error and not any further iterations error printed even though I have already set Here's the code I tried
|
@luisenp Here's the output using DCEM. It only has 2 steps optimization when I change the |
Ah, there was a bug in DCEM affecting negative costs. Fixed in #510. Can you check if with this fix it works for your use case now? Thanks for reporting this! |
Hi @luisenp, thanks for the quick fix. It works now and can generate some optimization after 50 iterations. However, it looks not easy to find a good solution after i have tried different hyper parameters. Here's the sample err. It looks the error variance is too large to converge. Could you give me some advices on how to use DCEM? |
Are your cost functions bounded below? |
Perhaps @dishank-b @bamos can also provides some tips for using DCEM. |
@Jeff09 the error seems to be still going down, can you just try with higher |
@Jeff09 The error seems to be converging, even if slowly. DCEM is a random method, so it's not surprising that the error can increase between iterations; but by the 100th iteration your image shows that it's definitely much lower than the initial error. You should play with the hyperparameters a bit to see what works best for your application. Lowering Now, regarding the comment of going to the next point, the expected behavior between different calls to the optimizer is application specific. Some questions I would consider:
Overall, countess parameters can affect what happens between different calls to the optimizer, and unfortunately there is really not much we can advise without knowing more details about your application. |
❓ Questions and Help
Hi theseus team,
I'm currently using theseus to solve some non-linear optimization problem. In my case, some cost function will return negative cost. However, in the objective, it'll default calculate the square of cost, making the negative gradient direction become the positive one. I wonder if there's any methods to handle this case.
Thank you so much.
The text was updated successfully, but these errors were encountered: