autora.theorist.bms.parallel
Parallel
The Parallel Machine Scientist Object, equipped with parallel tempering
Attributes:
Name | Type | Description |
---|---|---|
Ts |
list of parallel temperatures |
|
trees |
list of parallel trees, corresponding to each parallel temperature |
|
t1 |
equation tree which best describes the data |
Source code in temp_dir/bms/src/autora/theorist/bms/parallel.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 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 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
__init__(Ts, ops=get_priors()[1], custom_ops={}, variables=['x'], parameters=['a'], max_size=50, prior_par=get_priors()[0], x=None, y=None, root=None, random_state=None)
Initialises Parallel Machine Scientist
Parameters:
Name | Type | Description | Default |
---|---|---|---|
Ts
|
list
|
list of temperature values |
required |
ops
|
allowed operations for the search task |
get_priors()[1]
|
|
variables
|
independent variables from data |
['x']
|
|
parameters
|
settable values to improve model fit |
['a']
|
|
max_size
|
maximum size (number of nodes) in a tree |
50
|
|
prior_par
|
prior values over ops |
get_priors()[0]
|
|
x
|
independent variables of dataset |
None
|
|
y
|
dependent variable of dataset |
None
|
|
root
|
fixed root of the tree |
None
|
Source code in temp_dir/bms/src/autora/theorist/bms/parallel.py
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 |
|
anneal(n=1000, factor=5)
Annealing function for the Machine Scientist
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n
|
number of mcmc step & tree swap iterations |
1000
|
|
factor
|
degree of annealing - how much the temperatures are raised |
5
|
Returns: Nothing
Source code in temp_dir/bms/src/autora/theorist/bms/parallel.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
mcmc_step(verbose=False, p_rr=0.05, p_long=0.45)
Perform a MCMC step in each of the trees
Source code in temp_dir/bms/src/autora/theorist/bms/parallel.py
95 96 97 98 99 100 101 102 103 104 105 |
|
tree_swap()
Choose a pair of trees of adjacent temperatures and attempt to swap their temperatures based on the resultant energy change
Returns: new temperature values for the pair of trees
Source code in temp_dir/bms/src/autora/theorist/bms/parallel.py
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 |
|