comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » MPFit: changing the cost function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
MPFit: changing the cost function [message #58595] Wed, 06 February 2008 21:22 Go to next message
thomas.launey is currently offline  thomas.launey
Messages: 1
Registered: February 2008
Junior Member
Hello,

I am using Craig Markwardt's MPFit with great enjoyement but I would
like to change the way the model error is calculated. MPfit minimizes
the Chi^2 but for what I want to do, I would prefer minimizing "the
largest relative error" rather than the "mean relative error".
I haven't found any hint in the documentation about "user-defined cost
function". Shall I modify MPfit itself to add this option or did I
miss something?
Thanks,
Thomas

T. Launey
RIKEN Brain Science Institute
Re: MPFit: changing the cost function [message #58637 is a reply to message #58595] Mon, 11 February 2008 05:42 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
thomas.launey@ncm.brain.riken.jp writes:
> Hello,
>
> I am using Craig Markwardt's MPFit with great enjoyement but I would
> like to change the way the model error is calculated. MPfit minimizes
> the Chi^2 but for what I want to do, I would prefer minimizing "the
> largest relative error" rather than the "mean relative error".
> I haven't found any hint in the documentation about "user-defined cost
> function". Shall I modify MPfit itself to add this option or did I
> miss something?
> Thanks,
> Thomas
>
> T. Launey
> RIKEN Brain Science Institute

Hello, I'm afraid it's going to be harder than you suspect. The cost
function is built into the technique, namely it is *assumed* that the
cost function is the sum of the squared residuals, and this feeds
directly into the basic factorization approach taken by the code.

I suggest that you will probably want a generic optimizer. One option
is my TNMIN() code, which will max/minimize any arbitrary cost
function.

Good luck!
Craig
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: 32/19 = 1
Next Topic: sorting the chars in a string

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:13:50 PDT 2025

Total time taken to generate the page: 0.00561 seconds