-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUntitled.js
More file actions
61 lines (59 loc) · 1.14 KB
/
Untitled.js
File metadata and controls
61 lines (59 loc) · 1.14 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
(function() {
var run = function (input) {
F = {
0: 0,
1: 0,
2: 0,
9: 0.5004051195968041,
3: 0,
4: 0.0016204787418246241,
5: 0.0016204787418246241,
6: -0.06312629263848066,
7: 0.06814677058719099,
8: -0.09432079046964646,
10: 0.24999983587811228,
22: 0.04920510351657867,
17: 0.5225790777188701,
11: 0,
12: 0.09037777888588608,
13: 0.09037777888588608,
14: -0.0864469485823065,
15: -0.028363735741004356,
16: 0.06284970012493432,
18: 0.24949018524936523,
23: 0.08374879853799941,
24: 0.5132947817089634,
19: 0,
20: 0.053191664789030965,
21: -0.0151961908210069,
25: 0.249823248779311
};
F[0] = input[0];
F[1] = input[1];
F[2] = input[2];
F[3] = F[4];
F[4] = F[5];
F[4] += F[0] * F[6];
F[4] += F[1] * F[7];
F[4] += F[2] * F[8];
F[9] = (1 / (1 + Math.exp(-F[4])));
F[10] = F[9] * (1 - F[9]);
F[11] = F[12];
F[12] = F[13];
F[12] += F[0] * F[14];
F[12] += F[1] * F[15];
F[12] += F[2] * F[16];
F[17] = (1 / (1 + Math.exp(-F[12])));
F[18] = F[17] * (1 - F[17]);
F[19] = F[20];
F[20] = F[21];
F[20] += F[9] * F[22];
F[20] += F[17] * F[23];
F[24] = (1 / (1 + Math.exp(-F[20])));
F[25] = F[24] * (1 - F[24]);
var output = [];
output[0] = F[24];
return output;
};
return run
})