MCPcopy Create free account
hub / github.com/DFin/Neural-Network-Visualisation / update

Method update

assets/main.js:1424–1439  ·  view source on GitHub ↗
(probabilities)

Source from the content-addressed store, hash-verified

1422 }
1423
1424 update(probabilities) {
1425 if (!probabilities.length) return;
1426 const maxProb = Math.max(...probabilities);
1427 probabilities.forEach((prob, index) => {
1428 const clamped = Math.max(0, Math.min(1, prob));
1429 const entry = this.rows[index];
1430 if (!entry) return;
1431 entry.bar.style.width = `${(clamped * 100).toFixed(1)}%`;
1432 entry.value.textContent = `${(clamped * 100).toFixed(1)}%`;
1433 if (clamped === maxProb) {
1434 entry.bar.classList.add("highest");
1435 } else {
1436 entry.bar.classList.remove("highest");
1437 }
1438 });
1439 }
1440}
1441
1442class NetworkInfoPanel {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected