Package: unlockNN
unlockNNA Python package for interpreting and extracting uncertainties in neural network models of chemical systems based upon Gaussian processes.Statement of needNeural networks (NNs) are powerful tools for materials property prediciton (MPP)
based on structural information. After training, they offer a cheaper
alternative to density function theory (DFT) and are therefore promising for
high throughput screening of materials. However, most current implementations of
NNs for MPP lack uncertainty quantifiers. Knowledge of the certainty in an
estimate is particularly important for machine learning models, as the
reliability of a prediction depends on the existence of functionally similar
structures in the training dataset, which cannot be readily determined.UnlockNN contains utilities for adding uncertainty quantification to Keras-based
models. This is achieved by replacing the last layer of the model with avariational Gaussian process(VGP), a modification of a Gaussian process that
improves scalability to larger data sets. The caveat is that the modified model
must undergo further training in order to calibrate the uncertainty quantifier;
however, this typically only requires a small number of training iterations.UnlockNN also contains a specific configuration for adding uncertainty
quantification toMEGNet: a
powerful graph NN model for predicting properties of molecules and crystals.InstallationThe package can be installed by cloning this repository and building it using either anaconda or pip,
or it can be downloaded directly from PyPi.To install from PyPi, runpip install unlockNN.
To install from source:gitclonehttps://github.com/a-ws-m/unlockNN.gitcdunlockNN
condaenvcreate-fenvironment.yml# Optional: create a virtual environment with condapipinstall.Thedev_environment.ymlcontains additional dependencies for development, testing and building documentation.
It can be installed usingconda env create -f dev_environment.yml.DocumentationFull documentation is available for the projecthere.BenchmarksBenchmark details and results can be found in thebenchmarkingsubdirectory.License and attributionCode licensed under the MIT License.Development notesReporting issuesPlease use the Issue tracker to report bugs in the software, suggest feature improvements, or seek support.Contributing to unlockNNContributions are very welcome as we look to make unlockNN more flexible and efficient.
Please use theFork and Pullworkflow to make contributions and follow the contribution guidelines:Use the environment defined indev_environment.yml. This installsblack, the formatter used for this project, as well as utilities for building documentation (sphinxand theinsegeltheme), enabling the testing suite (pytestandpytest-cov) and publishing to PyPi (build, but this will be handled by the package maintainer).Useblackto format all Python files that you edit:black {edited_file.py}orpython -m black {edited_file.py}.Write tests for new features in the appropriate directory. Run tests usingpytest tests/, or optionally withpytest --cov=unlocknn tests/to generate coverage on the fly.After testing thatpytestworks for your current environment, runtoxin the root directory of the project to check that all versions of Python are compatible.UseGoogle-style Docstrings. Check docstrings withpydocstyle:pydocstyle {edited_file.py}.Check docstrings are valid Sphinx RST and that the documentation compiles without errors: in thedocsdirectory, runmake html.Feel free to clean up others' code as you go along.List of developersContributors to unlockNN:Alexander MoriartyHuge thanks toKeith Butler,Aron WalshandKazuki Moritafor supervising the project at its inception and for their immense support.