Page 1 of 1

MRF to optimize parameters for spiking rates

Posted: Wed May 28, 2008 7:23 pm
by etano
I was wondering if was possible to use MRF to optimize parameters that affect spiking rates. Everything I have seen has optimized parameters for a single potential or current or conductance, but would MRF allow optimization for other cumulative effects like epsp's. Say, for example, you have an experimental orientation tuning curve you which to match, and the parameters you can adjust include inhibitory and excitatory weights.

Posted: Thu May 29, 2008 11:25 am
by ted
The key is to recast the problem as a function fitting exercise. To do this, define a function

Code: Select all

func ffreq() {
  run a simulation in which you capture the spike times to a Vector
  from the recorded spike times, calculate the firing frequency
  return the firing frequency

Posted: Fri May 30, 2008 2:13 pm
by etano
Alright, I am able to do this. The model now has a function freq() which when you pass it the orientation of a stimulus (a thin bar), returns a firing rate. Now how do I tell MRF that this is the function I wish to optimize against experimental data?

Posted: Fri May 30, 2008 4:32 pm
by ted
Same way you'd deal with any other function. If you're rusty on this, breeze through
Tutorial 1 : optimizing a function ... /main.html
to get an overview of the whole process.

For your particular problem, everything would be the same as in the tutorial, up to
Step 3. Specify the function we want to optimize. I suppose you have a table with
several pairs of data e.g.
orientation firing_rate
that you're going to get into NEURON's "clipboard" and then "paste" into the fitter.
Remember that, for each such pair, you're going to be executing a complete simulation
and calculating a firing rate. So during the development & debugging phase of setting
things up, you'll want to limit the number of data pairs--otherwise, each iteration of the
MRF is going to be quite slow. After you have things working properly, and you're ready
for it to do the "real job," you can come back and paste a more complete data set into the

Anyway, when you get to Step 3, instead of
Fitness / Common Functional Forms / etc.
you'd select
Fitness / Expression with $1
and then enter
into the edit field of the dialog box.

Then carry on with the remaining steps as per the tutorial (i.e. specify the parameters
that you wish to adjust, etc.).

Posted: Tue Jun 03, 2008 5:38 pm
by etano
Alright, so everything is working quite well. A question however...

I am making copies of a neuron several times, thus I am using the modelTemplate. When I am using the MRF, I like to be able to see the voltage at the soma of one of these cells. Thus I plot cell[0].soma.v(.5). This works fine. However, when I save my session, close it, and reopen it, NEURON gives me the error that cell[0] is not an array variable and it refuses to bring up the voltage graph. What is happening here and how can I fix it?

Posted: Tue Jun 03, 2008 8:38 pm
by ted
The ses file is being read before the specific cell instance exists. Defer reading of the ses
file until the cell exists.