Git Product home page Git Product logo

Comments (6)

JasperSnoek avatar JasperSnoek commented on August 17, 2024

I think it is silly to have the code break when it would be much better to return an error message. However, I can't think of a good reason why anyone would set vmax == vmin besides by mistake. Perhaps we should just add a helpful error message here?

from spearmint.

JesseLivezey avatar JesseLivezey commented on August 17, 2024

I don't have a good reason, but I do have a bad reason! (laziness)

One example would be that I'm trying to optimize multiple hyperparameters at once. Later, I want to run the same optimization, but fix one of the parameters rather than optimizing over it. If I can set vmin == vmax and just get the trivial result for that parameter, then the rest of the code can stay the same. If I have to remove it from the list of hyperparameters, I then have to insert the parameter somewhere else in the code which is just more work for me.

I tried hacking it in by having a check here:

unit = (np.double(v) - vmin) / (vmax - vmin)

and then setting unit to zero if vmin == vmax. This runs, but I don't understand the code well enough to know if this will break any of the GP stuff down the line. Do you think something like this would work?

I can make a PR with at least a better warning.

from spearmint.

JasperSnoek avatar JasperSnoek commented on August 17, 2024

Hi Jesse, yeah I understand that. It would require building in some logic
to have those variables bypass the GP, since otherwise there would be
unnecessary computation happening (in computing covariances between these
zeros). I think your trick would work though, so you can do it in your own
branch if you like.

I'd rather leave that kind of bookkeeping up to the user than try to build
it in to Spearmint (or perhaps a user made wrapper around Spearmint to do
neat user-friendly bookkeeping, etc.) @mgelbart, what do you think?

Definitely a better warning would be great :-) I added a more useful
assert. Thanks!

Jasper

On Mon, May 11, 2015 at 7:24 PM, Jesse Livezey [email protected]
wrote:

I don't have a good reason, but I do have a bad reason! (laziness)

One example would be that I'm trying to optimize multiple hyperparameters
at once. Later, I want to run the same optimization, but fix one of the
parameters rather than optimizing over it. If I can set vmin == vmax and
just get the trivial result for that parameter, then the rest of the code
can stay the same. If I have to remove it from the list of hyperparameters,
I then have to insert the parameter somewhere else in the code which is
just more work for me.

I tried hacking it in by having a check here:

unit = (np.double(v) - vmin) / (vmax - vmin)

and then setting unit to zero if vmin == vmax. This runs, but I don't
understand the code well enough to know if this will break any of the GP
stuff down the line. Do you think something like this would work?

I can make a PR with at least a better warning.


Reply to this email directly or view it on GitHub
#17 (comment).

from spearmint.

mgelbart avatar mgelbart commented on August 17, 2024

I think if you remove the parameter from the config entirely then everything should be ok, but as you said your code would need to know that this parameter is not coming in. I agree with Jasper's assessment.

Mike

from spearmint.

JesseLivezey avatar JesseLivezey commented on August 17, 2024

Thanks for the feedback!

I'm probably also going to write something that just filters out parameters with trivial ranges and adds them back in at the end. Once I get it working, I'll post it here in case it's useful for others.

from spearmint.

JasperSnoek avatar JasperSnoek commented on August 17, 2024

That sounds great!

Cheers,

Jasper

On Wed, Jun 3, 2015 at 8:23 PM, Jesse Livezey [email protected]
wrote:

Thanks for the feedback!

I'm probably also going to write something that just filters out
parameters with trivial ranges and adds them back in at the end. Once I get
it working, I'll post it here in case it's useful for others.


Reply to this email directly or view it on GitHub
#17 (comment).

from spearmint.

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.