Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion code/data_processing/cc_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,17 @@ def cc_qc(self, df, threshold, TS=False):
CATEGORY = 2
print(f"FOR TASK SWITCHING -> Average accuracy at or below 0.5 across conditions and CATEGORY set to 2")

problematic_conditions = QC_UTILS.cond_block_not_reported(raw, self.ACC_COLUMN_NAME, self.COND_COLUMN_NAME, self.INCORRECT_SYMBOL)
# Check for blocks/conditions where every response is either incorrect
# or not reported. The first argument expects the column that defines
# the blocks/conditions and the second is the accuracy column. The
# previous implementation mistakenly flipped these arguments which
# caused the check to operate on the wrong columns.
problematic_conditions = QC_UTILS.cond_block_not_reported(
raw,
self.COND_COLUMN_NAME,
self.ACC_COLUMN_NAME,
self.INCORRECT_SYMBOL,
)

if len(problematic_conditions) != 0:
CATEGORY = 3
Expand Down
10 changes: 9 additions & 1 deletion code/data_processing/mem_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,15 @@ def fn_sm_qc(self, df, threshold):
print(f"Condition/Block '{condition}' has accuracy == 0% and CATEGORY set to 3")
avg_acc /= len(accuracy)

problematic_conditions = QC_UTILS.cond_block_not_reported(raw, self.ACC_COLUMN_NAME, self.COND_COLUMN_NAME, self.INCORRECT_SYMBOL)
# Detect any blocks/conditions where all responses are incorrect or
# missing. The utility expects the condition column first followed by
# the accuracy column; previously these were reversed.
problematic_conditions = QC_UTILS.cond_block_not_reported(
raw,
self.COND_COLUMN_NAME,
self.ACC_COLUMN_NAME,
self.INCORRECT_SYMBOL,
)

if len(problematic_conditions) != 0:
CATEGORY = 3
Expand Down
9 changes: 8 additions & 1 deletion code/data_processing/ps_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,14 @@ def ps_qc(self, submission, threshold, DSST=False):
CATEGORY = 2
print(f"FOR DSST -> Average accuracy at or below 0.5 across conditions and CATEGORY set to 2")

problematic_conditions = QC_UTILS.cond_block_not_reported(raw, self.ACC_COLUMN_NAME, self.COND_COLUMN_NAME, self.INCORRECT_SYMBOL)
# Identify blocks/conditions with only incorrect or missing responses.
# Arguments were previously inverted, leading to incorrect detection.
problematic_conditions = QC_UTILS.cond_block_not_reported(
raw,
self.COND_COLUMN_NAME,
self.ACC_COLUMN_NAME,
self.INCORRECT_SYMBOL,
)

if len(problematic_conditions) != 0:
CATEGORY = 3
Expand Down