-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Provide interface to the inference package EP-BOLFI #585
Comments
Hi Yannick, Thanks for opening this issue. This sounds like a reasonable path forward, feel free to ping me as you go through the process of integrating the cost/likelihood and parameters. If you can structure this functionality within the |
Hi Brady, |
Drafted a minimal EP-BOLFI interface in YannickNoelStephanKuhn@20dd5a6. |
Hi Brady, Other things I would like to talk about:
|
Everything works now: YannickNoelStephanKuhn@e543f05 To put a bow on it, I will figure out a nice plotting routine for Bayesian results. If the two points mentioned above are okay with you, I would open a pull request after. |
I implemented a predictive posterior visualization; if that term is unfamiliar, it boils down to plotting model evaluations of random variates drawn from the posterior parameter distribution. YannickNoelStephanKuhn@0aa55b3 It also shows how I work around the parallelization issue in #642 right now; with lots of |
I rewrote the EP-BOLFI example YannickNoelStephanKuhn@ced4cb5 using the parallelization fix #645. |
Hi Brady, I'm currently writing some cost functions that more closely resemble the type of optimization EP-BOLFI was made for: viewing the data through the lens of fit functions. My current implementation is here: https://github.com/YannickNoelStephanKuhn/PyBOP/blob/8decfd6f534885b5c6e42d7d04cd2490928e1ade/pybop/experimental/parameterized_costs.py Could you please show me where this happens? |
Hi @YannickNoelStephanKuhn, maybe I can help here, but I'll refer back to this version before #635. The |
Hi @NicolaCourtier , thanks, that worked perfectly. The example now works as per YannickNoelStephanKuhn@d9d855b. What are the next steps? Brady wanted me to put the files into an |
Hi @YannickNoelStephanKuhn - excellent, thanks for getting this into a good place. If you can open a PR into develop for these changes, we can start the review process! At the moment, having this land in the experimental directory makes the most sense, not because EP-BOLFI is unstable, but because its support in PyBOP is new and untested. We can then work towards integrating it into the main codebase after it's first PyBOP release, so we can get feedback from users and developers. |
Feature description
Makes EP-BOLFI available, an optimizer developed specifically for difficulties that are common with battery parameterization, such as, but not limited to:
Motivation
While EP-BOLFI, as in EP plus BOLFI, is expected to be superseded by its implementation within SOBER, its own interface here will serve as the basis of benchmarking the two against each other. Additionally, there are a lot of "self-driving" features within EP-BOLFI, the library, that make week-long runs on HPC resources viable. Finally, it might be the case that EP-BOLFI, the library, works better with limited resources, e.g., your decade-old work laptop.
Possible implementation
I would extend
BaseOptimiser
in a minimal fashion, rather than the way it is done forAdamWImpl
. While EP-BOLFI internally has a lot of similar structure to what is shown inAdamWImpl
, it would require a complete refactor of EP-BOLFI to expose it in this manner.I will also have to extend
OptimisationResult
to aBayesOptimisationResult
to catch parameter correlations and general uncertainty information. I would give it its own file, but I'm open to other suggestions.Next, I need to figure out how to deal with the features in EP as a cost function and the Likelihoods involved as per
pybop.costs
. I'm unsure whether this is necessary; if so, this requires a minor refactor of EP-BOLFI.Optionally, I would look into the way probabilistic
Parameter
s are handled right now, checking if they can handle inherent parameter uncertainties that EP-BOLFI was designed to handle. These are not parameters to fit, but parameters that would be randomly generated in each model evaluation during optimization.Finally, there may need to be some additional plotting routines for the
BayesOptimisationResult
.Additional context
I've been asked to provide an interface to EP-BOLFI in the past, and I'm happy to finally have the resources to oblige.
This will also help me with addressing the SOBER and BASQ interfaces mentioned in #228 afterwards, as I can practice a Bayesian Optimizer interface with something I'm more intimately familiar with.
The text was updated successfully, but these errors were encountered: