Code Monkey home page Code Monkey logo

retrotemp's Introduction

retrotemp

Neural network for predicting template relevance a la Segler and Waller's Neural Symbolic paper.

Dependencies if you want to use the final model

  • RDKit (most versions should be fine)
  • numpy

Dpendencies if you want to retrain on your own data

  • RDKit (most versions should be fine)
  • tensorflow (r0.12.0)
  • h5py
  • numpy

About

Learn to predict template relevance.

  1. Grab reaction precedents from templates stored in MongoDB python scripts/get_reaxys_data.py

  2. Calculate fingerprints and store in .h5 file python scripts/make_data_file.py data/reaxys_limit1000000000_reaxys_v2_transforms_retro_v9_10_5.txt 2048

  3. Train model python retrotemp/nntrain_fingerprint.py -t data/reaxys_limit1000000000_reaxys_v2_transforms_retro_v9_10_5.txt -o 163723 -m models/6d3M_Reaxys_10_5 --fp_len 2048

  4. Find best validation performance

    regex="model\.(.*)\.meta"
    for f in `ls -tr models/6d3M_Reaxys_10_5/*.meta`
    do
        if [[ $f =~ $regex ]]
        then
            ckpt="${BASH_REMATCH[1]}"
            echo $ckpt
            python retrotemp/nntrain_fingerprint.py  -o 163723 -m models/6d3M_Reaxys_10_5 --fp_len 2048 -c "$ckpt" -t data/reaxys_limit1000000000_reaxys_v2_transforms_retro_v9_10_5.txt --test valid
        fi
    done
    
  5. Retrain on whole dataset (?) for same number of epochs. Note: this is because we want a high-performing deployed model and no longer need to hold out any data. python retrotemp/nntrain_fingerprint.py -t data/reaxys_limit1000000000_reaxys_v2_transforms_retro_v9_10_5.txt -o 163723 -m models/6d3M_Reaxys_10_5 --fp_len 2048 --fixed_epochs_train_all 15

  6. Run standalone tensorflow version to dump to numpy arrays

retrotemp's People

Contributors

connorcoley 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.