Maximum PI query strategy. Selects the instance with highest probability of improvement. Args: optimizer: The :class:`~modAL.models.BayesianOptimizer` object for which the utility is to be calculated. X: The samples for which the probability of improvement is to be calculat
(optimizer: BaseLearner, X: modALinput, tradeoff: float = 0,
n_instances: int = 1)
| 103 | |
| 104 | |
| 105 | def max_PI(optimizer: BaseLearner, X: modALinput, tradeoff: float = 0, |
| 106 | n_instances: int = 1) -> np.ndarray: |
| 107 | """ |
| 108 | Maximum PI query strategy. Selects the instance with highest probability of improvement. |
| 109 | |
| 110 | Args: |
| 111 | optimizer: The :class:`~modAL.models.BayesianOptimizer` object for which the utility is to be calculated. |
| 112 | X: The samples for which the probability of improvement is to be calculated. |
| 113 | tradeoff: Value controlling the tradeoff parameter. |
| 114 | n_instances: Number of samples to be queried. |
| 115 | |
| 116 | Returns: |
| 117 | The indices of the instances from X chosen to be labelled. |
| 118 | The pi metric of the chosen instances. |
| 119 | |
| 120 | """ |
| 121 | pi = optimizer_PI(optimizer, X, tradeoff=tradeoff) |
| 122 | return multi_argmax(pi, n_instances=n_instances) |
| 123 | |
| 124 | |
| 125 | def max_EI(optimizer: BaseLearner, X: modALinput, tradeoff: float = 0, |
nothing calls this directly
no test coverage detected
searching dependent graphs…