[Insight-users] How to set my own cost function for optimizer?

Feng Ding carlding at gmail.com
Mon Apr 3 15:03:00 EDT 2006


Hi Luis,

Thanks. I noticed that for optimizers such as gradient descent and LM, we
are required to explicitly write GetDerivative() function. However,
sometimes, the cost function is very complicated, and it's almost impossible
to formulate such a derivative explicitly. Now, my question is, under such
circumstance, what can we do?

Best regards,
Carl DING

On 4/3/06, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>
>
> Hi Carl,
>
> You will find examples on how to set your own cost functions
> to ITK optimizers by looking at the tests in the directory:
>
>        Insight/Testing/Code/Numerics/
>            itkAmoebaOptimizerTest.cxx
>            itkConjugateGradientOptimizerTest.cxx
>            itkCumulativeGaussianOptimizerTest.cxx
>            itkExhaustiveOptimizerTest.cxx
>            itkFRPROptimizerTest.cxx*
>            itkGradientDescentOptimizerTest.cxx
>            itkLBFGSBOptimizerTest.cxx
>            itkLBFGSOptimizerTest.cxx
>            itkLevenbergMarquardtOptimizerTest.cxx
>            itkOptimizersHierarchyTest.cxx
>            itkPowellOptimizerTest.cxx*
>            itkRegularStepGradientDescentOptimizerTest.cxx
>            itkSPSAOptimizerTest.cxx
>            itkVersorRigid3DTransformOptimizerTest.cxx
>            itkVersorTransformOptimizerTest.cxx
>
>
>
> All of them set customized cost functions that are different
> from the ImageMetrics used in the registration framework.
>
>
>     Regards,
>
>
>        Luis
>
>
> -------------------
> Feng Ding wrote:
> > Dear all,
> >
> > My question is how to set my own cost function (eg. f(x,y)=x^2+y^2) for
> > an optimizer. I hope to run the optimization process separately, not in
> > the image to image registration framework. Thank you!
> >
> > Best regards,
> > Carl DING
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060403/09af3f0b/attachment.html


More information about the Insight-users mailing list