Skip to content

Is it possible to get the uncertainty values relative to the Oracle index? #240

Answered by Dref360
ColinS97 asked this question in Q&A
Discussion options

You must be logged in to vote

The full dataset can be accessed throught active_dataset._datataset.

If you use ModelWrapper you can get the uncertainty for all items in the full dataset by doing:

wrapper: ModelWrapper = ... # your_model
al_ds: ActiveLearningDataset = ... # Your active dataset



predictions = wrapper.predict_on_dataset(al_ds._dataset, iterations=N_ITERATIONS, ...) 
uncertainty = BALD().get_uncertainties(predictions)

# `uncertainty` as shape (len(al_ds._dataset),)
# We can easily get the oracle indices sorted by uncertainty.
oracle_indices = uncertainty.argsort()

Let me know if this answer your question.

Also if you need to translate pool indices to oracle indices you can use al_dataset._pool_to_oracle…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ColinS97
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants