-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalytics.html
More file actions
117 lines (75 loc) · 2.53 KB
/
analytics.html
File metadata and controls
117 lines (75 loc) · 2.53 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<html>
<head>
<title>ANN</title>
<body>
<div id="display">
</div>
<script src="utils.js"></script>
<script src="gridtools.js"></script>
<script src="analytics.js"></script>
<script src="neural.js"></script>
<script type='text/javascript'>
for(i=0; i<10; i++) {
newLocation = document.createElement('img');
newLocation.setAttribute('id', 'bar' + i);
newLocation.setAttribute('src', 'dot.gif');
document.getElementById('display').appendChild(newLocation);
currentLocation = document.getElementById('bar' + i);
currentLocation.style.top = 0;
currentLocation.style.left = i * 100;
currentLocation.style.position = 'absolute';
currentLocation.height = 20;
currentLocation.width = 1;
newLocation = document.createElement('img');
newLocation.setAttribute('id', 'vbar' + i);
newLocation.setAttribute('src', 'dot.gif');
document.getElementById('display').appendChild(newLocation);
currentLocation = document.getElementById('vbar' + i);
currentLocation.style.top = i * 100;
currentLocation.style.left = 0;
currentLocation.style.position = 'absolute';
currentLocation.height = 1;
currentLocation.width = 20;
}
var incoming = window.location.toString();
dataSet = incoming.substring(incoming.indexOf('?') + 1, incoming.length - 1).split('-');
for (i=0; i<dataSet.length; i++) {
dataSet[i] = dataSet[i].split(',');
}
var metaPattern = new Array(12, 24, 6, 2);
neuralNet = new neuralNetwork(null, buildNeuralPattern(metaPattern, 5));
alert(neuralNet.evaluate(polarDifferenceSense(dataSet, 10, 10)));
/*
graphableObj = polarDifferenceDistribution(dataSet);
//graphableObj = flatDistribution(dataSet);
var graphableObj = new Array();
for (i=0; i<1000; i++) {
graphableObj[i] = normalizeInputs(i / 100);
}
j = 0;
for (i=0; i<(graphableObj.positive.length + graphableObj.negative.length); i++) {
if (i < graphableObj.positive.length) {
value = graphableObj.positive[i];
} else {
value = graphableObj.negative[i - graphableObj.positive.length];
}
newLocation = document.createElement('img');
newLocation.setAttribute('id', 'dot' + i);
newLocation.setAttribute('src', 'dot.gif');
document.getElementById('display').appendChild(newLocation);
currentLocation = document.getElementById('dot' + i);
currentLocation.style.top = value + 200;
if (i < graphableObj.positive.length) {
currentLocation.style.left = i;
} else {
currentLocation.style.left = i - graphableObj.positive.length;
}
currentLocation.style.position = 'absolute';
currentLocation.height = 1;
currentLocation.width = 1;
// }
}
*/
</script>
</body>
</html>