# IZH model parameter manipulation

**URL:** <https://brian.discourse.group/t/izh-model-parameter-manipulation/595>\
**Category:** Science, Projects, and Showcases\
**Created:** [2 February 2022 01:44 UTC](https://brian.discourse.group/t/izh-model-parameter-manipulation/595 "2022-02-02T01:44:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lann591](https://avatars.discourse-cdn.com/v4/letter/l/97f17d/32.png) [@lann591](https://brian.discourse.group/u/lann591)\
**Post date:** [2 February 2022 01:44 UTC](https://brian.discourse.group/t/izh-model-parameter-manipulation/595/1 "2022-02-02T01:44:05Z")

</div>

So I have been trying to change the parameters I am using in my IZH neuron for a RS neuron, so that the behaviour matches that of a pre-modelled cortical excitatory neuron (MPE). I changed the variables a and the threshold, which made it resemble the MPE neuron more, but the MPE neuron resets to around -47mV and when I change the reset value c I get some weird behaviour. Here are some pictures showing what I am talking about:

 ![Screen Shot 2022-02-02 at 2.34.57 PM](https://global.discourse-cdn.com/free1/uploads/brian/original/1X/0b9bcc117846a80a8de83b8846ec58374e689742.png)  
But when I change c from -65mV to -47mV I get the following:  
 ![Screen Shot 2022-02-02 at 2.39.36 PM](https://global.discourse-cdn.com/free1/uploads/brian/original/1X/53d708271c96b6a165f97d4b997d7bf311c4d3d5.png)

Anyone have any solutions to this? Thanks!

---

<div class="post-metadata">

**Author:** ![adam](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/adam/32/197_2.png) [@adam](https://brian.discourse.group/u/adam)\
**Post date:** [2 February 2022 15:52 UTC](https://brian.discourse.group/t/izh-model-parameter-manipulation/595/2 "2022-02-02T15:52:07Z")

</div>

I’ll throw out a collection of random thoughts on the topic, but probably the most effective thing to do is look for papers fitting Ihzikevich models to data. (it looks like you’ve already started that process from other threads here).

- you could throw **black-box optimization** at the problem.
  - something like [MATLAB’s optimization toolbox](https://www.mathworks.com/products/optimization.html) would give you an interactive, tunable way to do this. I don’t have much experience with doing this in python, but this looks like it might be helpful - [PyGAD](https://pygad.readthedocs.io/en/latest/)
  - one of the major challenges here will be specifying the right cost function to optimize. You might consider objectives which include getting the overall firing rate correct, as well as “spike-distance” metrics which try to line up precise spike times. (this [scholarpedia article](http://www.scholarpedia.org/article/Measures_of_spike_train_synchrony) covers several popular examples)

- you could perform **parameter sweeps** to find, empirically, some patterns of spiking which look qualitatively similar to your cortical neuron
- you could construct a **phase-plane visualization** in order to get better insight into the relationship between key parameters and qualitative behaviors of the model
  - here are [some lecture notes](https://labs.seas.wustl.edu/bme/raman/Lectures/Lecture4_SimplerModels.pdf) covering phase-plane reductions of the hodgkin-huxley models, but I seem to recall there being several papers and maybe even a textbook chapter or two on doing this with the izhikevich equations
  - this kind of approach is especially useful at explaining phenomena like “why does this model neuron spike twice before dipping back down”

_a bonus, random hunch:_ The voltage cortical model dips down to before jumping up is not solely a function of the reset voltage. To me, it looks like the voltage is being “buoyed up” by the input current, so another way to lift that baseline might be to increase the stimulus sensitivity b. Also your cortical model voltage seems to decay quite slowly compared to the izhikevich, which may mean decreasing the decay rate a

---

<div class="post-metadata">

**Author:** ![rth](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/rth/32/16_2.png) [@rth](https://brian.discourse.group/u/rth)\
**Post date:** [2 February 2022 22:28 UTC](https://brian.discourse.group/t/izh-model-parameter-manipulation/595/3 "2022-02-02T22:28:34Z")

</div>

@lann591 correct me if I’m wrong. You want to reproduce the recording of a real MPE neuron (left on the screenshot) using the Izhikevich model (right on the screenshot). Is that right?

If so, I doubt that is possible without changing three other “baked-in” parameters, namely 0.04, 5., and 140. The problem is that after the voltage crosses ~ -40 mV, the dynamics drive it into infinity, the reset catches it at the “threshold” level, and set to some low voltage. So spike downstroke is always instant (one simulation step) in this model. There is no way to have slow, lovely voltage decay as in the MPE recording.

---

<div class="post-metadata">

**Author:** ![mstimberg](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/mstimberg/32/11_2.png) [@mstimberg](https://brian.discourse.group/u/mstimberg)\
**Post date:** [3 February 2022 09:47 UTC](https://brian.discourse.group/t/izh-model-parameter-manipulation/595/4 "2022-02-03T09:47:37Z")

</div>

Agreeing with all that has been said. In case you want to fit a model, of course the `brian2modelfitting` library might come handy 🙂 . But as @rth pointed out, you cannot really use the Izhikevich model (or similar I&F models) to fit the details of a membrane potential trace. This is even evident in Izhikevich’s examples, e.g. in Fig. 1 of [Izhikevich (2003)](https://ieeexplore.ieee.org/document/1257420/) – the experimental recording of the RS neuron has a much lower resting potential compared to the model. On the other hand, these types of models can be used to fit the _spiking_ response. I don’t know the paper you linked in [Implementation of Izhikevich neuron model - #16 by lann591](https://brian.discourse.group/t/implementation-of-izhikevich-neuron-model/578/16), but it seems that they did only that, i.e. recreate ISIs.
