Skip to content

404 bug incorrect shape handling for annotators parameter in query function in singleannotatorwrapper - #408

Merged
tpham93 merged 13 commits into
developmentfrom
404-bug-incorrect-shape-handling-for-annotators-parameter-in-query-function-in-singleannotatorwrapper
Jul 15, 2024
Merged

tpham93 merged 13 commits into
developmentfrom
404-bug-incorrect-shape-handling-for-annotators-parameter-in-query-function-in-singleannotatorwrapper

Conversation

@LukasLuehrs

Copy link
Copy Markdown
Collaborator

Closes #404 #405

Also, the term candidates and annotators now have more precise definitions.
If both candidates and annotators are None the missing values determine the candidate annotator sample pairs.
Otherwise, if not further specified by candidates and annotators, all candidates and annotators are considered as available in the sense that they can be queried, e.g. if candidates is None and annotators is the integer array [0, 1], for every sample the annotator 0 and the annotator 1 can be queried.
Thereby, there is no more unclear entanglement between y and candidates/annotators.
This is also more inline with the single annotator case, where once candidates are specified, the missing values no longer determine if a sample can be queried.

Further, the term n_candidates is defined to be len(y) if candidates is None and to be len(candidates) else.
This slightly deviates from the definition of n_candidates in the single annotator case, where n_candidates = sum(is_labeled(y)) if candidates is None. However, n_candidates can not meaningfully represent the number of available samples in the multi annotator setting anyway, as the example candidates=[[0.5, 1.0], [2.2, 0.5]], annotators=[[False, False], [True, False]] shows. Here n_candidates==2 by definition of the documentation, but the first sample is not available, leaving one available sample. Thereby, the term n_candidates was ambiguous in the multi annotator setting.

The name n_selectable_candiatates is chosen in the documentation of _transform_cand_annot to be able to reduce the length of X_cand where appropriate.

@mherde
mherde changed the base branch from master to development July 11, 2024 15:25
…ndling-for-annotators-parameter-in-query-function-in-singleannotatorwrapper
@codecov

codecov Bot commented Jul 13, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (4365a59) to head (f4e30a6).

Additional details and impacted files
@@              Coverage Diff              @@
##           development      #408   +/-   ##
=============================================
  Coverage       100.00%   100.00%           
=============================================
  Files               58        58           
  Lines             5096      5096           
=============================================
  Hits              5096      5096           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

mherde added 2 commits July 14, 2024 11:20
…ndling-for-annotators-parameter-in-query-function-in-singleannotatorwrapper
@tpham93
tpham93 merged commit ab1b7a7 into development Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants