Spaces:
Sleeping
Sleeping
Commit History
-
Fix ImportError: replace _normalize_name_text import in trajectory_model.py
Phase 1C removed _normalize_name_text from pitcher_adjustment.py but trajectory_model.py was still importing it directly from there, causing a startup crash on HF Spaces. Now imports normalize_pitcher_name from data.odds_name_map aliased as _normalize_name_text so internal usage lines are unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>2d30550 -
Merge remote: resolve mlb_starters.py conflict — keep conn param + remote team canonical map
Remote added _MLB_TEAM_CANONICAL, _canonical_team, _normalize_person, _names_match, build_oddsapi_starter_fallback_map, merge_probable_starters_with_odds_fallback, fetch_mlb_current_roster_map, and lookup_batter_current_team. Combined with our conn=None parameter and pitcher_resolution_log logging additions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>abe5c7e -
Accuracy overhaul: pitcher resolution logging, baseline recalibration, vig fix, XGBoost blend
Phase 1: Unified pitcher name normalization (normalize_pitcher_name), added pitcher_resolution_log table with logging from mlb_starters, live feed, and statcast lookup. Color-coded debug page section for resolution audit. Phase 2: Baseline HR probability 0.045 → 0.036 (empirical MLB 2024 per-PA rate). Phase 3: HR edge now uses single-sided vig removal (p / 1.055) instead of circular two-way normalization. Added kelly_pct to recommendation output. Phase 4: Removed double-counted temperature/wind adjustments from context_adjustment.py — environment_model.py owns all weather signals. Phase 5: BET threshold 6%/78 → 3.5%/72; WATCH 2.5%/62 → 1.5%/58. Phase 6: XGBoost HR delta blended at 20% weight when xgb_blend_eligible. Added validate_xgb_batch() for batch-level sanity checks. Phase 7: Hit-type distribution corrected — singles 0.76→0.62, doubles 0.20→0.33 (empirical MLB 2024 non-HR hit mix). Phase 9: edge.py converted to re-exports from no_vig_props.py (single source of truth for al…21151ce
-
Optimize props load path and reuse modeled state
2885bcc
-
Fix strikeout v2 reason tag payload
71e8078 -
Promote strikeout v2 and harden telemetry models
50dc123 -
Add props confidence breakdown diagnostics
d3b6f35 -
Improve load-time caching and baseline snapshots
c4ae8c3
-
Add shared multi-year baseline service
7b3d14f -
Personalize props model voice
4c8e6d6 -
Expand props with verdicts strikeouts and loader
6989587 -
Upgrade props HR calibration and Fangraphs fallback
0010624 -
Fix props pregame HR routing and odds provider fallback
87523c1 -
Add shared pregame HR engine for Props
9246aa7 -
Fix Model HR% blank: name format mismatch + column renames
Root causes: 1. Baseball Savant uses "Last, First" names; sportsbooks use "First Last". _build_statcast_name_index() now uses to_canonical_name() (from card lab) to index both forms — fixes 100% player lookup failure. 2. normalize_statcast() renames estimated_woba_using_speedangle → xwoba and stand → batter_stand. batter_baseline.py still used original names → xwoba always None, batter_stand always defaulted to "R". Fixed both lookups. 3. normalize_statcast() silently dropped spray_angle, hc_x, hc_y, bb_type. Added to rename_map so pull_rate, air_ball_rate, bb_type shape metrics are available to compute_batter_baseline(). 4. Added WARNING log after statcast load showing row count + sample names to confirm load success and name format in HuggingFace Spaces logs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>70995df
-
Audit-confirmed fixes: matchup confidence blend + platoon unknown handling
- zone_matchup_model + matchup_model: sample_size now populated so confidence_blend branch is reachable (was always max_fallback before) - live_fair_simulator_v3: batter_stand/p_throws default to None → unknown rows get multiplier 1.0 instead of false 0.92 suppression - Supporting changes: props mapper, recommendation engine, schedule, scores, bullpen model, pitcher adjustment/state, rolling form, zone matchup, debug page, logger utility Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>95e27f5
-
Post-patch cleanup: statcast season derivation + platoon lower bounds
- statcast.py: derive season from start_date instead of hardcoding "2026" - live_fair_simulator_v3.py: add max() lower bounds to opposite-hand platoon path Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>dca8dd7 -
Feedback tab + Batch 13 debug refinements + rebrand to Kasper
- Add Feedback nav tab (CockroachDB-backed submit + display) - Add missing snap_after_family_zone_* and snap_after_pulled_contact_* checkpoints to simulator - Add arsenal_drift_applied_scale to drift model output and simulator passthrough - Expand debug ladder to 12 steps with HR/Hit/TB2P toggle - Rebrand dashboard header to Kasper with updated product description - Add arsenal_drift_model.py and rolling_form_model.py (Batch 13 models) - Add debug_page.py (Batch 13 full debug dashboard) - Opportunity model and pitcher adjustment updates Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b3ac245 -
Batch 12.5D: XGBoost shadow model + evaluation pipeline + lineup_slot JOIN fix
- Add XGBoost HR/hit/TB2P models (trainer, dataset builder, shadow integration) - Add evaluation pipeline with 3-key JOIN (game_pk + batter_name + lineup_slot) - Fix lineup_slot schema in both DB tables with safe migration - Normalize lineup_slot in both logger paths for consistent JOIN - Add placeholder-odds disclaimer to Edge/ROI evaluation output - Add .gitignore excluding .claude/ and __pycache__ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>71c16c1
-
Batch 12A-12G: Player Analysis Suite — batter shape taxonomy, trend model, archetype classifier, pitcher contact-shape enrichment
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>32229d8 -
Batch 11: Environment Model — park + game-time weather + wind-direction overlay
- models/stadium_lookup.py: 30-park registry (lat/lon/cf_bearing) + resolve_stadium() - models/weather_provider.py: Open-Meteo hourly fetch aligned to scheduled game time - models/environment_model.py: park adj + weather adj + wind bucket → env_hr/hit/tb2p boosts - data/schedule.py: populate venue + game_datetime_utc from MLB Stats API; WBC schema parity - live_fair_simulator_v3.py: replace Phase C2 with additive env overlay; env_adj hoisted outside batter loop; 15 new output fields Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b96cb2a -
Batch 9/10 visibility polish: surface arsenal and family-zone matchup fields in output
- Add arsenal_hit_boost, arsenal_hr_boost, arsenal_tb2p_boost, arsenal_whiff_risk, arsenal_sample_size - Add family_zone_hit/hr/tb2p_boost, family_zone_whiff_risk, family_zone_sample_size, pitcher_family_zone_sample_size - Fix traj_boost key names (hit_adj / hr_adj / tb2p_adj) so trajectory fields are non-None in output - No math, weights, ordering, or clamps changed — visibility-only patch Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>def0d64 -
Batch 10 explainability: surface trajectory fields and reason_tags in output
- Add deception_score, tunnel_score, release_consistency_score, trajectory_sample_size to output row - Add traj_hit_boost, traj_hr_boost, traj_tb2p_boost stubs (safe .get()) - Merge traj_adj reason_tags[:1] into simulator reason_tags (max 5 total) - No logic, math, or weighting changes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>e85eb56 -
Batch 9/10: fix velocity double-count, add trajectory/deception physics layer
- pitcher_adjustment.py: remove coarse velo block (≥96/≤91) superseded by G1 precision tiers - trajectory_model.py: new file — kinematic trajectory reconstruction, tunneling metric, release consistency, and arsenal deception score from raw Statcast fields - live_fair_simulator_v3.py: wire trajectory adjustment into simulation pipeline Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>3dab900 -
Phase A-I audit: park factors, platoon adj, pitch sequencing, simulation overhaul
- features/park_factors.py: expanded to 30 MLB venues, added venue_hr_factor() - models/batter_baseline.py: batter_stand extraction, LHB baseline bonus - models/live_fair_simulator_v3.py: n_sims 10k, park factor integration, platoon adj, logging - models/pitch_sequence_model.py: count-state table, player usage rates, handedness support - models/pitcher_adjustment.py: p_throws extraction, logging, velocity bands - simulation/monte_carlo.py: fresh seed, hierarchical sampling, batter hit distribution - simulation/pa_outcome_sampler.py: movement_magnitude parameter - simulation/pitch_simulator.py: n_sims 10k default, pfx movement threading Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>01d9b69 -
Update models/live_fair_simulator_v3.py
Verified signaturef1f8eec -
Update models/live_fair_simulator_v3.py
Verified signaturef14d2ba -
Update models/live_fair_simulator_v3.py
Verified signature264d913 -
Update models/live_fair_simulator_v3.py
Verified signatured37820e -
Update models/matchup_model.py
Verified signatureccdc422 -
Create family_zone_profile_store.py
Verified signature272a64d
-
Update models/live_fair_simulator_v3.py
Verified signature770a155 -
Create arsenal_matchup_model.py
Verified signature6116739 -
Create pitcher_arsenal_model.py
Verified signature907228e -
Create batter_arsenal_model.py
Verified signature91ff9d0 -
Update models/live_fair_simulator_v3.py
Verified signaturefbe3e2d -
Update models/batter_baseline.py
Verified signature9e56c6f -
Update models/batter_baseline.py
Verified signatured4b3772 -
Update models/matchup_model.py
Verified signature584f3a7 -
Update models/matchup_model.py
Verified signature30aa3ab -
Update models/matchup_model.py
Verified signature8d328c4 -
Update models/pitcher_zone_model.py
Verified signature67a37ca -
Update models/pitcher_baseline_store.py
Verified signature2fa6934 -
Update models/pitcher_baseline_store.py
Verified signaturee25cdb5 -
Update models/batter_zone_store.py
Verified signature63a4a27 -
Update models/batter_zone_store.py
Verified signatureccb13ce -
Update models/pitcher_baseline_store.py
Verified signature07cccee -
Update models/batter_zone_store.py
Verified signature8d87338 -
Create pitcher_zone_model.py
Verified signature424b5b9 -
Update models/batter_zone_model.py
Verified signature26e1c80