[Insight-users] xxxxxSPAMxxxxx Cost Function Definition

Iván Macía imacia at vicomtech.org
Thu Jul 22 10:16:47 EDT 2010


Hi Rocío,

MulipleValuedCostFunction is just a generic virtual base class for cost
functions whose value is not a single scalar but a vector (or something you
can put in the form of a vector). In fact it defines a return value that is
a variable size Array, the size is defined by the actual cost function
implemented (in the virtual GetNumberOfValues() ). I ignore which function
you mention (CumulativeGaussianCostFunction maybe) but that is just a
derived class.

Are you sure you need a MultipleValuedCostFunction? Is that a vector or
matrix formula? I guess it is.

In order to define your cost function you need to reimplement:

GetValue() return cost function value given parameters
GetNumberOfParameters() (3 in your case A, a and b)
GetNumberOfValues() (this is the size of the return array of computed
values)
GetDerivative() compute derivative given parameters. You may leave the
implementation empty if your optimizer does not use derivatives

Best regards

Iván


-----Mensaje original-----
De: insight-users-bounces at itk.org [mailto:insight-users-bounces at itk.org] En
nombre de RCL
Enviado el: jueves, 22 de julio de 2010 15:13
Para: insight-users at itk.org
Asunto: [Insight-users] xxxxxSPAMxxxxx Cost Function Definition


Hello,

I'm new using ITK and I'm trying to model the temporal intensity variations
in contrast enhanced MR images. The function of the model has been already
defined and I need to minimize a cost function to obtain the model
parameters that best fit my data. I want to use the
itk::LevenbergMarquardtOptimizer to minimize my cost function. I know that
the SetCostFunction requires a variable of the type of
MultipleValuedCostFunction, but from what I've read, these functions are
only a sum of Gaussians (please correct me if this is not the case). Is
there any way I can define a cost function with this form:

sin(pi/2 - atan(A/(2*a - 2*b)*(a*exp(-a*(t + 1/A/(a*exp(-a*t) -
b*exp(-b*t))*(I + A/(a - b)*(exp(-a*t) - exp(-b*t)))*(a - b))) - b*exp(-b*(t
+ 1/A/(a*exp(-a*t) - b*exp(-b*t))*(I + A/(a - b)*(exp(-a*t) - exp(-b*t)))*(a
- b)))) + A*(a*exp(-a*t) - b*exp(-b*t))/(2*a - 2*b)))*(I + (A*(1/exp(a*t) -
1/exp(b*t)))/(a - b))

in order to obtain the model parameters "A", "a" and "b" ? 

Thanks,

RCL
-- 
View this message in context:
http://itk-insight-users.2283740.n2.nabble.com/Cost-Function-Definition-tp53
25258p5325258.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
_____________________________________
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://www.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-users



More information about the Insight-users mailing list