Views
No views yet
| Model | Dev CV mean R² |
|---|---|
| Ridge causal baseline | 0.327 |
| Single causal GRU (d256) | 0.389 |
| GRU ensemble (3×d256 + 2×d384) | 0.3922 |
gru/d256_s{42,123,7}.pt # 3 GRU members, d_model=256, 2 layers
gru/d384_s{42,123}.pt # 2 GRU members, d_model=384, 2 layers
solution.py # competition entry point (online PredictionModel)
src/ # model + inference code
config/folds.json # locked sequence-grouped CV folds
reports/ # technical reportmodel_state_dict + a config describing the
architecture, so src/models/sequence_inference.py::load_gru_checkpoint rebuilds
it without external metadata.1import numpy as np, torch
2from src.models.sequence_inference import GRUStatefulPredictionModel, load_gru_checkpoint
3from src.models.ensemble_predictor import EnsemblePredictionModel
4from pathlib import Path
5
6members = [GRUStatefulPredictionModel(load_gru_checkpoint(p))
7 for p in sorted(Path("gru").glob("*.pt"))]
8model = EnsemblePredictionModel(members) # equal-weight average
9
10class DP: # minimal DataPoint
11 def __init__(s, seq_ix, step, need, state):
12 s.seq_ix, s.step_in_seq, s.need_prediction, s.state = seq_ix, step, need, state
13
14# feed states one at a time; reset on a new seq_ix; predicts the NEXT state
15for t in range(1000):
16 pred = model.predict(DP(0, t, t >= 100, np.random.randn(32).astype("float32")))
17 # pred is None during warm-up (steps 0..99), else an (32,) float32 vectorsolution.py directly (auto-discovers models/submission/gru/*.pt).