Giter Club home page Giter Club logo

basicspearmint's Introduction

Introduction

I really like the bayesian optimization tool Spearmint (https://github.com/HIPS/Spearmint) but I found that some of its functionality was confusing and overkill if one is trying to run a few tests locally on some data. I have built some tools to streamline the process of small-scale hyperparameter optimization. Hopefully the tool is simple enough to understand -- it's just a few python scripts. I mostly made this repository for myself, but if others find it useful, that's awesome too!

Features supported

  • Basic HP optimization, geared towards supervised learning tasks
  • Train/validation/test splits

Dependencies

Get started quickly with an example

Included with this repository is an example configuration and dataset, under the example directory. Copy the config.json and experiment.py into the root directory of this repository, and then unzip exampleData into the experiments directory. Then, run setupExperiments.py, followed by viewExperiments.py.

How to use with your own data

  1. Get your dataset and determine how many train/val/test splits you want to make
  2. Fill the experiment folder with your data from each of your splits (see readme in the folder for specifics)
  3. Fill in what hyperparameters you want to optimize in config.json (see Spearmint's config json examples or example/config.json)
  4. Fill in your training/evaluation functions in experiment.py (see comments in file for help, and the example in example/experiment.py)
  5. Set the 3 parameters in basicSpearmint.json appropriately
  6. Run python setupExperiments.py and watch the magic of Bayesian Optimization!
  7. Once that is done, run python viewResults.py and wait for your results to be tested.
  8. Testing results using best hyperparameter settings will be printed in a table, and validation results will be saved in pickle files under the results directory.

basicspearmint's People

Contributors

jmhessel avatar

Watchers

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