Update the gains of the base acquisition functions. Parameters ---------- gp : GaussianProcessRegressor A fitted Gaussian Process.
(self, gp: GaussianProcessRegressor)
| 1236 | return np.argmax(r <= cumsum_softmax_g) # Returns the first True value |
| 1237 | |
| 1238 | def _update_gains(self, gp: GaussianProcessRegressor) -> None: |
| 1239 | """Update the gains of the base acquisition functions. |
| 1240 | |
| 1241 | Parameters |
| 1242 | ---------- |
| 1243 | gp : GaussianProcessRegressor |
| 1244 | A fitted Gaussian Process. |
| 1245 | """ |
| 1246 | with warnings.catch_warnings(): |
| 1247 | warnings.simplefilter("ignore") |
| 1248 | rewards = gp.predict(self.previous_candidates) |
| 1249 | self.gains += rewards |
| 1250 | self.previous_candidates = None |
| 1251 | |
| 1252 | def suggest( |
| 1253 | self, |