Commit Graph
5 Commits
Author SHA1 Message Date
wesandClaude Opus 4.7 f7e0042ef8 Add "How Busy?" tab: 4 learned tiers + dual logistic regression
New dashboard tab that rates current park crowding:

- Tiers: k-means on park-wide mean wait yields 4 ordinal levels
  ("Walk right on" / "Pleasant" / "Packed" / "What were you
  thinking?!"), with the rare 0.6% zoo tail isolated as its own
  tier rather than buried in a quartile.
- Board-reading model: multinomial LR on per-ride waits -> tier.
  Drives the live gauge (current avg wait + predicted tier +
  confidence + class-probability bar). Near-perfect by construction
  -- honest framing baked into the model card.
- Calendar-forecast model: LR on hour/dow/month/weekend -> tier,
  evaluated with GroupKFold by date to avoid same-day leakage.
  Drives the "expected vs actual" verdict for the current moment.
- Bellwether rides bar (top tier coefficients) and a confusion-
  matrix expander tell the honest story: forecast barely beats
  baseline on everyday tiers, but pins the zoo tier nearly 100% --
  because Knoebels' worst crowds are locked to specific October
  festival weekends. "The chaos has a schedule."

Implementation notes: trained models cached via st.cache_resource
(6h), live snapshot fetched separately on a 5-min ttl. Context
features use a fixed column set so live inference always aligns.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 23:38:23 -04:00
wesandClaude Opus 4.7 ad163cb996 Expose PC4 and make the PCA behavioral map configurable
- compute_pca now fits 4 components; PC4 added to PC_LABELS/PC_BLURB
  ("off-peak spread vs headliner pull", ~5% variance, framed as
  diminishing returns).
- "Read an axis" loadings explorer gains PC4.
- The behavioral-map scatter becomes interactive: pick any two
  components for the X/Y axes, and color by category tag, spatial
  area, or any component's loading (continuous RdBu, symmetric).
- Headline caption pinned to evr[:3] so "3 axes = 60%" stays true;
  the by-hour clock stays PC1-3 to preserve the three-axes story.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 19:54:52 -04:00
wesandClaude Opus 4.7 e65d1c796c Name the GPS k-means areas by their marquee ride
Replace the "Area N" fallbacks with derived names: Kiddieland
(lowest mean PC2) plus The Woodies / The Grand Midway / Flying
Turns Grove / Giant Wheel Corner, each keyed off the headline
ride that lands in the cluster so the labels survive re-clustering
as the wait history grows.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 19:35:42 -04:00
wesandClaude Opus 4.7 53109bc7fe Add interactive 3D PCA views to dashboard Park Mind tab
Two spin/zoom Plotly scatter_3d sub-tabs in the PCA tab:
- Rides in PC1xPC2xPC3 (loadings), color by category / GPS
  k-means area / PC1 busyness. Adds GPS k-means areas to
  compute_pca(), auto-labeling the lowest-PC2 cluster Kiddieland.
- Moments in PC1xPC2xPC3 (per-snapshot scores), color by hour /
  day-of-week / weekend / month, sampled to 15k points if larger.

Pin numpy in requirements (now imported directly).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 18:53:55 -04:00
wesandClaude Opus 4.7 ade774f5aa Add Streamlit app + knb_stats analysis notebooks
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 10:06:19 -04:00