Open BorisVSchmid opened 6 years ago
Hey Boris
Could you go into a bit more detail about exactly what behavior you are trying to achieve with the initial points?
At the moment, then :initial-points is a parameter of deodorant (rather than bopp itself) and thus inevitably takes in inputs of the form required for the Bayesian optimization scheme, rather than bopp. Its syntax is just of the form (map #(into [] (cons % (f %))) initial-thetas) where initial-thetas is a vector of the values of each input (in the order specified by the defopt input rather than the order they are necessarily sampled) and f is the target function of the optimization. As you've noted, then :initial-points is printed out when you have set :verbose 2. However, this is done whether you provide them as an input or not and so if you run BOPP without setting the :initial-points input, you'll see this things come out in a different format, e.g. :intial-points ([[4.551116063315992 5.5256651622872415] -25.212731299326094 ([])] [[9.477340236977007 9.521154069744426] -49.43158747606592 ([])]) which is is the format you need to match if you provide it manually yourself. Note that, in BOPP, f actually returns a tupple of the partition function estimate and the program outputs so this syntax might not be as exactly you expect - e.g. as you have no outputs, then there is a trailing list of and empty vector. So in the above example, [4.551116063315992 5.5256651622872415] is the input point, -25.212731299326094 is the marginal likelihood estimate, and ([]) is the output of the program (which happens to be empty).
The intention of :initial-points was to give a way of "restarting" the Bayesian optimization with some previously evaluated points, hence it is necessary to be in the format of deodorant (not BOPP) to avoid re-evaluation of these points.
If you instead want a means of forcing the initial-thetas to take on a certain set of values, I could add this quite easily, but this would require a separate input.
Hi Tom.
Thanks for the explanation. For some reason I can't get the "restarting" of the initial-points to work. I should try that with a more minimal model.
But you are right, yeah, I am looking for a way to suggest to BOPP to evaluate some initial-thetas defined by me (manual fits) in addition to the num-initial-points it samples itself.
I am trying to figure out how to correctly provide a list of initial points in BOPP. Am I overlooking something simple?
Here are the details. The doopt, the output of BOPP, and the defopt.
And from the output I get before the thing crashes is that BOPP doesn't like the format I use for initial-points. One, it reformats the map into a collcetion of [keyword values], and two, it drops the last keyword-value pair ({:beta_p 0.16744317384178953} in this case)
If I do not specify any initial points, BOPP runs fine, and feeds the run-epidemic function with the sampled maps of priors that the run-epidemic function expects.