@@ -88,10 +88,10 @@ function create_utils_benchmark()
8888 suite[" best_of_sample" ] = @benchmarkable (
8989 best_of_sample (pop, rss, $ options),
9090 setup = (
91- nfeatures= 1 ;
92- dataset= Dataset (randn (nfeatures, 32 ), randn (32 ));
93- pop= Population (dataset; npop= 100 , nlength= 20 , options= ($ options), nfeatures);
94- rss= RunningSearchStatistics (; options= ($ options))
91+ nfeatures = 1 ;
92+ dataset = Dataset (randn (nfeatures, 32 ), randn (32 ));
93+ pop = Population (dataset; npop= 100 , nlength= 20 , options= ($ options), nfeatures);
94+ rss = RunningSearchStatistics (; options= ($ options))
9595 )
9696 )
9797
@@ -110,9 +110,9 @@ function create_utils_benchmark()
110110 end
111111 end ,
112112 setup = (
113- nfeatures= 1 ;
114- dataset= Dataset (randn (nfeatures, 32 ), randn (32 ));
115- mutation_weights= MutationWeights (;
113+ nfeatures = 1 ;
114+ dataset = Dataset (randn (nfeatures, 32 ), randn (32 ));
115+ mutation_weights = MutationWeights (;
116116 mutate_constant= 1.0 ,
117117 mutate_operator= 1.0 ,
118118 swap_operands= 1.0 ,
@@ -125,23 +125,21 @@ function create_utils_benchmark()
125125 form_connection= 0.0 ,
126126 break_connection= 0.0 ,
127127 );
128- options= Options (;
129- unary_operators= [sin, cos],
130- binary_operators= [+ , - , * , / ],
131- mutation_weights,
128+ options = Options (;
129+ unary_operators= [sin, cos], binary_operators= [+ , - , * , / ], mutation_weights
132130 );
133- recorder= RecordType ();
134- temperature= 1.0 ;
135- curmaxsize= 20 ;
136- rss= RunningSearchStatistics (; options);
137- trees= [
131+ recorder = RecordType ();
132+ temperature = 1.0 ;
133+ curmaxsize = 20 ;
134+ rss = RunningSearchStatistics (; options);
135+ trees = [
138136 gen_random_tree_fixed_size (15 , options, nfeatures, Float64) for _ in 1 : 100
139137 ];
140- expressions= [
138+ expressions = [
141139 Expression (tree; operators= options. operators, variable_names= [" x1" ]) for
142140 tree in trees
143141 ];
144- members= [
142+ members = [
145143 PopMember (dataset, expression, options; deterministic= false ) for
146144 expression in expressions
147145 ]
@@ -155,14 +153,14 @@ function create_utils_benchmark()
155153 end ,
156154 seconds = 20 ,
157155 setup = (
158- nfeatures= 1 ;
159- T= Float64;
160- dataset= Dataset (randn (nfeatures, 512 ), randn (512 ));
161- ntrees= ($ ntrees);
162- trees= [
156+ nfeatures = 1 ;
157+ T = Float64;
158+ dataset = Dataset (randn (nfeatures, 512 ), randn (512 ));
159+ ntrees = ($ ntrees);
160+ trees = [
163161 gen_random_tree_fixed_size (20 , $ options, nfeatures, T) for i in 1 : ntrees
164162 ];
165- members= [
163+ members = [
166164 PopMember (dataset, tree, $ options; deterministic= false ) for tree in trees
167165 ]
168166 )
@@ -181,9 +179,9 @@ function create_utils_benchmark()
181179 compute_complexity (tree, $ options)
182180 end ,
183181 setup = (
184- T= Float64;
185- nfeatures= 3 ;
186- trees= [
182+ T = Float64;
183+ nfeatures = 3 ;
184+ trees = [
187185 gen_random_tree_fixed_size (20 , $ options, nfeatures, T) for
188186 i in 1 : ($ ntrees)
189187 ]
@@ -199,9 +197,9 @@ function create_utils_benchmark()
199197 SymbolicRegression. MutationFunctionsModule. randomly_rotate_tree! (tree)
200198 end ,
201199 setup = (
202- T= Float64;
203- nfeatures= 3 ;
204- trees= [
200+ T = Float64;
201+ nfeatures = 3 ;
202+ trees = [
205203 gen_random_tree_fixed_size (20 , $ options, nfeatures, T) for
206204 i in 1 : ($ ntrees)
207205 ]
@@ -216,9 +214,9 @@ function create_utils_benchmark()
216214 )
217215 end ,
218216 setup = (
219- T= Float64;
220- nfeatures= 3 ;
221- trees= [
217+ T = Float64;
218+ nfeatures = 3 ;
219+ trees = [
222220 gen_random_tree_fixed_size (20 , $ options, nfeatures, T) for i in 1 : ($ ntrees)
223221 ]
224222 )
@@ -242,9 +240,9 @@ function create_utils_benchmark()
242240 check_constraints (tree, $ options, $ options. maxsize)
243241 end ,
244242 setup = (
245- T= Float64;
246- nfeatures= 3 ;
247- trees= [
243+ T = Float64;
244+ nfeatures = 3 ;
245+ trees = [
248246 gen_random_tree_fixed_size (20 , $ options, nfeatures, T) for i in 1 : ($ ntrees)
249247 ]
250248 )
0 commit comments