Giter Club home page Giter Club logo

bayex's People

Contributors

alonfnt avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

alalulu8668

bayex's Issues

Improve screen ouput formatting.

Is your feature request related to a problem? Please describe.
Right now, there is only a printing inside the loop displaying the sampled points. I believe this can be improved.

Describe the solution you'd like
A context manager that could deal with displaying the results on screen with a nicely tabulated format.
There should be several levels of printing (display all the sampled values, display only those values that yield a larger target, not display anything) and maybe there should also be a flag to store the results into a log file (for long running cluster scenarios).

I was thinking about something similar to this:

  target  |    x      |     y     |
--------------------------------
  -2.2    |    1      |   5.34    |
  -1.2    |    2      |   5.14    | 
  -0.1    |    4      |   6.23    |
.
.
.

which resembles a lot what is done in the bayes_opt package.
However, if at some point the main loop gets jitted. Then there may be a problem as no printing will happen (maybe batches?).

Add option to use CPU or GPU

Since JAX works on both architectures and requires some installation tweaking to use them, it would be nice to add an indicator on pip to install JAX (jaxlib) with GPU support or not.

Likewise, adding a flag such as bayex.set_platform("cpu") on bayex.set_platform("gpu"), etc... would be nice too.

Dealing with Categorical variables

Is your feature request related to a problem? Please describe.
Functions sometimes have variables that are not in the real domain. If there is some categorical variable, the Bayesian optimization will not work.

Describe the solution you'd like
In order to be able to deal with categorical data, we need to preprocess them so that they can be mapped to the real domain.
Casting to a number will create weird dependencies, so some kind of one-hot encoding should be done.

This is not a new field, which means that there are already some papers out there with methods to deal with them.

  1. Bayesian Optimization for Categorical and Category-Specific Continuous Inputs
  2. Dealing with Categorical and Integer-valued Variables in Bayesian Optimization with Gaussian Processes

among others. We should implement them and see how they work.

Can this be made to work for latest JAX release?

During installation I get the error ERROR: No matching distribution found for jaxlib<0.2.0,>=0.1.69

My JAX is version 0.4.12

Would it take minor tweaks to get this working for the later JAX releases or it's a huge task?

Thanks

Clean README into specific markdown files for extra details

Is your feature request related to a problem? Please describe.
The current README file is not very organized since there hasn't even been a release, so it's not clear what bayex offers and what capabilities has.

Describe the solution you'd like
It would be nice to clean it a bit and add specific markdowns with more details steps and guidance for those who need it.

Some specific ideas I have are:
Add some bullet points on the main characteristics of bayex (different types, jax, parallel, reproducibility, GPU, etc)

Usage section:

  • Getting Started (A quick start guide to use bayex with not too much touching)
  • Advance Topics (Touch in advanced features, maybe split it if it gets too big, e.g. types, parallel, acquisition functions, etc)
  • Tips (Some guidance on how to tune the hyperparameters of the acquisition functions or learning rates depending on the target functions).

Contributing:

  • Add the proper detailed steps on another md file, since being detail oriented in the README would fill it pretty fast.

and more to come that I may think of when I (or someone) tackle(s) this one.

Add more acquisition functions

The most common acquisition functions are:

  1. Expected Improvement
  2. Probability of Improvement
  3. Upper Confidence Bound
  4. Lower Confidence Bound
  5. Simple Regret

it would be nice to have a way to pass this to bayex.optim. Probably a custom module with all the acq fun would also be clear and nice.

Additionally, including a basic tour on the difference of each criterion on a notebook/md would be of great help.

Specify variable types different than float

Is your feature request related to a problem? Please describe.
Since there are plans to deal with variable other than float, e.g. integers and #3, there should be a method to specify the type of the variable so that the suggested values can be casted correctly and be shown properly.
Also, knowing the type would help when dealing with the constrains.

Describe the solution you'd like
A method to deal with it could be passing a dictionary, similar to the constrains dict where the variable has an specific type.
Maybe consider that if the variable is not include, float will be assumed.

constrains = {'x': (-10, 10), 'y': (0, 10)}
dtypes = {'x': float, 'y': int}
optim_params = bayex.optim(f, constrains=constrains, dtypes=dtypes, seed=42, n=10)

which could yield the same as

constrains = {'x': (-10, 10), 'y': (0, 10)}
dtypes = dict(y=int)
optim_params = bayex.optim(f, constrains=constrains, dtypes=dtypes, seed=42, n=10)

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.