Unfit  3.1.1
Data fitting and optimization software
Public Member Functions | Private Attributes | List of all members
Unfit::Examples::CardiacAlphaN Class Reference

Fit the voltage dependence of a cardiac ion channel rate constant. More...

#include <CardiacAlphaN.hpp>

Inheritance diagram for Unfit::Examples::CardiacAlphaN:
Unfit::GenericCostFunction

Public Member Functions

 CardiacAlphaN (const std::vector< double > &vm, const std::vector< double > &alpha_n)
 
std::vector< double > operator() (const std::vector< double > &param)
 
- Public Member Functions inherited from Unfit::GenericCostFunction
virtual ~GenericCostFunction ()
 

Private Attributes

const std::vector< double > vm_
 
const std::vector< double > alpha_n_
 

Detailed Description

Fit the voltage dependence of a cardiac ion channel rate constant.

Here the goal is to fit the alpha_n rate constant as a function of the cell membrane potential (vm), given a set of experimental data (vm and alpha_n). This channel is a modified slow potassium channel from a cardiac muscle cell. The equation that has been chosen to fit the data is:

alpha_n = A / (1 + exp(B*vm + C))

The goal is to find the values of A, B & C that best fit the data. In terms of the model, A = param[0], B = param[1] and C = param[2].

Constructor & Destructor Documentation

◆ CardiacAlphaN()

Unfit::Examples::CardiacAlphaN::CardiacAlphaN ( const std::vector< double > &  vm,
const std::vector< double > &  alpha_n 
)
inline

Create the cost function. Here the experimental data must be passed in, and cannot be changed (if you want to, just create another cost function object). Here the experimental data is two vectors, membrane potential (vm) and the rate constant alpha_m.

Intended use : CardiacAlphaN cost_func(vm, alpha_n);

Parameters
vmA vector of membrane potentials
alpha_nA vector of experimental alpha_n data

Member Function Documentation

◆ operator()()

std::vector<double> Unfit::Examples::CardiacAlphaN::operator() ( const std::vector< double > &  param)
inlinevirtual

Calculate the linear distance (residuals) between our model and the data. This method encapsulates the model, and expects the current estimates of the unknown parameters as an input. See the class documentation for details about the model.

Intended use : residuals = cost_func(param)

Parameters
paramA vector containing the current estimates of the parameters we are trying to fit
Returns
A vector containing the residuals

Implements Unfit::GenericCostFunction.

Member Data Documentation

◆ alpha_n_

const std::vector<double> Unfit::Examples::CardiacAlphaN::alpha_n_
private

A vector to store the experimental rate constant, alpha_n

◆ vm_

const std::vector<double> Unfit::Examples::CardiacAlphaN::vm_
private

A vector to store the experimental membrane potential, vm


The documentation for this class was generated from the following file: