On how to give integers an extra bonus in score while searching #376
-
Hi, Mr. Miles! If the actual formula is sin(\pi * 7 * x / 2), can we directly obtain the formula in the hall of fame, instead of, say, sin(10.996 * x) ? (In this case, sin(11 * x) may also be a good answer.) I know that I can concat some "constant columns" to the features, say, all of numpy.pi to the data in order to simulate constant pi, but do I have to include all integers from 1 to 11 to obtain all possible candidates? And can we set the scores of them higher than ordinary decimal constants? Much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @NoRatRacing, Indeed concatenating constant columns is by far the easiest way to tackle this specification. Here are your options:
Cheers, |
Beta Was this translation helpful? Give feedback.
Hi @NoRatRacing,
Indeed concatenating constant columns is by far the easiest way to tackle this specification. Here are your options:
You could create one feature column for every integer (and constant) you are interested in including. Then, you could add
complexity_of_constants=5
to make regular real constants (like 10.996) more expensive – so the search will prefer your provided integers!I've done this approach even for integers 1 to 30, and it seems to do okay. You might need to run a bit longer though.
Indeed it's not the most elegant though.
The proper way to do this would be to introduce mixed integer programming. If someone has time to try that (with JuMP.jl), and push it, I (…