This repository was archived by the owner on Feb 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 554
This repository was archived by the owner on Feb 28, 2024. It is now read-only.
ValueError: All integer values shouldbe greater than 0.000000 #877
Copy link
Copy link
Closed
Labels
Description
Using skopt 0.7.4 and numpy: 1.18.1 on
OS: Linux Ubuntu
Python: 3.7.6 (default, Jan 8 2020, 19:59:22)
[GCC 7.3.0]
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-32-4988fa5b3e0a> in <module>
1 # Fit the model
2 # Fails at model 10 with: ValueError: All integer values shouldbe greater than 0.000000
----> 3 result = bayes_cv_tuner.fit(X, y, callback=status_print)
~/anaconda3/envs/lgbm/lib/python3.7/site-packages/skopt/searchcv.py in fit(self, X, y, groups, callback)
678 optim_result = self._step(
679 X, y, search_space, optimizer,
--> 680 groups=groups, n_points=n_points_adjusted
681 )
682 n_iter -= n_points
~/anaconda3/envs/lgbm/lib/python3.7/site-packages/skopt/searchcv.py in _step(self, X, y, search_space, optimizer, groups, n_points)
550
551 # get parameter values to evaluate
--> 552 params = optimizer.ask(n_points=n_points)
553
554 # convert parameters to python native types
~/anaconda3/envs/lgbm/lib/python3.7/site-packages/skopt/optimizer/optimizer.py in ask(self, n_points, strategy)
380 opt._tell(x, (y_lie, t_lie))
381 else:
--> 382 opt._tell(x, y_lie)
383
384 self.cache_ = {(n_points, strategy): X} # cache_ the result
~/anaconda3/envs/lgbm/lib/python3.7/site-packages/skopt/optimizer/optimizer.py in _tell(self, x, y, fit)
511 # of points and then pick the best ones as starting points
512 X = self.space.transform(self.space.rvs(
--> 513 n_samples=self.n_points, random_state=self.rng))
514
515 self.next_xs_ = []
~/anaconda3/envs/lgbm/lib/python3.7/site-packages/skopt/space/space.py in transform(self, X)
806 # Transform
807 for j in range(self.n_dims):
--> 808 columns[j] = self.dimensions[j].transform(columns[j])
809
810 # Repack as an array
~/anaconda3/envs/lgbm/lib/python3.7/site-packages/skopt/space/space.py in transform(self, X)
142 def transform(self, X):
143 """Transform samples form the original space to a warped space."""
--> 144 return self.transformer.transform(X)
145
146 def inverse_transform(self, Xt):
~/anaconda3/envs/lgbm/lib/python3.7/site-packages/skopt/space/transformers.py in transform(self, X)
232 def transform(self, X):
233 for transformer in self.transformers:
--> 234 X = transformer.transform(X)
235 return X
236
~/anaconda3/envs/lgbm/lib/python3.7/site-packages/skopt/space/transformers.py in transform(self, X)
181 if np.any(np.round(X) < self.low):
182 raise ValueError("All integer values should"
--> 183 "be greater than %f" % self.low)
184 else:
185 if np.any(X > self.high + 1e-8):
ValueError: All integer values shouldbe greater than 0.000000