Skip to content

Commit

Permalink
fixing skill calculation for extracts that do not have feedback or di…
Browse files Browse the repository at this point in the history
…fficulty data
  • Loading branch information
Ramanakumar Sankar committed Jul 27, 2023
1 parent 89070fc commit 93150f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions panoptes_aggregation/reducers/user_skill_reducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ def user_skill_reducer(extracts, relevant_reduction=[], mode='binary', null_clas
- level_up : bool
flag to show whether the user should be leveled up using the input thresholds
'''
extracts = [extracti for extracti in extracts if 'feedback' in extracti.keys()]
relevant_reduction = [redi for redi in relevant_reduction if 'difficulty' in redi['data'].keys()]

assert len(extracts) == len(relevant_reduction), f"mismatch in length of extract ({len(extracts)}) and subject difficulty ({len(relevant_reduction)}) arrays!"

# confusion_simple, confusion_subject = get_confusion_matrix(extracts, relevant_reduction, mode, None)
confusion_simple, confusion_subject, classes = get_confusion_matrix(extracts, relevant_reduction, mode, null_class)

Expand Down

0 comments on commit 93150f6

Please sign in to comment.