Maximum EI query strategy. Selects the instance with highest expected improvement. Args: optimizer: The :class:`~modAL.models.BayesianOptimizer` object for which the utility is to be calculated. X: The samples for which the expected improvement is to be calculated.
(optimizer: BaseLearner, X: modALinput, tradeoff: float = 0,
n_instances: int = 1)
| 123 | |
| 124 | |
| 125 | def max_EI(optimizer: BaseLearner, X: modALinput, tradeoff: float = 0, |
| 126 | n_instances: int = 1) -> np.ndarray: |
| 127 | """ |
| 128 | Maximum EI query strategy. Selects the instance with highest expected improvement. |
| 129 | |
| 130 | Args: |
| 131 | optimizer: The :class:`~modAL.models.BayesianOptimizer` object for which the utility is to be calculated. |
| 132 | X: The samples for which the expected improvement is to be calculated. |
| 133 | tradeoff: Value controlling the tradeoff parameter. |
| 134 | n_instances: Number of samples to be queried. |
| 135 | |
| 136 | Returns: |
| 137 | The indices of the instances from X chosen to be labelled. |
| 138 | The ei metric of the chosen instances. |
| 139 | |
| 140 | """ |
| 141 | ei = optimizer_EI(optimizer, X, tradeoff=tradeoff) |
| 142 | return multi_argmax(ei, n_instances=n_instances) |
| 143 | |
| 144 | |
| 145 | def max_UCB(optimizer: BaseLearner, X: modALinput, beta: float = 1, |
nothing calls this directly
no test coverage detected
searching dependent graphs…