actsnclass.uncertainty_sampling
- actsnclass.uncertainty_sampling(class_prob: array, test_ids: array, queryable_ids: array, batch=1, screen=False) list
Search for the sample with highest uncertainty in predicted class.
- Parameters:
class_prob (np.array) – Classification probability. One value per class per object.
test_ids (np.array) – Set of ids for objects in the test sample.
queryable_ids (np.array) – Set of ids for objects available for querying.
batch (int (optional)) – Number of objects to be chosen in each batch query. Default is 1.
dump (bool (optional)) – If True display on screen the shift in index and the difference in estimated probabilities of being Ia caused by constraints on the sample available for querying.
- Returns:
query_indx – List of indexes identifying the objects from the test sample to be queried in decreasing order of importance.
- Return type:
list