Question on cost

80 views
Skip to first unread message

Alessandro Dal Grande

unread,
Sep 9, 2015, 10:48:09 PM9/9/15
to Ceres Solver
Hi, I was just looking at a non-linear optimization report and the reported cost is different from what I see when debugging:









Solver Summary (v 1.10.0-no_lapack-no_openmp)




                                     Original                  Reduced


Parameter blocks                            1                        1


Parameters                                  2                        2


Residual blocks                             1                        1


Residual                                    1                        1




Minimizer                        TRUST_REGION




Dense linear algebra library            EIGEN


Trust region strategy     LEVENBERG_MARQUARDT




                                        Given                     Used


Linear solver                        DENSE_QR                 DENSE_QR


Threads                                     1                        1


Linear solver threads                       1                        1




Cost:


Initial                          1.795629e+07


Final                            1.787265e+07


Change                           8.363425e+04




Minimizer iterations                       21


Successful steps                            7


Unsuccessful steps                         14




Time (in seconds):


Preprocessor                           0.0001




  Residual evaluation                  0.0000


  Jacobian evaluation                  0.0009


  Linear solver                        0.0003


Minimizer                              0.0014




Postprocessor                          0.0000


Total                                  0.0015




Termination:                      CONVERGENCE (Function tolerance reached. |cost_change|/cost: 8.800459e-07 <= 1.000000e-06)


When I debug, I have one residual of size 1, and the initial value I see is around 5000, while the final is around 4000. Why is the reported cost so different?

Thanks

Sameer Agarwal

unread,
Sep 9, 2015, 11:21:35 PM9/9/15
to Ceres Solver

Alessandro,
I do not quite understand your question. Can you elaborate please?


--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/b88e7877-2f8e-4928-b4d5-dd4e8e04b338%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alessandro Dal Grande

unread,
Sep 9, 2015, 11:29:06 PM9/9/15
to Ceres Solver
Hi Sameer,

it might be due to my lacking knowledge, but isn't the cost the sum of residuals? If I know that the (only) residual starts from ~5*10^3, how comes the report says ~17*10^6?

Thanks

Sameer Agarwal

unread,
Sep 9, 2015, 11:47:49 PM9/9/15
to Ceres Solver

No the cost is 1/2 times the sum of squared residuals.

Sameer


Alessandro Dal Grande

unread,
Sep 10, 2015, 12:01:41 AM9/10/15
to Ceres Solver
Ah totally forgot that. Thanks!
Reply all
Reply to author
Forward
0 new messages