03-09-2010 10:56 AM
If the difference is > 5000, generate an error inside the model and the fitting procedure will stop.
Let me know if you need help with all that. 😉
03-09-2010 02:10 PM
Hi altenbach,
Thanks very much.
I am unclear about the logic of your suggestion. Isn't my model function called once for every iteration of the L-M algorithm?
Will this work?
How do I generate an error inside the model function? It has no error clusters.
Thanks again.
03-09-2010 02:44 PM
Actually the L-M VI has an error out cluster.
Still unsure about the logic of your suggestion. Please explain.
03-09-2010 02:53 PM
This arrangement terminates too early. The two tick values are almost identical but when I subtract them I get a huge number which is obviously much greater than 5000. Please have a look and let me know what I'm doing wrong.
Notice my model function contains an infinite sum (while loop).
03-09-2010 03:00 PM
Switch the inputs of the subtract function. 🙂
(You need to subtract the "new tick count" from the "start tick count", and not vice versa.)
03-09-2010 03:18 PM
altenbach wrote:(You need to subtract the "new tick count" from the "start tick count", and not vice versa.)
03-09-2010 03:26 PM
battler. wrote:Notice my model function contains an infinite sum (while loop).
OK, this is probably a problem. Since you are terminating the inner loop based on a tolerance, the partial derivatives calculation will probably be suspect.
The model calculation as a function of parameter value is not a smooth function but will look more like a stair steps. You should probably calculate your own partial derivatives inside the model function to deal with this.
03-09-2010 07:18 PM
How to calculate/implement the partial derivatives?
Do I have to do it analytically? That could be a problem 😉 Can I do it numerically? If so, how??
The function appears to return a correct fit of the parameters although there are numerous occasions when it can't solve and/or returns huge parameter values.
Thanks for your assistance.
03-09-2010 07:31 PM
03-09-2010 11:10 PM
Thanks Darin, I appreciate that.
Can you please explain in more simple terms what you've done?
It looks like you may have implemented the partial derivatives (numerically?). Did you work them out analytically?
I need to verify what you've done.