remeta.modelspec.Parameter
Definition of ReMeta parameter
Usage
The Parameter class should only be used in the context of a
Configuration instance. This ensures that sensible defaults are used
for unspecified attributes of the parameter.
cfg = remeta.Configuration()
Disable parameter: cfg.param_type1_bias.enable = 0
Enable parameter: cfg.param_type1_tresh.enable = 1
Change the initial guess: cfg.param_type1_noise.guess = 0.8
Change parameter bounds: cfg.param_type1_noise.bounds = (1e-2, 2)
Change values visited during grid search: cfg.param_type1_noise.grid_range = np.arange(0.1, 0.5, 0.05)
Make a parameter a group-level (e.g. random-effects) parameter: cfg.param_type1_thresh.group = 'random'
Create a parameter prior with (mean, SD): cfg.param_type1_bias.prior = (0, 0.1)
Change the noise distribution: cfg.param_type1_noise.model = 'logistic'
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enable
|
int
|
|
None
|
guess
|
float
|
Initial guess for parameter optimization |
None
|
bounds
|
tuple[float, float]
|
Parameter bounds of the form (lower bound, upper bound). |
None
|
grid_range
|
list[float] | NDArray[float]
|
1-d grid for initial gridsearch in the parameter optimization procedure. |
None
|
group
|
None | str
|
|
None
|
prior
|
None | tuple[float, float]
|
|
None
|
preset
|
None | float
|
(not yet supported) Instead of fitting a parameter, set it to a fixed value. Note that this automatically disables the parameter, i.e. parameter.enable will be set to 0. |
None
|
default
|
None | float
|
This an internal attribute, that should typically not be touched. It specifies a default value for a parameter that may be used if the parameter is not fitted. |
None
|
model
|
None | str
|
For noise parameters, specifies an appropriate sampling distribution. For other parameters, it may specify a function that is parameterized. |
None
|
Source code in remeta/modelspec.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |