fitAlgs.qualityFunc module¶
fitAlgs.qualityFunc Module¶
Author: | Dominic Hunt |
---|
Functions¶
BIC2 (**kwargs) |
Generates a function that calculates the Bayesian Information Criterion (BIC) | ||||
BIC2norm (**kwargs) |
|
||||
BIC2normBoot (**kwargs) |
An attempt at looking what would happen if the samples were resampled. | ||||
WBIC2 (**kwargs) |
Unfinished WBIC implementation | ||||
bayesFactor (**kwargs) |
:math:`2^{ | ||||
bayesInv (**kwargs) |
|
||||
bayesRand (**kwargs) |
|||||
logAverageProb (modVals) |
Generates a fit quality value based on \(\sum -2\mathrm{log}_2(\vec x)\) | ||||
logeprob (modVals) |
Generates a fit quality value based on :math:`f_{mathrm{mod}}left(vec x | ||||
logprob (modVals) |
Generates a fit quality value based on :math:`f_{mathrm{mod}}left(vec x | ||||
maxprob (modVals) |
Generates a fit quality value based on \(\sum 1-{\vec x}\) | ||||
qualFuncIdent (value, **kwargs) |
|||||
r2 (**kwargs) |
|||||
simpleSum (modVals) |
Generates a fit quality value based on \(\sum {\vec x}\) |
Author: | Dominic Hunt |
---|
-
fitAlgs.qualityFunc.
BIC2
(**kwargs)[source]¶ Generates a function that calculates the Bayesian Information Criterion (BIC)
:math:`lambda mathrm{log}_2(T)+ f_{mathrm{mod}}left(vec x
ight)`
kwargs
-
fitAlgs.qualityFunc.
BIC2norm
(**kwargs)[source]¶ Parameters: - numParams (int, optional) – The number of parameters used by the model used for the fits process. Default 2
- qualityThreshold (float, optional) – The BIC minimum fit quality criterion used for determining if a fit is valid. Default 20.0
- number_actions (int or list of ints the length of the number of trials being fitted, optional) – The number of actions the participant can choose between for each trialstep of the task. May need to be specified for each trial if the number of action choices varies between trials. Default 2
- randActProb (float or list of floats the length of the number of trials being fitted. Optional) – The prior probability of an action being randomly chosen. May need to be specified for each trial if the number
of action choices varies between trials. Default
1/number_actions
-
fitAlgs.qualityFunc.
BIC2normBoot
(**kwargs)[source]¶ An attempt at looking what would happen if the samples were resampled. It was hoped that by doing this, the difference between different sample distributions would become more pronounced. This was not found to be true.
Parameters: - numParams (int, optional) – The number of parameters used by the model used for the fits process. Default 2
- qualityThreshold (float, optional) – The BIC minimum fit quality criterion used for determining if a fit is valid. Default 20.0
- number_actions (int or list of ints the length of the number of trials being fitted, optional) – The number of actions the participant can choose between for each trialstep of the task. May need to be specified for each trial if the number of action choices varies between trials. Default 2
- randActProb (float or list of floats the length of the number of trials being fitted. Optional) – The prior probability of an action being randomly chosen. May need to be specified for each trial if the number
of action choices varies between trials. Default
1/number_actions
- numSamples (int, optional) – The number of samples that will be randomly resampled from
modVals
. Default 100 - sampleLen (int, optional) – The length of the random sample. Default 1
-
fitAlgs.qualityFunc.
bayesInv
(**kwargs)[source]¶ Parameters: - numParams (int, optional) – The number of parameters used by the model used for the fitters process. Default 2
- qualityThreshold (float, optional) – The BIC minimum fit quality criterion used for determining if a fit is valid. Default 20.0
- number_actions (int or list of ints the length of the number of trials being fitted, optional) – The number of actions the participant can choose between for each trialstep of the task. May need to be specified for each trial if the number of action choices varies between trials. Default 2
- randActProb (float or list of floats the length of the number of trials being fitted. Optional) – The prior probability of an action being randomly chosen. May need to be specified for each trial if the number
of action choices varies between trials. Default
1/number_actions
-
fitAlgs.qualityFunc.
logAverageProb
(modVals)[source]¶ Generates a fit quality value based on \(\sum -2\mathrm{log}_2(\vec x)\)
Returns: fit – The sum of the model values returned Return type: float
-
fitAlgs.qualityFunc.
logeprob
(modVals)[source]¶ - Generates a fit quality value based on :math:`f_{mathrm{mod}}left(vec x
ight) = sum -mathrm{log}_e(vec x)`
- fit : float
- The sum of the model values returned
-
fitAlgs.qualityFunc.
logprob
(modVals)[source]¶ - Generates a fit quality value based on :math:`f_{mathrm{mod}}left(vec x
ight) = sum -2mathrm{log}_2(vec x)`
- fit : float
- The sum of the model values returned