Task Module
task
ChangePointTask
Change-point task: Implementation of the basic functions.
ChangePointTask
Specifies attributes and methods of the Task object that models the change-point task.
Source code in rbmpy/task/ChangePointTask.py
10 11 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 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |
__init__(task_vars)
Creates the Task object based on the initialization object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_vars
|
TaskVars
|
Object instance with task parameters. |
required |
Source code in rbmpy/task/ChangePointTask.py
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 | |
sample_cp()
Samples change points.
The function takes into account the hazard rate h and the safe criterion s.
Returns:
| Type | Description |
|---|---|
None
|
This function does not return any value. |
Source code in rbmpy/task/ChangePointTask.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
sample_mu()
Samples the mean of the outcome-generating distribution conditional on a change point.
Returns:
| Type | Description |
|---|---|
None
|
This function does not return any value. |
Source code in rbmpy/task/ChangePointTask.py
70 71 72 73 74 75 76 77 78 79 80 | |
sample_outcome()
Samples the outcome conditional on the outcome-generating mean.
The function works for normal and circular outcome spaces.
Returns:
| Type | Description |
|---|---|
None
|
This function does not return any value. |
Source code in rbmpy/task/ChangePointTask.py
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 | |
sample_shield()
Samples the size of the shield.
Returns:
| Type | Description |
|---|---|
None
|
This function does not return any value. |
Source code in rbmpy/task/ChangePointTask.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
sample_catch_trial()
Samples catch trials.
Returns:
| Type | Description |
|---|---|
None
|
This function does not return any value. |
Source code in rbmpy/task/ChangePointTask.py
134 135 136 137 138 139 140 141 142 143 144 145 146 | |
TaskVars
TaskVars: Initialization of the change-point task.
TaskVars
Specifies attributes of the TaskVars object that are used for the change-point task.
Source code in rbmpy/task/TaskVars.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
__init__()
Determines the default task variables.
Source code in rbmpy/task/TaskVars.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |