Diverse Mini-batch Active Learning#134
Open
mbrine555 wants to merge 6 commits intomodAL-python:devfrom
Open
Conversation
added 6 commits
June 19, 2021 12:16
| Returns: | ||
| Indices of the instances from `X` chosen to be labelled | ||
| """ | ||
| uncertainty = classifier_margin(classifier, X, **uncertainty_measure_kwargs) |
Contributor
There was a problem hiding this comment.
so you only support margin uncertainty? I would suggest to add the callable as param of the function, and default to classifier_margin.
|
|
||
| # Limit data set based on n_instances and filter_param | ||
| record_limit = filter_param * n_instances | ||
| keep_args = np.argsort(uncertainty_scores)[-record_limit:] |
Contributor
There was a problem hiding this comment.
argsort is suboptimal in this case because we only need to partition at the record_limitth instance.
argpartition is better suited for that. it is O(n) as opposed to O(nlog(n)) for argsort. you can use multi_argmax, or shuffled_argmax already implemented in selection.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a PR that implements a new batch active learning query strategy (as mentioned in #119). Diverse Mini-batch Active Learning attempts to take into account both informativeness and diversity when selecting a batch of new examples to be labeled. It's also worth noting that this involves bumping the required
scikit-learnversion from0.18 -> 0.20.I'm not sure if there's any additional documentation you'd like to have added around this, so just let me know!