linear core More...
#include <core.h>
Public Member Functions | |
linearCore (const PsiData *data=NULL, const int sigmoid=1, const double alpha=0.1) | |
construcor | |
linearCore (const linearCore &original) | |
copy constructor | |
double | g (double x, const std::vector< double > &prm) const |
evaluate the core of the sigmoid | |
double | dg (double x, const std::vector< double > &prm, int i) const |
first derivative w.r.t. parameter i | |
double | dgx (double x, const std::vector< double > &prm) const |
evaluate the first derivative of the core with respect to stimulus intensity | |
double | ddg (double x, const std::vector< double > &prm, int i, int j) const |
second derivative w.r.t. parameters i and j | |
double | inv (double y, const std::vector< double > &prm) const |
inverse of the core | |
double | dinv (double y, const std::vector< double > &prm, int i) const |
deriviative of the inverse w.r.t. parameter i | |
std::vector< double > | transform (int nprm, double a, double b) const |
transform logistic regression parameters to useful ones for this core | |
PsiCore * | clone (void) const |
clone object by value | |
Static Public Member Functions | |
static std::string | getDescriptor (void) |
get a short string that identifies the type of core |
linear core
The core of the sigmoid is simply a*x+b, where a and b are the first two parameters. This is the parameterization that would be used in the context of generalized linear models. The parameters do not have an obvious interpretation in terms of psychophysically meaningful quantities. However, it might well be that in this form, the parameters are more independent, which is particularly important for MCMC.
linearCore::linearCore | ( | const PsiData * | data = NULL , |
|
const int | sigmoid = 1 , |
|||
const double | alpha = 0.1 | |||
) | [inline] |
construcor
data | ignored | |
sigmoid | ignored | |
alpha | ignored |
double linearCore::ddg | ( | double | x, | |
const std::vector< double > & | prm, | |||
int | i, | |||
int | j | |||
) | const [inline, virtual] |
second derivative w.r.t. parameters i and j
x | stimulus intensity | |
prm | parameter vector | |
i | index of the parameter we want for the first derivative | |
j | index of the parameter we want for the second derivative |
Reimplemented from PsiCore.
double linearCore::dg | ( | double | x, | |
const std::vector< double > & | prm, | |||
int | i | |||
) | const [inline, virtual] |
first derivative w.r.t. parameter i
x | stimululs intensity | |
prm | parameter vector | |
i | index of the parameter we want the derivative to |
Reimplemented from PsiCore.
double linearCore::dgx | ( | double | x, | |
const std::vector< double > & | prm | |||
) | const [inline, virtual] |
evaluate the first derivative of the core with respect to stimulus intensity
x | stimulus intensity | |
prm | parameter vector |
Reimplemented from PsiCore.
double linearCore::dinv | ( | double | y, | |
const std::vector< double > & | prm, | |||
int | i | |||
) | const [inline, virtual] |
deriviative of the inverse w.r.t. parameter i
y | value at which the derivative of the inverse should be evaluated | |
prm | parameter vector | |
i | index of the parameter we want the derivative to |
Reimplemented from PsiCore.
double linearCore::g | ( | double | x, | |
const std::vector< double > & | prm | |||
) | const [inline, virtual] |
evaluate the core of the sigmoid
x | stimulus intensity | |
prm | parameter vector |
Reimplemented from PsiCore.
double linearCore::inv | ( | double | y, | |
const std::vector< double > & | prm | |||
) | const [inline, virtual] |
inverse of the core
y | value to be inverted | |
prm | parameter vector |
Reimplemented from PsiCore.
std::vector<double> linearCore::transform | ( | int | nprm, | |
double | a, | |||
double | b | |||
) | const [inline, virtual] |
transform logistic regression parameters to useful ones for this core
nprm | number of parameters in the whole model | |
a | intercept parameter of the logistic regression model | |
b | slope parameter of the logistic regression |
Reimplemented from PsiCore.