# Can LevenbergMarquardtOptimizer be constrained with bounds ?

**URL:** https://discourse.itk.org/t/can-levenbergmarquardtoptimizer-be-constrained-with-bounds/4075
**Category:** Algorithms
**Tags:** registration, optimization
**Created:** [April 26, 2021, 9:32am UTC](https://discourse.itk.org/t/can-levenbergmarquardtoptimizer-be-constrained-with-bounds/4075 "2021-04-26T09:32:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![agp](https://discourse.itk.org/letter_avatar_proxy/v4/letter/a/7ea924/32.png) [@agp](https://discourse.itk.org/u/agp)
#### Post date: [April 26, 2021, 9:32am UTC](https://discourse.itk.org/t/can-levenbergmarquardtoptimizer-be-constrained-with-bounds/4075/1 "2021-04-26T09:32:04Z")

</div>

Hello everyone,  
I have been working on registering a statistical shape model to a 3D pointset, using ITK and [statismo](https://github.com/kenavolic/statismo/tree/develop)  
I have tested multiple optimizers available in ITK to optimize a composite transform of a itk::StatisticalShapeModelTransform (from statismo) and a rigid transform (I tested both itk::Euler3DTransform and itk::VersorRigid3DTransform) and I found the constrained version of LBFGS optimizer very convenient to bound the StatisticalShapeModelTransform parameters (bounded parameters for this transform can ensure a realistic shape deformation).  
The problem is that a StatisticalShapeModelTransform is not compatible with the LBFGSB Optimizer (I got the error “ComputeJacobianWithRespectToPosition() is not implemented for StatisticalShapeModelTransform”)  
So I now work with the Levenberg Marquardt optimizer and I wonder if it is possible to pass bounds parameters to the LM optimizer, such as in LBFGSB Optimizer, in order to enhance the optimization ?  
Thanks in advance for any help/tip !
