MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / plotScoreBar

Function plotScoreBar

baseball-node/client.js:97–103  ·  view source on GitHub ↗
(score, container, className = '')

Source from the content-addressed store, hash-verified

95}
96
97function plotScoreBar(score, container, className = '') {
98 const scoreDiv = document.createElement('div');
99 scoreDiv.className = 'score ' + className;
100 scoreDiv.style.width = (score * BAR_WIDTH_PX) + 'px';
101 scoreDiv.innerHTML = (score * 100).toFixed(1);
102 container.appendChild(scoreDiv);
103}
104
105function plotPredictResult(result) {
106 predictButton.textContent = 'Predict Pitch';

Callers 1

plotAccuracyPerClassFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected