This script proposes a new convex fitting procedure that allows the parameters estimation of a large class of stochastic Integrate-and-Fire model upgraded with spike-triggered current and moving threshold from patch-clamp experiments (i.e. given the injected current and the recorded membrane potential).
This script applies the method described in the paper to estimate the parameters of a reference model from a single voltage trace and the corresponding input current and evaluate the performance of the fitted model on a separated test set.
Mensi S, Naud R, Pozzorini C, Avermann M, Petersen CC, Gerstner W (2012) Parameter extraction and classification of three cortical neuron types reveals two distinct adaptation mechanisms. J Neurophysiol 107:1756-75 [PubMed]