Buckets:
| #!/usr/bin/env python3 | |
| """Claim 5: verify synthetic binding task design (disjoint colors, chance, shapes).""" | |
| from __future__ import annotations | |
| import json | |
| from pathlib import Path | |
| import numpy as np | |
| from binding_task import ( | |
| COLOR_NAMES, | |
| SHAPES, | |
| generate_binding_trials, | |
| generate_samediff_trials, | |
| verify_disjoint_colors, | |
| ) | |
| def main(): | |
| trials = generate_binding_trials(500, seed=42) | |
| sd = generate_samediff_trials(500, seed=42) | |
| disjoint = verify_disjoint_colors(trials) | |
| # Random baseline | |
| rng = np.random.default_rng(0) | |
| chance = float(np.mean([rng.integers(0, 4) == t.target_index for t in trials])) | |
| same_rate = float(np.mean([t.same for t in sd])) | |
| out = { | |
| "n_binding": len(trials), | |
| "n_samediff": len(sd), | |
| "shapes": list(SHAPES), | |
| "colors": list(COLOR_NAMES), | |
| "disjoint_color_rate": disjoint, | |
| "candidates_per_trial": 4, | |
| "chance_level_binding": 0.25, | |
| "empirical_random_accuracy": chance, | |
| "samediff_same_fraction": same_rate, | |
| "claim5_verified": disjoint == 1.0 and len(trials) == 500, | |
| } | |
| Path("outputs").mkdir(exist_ok=True) | |
| Path("outputs/claim5_task_stats.json").write_text(json.dumps(out, indent=2)) | |
| print(json.dumps(out, indent=2)) | |
| if __name__ == "__main__": | |
| main() | |
Xet Storage Details
- Size:
- 1.33 kB
- Xet hash:
- 29fa515f3c08d4320309316f9b85a66fc2ad984ba6682f3c5d81dd332f9d9da4
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.