Created
March 31, 2020 13:34
-
-
Save Rishit-dagli/ae08f11caf9d6e9ad3516dff158d2892 to your computer and use it in GitHub Desktop.
Scatterplot of data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function run() { | |
// Load and plot the original input data that we are going to train on. | |
const data = await getData(); | |
const values = data.map(d => ({ | |
x: d.horsepower, | |
y: d.mpg, | |
})); | |
tfvis.render.scatterplot( | |
{name: 'Horsepower v MPG'}, | |
{values}, | |
{ | |
xLabel: 'Horsepower', | |
yLabel: 'MPG', | |
height: 300 | |
} | |
); | |
// More code will be added below | |
} | |
document.addEventListener('DOMContentLoaded', run); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment