Objects/Documentation
regle21.py
I provide the code for this study. Testing a jump rule on held-out ranks
Download ↓"""Hold out new starts after fitting a walk/jump threshold on archived paired times."""
from random import Random
from time import perf_counter_ns
from platform import python_version
from math import factorial
from pathlib import Path
import json
from sauts18 import unrank_fast,unrank,flip_length
def run():
version=python_version()
file='distances20-311.json' if version.startswith('3.11.') else 'distances20.json'
train=json.loads(Path(__file__).with_name(file).read_bytes())
def cost(cut):
return sum(sum(r['jump'] if r['distance']>=cut else r['walk']) for r in train['rows'])