Thread Subject: help with optimization

Subject: help with optimization

From: Akshay

Date: 8 Feb, 2012 21:24:12

Message: 1 of 2

I am currently using fminlbfgs to determine the paramters in a bspline registration. I am trying to make sure the deformation is diffemorphic by constraining the maximum deformation. is it possible to return function values through the output function?

For ex, if the current iteration has a function value > threshold, i need to return inf so that the iteration goes back one step.

Please help me regarding this.

Subject: help with optimization

From: Alan Weiss

Date: 9 Feb, 2012 15:12:21

Message: 2 of 2

On 2/8/2012 4:24 PM, Akshay wrote:
> I am currently using fminlbfgs to determine the paramters in a bspline
> registration. I am trying to make sure the deformation is diffemorphic
> by constraining the maximum deformation. is it possible to return
> function values through the output function?
>
> For ex, if the current iteration has a function value > threshold, i
> need to return inf so that the iteration goes back one step.
>
> Please help me regarding this.

I am not familiar with fminlbfgs.

But I can tell you that output functions are for observing iterations,
not changing things inside.

Generally, if you want your objective function to return a value, you
have to program the objective function to return that value. You could
have your objective function, say objfun, take two arguments, x and
threshold, and call @(x)objfun(x,threshold). See
http://www.mathworks.com/help/toolbox/optim/ug/brhkghv-7.html

Good luck,

Alan Weiss
MATLAB mathematical toolbox documentation

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com