10000 Optimizing over a list defining points in the search space? · Issue #371 · scikit-optimize/scikit-optimize · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Optimizing over a list defining points in the search space? #371

Open
ardunn opened this issue May 1, 2017 · 5 comments · May be fixed 8000 by #971
Open

Optimizing over a list defining points in the search space? #371

ardunn opened this issue May 1, 2017 · 5 comments · May be fixed by #971
Labels

Comments

@ardunn
Copy link
ardunn commented May 1, 2017

Is there a feature where, instead of using dimensions to define the search space, skopt will optimize on a list of points which define the search space?

This would be a useful feature if I wanted to optimize in a subset of the possible points of a space (rather than the entire space).

@ardunn ardunn changed the title Optimizing over a list of all possible outputs? Optimizing over a list defining points in the search space? May 1, 2017
@betatim
Copy link
Member
betatim commented May 2, 2017

The short answer is no.

The longer answer is that you can have categorical dimensions, which means only the values in that list will be tried, however the optimizer will visit all possible combinations. For example if you have two categorical dimensions: a = Categorical([1,2,3,4,5]) and b = Categorical([6,7,8]) then each combination will be considered a possible point.

If that includes too many points you don't want to visit, then right now the best option would be to inherit from Space and modify the method that samples points (space.rvs()). You should then be able to pass an instance of your Space class to the minimizer functions.


If there is demand or interest we could add such a class to scikit-optimize directly, so contributions welcome.

@ardunn
Copy link
Author
ardunn commented May 2, 2017

Ok, thank you. How exactly though is a space instance passed to a minimizer function? I do not see a parameter for it in any of the minimizer functions.

@betatim
Copy link
Member
betatim commented May 3, 2017

You can't ... sorry for this. In my head I was convinced that you could pass a Space instance in everywhere that a list of dimensions is expected but for sure the documentation doesn't tell you that you can ...

I think it would be a great feature to have and shouldn't be too tricky to implement.

@MechCoder
Copy link
Member

This is not completely fixed by #373 right?

@MechCoder MechCoder reopened this May 3, 2017
@betatim
Copy link
Member
betatim commented May 4, 2017

#373 only made it possible to pass around an instance of Space (https://github.com/scikit-optimize/scikit-optimize/pull/373/files#diff-20465f658b113fd17f365969d75b5876R178) but you still need to make your own Space subclass that contains only a fixed grid.

@MechCoder MechCoder added the API label May 5, 2017
@kernc kernc linked a pull request Nov 17, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
0