-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diverse Mini-batch Active Learning #134
base: dev
Are you sure you want to change the base?
Conversation
Returns: | ||
Indices of the instances from `X` chosen to be labelled | ||
""" | ||
uncertainty = classifier_margin(classifier, X, **uncertainty_measure_kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
argsort is suboptimal in this case because we only need to partition at the record_limit
th 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 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-learn
version 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!