(self,
estimator: BaseEstimator,
query_strategy: Callable = max_EI,
X_training: Optional[modALinput] = None,
y_training: Optional[modALinput] = None,
bootstrap_init: bool = False,
on_transformed: bool = False,
**fit_kwargs)
| 370 | """ |
| 371 | |
| 372 | def __init__(self, |
| 373 | estimator: BaseEstimator, |
| 374 | query_strategy: Callable = max_EI, |
| 375 | X_training: Optional[modALinput] = None, |
| 376 | y_training: Optional[modALinput] = None, |
| 377 | bootstrap_init: bool = False, |
| 378 | on_transformed: bool = False, |
| 379 | **fit_kwargs) -> None: |
| 380 | super(BayesianOptimizer, self).__init__(estimator, query_strategy, |
| 381 | X_training, y_training, bootstrap_init, on_transformed, **fit_kwargs) |
| 382 | # setting the maximum value |
| 383 | if self.y_training is not None: |
| 384 | max_idx = np.argmax(self.y_training) |
| 385 | self.X_max = retrieve_rows(self.X_training, max_idx) |
| 386 | self.y_max = self.y_training[max_idx] |
| 387 | else: |
| 388 | self.X_max = None |
| 389 | self.y_max = -np.inf |
| 390 | |
| 391 | def _set_max(self, X: modALinput, y: modALinput) -> None: |
| 392 | max_idx = np.argmax(y) |
nothing calls this directly
no test coverage detected