Maximum UCB query strategy. Selects the instance with highest upper confidence bound. Args: optimizer: The :class:`~modAL.models.BayesianOptimizer` object for which the utility is to be calculated. X: The samples for which the maximum upper confidence bound is to be calcula
(optimizer: BaseLearner, X: modALinput, beta: float = 1,
n_instances: int = 1)
| 143 | |
| 144 | |
| 145 | def max_UCB(optimizer: BaseLearner, X: modALinput, beta: float = 1, |
| 146 | n_instances: int = 1) -> np.ndarray: |
| 147 | """ |
| 148 | Maximum UCB query strategy. Selects the instance with highest upper confidence bound. |
| 149 | |
| 150 | Args: |
| 151 | optimizer: The :class:`~modAL.models.BayesianOptimizer` object for which the utility is to be calculated. |
| 152 | X: The samples for which the maximum upper confidence bound is to be calculated. |
| 153 | beta: Value controlling the beta parameter. |
| 154 | n_instances: Number of samples to be queried. |
| 155 | |
| 156 | Returns: |
| 157 | The indices of the instances from X chosen to be labelled. |
| 158 | The ucb metric of the chosen instances. |
| 159 | |
| 160 | """ |
| 161 | ucb = optimizer_UCB(optimizer, X, beta=beta) |
| 162 | return multi_argmax(ucb, n_instances=n_instances) |
nothing calls this directly
no test coverage detected
searching dependent graphs…