[Insight-developers] single valued cost function

Karthik Krishnan karthik.krishnan at kitware.com
Thu Jul 15 14:52:11 EDT 2010


On Fri, Jul 16, 2010 at 12:02 AM, Ziv Yaniv
<zivy at isis.imac.georgetown.edu>wrote:

> What was the reasoning behind having the GetValueAndDerivative and the pure
> virtual GetDerivative method in the SingleValuedCostFunction class? This
> does not accommodate non differentiable functions in a natural way.
>
> I see two options:
>
> Slight modification of the current cost function hierarchy,
> 1. Remove both methods from the SingleValuedCostFunction class.
> 2. Add a class SingleValuedCostFunctionWithDerivative adding the two
> methods and inheriting from SingleValuedCostFunction
> 3. Modify the inheritance of the direct subclasses (7 according to doxygen)
> from the old class to the new one.
>

Don't you also need to to include a similar additional hierarchy in the
optimizers, since the hierarchy of cost functions should be matched by the
space of optimizers.

There are only two kinds of cost functions : (a) single valued multivariate
(b) Multivalued multivariate cost functions. Likewise there are two kinds of
optimizers as well.

thx
--
karthik


>
> No change to code base,
> 1. Implementation of GetDerivative in a subclass that cannot compute one
> just throws an excpetion. Ugly but guaranteed to get the developers
> attention.
>
> Am I missing something? If not, I would be happy if itk-v4 adopts the first
> option.
>
>                   Ziv
>
>
> --
> Ziv Yaniv, PhD., Research Assistant Professor
> Imaging Science and Information Systems (ISIS) Center
> Department of Radiology
> Georgetown University Medical Center
> 2115 Wisconsin Avenue, Suite 603
> Washington, DC, 20007,
>
> Phone: +1-202-687-7286
> Fax: +1-202-784-3479
> email: zivy at isis.georgetown.edu
> web: http://isiswiki.georgetown.edu/zivy/
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100716/016cc677/attachment.htm>


More information about the Insight-developers mailing list