-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
134 lines (104 loc) · 3.18 KB
/
index.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
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html>
<html>
<head>
<title>genetic plot</title>
<script src="https://d3js.org/d3.v3.js"></script>
<script src=".././node_modules/function-plot/dist/function-plot.js"></script>
<style>
input {
padding: 6px;
}
body,
html,
input {
font-family: sans-serif;
font-size: 11pt;
}
form {
display: table;
}
p {
display: table-row;
}
label {
display: table-cell;
}
input {
display: table-cell;
width: 400px;
}
</style>
</head>
<body>
<form>
<p>
<label for="templates">Choose from templates</label>
<select id="templates">
<option value='{"dp": [[-0.7587, -2.5175],[0.3576,-0.2849]],
"fx": [-1, 2]}'>1st order poly</option>
<option value='{"dp": [[-2.64, 5.35], [-2.16, 3.51], [-1.61, 1.98], [-0.9, 0.91], [-0.13, 0.88], [0.28, 1.36], [0.84, 2.55], [1.46, 4.62]],
"fx": [1, 1, 1]}'>2nd order poly</option>
<option selected value='{"dp": [[-3.73, -4.29], [-3.3, -0.89], [-2.78, 0.28], [-1.81, -2.35], [-0.45, -4.96], [0.6, 5.11]],
"fx": [-2.6, 8.1, 6.9, 1.3]}'>3rd order poly</option>
<option value='{"dp": [[-1.1018, 2.0277], [-1.0641, 0.9713], [-0.9768, -0.9416], [-0.8963, -2.1355], [-0.6510, -3.3698], [-0.3821, -2.5148], [-0.0143, -1.0300], [0.2611, -0.9558], [0.4754, -1.4630], [0.7069, -1.9178], [1.1333, 1.7366]],
"fx": [-1, 2, -7, -2, 7.5]}'>4th order poly</option>
</select>
</p>
<p>
<label for="data">JSON Data</label>
<input type="text" id="data" value="" /><br>
</p>
<p>
<label for="order">Poly order</label>
<input type="text" id="order" value="" /><br>
</p>
<p>
<label for="iterations">Iterations</label>
<input type="text" id="iterations" value="1000" /><br>
</p>
<p>
<label for="poolsize">Start poolsize</label>
<input type="text" id="poolsize" value="2000" /><br>
</p>
<p>
<label for="minguess">Min-guess</label>
<input type="text" id="minguess" value="-100" /><br>
</p>
<p>
<label for="maxguess">Max-guess</label>
<input type="text" id="maxguess" value="100" /><br>
</p>
<p>
<label for="updrate">Update-rate</label>
<input type="text" id="updrate" value="1" /><br>
</p>
<p>
<label for="eq">Enter correct EQ (if you want to):</label>
<input type="text" id="eq" value="" /><br>
</p>
<p>
<label for="eq1">Best guessed EQ:</label>
<input type="text" id="eq1" value="" /><br>
</p>
<p>
<label for="sqerr">Best squared error</label>
<input type="text" id="sqerr" value="" /><br>
</p>
<p>
<label for="run">Run</label>
<input type="button" value="Reset and run" id="run" /><br>
<label for="stop">Stop latch</label>
<input type="radio" id="stop" value="">
</p>
<p>
<label for="counter">Iterations left</label>
<input id="counter" value="" />
</p>
</form>
<div id="plot"></div>
<p>
<a href="https://github.com/peheje">https://github.com/peheje</a>
</p>
</body>
<script src="bundle.js"></script>
</html>