Questions tagged [scikit-optimize]

Questions regarding the use of scikit-optimize, a package for model-based sequential optimization.

Questions regarding the use of scikit-optimize, a Python package for model-based sequential optimization of costly black-box functions.

47 questions
0
votes
4 answers

Fitting a curve to some datapoints

the fitted curve doesn't fit the datapoints (xH_data, nH_data) as expected. Does someone know what might be the issue here? from scipy.optimize import curve_fit import numpy as np import matplotlib import matplotlib.pyplot as plt xH_data =…
0
votes
1 answer

Scoring parameter in BayesSearchCV class confusion

I'm using BayesSearchCV from scikit-optimize to train a model on a fairly imbalanced dataset. From what I'm reading precision or ROC AUC would be the best metrics for imbalanced dataset. In my code: knn_b = BayesSearchCV(estimator=pipe,…
Callum Matthews
  • 95
  • 2
  • 10
0
votes
0 answers

How to use scikit-optimize to change the hidden layers in MLPRegressor?

I am attempting to use scikit-optimize to tune the hyperparameters of a scikit-learn multi-layer perception regressor (MLPRegressor). However, the problem is that scikit-optimize seems to convert the list of categorical variables into a numpy array,…
S R Maiti
  • 237
  • 3
  • 13
0
votes
1 answer

what does model_queue_size do?

General question: Using scikit-optimize for a black box optimization. Can't find in the doc what model_queue_size does. I'm doing the ask-tell because I can parallelize the calculation of y as described in the example. So, doing some profiling, it…
Mark Sale
  • 65
  • 5
0
votes
1 answer

Getting a negative R-squared value with curve_fit()

I've read a related post on manually calculating R-squared values after using scipy.optimize.curve_fit(). However, they calculate an R-squared value when their function follows the power-law (f(x) = a*x^b). I'm trying to do the same but get negative…
0
votes
1 answer

How do I extract the best features when using BayesSearchCV?

When using BayesSearchCV from Skopt for Feature Selection, how can I extract the feature names of the optimal set of features? I only know how to get the number of features together with other hyperparameters but am unable to find how to get the…
0
votes
1 answer

Black box optimization with Scikit Optimize

I have to optimize a black-box problem that depends on external software (no function definition neither derivatives) that is quite expensive to evaluate. It depends on several variables, some of them are real and some other are integers. I think…
0
votes
1 answer

Scikit-learn - how to use single static validation set for CV object?

In Scikit-learn RandomSearchCV and GridSearchCV require the cross validation object for the cv argument, e.g. GroupKFold or any other CV splitter from sklearn.model_selection. However, how can I use single, static validation set? I have very large…
0
votes
1 answer

skopt: How to dynamically change bounds during optimization?

I have just started using skopt so please feel free to redirect me to any basic tutorial that I might have missed. Anyway, here it goes: I have an optimization problem where I calculate a 2-peaks spectrum via a complex physical model and then…
Chris
  • 89
  • 2
  • 8
0
votes
1 answer

BayesSearchCV parameters

I just read about Bayesian optimization and I want to try it. I installed scikit-optimize and checked the API, and I'm confused: I read that Bayesian optimization starts with some initialize samples. I can't see where I can change this number ?…
Boom
  • 1,145
  • 18
  • 44
0
votes
1 answer

Using @use_named_args from Scikit Optimize

I'm having a problem on using @use_named_args from Scikit Optimize. The problem is that my objective function accepts the arguments NamedTuple and I can't change this because this is the requirement in the project I'm working on. Now, I need to…
eng2019
  • 953
  • 10
  • 26
0
votes
1 answer

How to use scikit-learn optimize in a class (especially the use_named_args decorator)?

I am using the scikit-learn optimize package to tune the hyperparameters of my model. For performance and readability reasons (I am training several models with the same process), I want to structure the whole hyperparameter-tuning in a…
0
votes
0 answers

Can changing constraints be used with the scikit-optimize API?

The canonical use case for scikit-optimize is an optimization objective given a fixed set of hyperparameters, where skopt is given full control to explore the space. However, one may wish to simultaneously expose a variable to skopt and fix it to a…
Brian Bien
  • 723
  • 8
  • 21
0
votes
1 answer

No module named 'sklearn.externals.joblib' ERROR

i am trying to implement a bayesian optimization but already starting having an error while importing 'gp_minimize' from scikit-optimize package from skopt import gp_minimize ` res = gp_minimize(f, # the function to minimize …
0
votes
1 answer

How can you merge several search result files (pkl) to plot them all together?

I have used a couple of computers to run the same script and now have several result_files.pkl. results1 = gp_minimize(func=fitness, dimensions=dimensions, acq_func='gp_hedge', …
Wilfredo
  • 55
  • 6