MCPcopy Create free account
hub / github.com/ml5js/ml5-library / scatterplot

Method scatterplot

src/NeuralNetwork/NeuralNetworkVis.js:25–43  ·  view source on GitHub ↗

* creates a scatterplot from 1 input variable and 1 output variable * @param {*} inputLabel * @param {*} outputLabel * @param {*} data

(inputLabel, outputLabel, data)

Source from the content-addressed store, hash-verified

23 * @param {*} data
24 */
25 scatterplot(inputLabel, outputLabel, data) {
26 const values = data.map(item => {
27 return {
28 x: item.xs[inputLabel],
29 y: item.ys[outputLabel],
30 };
31 });
32
33 const visOptions = {
34 name: "debug mode",
35 };
36 const chartOptions = {
37 xLabel: "X",
38 yLabel: "Y",
39 height: this.config.height,
40 };
41
42 tfvis.render.scatterplot(visOptions, values, chartOptions);
43 }
44
45 /**
46 * creates a scatterplot from all input variables and all output variables

Callers 1

scatterplotAllMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected