Coder Social home page Coder Social logo

aryandeshwal / bo_of_cofs Goto Github PK

View Code? Open in Web Editor NEW
18.0 1.0 4.0 25.73 MB

Python code for the paper Bayesian Optimization of Nanoporous Materials.

Jupyter Notebook 99.98% Python 0.02%
python bayesian-optimization metal-organic-frameworks covalent-organic-frameworks

bo_of_cofs's Introduction

Python code to reproduce all plots in:

❝Bayesian optimization of nanoporous materials❞ A. Deshwal, C. Simon, J. R. Doppa. Molecular Systems Design & Engineering. (2021) link preprint

requirements

the Python 3 libraries required for the project are in requirements.txt. use Jupyter Notebook or Jupyter Lab to run Python 3 in the *.ipynb.

search methods

step 1: prepare the data

our paper relies on data from Mercado et al. here. we visited Materials Cloud to download and untar properties.tgz giving properties.csv in new/. this is the data we use.

run the code in the Jupyter Notebook prepare_Xy.ipynb to prepare the data and write inputs_and_outputs.pkl to be read in by other Notebooks. in here, you can set the number of runs nb_runs, number of iterations for each run nb_iterations, and, if you wish, a flag downsample_data for testing.

step 2: run the searches

run the following Jupyter Notebooks, which will write search results to .pkl files.

  • random_search.ipynb for random search
  • evol_search.ipynb for evolutionary search (CMA-ES)
  • random_forest_run.ipynb for one-shot supervised machine learning (via random forests). run twice, one with the flag diversify_training = True, the other with diversify_training = False.
  • BO_run.ipynb for Bayesian optimization. run three times, with which_acquisition set to "EI", "max y_hat", and max sigma.

each .ipynb can be run on a desktop computer. the BO code takes the longest, at ~10 min per run.

step 3: visualize the results

finally, run viz.ipynb to read in the *.pkl files output from the search runs and visualize the results.

toy GP illustrations

see synthetic_example.ipynb for the toy GP plots in the paper.

bo_of_cofs's People

Contributors

aryandeshwal avatar simonensemble avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.