-
Notifications
You must be signed in to change notification settings - Fork 15
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
Adding the ability to specify classes to filter user-skill calculation #796
Conversation
tagging @ramanakumars as well for visibility and crosschecking. |
Hi @CKrawczyk -- Would you mind reviewing this PR? |
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.
All changes look reasonable to me. It might be worth adding a new test to https://github.com/zooniverse/aggregation-for-caesar/blob/master/panoptes_aggregation/tests/reducer_tests/test_user_skill_reducer.py but this is not a blocker.
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.
lines 60-64 reflect a slightly different treatment of the focus_classes
keyword argument input so that the tests can ingest this info.
@CKrawczyk I added a test for the |
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.
Looks good. Let me know when you are happy to have it merged.
@CKrawczyk @lcjohnso , thank you! I am happy for it to be merged whenever works for either/both of you. |
Context: The current version of the user-skill calculation is done on ALL detected classes present within a task (either the mean skill or that skill for all classes be above a certain
skill_threshold
). This creates a situation where, for a task with large number of classes OR imbalanced datasets, the user has to see at least N images per class before they get a chance to even be considered for leveling up.Motivation: Research teams should be given the opportunity to provide specific classes using which they can judge the leveling up decision.
This PR:
user_skill_reducer
function now takes infocus_classes
argument (default: None
).focus_classes
are provided (e.g., ['square', 'triangle']), then compute themean_skill
,null_removed_classes
, andnull_removed_class_counts
on these subset classes (instead of everything).lines 87-89
were done as this block of code is just repeated betweenif binary... else: ...
statement, with the only difference being thenull_class='False'
in the binary case.An example caeasar config looks as such:
.../reducers/user_skill_reducer?mode='one-to-one'&count_threshold=5&focus_classes=['1', '2']&strategy='all'&skill_threshold=0.2