Coder Social home page Coder Social logo

Comments (2)

till-m avatar till-m commented on May 30, 2024

Hi Aidan,

there is no built-in way to deal with this problem both elegantly and well. Two suggestions that I can offer:
The easier way would be to round to the appropriate value within your target function:

def my_surrogate_target_func(t):
    t = (t //2) * 2
    return my_target_func(t)

This is relatively straightforward and ensures that your values are appropriate, but it will not help the optimizer understand that 7.7 and 8.3 are the same for your function. That can be done by modifying the kernel of the GP, but it would require you to be somewhat comfortable with python: You can do this yourself (see here to get you started). Alternatively, I toyed with the idea of adding this to the codebase once. I still have this commited to a branch that you can install from, see here for an example on how that would be used.

Let me know if that helps.

from bayesianoptimization.

till-m avatar till-m commented on May 30, 2024

I will close this for now. Feel free to reopen if you need any more help.

from bayesianoptimization.

Related Issues (20)

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.