techoe / ceres-solver

Automatically exported from code.google.com/p/ceres-solver
Other
0 stars 0 forks source link

conditioned functions #151

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. trying to use conditioned functions

What is the expected output? What do you see instead?
expected:
iter      cost      cost_change  |gradient|   |step|    tr_ratio  tr_radius  
ls_iter  iter_time  total_time
   0  4.512500e+01    0.00e+00    9.50e+00   0.00e+00   0.00e+00  1.00e+04       0    2.99e-04    1.04e-03
   1  4.511598e-07    4.51e+01    9.50e-04   9.50e+00   1.00e+00  3.00e+04       1    3.84e-04    9.72e-03
   2  5.012552e-16    4.51e-07    3.17e-08   9.50e-04   1.00e+00  9.00e+04       1    2.98e-05    9.92e-03
Ceres Solver Report: Iterations: 2, Initial cost: 4.512500e+01, Final cost: 
5.012552e-16, Termination: CONVERGENCE
x : 0.5 -> 10

got:
Ceres Solver Report: Iterations: 0, Initial cost: 4.072531e+03, Final cost: 
4.072531e+03, Termination: CONVERGENCE
x : 0.5 -> 0.5

What version of the product are you using? On what operating system?
Ceres : 1.9
Xubuntu : 14.04

Please provide any additional information below.

I was developing a logistic regression (the residuals are > 0 ), I do not want 
residuals to be squared.
I modified the helloword example to show how I used the ConditionedCostFunction

Original issue reported on code.google.com by Pierre.d...@gmail.com on 29 Aug 2014 at 6:41

Attachments:

GoogleCodeExporter commented 9 years ago
You need to update the jacobian in your condition function. you are only 
updating the residuals vector. So the solver does not see jacobian at all and 
thinks it has converged.

Original comment by sameerag...@google.com on 29 Aug 2014 at 8:10