swap.utils.control
¶
swap.utils.collection
¶
swap.utils.parser
¶
swap.utils.subject
¶
-
class
swap.utils.subject.
Subject
(subject, gold, config, score=None, seen=0, retired=None)[source]¶ Bases:
object
Class to track an individual subject, its gold status, and its score.
-
__init__
(subject, gold, config, score=None, seen=0, retired=None)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
classify
(user, cl)[source]¶ Add a classification to this subject
user: user that made the classification cl: classification, 1 or 0
-
score
¶
-
-
class
swap.utils.subject.
Subjects
(config, items=None)[source]¶ Bases:
swap.utils.collection.Collection
Collection of Subjects
-
class
swap.utils.subject.
Thresholds
(subjects, fpr, mdr, thresholds=None)[source]¶ Bases:
object
Class to determine retirement thresholds
Thresholds are determined from the false positive rate (fpr) and the missed detection rate (mdr), considering only the subjects with gold labels. The bogus retirement threshold is set such that a rate equal to mdr of real subjects are mislabeled as bogus. The real retirement threshold is set such that a rate equal to fpr of bogus subjects are labeled as real.
swap.utils.user
¶
-
class
swap.utils.user.
User
(user, username, confusion, config)[source]¶ Bases:
object
-
__init__
(user, username, confusion, config)[source]¶ Parameters: confusion (([0_numer, 1_numer], [0_denom, 1_denom])) –
-
confusion
¶
-
score
¶
-
caesar_external.extractor
¶
Get classifications from Panoptes
caesar_external.reducer
¶
Get classifications from Panoptes
caesar_external.data
¶
Storage module to track which classification was gotten last