PolyChord / PolyChordLite

Public version of PolyChord: See polychord.co.uk for PolyChordPro
https://polychord.io/
Other
83 stars 26 forks source link

Running from samples #82

Closed yallup closed 2 years ago

yallup commented 2 years ago

Added a function wrapping around run_pypolychord to enable passing a set of samples to treat as the starting live points.

This involves a bit of ugly os file manipulation, currently have put in no checks or error handling as use case not fully crystalised yet. Corresponding test script included in Python_Functions directory

williamjameshandley commented 2 years ago

OK, I've refactored and updated this in a way that doesn't depend on an initial polychord run, and that generates the initial live points in an mpi parallelised fashion. Relatively easy to use, you just provide hypercube samples via e.g. settings.prior_samples = np.random.rand(500,nDims), and replace the np.random.rand function with whichever procedure you prefer. Let me know if that works for you, and if so we'll merge.

williamjameshandley commented 2 years ago

I also took this opportunity to move everything out of __init__.py and into polychord.py, as well as updating the requirements.

yallup commented 2 years ago

Looks good and much more robust, only main comment is would it be more descriptive to name settings.prior_samples to settings.cube_samples? Hypercube samples are a bit of an alien concept but this is a bit of an alien method.