pub struct StreamTelemetry {
pub matches: u32,
pub home_wins: u32,
pub draws: u32,
pub away_wins: u32,
pub goals: u32,
pub shots: u32,
pub shots_on_target: u32,
pub goals_by_kind: BTreeMap<ShotKind, u32>,
pub goals_by_source: BTreeMap<ShotSource, u32>,
pub home_events: u32,
pub away_events: u32,
pub by_formation: BTreeMap<u8, FormationStats>,
}Expand description
Accumulates match aggregates directly from MatchOutcome traces —
everything SeasonTelemetry can’t see because the fold discards the
stream. Mirrors the notebook’s report() fields.
Fields§
§matches: u32§home_wins: u32§draws: u32§away_wins: u32§goals: u32§shots: u32§shots_on_target: u32§goals_by_kind: BTreeMap<ShotKind, u32>§goals_by_source: BTreeMap<ShotSource, u32>Goals keyed by arrival route (MATCH_MODEL.md §5) — what makes the
wide-origin-goal-share target (cross + cutback, §8) computable,
distinct from goals_by_kind’s coarser Finish/Header/LongShot split.
home_events: u32A crude possession proxy: total stream events attributed to each side (more events ⇒ more time on the ball / advancing it).
away_events: u32§by_formation: BTreeMap<u8, FormationStats>Keyed by Lineup::formation index into FORMATIONS.
Implementations§
Source§impl StreamTelemetry
impl StreamTelemetry
Sourcepub fn record(
&mut self,
outcome: &MatchOutcome,
home_formation: u8,
away_formation: u8,
)
pub fn record( &mut self, outcome: &MatchOutcome, home_formation: u8, away_formation: u8, )
Fold one match’s trace in. home_formation/away_formation are the
Lineup::formation index each side fielded, for the per-formation
breakdown (MATCH_MODEL.md §10 item 1’s diagnostic).
pub fn goals_per_match(&self) -> f64
pub fn shots_per_match(&self) -> f64
pub fn home_win_rate(&self) -> f64
pub fn draw_rate(&self) -> f64
pub fn away_win_rate(&self) -> f64
pub fn shot_on_target_rate(&self) -> f64
pub fn conversion_rate(&self) -> f64
Share of goals scored via ShotKind::Header — the headed-goal-share
calibration target (MATCH_MODEL.md §8).
Share of goals arriving via ShotSource::Cross or Cutback — the
wide-origin-goal-share calibration target (MATCH_MODEL.md §8:
“cross + cutback”), 25-35%.
Home share of the possession-proxy event count.
Trait Implementations§
Source§impl Clone for StreamTelemetry
impl Clone for StreamTelemetry
Source§fn clone(&self) -> StreamTelemetry
fn clone(&self) -> StreamTelemetry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more