Parameter bounds and numerical differentiation

22 views
Skip to first unread message

Zhian Guo

unread,
Jun 5, 2025, 10:11:34 PMJun 5
to Ceres Solver
I am using LM trust-region method and using ParameterLowerBound and UpperBound for parameters.    It looks like the when ceres evaluate cost at out of bound parameters the parameters are being clipped.   Does it mean that numerical differentiation will produce incorrect values at or near the boundary?   
For now some of my cost functions are using numerical diff.  Is it advised to switch them to analytical or auto-diff cost functions?
Thanks

Sameer Agarwal

unread,
Jun 5, 2025, 10:59:28 PMJun 5
to ceres-...@googlegroups.com
Yes this is a known problem with numerical differentiation. Because of the structure of NumericDiffCostFunction there is no easy way to enforce the bounds constraints.

Sameer 

--
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 visit https://groups.google.com/d/msgid/ceres-solver/3f72765d-5797-44e5-8c37-870b5fcd538cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages