Minimizing the error in praxis

Using the Multiple Run Fitter, praxis, etc..
Post Reply
kidd
Posts: 11
Joined: Sat Oct 02, 2010 7:18 am

Minimizing the error in praxis

Post by kidd »

Hi
i want to fit a model and i want to restrict the amount of the error so that the Praxis stop the fitting when it reachs that amount of error. how can i do that?
Last edited by kidd on Sun Oct 03, 2010 4:33 am, edited 1 time in total.
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Optimizing a model

Post by hines »

If you are using fit_praxis directly,
http://www.neuron.yale.edu/neuron/stati ... fit_praxis
you can register a callback function by specifying a hoc statement as a string in the
4th argument (I see this is undocumented and I need to update the help file). This statement will be executed at the end of each quad form computed by praxis.
In this way you can decide when you want praxis to stop and then call
http://www.neuron.yale.edu/neuron/stati ... top_praxis

If you are using the multiple run fitter then copy the hoc library file, nrn/lib/hoc/mulfit.hoc to your
project directory (now the copied file will be loaded instead of the library file) along with the
folder nrn/lib/hoc/mulfit and modify the
proc after_quad() {
procedure in the fitparm.hoc file.
kidd
Posts: 11
Joined: Sat Oct 02, 2010 7:18 am

Re: Minimizing the error in praxis

Post by kidd »

thank you
is there anyway using GUI instead of code writing? im not familier with that!
-- can i use a function to minimize the error? like some famous error functions (SSE,...) i mean like the MRF i insert a function in Neuron and that function controls the amount of error in praxis
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Minimizing the error in praxis

Post by hines »

Yes. Specify your function to the
MulRunFitter/Generators/AddFitnessGenerator/AddFitnessPrimitive
but that still requires you to specify the "FitnessPrimitive" using programming
and you would have to use the stop_praxis() function within that function to request it to stop.
Post Reply