Spaces:
Running
Running
Use per-6h calibrated rain probabilities, enable 80% fan by default, and tighten honest UI copy
Browse files- about.html +12 -13
- app.js +9 -9
- engine.js +2 -0
- indra.wasm +2 -2
about.html
CHANGED
|
@@ -20,36 +20,35 @@
|
|
| 20 |
<main>
|
| 21 |
<section class="prose">
|
| 22 |
<h1>About Indra</h1>
|
| 23 |
-
<p><a href="https://huggingface.co/Sculptor-AI/Indra">Indra</a> by <a href="https://huggingface.co/Sculptor-AI">Sculptor AI</a> is a
|
| 24 |
-
<p><b>Zero guidance.</b>
|
| 25 |
|
| 26 |
<h2>What it reads</h2>
|
| 27 |
<ul>
|
| 28 |
-
<li><b>Only this station's past 91 days of observations</b>
|
| 29 |
-
<li><b>
|
| 30 |
-
<li><b>
|
| 31 |
</ul>
|
| 32 |
|
| 33 |
-
<h2>
|
| 34 |
<ul>
|
| 35 |
-
<li><b>
|
| 36 |
-
<li><b>
|
| 37 |
-
<li><b>
|
| 38 |
</ul>
|
| 39 |
|
| 40 |
-
<h2>Verified Benchmarks</h2>
|
| 41 |
-
<p>
|
| 42 |
<table class="tbl">
|
| 43 |
<thead><tr><th>Model (Unseen Zero-Shot, BME280-Only)</th><th>Mean D1–D5 CRPSS</th><th>D1 Rain AUC</th></tr></thead>
|
| 44 |
<tbody>
|
| 45 |
-
<tr><td class="best">Indra (
|
| 46 |
<tr><td>HistGradientBoosting (60 GBDT trees)</td><td>+0.1240</td><td>0.762</td></tr>
|
| 47 |
<tr><td>Ridge Regression</td><td>+0.0683</td><td>0.731</td></tr>
|
| 48 |
<tr><td>Damped Persistence</td><td>+0.0507</td><td>—</td></tr>
|
| 49 |
<tr><td>Persistence</td><td>−0.5619</td><td>—</td></tr>
|
| 50 |
</tbody>
|
| 51 |
</table>
|
| 52 |
-
<p class="note">On untouched 2022 global land ERA5 (30 dates × 4,000 stations), single-node offline Indra achieves Day 1 CRPS 0.95 °C (CRPSS +0.722, calibrated SSR 1.02) vs. deterministic ECMWF IFS HRES (1.07 °C, +0.683), while global 3D NWP/AI models naturally lead Days 2–5 by assimilating planetary upper-air grids.</p>
|
| 53 |
</section>
|
| 54 |
</main>
|
| 55 |
</body>
|
|
|
|
| 20 |
<main>
|
| 21 |
<section class="prose">
|
| 22 |
<h1>About Indra</h1>
|
| 23 |
+
<p><a href="https://huggingface.co/Sculptor-AI/Indra">Indra</a> by <a href="https://huggingface.co/Sculptor-AI">Sculptor AI</a> is a tiny, standalone 5-day probabilistic weather model (<b>1.69M parameters</b>, <b>1.03 MB INT4</b>) built for offline microcontrollers and running here in your browser via a 47 KB freestanding WebAssembly build of the zero-allocation C99 runtime.</p>
|
| 24 |
+
<p><b>Zero guidance.</b> Indra never reads NWS, National Blend, GFS, or NAM forecasts. Your browser fetches only the airport's past 91 days of measurements and computes a 32-member 5-day ensemble locally. The NWS line on the forecast page is shown strictly as a comparison reference.</p>
|
| 25 |
|
| 26 |
<h2>What it reads</h2>
|
| 27 |
<ul>
|
| 28 |
+
<li><b>Only this station's past 91 days of observations</b> across three timescales (24h @ 1h, 20d @ 6h, 70d @ 24h): temperature, dew point, pressure, plus optional wind, precipitation, and cloud cover. It also runs on bare <code>BME280</code> barometric nodes (T, P, RH only).</li>
|
| 29 |
+
<li><b>Embedded pre-2021 global climate map (32.4 KB):</b> A quantized 1990–2019 ERA5 seasonal grid packed inside the 1.03 MB weights blob.</li>
|
| 30 |
+
<li><b>52-byte seasonal offset (causal RLS):</b> A closed-form 3-parameter seasonal bias update that nudges the coarse global grid toward the local station as days accumulate (improving unseen-station 5-day mean CRPSS from +0.120 to +0.126).</li>
|
| 31 |
</ul>
|
| 32 |
|
| 33 |
+
<h2>Honest limits</h2>
|
| 34 |
<ul>
|
| 35 |
+
<li><b>Days 1–2 vs. Days 3–5:</b> On unseen 2025 NOAA stations, Indra clearly beats simple baselines (persistence, ridge) on Days 1–2 and produces well-calibrated uncertainty ranges (SSR ~ 0.99). Overall it roughly ties a 60-tree gradient-boosted baseline (ahead on Days 1–2 temp and Day 1–5 rain AUC; slightly behind on Days 4–5 temp), and has essentially no temperature skill over 14-year station climatology after Day 3.</li>
|
| 36 |
+
<li><b>Global NWP is much stronger:</b> Operational models like NWS, ECMWF IFS, and Pangu-Weather assimilate global satellites, radar, and upper-air grids, so they have lower point error and higher skill than any single offline station at every lead.</li>
|
| 37 |
+
<li><b>Code & reproducibility:</b> Full model, training, evaluation, and C99 runtime source code are published in <a href="https://huggingface.co/Sculptor-AI/Indra">Sculptor-AI/Indra</a>.</li>
|
| 38 |
</ul>
|
| 39 |
|
| 40 |
+
<h2>Verified Benchmarks (Untouched 2025 NOAA GHCNh)</h2>
|
| 41 |
+
<p>444 never-seen holdout stations, bare <code>BME280</code>-only sensors, 5-day mean CRPSS vs. 14-year station climatology:</p>
|
| 42 |
<table class="tbl">
|
| 43 |
<thead><tr><th>Model (Unseen Zero-Shot, BME280-Only)</th><th>Mean D1–D5 CRPSS</th><th>D1 Rain AUC</th></tr></thead>
|
| 44 |
<tbody>
|
| 45 |
+
<tr><td class="best">Indra (1.69M, 1.03 MB INT4 / FP32)</td><td class="best">+0.1264</td><td class="best">0.799</td></tr>
|
| 46 |
<tr><td>HistGradientBoosting (60 GBDT trees)</td><td>+0.1240</td><td>0.762</td></tr>
|
| 47 |
<tr><td>Ridge Regression</td><td>+0.0683</td><td>0.731</td></tr>
|
| 48 |
<tr><td>Damped Persistence</td><td>+0.0507</td><td>—</td></tr>
|
| 49 |
<tr><td>Persistence</td><td>−0.5619</td><td>—</td></tr>
|
| 50 |
</tbody>
|
| 51 |
</table>
|
|
|
|
| 52 |
</section>
|
| 53 |
</main>
|
| 54 |
</body>
|
app.js
CHANGED
|
@@ -4,7 +4,7 @@ const HOME = "IND";
|
|
| 4 |
const S = { data: null, unit: "F", ranges: true, at: HOME, city: null, tz: "America/Indiana/Indianapolis", want: 0 };
|
| 5 |
try {
|
| 6 |
S.unit = localStorage.getItem("kind-unit") || "F";
|
| 7 |
-
const savedR = localStorage.getItem("
|
| 8 |
S.ranges = savedR == null ? true : savedR === "1";
|
| 9 |
S.at = localStorage.getItem("indra-at") || HOME;
|
| 10 |
S.city = localStorage.getItem("indra-city");
|
|
@@ -99,7 +99,8 @@ function build() {
|
|
| 99 |
tl50: p.tl50,
|
| 100 |
td,
|
| 101 |
mslp: p.p50,
|
| 102 |
-
rain: dayObj ? dayObj.pop_05 : null,
|
|
|
|
| 103 |
rain50: dayObj ? dayObj.pop_50 : null,
|
| 104 |
nws: nwsForBucket(time.getTime()),
|
| 105 |
};
|
|
@@ -158,8 +159,8 @@ function rowsSpec() {
|
|
| 158 |
{ id: "nws", h: 18, label: "NWS (compare)" },
|
| 159 |
{ id: "vs", h: 18, label: "NWS vs Indra" },
|
| 160 |
{ id: "sp1", h: 12, label: "" },
|
| 161 |
-
{ id: "rchart", h: 86, label: `<span>Rain chance %<br><i class="k" style="background:var(--r-ours)"></i>Indra
|
| 162 |
-
{ id: "rain", h: 18, label: "Indra
|
| 163 |
{ id: "rnws", h: 18, label: "NWS %" },
|
| 164 |
{ id: "rmeas", h: 18, label: `Measured, ${uR()}` },
|
| 165 |
{ id: "sp2", h: 12, label: "" },
|
|
@@ -298,7 +299,7 @@ function drawStrip() {
|
|
| 298 |
const tip = p.past
|
| 299 |
? `measured ${r0(U.t(p.t))}°`
|
| 300 |
: `Indra ${r0(U.t(p.t))}° (80%: ${r0(U.t(p.t10))}–${r0(U.t(p.t90))}°)` + (p.nws?.tF != null ? `, NWS ${r0(U.tF(p.nws.tF))}°` : "");
|
| 301 |
-
const rainTip = !p.past && p.rain != null ? `.
|
| 302 |
el("title", {}, r, `${fWhen.format(p.time)}: ${tip}${rainTip}`);
|
| 303 |
});
|
| 304 |
|
|
@@ -331,11 +332,10 @@ function drawPlace() {
|
|
| 331 |
const airport = `${st.name} (${st.id})`;
|
| 332 |
$("#where").textContent = S.city ? `${S.city}: ${airport}` : airport;
|
| 333 |
document.title = `${S.city ? S.city.split(",")[0] : st.name} — Indra (Standalone)`;
|
| 334 |
-
|
| 335 |
-
$("#zero-meta").innerHTML = `<b>Zero NWP/NWS guidance</b> · Station sensors only · 52 B Bayesian RLS adapted over <b>${d.adaptDays} days</b> · Regime <b>R${reg.id}</b> (${reg.label}, ${(reg.conf * 100).toFixed(0)}%) · Computed in <b>${d.device_seconds}s</b> on your device (${d.model.sizeMB} MB INT4 WASM).`;
|
| 336 |
$("#place-note").textContent = d.nws?.error
|
| 337 |
? "NWS comparison is temporarily unavailable; showing Indra's standalone 5-day forecast."
|
| 338 |
-
: "NWS is fetched strictly for side-by-side comparison and is never passed into Indra.";
|
| 339 |
}
|
| 340 |
|
| 341 |
function drawInputs() {
|
|
@@ -504,7 +504,7 @@ $("#units").addEventListener("click", () => {
|
|
| 504 |
$("#strip-labels").addEventListener("change", (e) => {
|
| 505 |
if (e.target.id !== "ranges") return;
|
| 506 |
S.ranges = e.target.checked;
|
| 507 |
-
try { localStorage.setItem("
|
| 508 |
render();
|
| 509 |
$("#ranges").focus();
|
| 510 |
});
|
|
|
|
| 4 |
const S = { data: null, unit: "F", ranges: true, at: HOME, city: null, tz: "America/Indiana/Indianapolis", want: 0 };
|
| 5 |
try {
|
| 6 |
S.unit = localStorage.getItem("kind-unit") || "F";
|
| 7 |
+
const savedR = localStorage.getItem("indra-ranges-v2");
|
| 8 |
S.ranges = savedR == null ? true : savedR === "1";
|
| 9 |
S.at = localStorage.getItem("indra-at") || HOME;
|
| 10 |
S.city = localStorage.getItem("indra-city");
|
|
|
|
| 99 |
tl50: p.tl50,
|
| 100 |
td,
|
| 101 |
mslp: p.p50,
|
| 102 |
+
rain: p.rain6h != null ? p.rain6h : (dayObj ? dayObj.pop_05 : null),
|
| 103 |
+
rain24: dayObj ? dayObj.pop_05 : null,
|
| 104 |
rain50: dayObj ? dayObj.pop_50 : null,
|
| 105 |
nws: nwsForBucket(time.getTime()),
|
| 106 |
};
|
|
|
|
| 159 |
{ id: "nws", h: 18, label: "NWS (compare)" },
|
| 160 |
{ id: "vs", h: 18, label: "NWS vs Indra" },
|
| 161 |
{ id: "sp1", h: 12, label: "" },
|
| 162 |
+
{ id: "rchart", h: 86, label: `<span>Rain chance (6h) %<br><i class="k" style="background:var(--r-ours)"></i>Indra 6h <i class="k" style="background:var(--r-nws)"></i>NWS</span>` },
|
| 163 |
+
{ id: "rain", h: 18, label: "Indra 6h %", strong: true },
|
| 164 |
{ id: "rnws", h: 18, label: "NWS %" },
|
| 165 |
{ id: "rmeas", h: 18, label: `Measured, ${uR()}` },
|
| 166 |
{ id: "sp2", h: 12, label: "" },
|
|
|
|
| 299 |
const tip = p.past
|
| 300 |
? `measured ${r0(U.t(p.t))}°`
|
| 301 |
: `Indra ${r0(U.t(p.t))}° (80%: ${r0(U.t(p.t10))}–${r0(U.t(p.t90))}°)` + (p.nws?.tF != null ? `, NWS ${r0(U.tF(p.nws.tF))}°` : "");
|
| 302 |
+
const rainTip = !p.past && p.rain != null ? `. 6h rain chance: ${r0(p.rain)}% (24h >=0.5mm: ${r0(p.rain24)}%)` : "";
|
| 303 |
el("title", {}, r, `${fWhen.format(p.time)}: ${tip}${rainTip}`);
|
| 304 |
});
|
| 305 |
|
|
|
|
| 332 |
const airport = `${st.name} (${st.id})`;
|
| 333 |
$("#where").textContent = S.city ? `${S.city}: ${airport}` : airport;
|
| 334 |
document.title = `${S.city ? S.city.split(",")[0] : st.name} — Indra (Standalone)`;
|
| 335 |
+
$("#zero-meta").innerHTML = `<b>Zero NWP/NWS guidance</b> · Station sensors only · 91d history + 52 B seasonal offset (<b>${d.adaptDays}d</b>) · Computed in <b>${d.device_seconds}s</b> on your device (${d.model.sizeMB} MB INT4 WASM).`;
|
|
|
|
| 336 |
$("#place-note").textContent = d.nws?.error
|
| 337 |
? "NWS comparison is temporarily unavailable; showing Indra's standalone 5-day forecast."
|
| 338 |
+
: "NWS is fetched strictly for side-by-side comparison and is never passed into Indra. Without spatial weather grids, Days 3–5 revert toward local seasonal averages.";
|
| 339 |
}
|
| 340 |
|
| 341 |
function drawInputs() {
|
|
|
|
| 504 |
$("#strip-labels").addEventListener("change", (e) => {
|
| 505 |
if (e.target.id !== "ranges") return;
|
| 506 |
S.ranges = e.target.checked;
|
| 507 |
+
try { localStorage.setItem("indra-ranges-v2", S.ranges ? "1" : "0"); } catch (err) { /* ignore */ }
|
| 508 |
render();
|
| 509 |
$("#ranges").focus();
|
| 510 |
});
|
engine.js
CHANGED
|
@@ -225,6 +225,7 @@ const Engine = (() => {
|
|
| 225 |
|
| 226 |
const dailyRaw = new Float32Array(ex.memory.buffer, ex.wasm_out_daily(), 47);
|
| 227 |
const stepRaw = new Float32Array(ex.memory.buffer, ex.wasm_out_6h(), 180);
|
|
|
|
| 228 |
|
| 229 |
const daily = [];
|
| 230 |
for (let d = 0; d < 5; d++) {
|
|
@@ -257,6 +258,7 @@ const Engine = (() => {
|
|
| 257 |
tl50: stepRaw[o + 6],
|
| 258 |
p50: stepRaw[o + 7],
|
| 259 |
dp_dep: stepRaw[o + 8],
|
|
|
|
| 260 |
dayIdx: Math.floor(k / 4),
|
| 261 |
});
|
| 262 |
}
|
|
|
|
| 225 |
|
| 226 |
const dailyRaw = new Float32Array(ex.memory.buffer, ex.wasm_out_daily(), 47);
|
| 227 |
const stepRaw = new Float32Array(ex.memory.buffer, ex.wasm_out_6h(), 180);
|
| 228 |
+
const rain6hRaw = new Float32Array(ex.memory.buffer, ex.wasm_out_rain6h(), 20);
|
| 229 |
|
| 230 |
const daily = [];
|
| 231 |
for (let d = 0; d < 5; d++) {
|
|
|
|
| 258 |
tl50: stepRaw[o + 6],
|
| 259 |
p50: stepRaw[o + 7],
|
| 260 |
dp_dep: stepRaw[o + 8],
|
| 261 |
+
rain6h: rain6hRaw[k] * 100,
|
| 262 |
dayIdx: Math.floor(k / 4),
|
| 263 |
});
|
| 264 |
}
|
indra.wasm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3719128c586f9ff9fbfa36ee03fae1b0ffac51ff3d674b91c60ec7b6802082fa
|
| 3 |
+
size 47352
|