Repository navigation
Expand file tree
/
Copy pathdashboard.html
More file actions
782 lines (720 loc) · 49.3 KB
/
Copy pathdashboard.html
File metadata and controls
782 lines (720 loc) · 49.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fermentation Data Model Evidence Dashboard</title>
<style>
:root {
--ink: #172126;
--muted: #667176;
--paper: #f4f1e8;
--surface: #fffef9;
--line: #d7d3c7;
--asset: #b23a32;
--asset-soft: #f7e8e3;
--process: #087e6a;
--process-soft: #dff0e9;
--signal: #dc8c22;
--navy: #23425b;
}
* { box-sizing: border-box; }
body {
margin: 0;
color: var(--ink);
background:
repeating-linear-gradient(90deg, transparent 0, transparent 79px, rgba(35, 66, 91, 0.035) 80px),
var(--paper);
font-family: "Avenir Next", Avenir, "Gill Sans", sans-serif;
}
button, select { font: inherit; }
.shell { max-width: 1460px; margin: 0 auto; padding: 28px 32px 60px; }
header {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 24px;
align-items: end;
padding-bottom: 20px;
border-bottom: 3px solid var(--ink);
}
.eyebrow, .section-kicker {
margin: 0 0 7px;
color: var(--asset);
font-size: 12px;
font-weight: 700;
letter-spacing: 0;
text-transform: uppercase;
}
h1 {
max-width: 860px;
margin: 0;
font-family: Charter, "Iowan Old Style", Georgia, serif;
font-size: clamp(32px, 4vw, 58px);
line-height: 1.02;
letter-spacing: 0;
}
h2, h3 { margin: 0; letter-spacing: 0; }
h2 { font-family: Charter, "Iowan Old Style", Georgia, serif; font-size: 28px; }
h3 { font-size: 16px; }
p { line-height: 1.55; }
.run-meta { color: var(--muted); font-size: 12px; text-align: right; }
.run-meta strong { display: block; color: var(--ink); font-size: 13px; }
.thesis {
display: grid;
grid-template-columns: 1.45fr 0.55fr;
gap: 1px;
margin-top: 20px;
border: 1px solid var(--line);
background: var(--line);
}
.thesis-copy, .verdict { padding: 25px 28px; background: var(--surface); }
.thesis-copy p { max-width: 850px; margin: 8px 0 0; font-size: 18px; }
.verdict { background: var(--ink); color: white; }
.verdict span { display: block; color: #cbd5d9; font-size: 12px; text-transform: uppercase; }
.verdict strong { display: block; margin-top: 8px; font-size: 34px; line-height: 1; }
.verdict small { display: block; margin-top: 7px; color: #dbe1e3; line-height: 1.4; }
.method-strip {
display: grid;
grid-template-columns: repeat(6, 1fr);
margin: 18px 0 38px;
border: 1px solid var(--line);
background: var(--surface);
}
.method-item { min-width: 0; padding: 14px 16px; border-right: 1px solid var(--line); }
.method-item:last-child { border-right: 0; }
.method-item span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.method-item strong { display: block; margin-top: 4px; font-size: 14px; overflow-wrap: anywhere; }
section { margin-top: 42px; }
.section-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 16px; }
.section-head p { max-width: 680px; margin: 0; color: var(--muted); font-size: 14px; text-align: right; }
.transfer-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
gap: 12px;
}
.topology-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
margin-bottom: 14px;
}
.topology-card {
padding: 18px;
border: 1px solid var(--line);
border-radius: 4px;
background: var(--surface);
}
.equipment-line { display: flex; gap: 7px; align-items: end; height: 72px; margin: 15px 0; }
.vessel-glyph {
position: relative;
width: 44px;
height: 64px;
border: 2px solid var(--navy);
border-radius: 3px 3px 15px 15px;
background: linear-gradient(to top, rgba(8, 126, 106, 0.25) 0 62%, transparent 62%);
}
.vessel-glyph.large { width: 72px; }
.vessel-glyph::before { content: ""; position: absolute; left: 8px; right: 8px; top: -7px; border-top: 2px solid var(--navy); }
.utility-glyph { align-self: center; padding: 8px 10px; border-left: 4px solid var(--signal); color: var(--muted); font-size: 11px; }
.stage-arrow { align-self: center; color: var(--muted); font-size: 18px; padding: 0 2px; }
.brite-glyph {
position: relative;
width: 34px;
height: 58px;
border: 2px solid var(--signal);
border-radius: 15px 15px 15px 15px;
background: linear-gradient(to top, rgba(220, 140, 34, 0.28) 0 78%, transparent 78%);
}
.brite-glyph::before { content: ""; position: absolute; left: 10px; right: 10px; top: -6px; height: 6px; border: 2px solid var(--signal); border-radius: 4px 4px 0 0; border-bottom: none; }
.stage-label { display: block; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.topology-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.proof-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1px;
margin-bottom: 18px;
border: 1px solid var(--line);
background: var(--line);
}
.proof-item { padding: 15px; background: var(--surface); }
.proof-item span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.proof-item strong { display: block; margin-top: 5px; font-size: 19px; }
.topology-explorer {
display: grid;
grid-template-columns: 300px minmax(0, 1fr);
gap: 14px;
margin-top: 14px;
}
.topology-controls { padding: 19px; border: 1px solid var(--line); background: var(--surface); }
.topology-controls select { width: 100%; margin: 12px 0; padding: 9px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); }
.topology-charts { display: grid; gap: 12px; }
#topology-signal-chart { height: 220px; }
#topology-decision-chart { height: 125px; }
.transfer-card {
min-height: 228px;
padding: 18px;
border: 1px solid var(--line);
border-top: 5px solid var(--navy);
border-radius: 4px;
background: var(--surface);
}
.transfer-card.asset { border-top-color: var(--asset); }
.transfer-card.process { border-top-color: var(--process); }
.transfer-card .stage { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.transfer-card h3 { margin-top: 7px; min-height: 42px; }
.score { margin: 15px 0 1px; font-family: Charter, Georgia, serif; font-size: 44px; line-height: 1; }
.score-label { color: var(--muted); font-size: 11px; }
.interval { margin: 7px 0 12px; color: var(--muted); font-size: 12px; }
.mini-pair { display: flex; gap: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; }
.mini-pair strong { display: block; margin-top: 2px; font-size: 16px; }
.takeaway { margin: 13px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.claim-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 18px; }
.claim-panel, .shift-panel, .scenario-panel, .chart-panel {
border: 1px solid var(--line);
border-radius: 4px;
background: var(--surface);
}
.claim-panel, .shift-panel { padding: 22px; }
.mini-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12.5px; }
.mini-table th { text-align: left; color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.mini-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.mini-table tr:last-child td { border-bottom: 0; }
.scenario-toolbar { display: flex; gap: 5px; padding: 4px; border: 1px solid var(--line); background: var(--surface); }
.scenario-button {
min-height: 36px;
padding: 7px 12px;
border: 0;
border-radius: 3px;
color: var(--muted);
background: transparent;
cursor: pointer;
}
.scenario-button[aria-pressed="true"] { color: white; background: var(--ink); }
.scenario-stat { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.scenario-stat strong { text-align: right; }
.scenario-explain { margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.chart-panel { padding: 16px 17px; }
.chart-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.chart-title span { color: var(--muted); font-size: 11px; }
canvas { display: block; width: 100%; height: 230px; }
.model-key { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.model-key i { display: inline-block; width: 15px; height: 3px; margin-right: 5px; vertical-align: middle; }
.interpretation {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1px;
border: 1px solid var(--line);
background: var(--line);
}
.interpretation article { padding: 20px; background: var(--surface); }
.interpretation .number { color: var(--signal); font-family: Charter, Georgia, serif; font-size: 30px; }
.interpretation p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
footer { margin-top: 38px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
@media (max-width: 1040px) {
.transfer-grid { grid-template-columns: repeat(2, 1fr); }
.method-strip { grid-template-columns: repeat(3, 1fr); }
.method-item:nth-child(3) { border-right: 0; }
.method-item:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
.claim-grid { grid-template-columns: 1fr; }
.topology-explorer { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
.shell { padding: 20px 16px 42px; }
header, .thesis { grid-template-columns: 1fr; }
.run-meta { text-align: left; }
.method-strip, .transfer-grid, .interpretation, .topology-grid, .proof-grid { grid-template-columns: 1fr; }
.method-item { border-right: 0; border-bottom: 1px solid var(--line); }
.section-head { align-items: start; flex-direction: column; }
.section-head p { text-align: left; }
.scenario-toolbar { width: 100%; overflow-x: auto; }
.scenario-button { flex: 0 0 auto; }
canvas { height: 200px; }
}
</style>
</head>
<body>
<main class="shell">
<header>
<div>
<p class="eyebrow">Brewery PoC / Evidence Dashboard</p>
<h1>Equipment count, type, and unit change; the meaning of process run remains constant.</h1>
</div>
<div class="run-meta"><strong>Reproducible local experiment</strong><span id="generated-at">Loading results</span></div>
</header>
<div class="thesis">
<div class="thesis-copy">
<p class="section-kicker">Core finding</p>
<p>The PoC is heterogeneous on two axes: <strong>(1)</strong> fermentation runs on three sites with different scales/units (1 × 200 HL, 4 × 100 HL °F solenoid, 2 × 150 HL + shared glycol); <strong>(2)</strong> the run matures in a different <strong>equipment type</strong> (conditioning tank). The model trained on the raw asset schema <strong>collapses</strong> when the site changes; the process contract preserves its meaning even when the equipment count, type, and unit change, and captures conditioning-specific faults — signals that never exist in the fermenter schema — with a single model.</p>
</div>
<div class="verdict">
<span>Global A+B / unseen topology C</span>
<strong id="hero-score">-</strong>
<small id="hero-gap">Calculating calibration requirement</small>
</div>
</div>
<div class="method-strip" id="method-strip"></div>
<section>
<div class="section-head">
<div><p class="section-kicker">Core evidence</p><h2>Same algorithm, single variable: data layer</h2></div>
<p>The raw asset model is strong at home but collapses on a different raw schema. The same OneClassSVM model transfers across sites using the process contract.</p>
</div>
<div class="transfer-grid" id="raw-transfer-grid"></div>
<p class="shift-note" id="raw-transfer-shift"></p>
</section>
<section>
<div class="section-head">
<div><p class="section-kicker">Equipment topology</p><h2>One process run, two equipment types, three physical implementations</h2></div>
<p>Every run starts in a fermenter (blue) and matures in a different equipment type — conditioning tank (orange). The number of equipment, unit (°C/°F, bar/psi), actuator type, and absolute scale are incompatible across sites; the process contract covers both.</p>
</div>
<div class="topology-grid">
<article class="topology-card">
<h3>Topology A · Monolithic</h3>
<span class="stage-label">Fermentation → Conditioning</span>
<div class="equipment-line"><i class="vessel-glyph large"></i><span class="stage-arrow">→</span><i class="brite-glyph"></i></div>
<div class="topology-meta"><span>Ferment 1×200 HL · °C · analog</span><span>Cond 1×200 HL · bar</span></div>
</article>
<article class="topology-card">
<h3>Topology B · Parallel group</h3>
<span class="stage-label">Fermentation → Conditioning</span>
<div class="equipment-line"><i class="vessel-glyph"></i><i class="vessel-glyph"></i><i class="vessel-glyph"></i><i class="vessel-glyph"></i><span class="stage-arrow">→</span><i class="brite-glyph"></i><i class="brite-glyph"></i></div>
<div class="topology-meta"><span>Ferment 4×100 HL · °F · solenoid</span><span>Cond 2×200 HL · psi</span></div>
</article>
<article class="topology-card">
<h3>Topology C · Shared utility</h3>
<span class="stage-label">Fermentation → Conditioning</span>
<div class="equipment-line"><i class="vessel-glyph"></i><i class="vessel-glyph"></i><span class="utility-glyph">Shared glycol</span><span class="stage-arrow">→</span><i class="brite-glyph"></i></div>
<div class="topology-meta"><span>Ferment 2×150 HL · °C · no allocation</span><span>Cond 1×300 HL · bar</span></div>
</article>
</div>
<div class="proof-grid">
<div class="proof-item"><span>Raw feature counts</span><strong id="topology-raw-counts">-</strong></div>
<div class="proof-item"><span>Asset / process transformation</span><strong id="topology-transform-counts">-</strong></div>
<div class="proof-item"><span>Canonical output equality</span><strong id="topology-contract-equality">-</strong></div>
<div class="proof-item"><span>Shared utility allocation</span><strong id="topology-utility-allocation">-</strong></div>
</div>
<div class="topology-explorer">
<aside class="topology-controls">
<p class="section-kicker">Run inspection</p>
<select id="topology-site-selector" aria-label="Topology selection">
<option value="Topology_A">A · 1 × 200 HL</option>
<option value="Topology_B">B · 4 × 100 HL</option>
<option value="Topology_C" selected>C · 2 × 150 HL + utility</option>
</select>
<div class="scenario-toolbar" role="group" aria-label="Scenario selection">
<button class="scenario-button topology-scenario-button" data-topology-scenario="HEALTHY" aria-pressed="false">Healthy</button>
<button class="scenario-button topology-scenario-button" data-topology-scenario="OVERHEATING" aria-pressed="true">Cooling failure</button>
<button class="scenario-button topology-scenario-button" data-topology-scenario="COLD_CRASH" aria-pressed="false">Cold crash</button>
</div>
<div id="topology-run-stats"></div>
<p class="scenario-explain" id="topology-run-note"></p>
</aside>
<div class="topology-charts">
<div class="chart-panel"><div class="chart-title"><h3>Process run status</h3><span>Volume-weighted average + spread between equipment</span></div><canvas id="topology-signal-chart"></canvas><div class="model-key"><span><i style="background:#dc8c22"></i>Average temperature</span><span><i style="background:#23425b"></i>Temperature spread</span></div></div>
<div class="chart-panel"><div class="chart-title"><h3>Local and global model decisions</h3><span>1 = anomaly</span></div><canvas id="topology-decision-chart"></canvas><div class="model-key"><span><i style="background:#b23a32"></i>Asset-local</span><span><i style="background:#087e6a"></i>Global A+B</span><span><i style="background:#172126"></i>Ground truth</span></div></div>
</div>
</div>
</section>
<section>
<div class="section-head">
<div><p class="section-kicker">Enriched evidence</p><h2>Multi-seed, multi-algorithm, multi-product, and lineage</h2></div>
<p>Branches added with the same discipline: product × topology matrix, harmonization ablation, calibration curve, fault taxonomy, blend genealogy, and ownership cost.</p>
</div>
<div class="proof-grid" id="enrichment-headline"></div>
<div class="claim-grid">
<div class="claim-panel">
<h3>Distributional robustness (multi-seed × algorithm)</h3>
<div id="robustness-table"></div>
<p class="takeaway" id="robustness-note"></p>
</div>
<div class="claim-panel">
<h3>Harmonization ablation (raw A → B, temperature signal)</h3>
<div id="ablation-table"></div>
<p class="takeaway">Each step is added cumulatively; unit conversion is the step that unlocks transfer.</p>
</div>
</div>
<div class="claim-grid" style="margin-top:14px">
<div class="claim-panel">
<h3>Fault taxonomy (global model, which signal detects it)</h3>
<div id="fault-table"></div>
</div>
<div class="claim-panel">
<h3>Unseen site few-shot calibration (C)</h3>
<div id="calibration-table"></div>
<p class="takeaway" id="genealogy-note"></p>
</div>
</div>
</section>
<section>
<div class="section-head">
<div><p class="section-kicker">Multi-equipment type</p><h2>One ProcessRun spans two different equipment types</h2></div>
<p>The run does not end in the fermenter: it matures in a different equipment type (conditioning / Brite tank). The measurement schema of this tank is disjoint from the fermenter's, and two faults live only here. The fermenter asset model is structurally blind to these faults; ProcessRun catches them with a single model.</p>
</div>
<div class="proof-grid" id="cross-headline"></div>
<div class="claim-grid" style="margin-top:14px">
<div class="claim-panel">
<h3>Conditioning ProcessRun model (single global model)</h3>
<div id="cross-site-table"></div>
<p class="takeaway" id="cross-note"></p>
</div>
<div class="claim-panel">
<h3>Conditioning-specific faults — signals absent in fermenter schema</h3>
<div id="cross-fault-table"></div>
<p class="takeaway" id="cross-disjoint-note"></p>
</div>
</div>
<div class="topology-explorer" style="margin-top:16px">
<aside class="topology-controls">
<p class="section-kicker">Conditioning run inspection</p>
<select id="cond-site-selector" aria-label="Conditioning topology selection">
<option value="Topology_A">A · 1 × 200 HL · bar</option>
<option value="Topology_B" selected>B · 2 × 200 HL · psi</option>
<option value="Topology_C">C · 1 × 300 HL · bar</option>
</select>
<div class="scenario-toolbar" role="group" aria-label="Conditioning scenario selection">
<button class="scenario-button cond-scenario-button" data-cond-scenario="HEALTHY" aria-pressed="false">Healthy</button>
<button class="scenario-button cond-scenario-button" data-cond-scenario="DIACETYL_STALL" aria-pressed="true">Diacetyl stall</button>
<button class="scenario-button cond-scenario-button" data-cond-scenario="PRESSURE_LOSS" aria-pressed="false">Pressure loss</button>
</div>
<div id="cond-run-stats"></div>
<p class="scenario-explain" id="cond-run-note"></p>
</aside>
<div class="topology-charts">
<div class="chart-panel"><div class="chart-title"><h3>Conditioning signals</h3><span>VDK (diacetyl) and tank pressure — signals absent in fermenter</span></div><canvas id="cond-signal-chart"></canvas><div class="model-key"><span><i style="background:#dc8c22"></i>VDK (ppb)</span><span><i style="background:#23425b"></i>Pressure (bar)</span></div></div>
<div class="chart-panel"><div class="chart-title"><h3>ProcessRun model decision</h3><span>1 = anomaly · fermenter model can never see this fault</span></div><canvas id="cond-decision-chart"></canvas><div class="model-key"><span><i style="background:#087e6a"></i>ProcessRun (conditioning)</span><span><i style="background:#172126"></i>Ground truth</span></div></div>
</div>
</div>
</section>
<section>
<div class="section-head"><div><p class="section-kicker">White paper conclusions</p><h2>What the evidence says and does not say</h2></div></div>
<div class="interpretation">
<article><div class="number">01</div><h3>Analysis unit is fixed</h3><p>One, two, or three fermenters map to the same ProcessRun contract; representative run state and equipment spread are preserved together.</p></article>
<article><div class="number">02</div><h3>Asset control is fair</h3><p>All three custom adapters produce the exact same canonical numbers. The difference is not transformation capability, but the ownership boundary of a single generic aggregator versus three topology contracts.</p></article>
<article><div class="number">03</div><h3>Unseen topology requires calibration</h3><p>The global model trained on A+B works on C, but healthy FPR is above the production threshold. A shared contract does not remove the need to learn local normal behavior.</p></article>
<article><div class="number">04</div><h3>Runs span beyond one equipment type</h3><p>ProcessRun covers both fermenter + conditioning tank. Asset rows per equipment type have disjoint schemas and cannot be stacked; the process contract is the only analytical unit holding the run end-to-end.</p></article>
</div>
</section>
<footer>Source: local physical simulation with a fixed seed. Training and test batches are separate; anomalous batches are only used in evaluation.</footer>
</main>
<script src="data/results.js"></script>
<script>
const COLORS = { ink: '#172126', muted: '#778086', grid: '#dedbd2', asset: '#b23a32', process: '#087e6a', signal: '#dc8c22', navy: '#23425b' };
const pct = value => `${(value * 100).toFixed(1)}%`;
function metricCard(stage, title, metrics, kind, note) {
const interval = metrics.confidence_95.macro_f1;
return `<article class="transfer-card ${kind}">
<span class="stage">${stage}</span><h3>${title}</h3>
<div class="score">${pct(metrics.macro_f1)}</div><div class="score-label">macro-F1</div>
<div class="interval">95% batch CI: ${pct(interval.low)}–${pct(interval.high)}</div>
<div class="mini-pair"><div>Balanced accuracy<strong>${pct(metrics.balanced_accuracy)}</strong></div><div>Healthy FPR<strong>${pct(metrics.fpr)}</strong></div></div>
<p class="takeaway">${note}</p>
</article>`;
}
function initSummary() {
const topologyGlobal = resultsData.process_centric.global_a_b_model;
document.getElementById('generated-at').textContent = new Date(resultsData.generated_at).toLocaleString('en-US');
document.getElementById('hero-score').textContent = pct(topologyGlobal.Topology_C.macro_f1);
document.getElementById('hero-gap').textContent = `C healthy FPR: ${pct(topologyGlobal.Topology_C.fpr)}; topology calibration required`;
document.getElementById('method-strip').innerHTML = [
['Analysis unit', resultsData.feature_contract.analysis_unit],
['Equipment types', (resultsData.feature_contract.spans_equipment_types || []).length + ' (fermenter + conditioning)'],
['Site volumes', Object.values(resultsData.contract.site_volumes_hl).map(v => `${v}`).join(' / ') + ' HL'],
['Physical topologies', '1 / 4 / 2 fermenter'],
['Algorithm', resultsData.model_contract.algorithm],
['Training topologies', 'A + B'],
['Unseen control', 'Unseen topology C']
].map(item => `<div class="method-item"><span>${item[0]}</span><strong>${item[1]}</strong></div>`).join('');
initRawTransfer(resultsData);
initTopology(resultsData);
initEnrichment(resultsData);
initCrossEquipment(resultsData);
}
function initCrossEquipment(data) {
const pct1 = v => `${(v * 100).toFixed(1)}%`;
const cross = data.cross_equipment;
const own = data.ownership_cost;
const bySite = cross.conditioning_process_model.by_site;
const contract = data.contract.cross_equipment;
document.getElementById('cross-headline').innerHTML = [
['Equipment type', `${contract.equipment_types.length} (fermenter + conditioning)`],
['Conditioning A+B→C (unseen)', pct1(bySite.Topology_C.macro_f1)],
['Raw schemas disjoint', contract.raw_schemas_disjoint ? 'Yes (disjoint)' : 'No'],
['Multi-type definition ratio', `${own.multi_type_reuse_ratio}× (${own.asset_definitions_multi_type_now} adapters → 1)`]
].map(i => `<div class="proof-item"><span>${i[0]}</span><strong>${i[1]}</strong></div>`).join('');
const siteLabel = { Topology_A: 'A (seen)', Topology_B: 'B (seen)', Topology_C: 'C (unseen)' };
document.getElementById('cross-site-table').innerHTML =
`<table class="mini-table"><thead><tr><th>Site</th><th>macro-F1</th><th>Healthy FPR</th></tr></thead><tbody>${
['Topology_A', 'Topology_B', 'Topology_C'].map(s =>
`<tr><td>${siteLabel[s]}</td><td><strong>${pct1(bySite[s].macro_f1)}</strong></td><td style="color:var(--muted)">${pct1(bySite[s].fpr)}</td></tr>`).join('')}</tbody></table>`;
document.getElementById('cross-note').textContent =
'Same algorithm and holdout; one global model works on three conditioning topologies (different tank count, °C/°F, bar/psi).';
const recall = cross.conditioning_only_fault_recall;
const signals = cross.fault_carrying_signals;
document.getElementById('cross-fault-table').innerHTML =
`<table class="mini-table"><thead><tr><th>Fault</th><th>Carrying signal</th><th>Recall</th></tr></thead><tbody>${
Object.keys(recall).map(f =>
`<tr><td>${f}</td><td style="color:var(--muted)">${signals[f]}</td><td><strong>${pct1(recall[f])}</strong></td></tr>`).join('')}</tbody></table>`;
document.getElementById('cross-disjoint-note').textContent =
`Fermenter measurement columns (${contract.fermenter_measurement_columns.join(', ')}) and conditioning columns (${contract.conditioning_measurement_columns.join(', ')}) are disjoint; fermenter model cannot structurally see VDK/pressure.`;
updateConditioningView();
}
function initEnrichment(data) {
const pct1 = v => `${(v * 100).toFixed(1)}%`;
const rob = data.robustness;
const delta = rob.data_layer_delta_macro_f1;
const gen = data.genealogy;
const own = data.ownership_cost;
document.getElementById('enrichment-headline').innerHTML = [
['Data-layer gain · OCSVM', `+${(delta.OneClassSVM * 100).toFixed(0)} pt`],
['Data-layer gain · IForest', `+${(delta.IsolationForest * 100).toFixed(0)} pt`],
['Blend genealogy macro-F1', pct1(gen.metrics.macro_f1)],
['Definition reuse ratio', `${own.definition_reuse_ratio}× (N adapters → 1)`]
].map(i => `<div class="proof-item"><span>${i[0]}</span><strong>${i[1]}</strong></div>`).join('');
// Robustness: algo x arm mean±std macro-F1
const armLabel = { raw_asset_A_to_B: 'Raw A→B', process_global_to_B: 'Process A+B→B', process_global_to_C: 'Process →C' };
let rows = rob.algorithms.map(algo => {
const cells = rob.arms.map(arm => {
const m = rob.summary[algo][arm].macro_f1;
return `<td>${(m.mean * 100).toFixed(1)}<span style="color:var(--muted)">±${(m.std * 100).toFixed(1)}</span></td>`;
}).join('');
return `<tr><td><strong>${algo}</strong></td>${cells}</tr>`;
}).join('');
document.getElementById('robustness-table').innerHTML =
`<table class="mini-table"><thead><tr><th>Algorithm</th>${rob.arms.map(a => `<th>${armLabel[a]}</th>`).join('')}</tr></thead><tbody>${rows}</tbody></table>`;
document.getElementById('robustness-note').textContent =
`${rob.seeds.length} seeds × ${rob.algorithms.length} algorithms; raw arm collapses on all algorithms, process is superior on all (macro-F1 %).`;
// Ablation
const steps = data.ablation.steps;
document.getElementById('ablation-table').innerHTML =
`<table class="mini-table"><tbody>${Object.entries(steps).map(([k, v]) =>
`<tr><td>${k}</td><td><strong>${pct1(v.macro_f1)}</strong></td><td style="color:var(--muted)">FPR ${pct1(v.fpr)}</td></tr>`).join('')}</tbody></table>`;
// Fault taxonomy
const fx = data.fault_taxonomy;
document.getElementById('fault-table').innerHTML =
`<table class="mini-table"><thead><tr><th>Fault</th><th>Carrying signal</th><th>Recall</th></tr></thead><tbody>${
Object.entries(fx).map(([fault, v]) =>
`<tr><td>${fault}</td><td style="color:var(--muted)">${v.carrying_signal}</td><td><strong>${pct1(v.recall)}</strong></td></tr>`).join('')}</tbody></table>`;
// Calibration
const curve = data.calibration.curve;
document.getElementById('calibration-table').innerHTML =
`<table class="mini-table"><thead><tr><th>k (C healthy batch)</th><th>FPR</th><th>macro-F1</th></tr></thead><tbody>${
curve.map(c => `<tr><td>${c.k_healthy_c_batches}</td><td><strong>${pct1(c.fpr)}</strong></td><td>${pct1(c.macro_f1)}</td></tr>`).join('')}</tbody></table>`;
document.getElementById('genealogy-note').textContent =
`Blend genealogy: ${gen.blend_lots} lots, macro-F1 ${pct1(gen.metrics.macro_f1)} — many-to-one relationship, which the asset hierarchy cannot express, is detected at the run level.`;
}
function initRawTransfer(topology) {
const raw = topology.asset_centric.raw_transfer;
const globalB = topology.process_centric.global_a_b_model.Topology_B;
const shift = raw.distribution_shift;
document.getElementById('raw-transfer-grid').innerHTML = [
metricCard('Raw asset · home site', 'Model A → A (raw °C)', raw.a_on_a_raw, 'asset', 'Model is strong in its own raw schema: unit and scale are the same as training.'),
metricCard('Raw asset · site transfer', 'Model A → B (raw °F)', raw.a_on_b_raw, 'asset', 'The same model collapses when applied to B raw schema with naive column alignment: flags everything as anomalous.'),
metricCard('Process contract', 'Model A+B → B (canonical)', globalB, 'process', 'Same algorithm; only the data layer changes to the intensive process contract.')
].join('');
document.getElementById('raw-transfer-shift').textContent =
`Distribution shift: train ${shift.train_temp_mean.toFixed(1)} ${shift.train_temp_unit}° / ${shift.train_actuator_type}, `
+ `test ${shift.test_temp_mean.toFixed(1)} ${shift.test_temp_unit}° / ${shift.test_actuator_type}. `
+ `Raw cooling scale ${shift.train_cooling_scale.toFixed(1)} → ${shift.test_cooling_scale.toFixed(1)} (grows with volume). `
+ 'The process contract neutralizes this unit and scale discrepancy using intensive features.';
}
function initTopology(topology) {
const contract = topology.contract;
const local = topology.asset_centric.local_models;
const single = topology.process_centric.single_topology_a_model;
const global = topology.process_centric.global_a_b_model;
const equalityCount = Object.values(contract.canonical_outputs_numerically_equal).filter(Boolean).length;
document.getElementById('topology-raw-counts').textContent = Object.values(contract.raw_feature_counts).join(' / ');
document.getElementById('topology-transform-counts').textContent = `${contract.asset_specific_adapter_count} adapters / ${contract.generic_process_aggregator_count} aggregators`;
document.getElementById('topology-contract-equality').textContent = `${equalityCount}/3 numerically equal`;
document.getElementById('topology-utility-allocation').textContent = contract.shared_utility_allocation_available ? 'Available' : 'Not possible for C';
document.getElementById('topology-metrics-grid').innerHTML = [
metricCard('Asset-local', 'A · 1×200 HL', local.Topology_A, 'asset', 'Separate model for a single monolithic topology.'),
metricCard('Asset-local', 'B · 4×100 HL', local.Topology_B, 'asset', 'Separate adapter and model for a parallel group.'),
metricCard('Asset-local', 'C · 2×150 HL', local.Topology_C, 'asset', 'Separate model for a shared utility topology.'),
metricCard('Topology transfer', 'A-only model → B', single.Topology_B, '', 'Common field names alone do not teach the parallel topology.'),
metricCard('Global process', 'A+B model → B', global.Topology_B, 'process', 'Monolithic and parallel normal behaviors are learned in a single model.'),
metricCard('Unseen topology', 'A+B model → C', global.Topology_C, '', 'Works with shared utility; FPR requires local calibration.')
].join('');
updateTopologyView();
}
function setupCanvas(canvas) {
const ratio = window.devicePixelRatio || 1;
const rect = canvas.getBoundingClientRect();
canvas.width = Math.max(1, Math.round(rect.width * ratio));
canvas.height = Math.max(1, Math.round(rect.height * ratio));
const context = canvas.getContext('2d');
context.setTransform(ratio, 0, 0, ratio, 0, 0);
return { context, width: rect.width, height: rect.height };
}
function drawLine(context, values, xFor, yFor, color, width = 2) {
context.beginPath();
values.forEach((value, index) => index ? context.lineTo(xFor(index), yFor(value)) : context.moveTo(xFor(index), yFor(value)));
context.strokeStyle = color;
context.lineWidth = width;
context.stroke();
}
function drawTopologySignalChart(data) {
const { context, width, height } = setupCanvas(document.getElementById('topology-signal-chart'));
const pad = { left: 45, right: 48, top: 10, bottom: 28 };
const innerW = width - pad.left - pad.right;
const innerH = height - pad.top - pad.bottom;
const xFor = index => pad.left + index / (data.elapsed_hours.length - 1) * innerW;
const meanMin = Math.floor(Math.min(...data.temp_mean_c) - 1);
const meanMax = Math.ceil(Math.max(...data.temp_mean_c) + 1);
const spreadMax = Math.max(1, Math.ceil(Math.max(...data.temp_spread_c) + 1));
const meanY = value => pad.top + (meanMax - value) / (meanMax - meanMin) * innerH;
const spreadY = value => pad.top + (spreadMax - value) / spreadMax * innerH;
context.font = '11px Avenir Next'; context.fillStyle = COLORS.muted; context.strokeStyle = COLORS.grid;
for (let tick = 0; tick <= 4; tick++) {
const y = pad.top + tick / 4 * innerH;
context.beginPath(); context.moveTo(pad.left, y); context.lineTo(width - pad.right, y); context.stroke();
context.fillText((meanMax - tick / 4 * (meanMax - meanMin)).toFixed(0) + '°', 7, y + 4);
context.fillText((spreadMax - tick / 4 * spreadMax).toFixed(0) + 'Δ', width - 38, y + 4);
}
[0, 48, 96, 144].forEach(hour => context.fillText(`${hour} hr`, pad.left + hour / 168 * innerW - 10, height - 7));
const injectionIndex = data.ground_truth.findIndex(value => value === 1);
if (injectionIndex >= 0) {
const x = xFor(injectionIndex); context.strokeStyle = COLORS.asset; context.setLineDash([4, 4]);
context.beginPath(); context.moveTo(x, pad.top); context.lineTo(x, height - pad.bottom); context.stroke(); context.setLineDash([]);
}
drawLine(context, data.temp_mean_c, xFor, meanY, COLORS.signal, 2.2);
drawLine(context, data.temp_spread_c, xFor, spreadY, COLORS.navy, 2.2);
}
function drawTopologyDecisionChart(data) {
const { context, width, height } = setupCanvas(document.getElementById('topology-decision-chart'));
const pad = { left: 82, right: 12, top: 7, bottom: 22 };
const innerW = width - pad.left - pad.right;
const rows = [
['Ground truth', data.ground_truth, COLORS.ink],
['Asset-local', data.asset_local_prediction, COLORS.asset],
['Global A+B', data.global_prediction, COLORS.process]
];
const rowHeight = (height - pad.top - pad.bottom) / rows.length;
context.font = '11px Avenir Next';
rows.forEach((row, rowIndex) => {
const y = pad.top + rowIndex * rowHeight;
context.fillStyle = COLORS.muted; context.fillText(row[0], 1, y + rowHeight * 0.65);
context.fillStyle = '#e7e4db'; context.fillRect(pad.left, y + 4, innerW, rowHeight - 8);
const stepWidth = innerW / row[1].length;
context.fillStyle = row[2];
row[1].forEach((value, index) => { if (value) context.fillRect(pad.left + index * stepWidth, y + 4, Math.max(1, stepWidth), rowHeight - 8); });
});
context.fillStyle = COLORS.muted;
[0, 48, 96, 144].forEach(hour => context.fillText(`${hour} hr`, pad.left + hour / 168 * innerW - 10, height - 4));
}
function updateTopologyView() {
if (!resultsData.contract) return;
const siteId = document.getElementById('topology-site-selector').value;
const active = document.querySelector('.topology-scenario-button[aria-pressed="true"]');
const scenario = active ? active.dataset.topologyScenario : 'OVERHEATING';
const topology = resultsData;
const data = topology.series[siteId][scenario];
const local = topology.asset_centric.local_models[siteId];
const global = topology.process_centric.global_a_b_model[siteId];
document.getElementById('topology-run-stats').innerHTML = [
['Asset-local macro-F1', pct(local.macro_f1)],
['Global model macro-F1', pct(global.macro_f1)],
['Global healthy FPR', pct(global.fpr)]
].map(item => `<div class="scenario-stat"><span>${item[0]}</span><strong>${item[1]}</strong></div>`).join('');
const shared = siteId === 'Topology_C';
document.getElementById('topology-run-note').textContent = shared
? 'Shared glycol impact is compared at the process run level; since it is not allocated per tank, data is not fabricated.'
: 'Temperature average represents the batch status, while spread represents the imbalance between equipment.';
drawTopologySignalChart(data);
drawTopologyDecisionChart(data);
}
function drawConditioningSignalChart(data) {
const { context, width, height } = setupCanvas(document.getElementById('cond-signal-chart'));
const pad = { left: 48, right: 50, top: 10, bottom: 28 };
const innerW = width - pad.left - pad.right;
const innerH = height - pad.top - pad.bottom;
const xFor = index => pad.left + index / (data.elapsed_hours.length - 1) * innerW;
const vdkMax = Math.max(20, Math.ceil(Math.max(...data.diacetyl_ppb_mean) / 20 + 1) * 20);
const presMax = Math.max(1.5, Math.ceil(Math.max(...data.pressure_mean_bar) + 0.3));
const vdkY = value => pad.top + (vdkMax - value) / vdkMax * innerH;
const presY = value => pad.top + (presMax - value) / presMax * innerH;
context.font = '11px Avenir Next'; context.fillStyle = COLORS.muted; context.strokeStyle = COLORS.grid;
for (let tick = 0; tick <= 4; tick++) {
const y = pad.top + tick / 4 * innerH;
context.beginPath(); context.moveTo(pad.left, y); context.lineTo(width - pad.right, y); context.stroke();
context.fillText((vdkMax - tick / 4 * vdkMax).toFixed(0), 7, y + 4);
context.fillText((presMax - tick / 4 * presMax).toFixed(1), width - 42, y + 4);
}
[0, 48, 96, 144].forEach(hour => context.fillText(`${hour} hr`, pad.left + hour / 168 * innerW - 10, height - 7));
const injectionIndex = data.ground_truth.findIndex(value => value === 1);
if (injectionIndex >= 0) {
const x = xFor(injectionIndex); context.strokeStyle = COLORS.asset; context.setLineDash([4, 4]);
context.beginPath(); context.moveTo(x, pad.top); context.lineTo(x, height - pad.bottom); context.stroke(); context.setLineDash([]);
}
drawLine(context, data.diacetyl_ppb_mean, xFor, vdkY, COLORS.signal, 2.2);
drawLine(context, data.pressure_mean_bar, xFor, presY, COLORS.navy, 2.2);
}
function drawConditioningDecisionChart(data) {
const { context, width, height } = setupCanvas(document.getElementById('cond-decision-chart'));
const pad = { left: 108, right: 12, top: 7, bottom: 22 };
const innerW = width - pad.left - pad.right;
const rows = [
['Ground truth', data.ground_truth, COLORS.ink],
['ProcessRun', data.global_prediction, COLORS.process]
];
const rowHeight = (height - pad.top - pad.bottom) / rows.length;
context.font = '11px Avenir Next';
rows.forEach((row, rowIndex) => {
const y = pad.top + rowIndex * rowHeight;
context.fillStyle = COLORS.muted; context.fillText(row[0], 1, y + rowHeight * 0.6);
context.fillStyle = '#e7e4db'; context.fillRect(pad.left, y + 4, innerW, rowHeight - 8);
const stepWidth = innerW / row[1].length;
context.fillStyle = row[2];
row[1].forEach((value, index) => { if (value) context.fillRect(pad.left + index * stepWidth, y + 4, Math.max(1, stepWidth), rowHeight - 8); });
});
context.fillStyle = COLORS.muted;
[0, 48, 96, 144].forEach(hour => context.fillText(`${hour} hr`, pad.left + hour / 168 * innerW - 10, height - 4));
}
function updateConditioningView() {
if (typeof resultsData === 'undefined' || !resultsData.cross_equipment) return;
const cross = resultsData.cross_equipment;
if (!cross.series) return;
const siteId = document.getElementById('cond-site-selector').value;
const active = document.querySelector('.cond-scenario-button[aria-pressed="true"]');
const scenario = active ? active.dataset.condScenario : 'DIACETYL_STALL';
const data = (cross.series[siteId] || {})[scenario];
const site = cross.conditioning_process_model.by_site[siteId];
const noteMap = {
HEALTHY: 'Healthy maturation: VDK decreases to target, pressure is held at setpoint; model is clean.',
DIACETYL_STALL: 'VDK does not decrease (failed rest). Signal only in diacetyl; VDK absent in fermenter schema.',
PRESSURE_LOSS: 'Tank pressure leaks; carbonation cannot reach setpoint. Signal only in pressure.'
};
document.getElementById('cond-run-stats').innerHTML = [
['ProcessRun macro-F1', pct(site.macro_f1)],
['Healthy FPR', pct(site.fpr)],
['Fermenter can see?', 'No (disjoint)']
].map(item => `<div class="scenario-stat"><span>${item[0]}</span><strong>${item[1]}</strong></div>`).join('');
document.getElementById('cond-run-note').textContent = noteMap[scenario] || '';
if (!data) return;
drawConditioningSignalChart(data);
drawConditioningDecisionChart(data);
}
window.addEventListener('DOMContentLoaded', () => {
if (typeof resultsData === 'undefined') {
document.body.innerHTML = '<main class="shell"><h1>No results data found</h1><p>Run simulator.py, schemas.py and analyzer.py first.</p></main>';
return;
}
initSummary();
document.getElementById('topology-site-selector').addEventListener('change', updateTopologyView);
document.querySelectorAll('.topology-scenario-button').forEach(button => button.addEventListener('click', () => {
document.querySelectorAll('.topology-scenario-button').forEach(item => item.setAttribute('aria-pressed', String(item === button)));
updateTopologyView();
}));
document.getElementById('cond-site-selector').addEventListener('change', updateConditioningView);
document.querySelectorAll('.cond-scenario-button').forEach(button => button.addEventListener('click', () => {
document.querySelectorAll('.cond-scenario-button').forEach(item => item.setAttribute('aria-pressed', String(item === button)));
updateConditioningView();
}));
let resizeTimer;
window.addEventListener('resize', () => { clearTimeout(resizeTimer); resizeTimer = setTimeout(() => {
updateTopologyView();
updateConditioningView();
}, 100); });
});
</script>
</body>
</html>