Page 1 of 1

Minimizing the error in praxis

Posted: Sat Oct 02, 2010 7:35 am
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?

Re: Optimizing a model

Posted: Sat Oct 02, 2010 3:56 pm
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.

Re: Minimizing the error in praxis

Posted: Sun Oct 03, 2010 4:08 am
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

Re: Minimizing the error in praxis

Posted: Sun Oct 03, 2010 7:14 am
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.