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

Function formatTimelineMetrics

assets/main.js:922–932  ·  view source on GitHub ↗
(metrics)

Source from the content-addressed store, hash-verified

920}
921
922function formatTimelineMetrics(metrics) {
923 if (!metrics) return "";
924 const segments = [];
925 if (Number.isFinite(metrics.testAccuracy)) {
926 segments.push(`Test acc: ${formatDecimal(metrics.testAccuracy * 100, 2)}%`);
927 }
928 if (Number.isFinite(metrics.avgTrainingLoss)) {
929 segments.push(`Avg loss: ${formatDecimal(metrics.avgTrainingLoss, 4)}`);
930 }
931 return segments.join(" • ");
932}
933
934function setupTimelineSlider(timelineSnapshots, options = {}) {
935 const overlay = document.getElementById("timelineOverlay");

Callers 1

setActiveIndexFunction · 0.85

Calls 1

formatDecimalFunction · 0.85

Tested by

no test coverage detected