DeaglanBartlett / ESR

23 stars 5 forks source link

Not optimising repeated functions #29

Closed tomasdsousa closed 1 year ago

tomasdsousa commented 1 year ago

We create a file with all unique equations from all complexities previous to the one being evaluated, and if a function about to have its parameters optimised has an exact match in that file, we set its log likelihood to infinity so that it is discarded. This is both to save time in the optimisation and to not have the exact same function in different final_compl.dat files, since we only care about the lower complexity representation.

tomasdsousa commented 1 year ago

I also noticed a small error that happens when a function has more than 3 parameters, and at least 3 have Nsteps<1. When looping through different idx with itertools, when len(idx)>1 - idx=[0,1] for example - one can't index p[idx] so we loop through idx to index the parameter list individually.

for idx_ in idx: p[idx_]=0.