Chapter 9.1 Parameter Fitting

9.0 Fitting overview

9.2 Fitting experimental curves with models

9.3 Evaluating fitting routines

Generating Analytic Functions

When this option is chosen, a panel appears with a single exponential decay as the default function with default parameter values of unity; the curve is plotted in the graphic window below the control panel. One may immediately see the effect of changing the parameter values.

Several common analytic functions are available via a cursor click on "Fit to Data"
followed by the selection of "Common Functional Forms"
Selection of one of these immediately brings in "Args" (Arguments) and a "Y-expr" (Yexpression) into their respective fields. Alternatively one may write an arbitrary function in the "Y-expr" field, and naming the arguments in the "Args" field.

There are several useful options available already. From the "Print & File Manager Window":

Fitting Data with Analytic Functions

Fitting of data files with analytic functions is simple and straight forward with the facilities contained in this panel. As the fitting takes place, the analytic function curve changes as well as the currently used parameter values.

Illustration of Generation and Fitting Exponential Decays

I have illustrated the use of these features by reproducing the exponential curves used earlier in the discussion fitting difficulties in Chap. 3. Professional Style. The steps involved were to:

  1. Choose a Double Exponential from the common forms menu
  2. Add an additional term to the Y-expression and Arguments. (Of course I could have written out the whole expression de novo)
  3. Set the parameter values as in the previous example
  4. Save this curve in a data file (filename.dat) by choosing "Print to file" (in the Print & File Window Manager) and then the Ascii format.
  5. Edit the file so that the header (first line) to remove text and leave only the number of points in the curve (as pairs of y & t).
  6. Read that data file back in via the "Fit to Data" and "Read Data File" buttons.
  7. Select Double Exponential from the common forms menu
  8. Select "Fit to Data" and going with the "Simplex" fitting routine The result to these operations is shown here where on can see that the best fitting double exponential parameters found were the same as those shown previously in Chap. 3.

    Other Examples using HH

    Other examples of parameter fitting have been added to illustrate finding the parameters of curves where the data are of a known form (as in the HH equations).

    m-infinity. In the Hodgkin-Huxley expression for the sodium conductance the values of the steady state of "m" ("hh_minf" in NEURON) were generated by NEURON. The curve was saved as a Ascii file and edited for importation into the "Run Fitter". When the "Read Data File" option under the "Fit to Data" button was selected, and the minf.dat file chosen, the points in the curve below appeared. "Double Boltzman" was selected from the 'Common Forms" submenu as the expression to fit this data. It was clear that adjustment of the parameters A & k would not provide a fit. Therefore a voltage shift was added to the 'Args" and "Y-expr" fields. Thus when a "Fit Data" selection was made, the Two-state Boltzman expression provided a very nice fit.

    Kinetics of m. Similarly a curve of m^3 as a function of time was generated under NEURON, saved as an Ascii file, and imported into the Parameterized Fitter. Here the "Y-expr" chosen was a first order lag (from the 'Common Forms" submenu) and the third power was entered with the field editor. When the Fit to Data selection was made a rather clean fit was obtained.

    Back to:

    9.0 Fitting Overview

    On to:

    9.2 Fitting experimental curves with models

    9.3 Evaluating fitting routines