Modello di stima Votara «odds-lite» – probabilità che un oggetto federale sia accettato
votara-odds-lite
- Editore
- Votara
- Modalità di accesso
code- Punto di accesso
src/lib/model/odds-lite.ts- Licenza
- AGPL-3.0 (code), CC BY 4.0 (outputs)
- Copertura
- Territorio national · dal 1981 · al 2025
- Lacune
- No pre-vote polls (no open poll data exists, docs/architecture/notes/data-spike.md §(h)). No cantonal simulation — acceptance under the double majority is learned as one outcome. Tie-breakers (Stichfragen) are not estimated. Party recommendations of parties without a swissvotes column (e.g. LPS before 2009, PdA, LdU, LDP, smaller lists) are not counted.
- Usato in
- STEER-03, STEER-04, STEER-06, STEER-07
- Limiti noti
- Votara estimate, not an official forecast. No opinion polls: the model only knows the authorities' and parties' positions and the parliamentary votes, so campaigns, turnout and late swings are invisible to it. Small sample (382 tested votes, about 10 per year) and drift over time; the 20-year half-life was chosen after looking at backtest results, which makes the backtest slightly optimistic. The double majority (people and cantons) is not modelled separately. Recommendations in the data are the final ones; for upcoming votes some parties may not have decided yet (counted as unknown). Party vote shares come from the previous election and do not follow party switches during a legislature. In the backtest the model has a lower Brier score and log loss than the three baselines, but its accuracy (share of correct yes/no calls) is slightly below "follow the Federal Council". Published on Tim's request on 2026-11-01 (docs/06 "Publication gate"); per-vote estimates are shown only where the server sets VOTARA_ODDS_PUBLIC=1 (flag odds_public, default off), and pnpm model:predict logged the estimates of that day before publication.
- File elaborato
- data/model/predictions.csv
Quanto sono aggiornati questi dati?
- Attualità
- Nessun aggiornamento regolare
Non c’è una fonte da consultare regolarmente: Votara lo calcola da sé, oppure la pubblicazione non cambia.
- Periodo coperto
- Non è una serie temporale
- Ultima modifica dei dati
- Ultima consultazione della fonte
- Nessuna consultazione registrata
- Frequenza di aggiornamento
- Calcolato da Votara
Nota del registro (in inglese): pnpm model:run after each voting Sunday or data update (rewrites data/model/odds-lite-backtest.json and odds-lite-model.json). Published estimates are appended by pnpm model:predict (needs VOTARA_ODDS_PUBLIC=1); first lines 2026-11-01.
Lo stato è calcolato a ogni generazione del sito; questa pagina lo mostra al . Risultati dei controlli
Fasi di elaborazione
- Inputs: swissvotes (type, result, recommendations of the Federal Council, the parliament and 12 national parties, final votes in both councils) and bfs-party-strength (party vote shares at National Council elections 1919–2023). Script: scripts/model-run.ts.
- Target: P(accepted) = probability that the object is accepted (official result, double majority included where required). Not P(yes share > 50 %).
- Features (14): intercept; vote type (mandatory referendum, popular initiative, counter-proposal; reference optional referendum); Federal Council and parliament recommendation (+1 yes, −1 no, 0 none) each with a missing indicator; National Council and Council of States final-vote yes share minus 0.5, each with a missing indicator; party support = vote share of parties recommending yes minus those recommending no; party_unknown_share = vote share of covered parties without a known recommendation.
- Party support uses the most recent National Council election held in an earlier calendar year (the data has the election year only). yes/no count; none, free vote, blank ballot, neutral and tie-breaker preferences count as no direction; unknown counts as unknown; a party that no longer exists ("na") follows its successor (CVP and BDP → Die Mitte).
- Fit: L2-regularised logistic regression (λ = 1, intercept not penalised), 25 Newton (IRLS) iterations, time-decay case weights with a 20-year half-life. Hand-rolled, deterministic, no dependency.
- Backtest: for each year 1981–2025 fit on all decided votes before that year and predict its votes; Brier score, log loss, accuracy, 10 calibration bins, per decade and per type, against three time-weighted baselines (base rate per vote type, follow the Federal Council, follow the parliament). Tie-breakers and pending votes are excluded.
- Outputs rounded to 6 decimals. The published model is fitted on every decided vote (1848 – latest voting Sunday) with the same settings.