Skip to content

Add interactive GP concrete strength explorer (BOxCrete website) + PartialFixedNoiseLikelihood - #14

Merged
SebastianAment merged 2 commits into
mainfrom
interactive-gp-website
May 7, 2026
Merged

Add interactive GP concrete strength explorer (BOxCrete website) + PartialFixedNoiseLikelihood#14
SebastianAment merged 2 commits into
mainfrom
interactive-gp-website

Conversation

@SebastianAment

Copy link
Copy Markdown
Contributor

This PR adds two related changes that together ship the public BOxCrete interactive web explorer.

1. PartialFixedNoiseLikelihood

A new Gaussian likelihood (in boxcrete/models.py) that learns observation noise on real data while applying a fixed near-zero noise to a tail of pseudo-observations. This lets GPs be conditioned to pass through pseudo-points (e.g. zero strength at time zero) with high certainty while still learning the real-data noise via marginal-likelihood optimization. Exported from boxcrete.__init__.

  • New: test/test_partial_fixed_noise_likelihood.py — unit tests for the new class.
  • Updated: test/test_utils.pytest_get_day_zero_data accounts for non-unique X rows when generating day-zero pseudo-observations.

2. Interactive GP concrete strength explorer (BOxCrete website)

A GitHub Pages site at docs/ that runs the trained Gaussian process directly in the browser via a WASM build of the BLAS routines and a small JS port of the GP (gp.mjs). Users can explore mix design tradeoffs interactively without any backend.

Features

  • Composition sliders with SI / imperial unit toggle.
  • Performance-tradeoff scatter (GWP / cost / strength) with switchable axes, multi-row filters, and Pareto-optimal labelling.
  • Predicted strength curve with ±2σ uncertainty band and a "far from data" warning when extrapolating.
  • Per-mix and per-ingredient insight panels (docs/model/mix_analyses.json).
  • About modal, citation copy buttons (BibTeX / APA), references panel.
  • Light / dark themes with frosted-glass header and animated gradient.
  • Mobile-first responsive layout: unified scatter / sliders panel with tab-style toggle, viewport-fit panels, evenly-spaced header items, sticky header (preserved through overflow-x: clip to avoid the iOS Safari sticky/overflow bug), and iOS background fixes via a fixed bg-layer element.

Supporting infrastructure

  • scripts/export_model.py — serializes the trained GP to JSON for the web UI.
  • docs/model/*.json — exported GP parameters, training data, mix analyses.
  • docs/blas_f64.{wasm,js} — WASM glue for matrix ops in the browser.
  • test/test_js_gp.mjs — parity test for the JS GP against the Python model.
  • .github/workflows/js-sync.yml — CI to keep the JS GP in sync with the Python model.

Testing

  • Full Python suite: 176 passed.
  • JS GP parity test passes against the Python model.
  • Manual QA on desktop (light/dark) and mobile (Safari iOS, Chrome Android): sliders, scatter axis switches, filters, Pareto labelling, mix/ingredient insights, citation copy, theme toggle, unit toggle, mobile panel toggle, and responsive header all working.

Deployment

The site is served from docs/ via GitHub Pages. After merge, the live URL will reflect this commit automatically.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 7, 2026
Comment thread .github/workflows/js-sync.yml Fixed
Introduces PartialFixedNoiseLikelihood, a Gaussian likelihood that learns
noise for real observations while applying fixed near-zero noise to a tail
of pseudo-observations. This lets GPs be conditioned to pass through
pseudo-points (e.g. zero strength at time zero) with high certainty while
still learning observation noise on real data via marginal-likelihood
optimization.

- boxcrete/models.py: new PartialFixedNoiseLikelihood class + integration
- boxcrete/__init__.py: export the new class
- boxcrete/utils.py: supporting changes
- test/test_utils.py: extended utility tests
- test/test_partial_fixed_noise_likelihood.py: tests for the new likelihood
GitHub Pages site at docs/ providing an interactive web UI for exploring
concrete mix compressive-strength predictions from the Gaussian process
model. The page runs the GP entirely in the browser via a WASM build of
the BLAS routines and a small JS port (gp.mjs).

Highlights
- Composition sliders with SI/imperial unit toggle
- Performance-tradeoff scatter (GWP, cost, strength) with axis switches,
  filters, and Pareto-optimal labelling
- Predicted strength curve with \u00b12\u03c3 uncertainty band and far-from-data
  warning
- Per-mix and per-ingredient insight panels (mix_analyses.json)
- About modal, citation copy buttons (BibTeX/APA), references panel
- Light/dark themes with frosted-glass header and animated gradient
- Mobile-first responsive layout: unified scatter/sliders panel with
  tab-style toggle, viewport-fit panels, evenly-spaced header items,
  iOS background fixes via fixed bg-layer
- Header restructured into h1 + .header-links (centered nav) +
  .header-actions wrapper so right-anchored controls survive when
  individual children are hidden on mobile

Supporting infrastructure
- scripts/export_model.py: serializes the trained GP to JSON for the web UI
- docs/model/*.json: exported GP parameters, training data, mix analyses
- docs/blas_f64.{wasm,js}: WASM glue for matrix ops in the browser
- test/test_js_gp.mjs: parity test for the JS GP against the Python model
- .github/workflows/js-sync.yml: CI to keep JS GP in sync
@SebastianAment
SebastianAment force-pushed the interactive-gp-website branch from 8936ac1 to 5cb35db Compare May 7, 2026 20:47
@SebastianAment
SebastianAment merged commit 2b9d267 into main May 7, 2026
18 checks passed
@SebastianAment
SebastianAment deleted the interactive-gp-website branch May 7, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants