OpenFreeEnergy / cinnabar

Package for consistent reporting of relative free energy results
MIT License
37 stars 13 forks source link

Refactor stats into base and derived class so we can drop in different MLE solvers? #89

Open jchodera opened 1 year ago

jchodera commented 1 year ago

It would be useful if we could refactor stats.py into a class API so that we could drop in different solvers.

Right now, the implementation of the NetBFE analytical solver (which has several limitations, such as not being able to handle both forward and reverse estimates for the same edge) is implemented in mle().

As an example, we could have a NetworkSolver base class with methods like

and then NetBFESolver could be a derived class implementation of this.

We may also want to clean up the API within stats.py at the same time. Right now, it just assumes the graph is labeled in a particular way, and generates new labels when mle() is called. The bootstrap() method also generates multivariate normal data from the MLE solution and computes various statistics, which may not be what we want.

I'm particularly interested in implementing a drop-in replacement for NetBFESolver that uses the same API, but numerically solves for the optimal free energies. This would provide several additional features:

zhang-ivy commented 1 year ago

Just noting that this refactor + replacement for NetBFE solver would be useful for my work as well!