|
Download task_035/instruction.md from Lego-X/UXInteract: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_035/instruction.md
- Command line
-
hf download hf://datasets/Lego-X/UXInteract/task_035/instruction.md
-
curl -L -o instruction.md https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_035/instruction.md
1.35 kB
Optimize an F1 threshold
Write solve.py to choose the clarity-score threshold that maximizes binary F1 on the supplied dataset. Run python3 solve.py from the project root. Read test.csv on every run; its columns are url (identifier only), score (finite real number), and label (clear or blurry). Do not fetch images or use the network.
Threshold and output
Consider the distinct scores in the current file as candidate thresholds. At threshold t, predict clear for score >= t and blurry otherwise, so rows with tied scores receive the same prediction. Treat clear as positive. Compute F1 as 2*TP / (2*TP + FP + FN), or zero when the denominator is zero. Select any candidate achieving the maximum; scores are not restricted to [0,1].
- Write
threshold_metrics.jsonwith finite numericthresholdandf1fields. Keep the selected score unrounded and report its actual F1. - Write
threshold_report.txtwith clearly labeledthreshold:andF1 score:values at no fewer than three decimal places, consistent with the JSON.
Acceptance Checklist
- The threshold comes from the current scores and achieves their maximum attainable F1. The JSON and formatted report agree.
- New score distributions, tied scores and inputs with only one class are handled without fixed thresholds, downloads or errors.