-
Notifications
You must be signed in to change notification settings - Fork 2
/
test-highcharts.html
37 lines (30 loc) · 1.39 KB
/
test-highcharts.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<html>
<head>
<!-- For Highcharts translator -->
<script src="https://code.highcharts.com/highcharts.js"></script>
<!-- For Explorer -->
<script src="https://rawgithub.com/highcharts/draggable-points/master/draggable-points.js"></script>
<!-- For Scanner -->
<script src="https://code.highcharts.com/modules/boost-canvas.js"></script>
<script src="https://code.highcharts.com/modules/boost.js"></script>
<!-- BrainJS and BrainCT -->
<script src="https://cdn.rawgit.com/BrainJS/brain.js/7e5ced2e/browser.js"></script>
<script src="./browser.js"></script>
</head>
<body>
<div id="container-explorer" style="height: 400px"></div>
<div id="container-scanner" style="height: 400px"></div>
<script>
const net = new brain.NeuralNetwork();
net.train([
{input: [0, 0], output: [0, 1, 0, 1]},
{input: [0, 1], output: [1, 0, 1, 0]},
{input: [1, 0], output: [1, 0, 1, 0]},
{input: [1, 1], output: [0, 1, 1, 0]},
], {log: false});
const newCT = new brainCT.BrainCT(net);
Highcharts.chart('container-explorer', brainCT.Translate.from(newCT).to.highcharts.explorer());
Highcharts.chart('container-scanner', brainCT.Translate.from(newCT).to.highcharts.scannerSync());
</script>
</body>
</html>