summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2016-04-03 16:29:07 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2016-04-03 16:29:07 +0200
commitc285b7bea0301fea4694484cdbeeca6a2565d72c (patch)
treeb203ed4018975404eb7bdff8c5378bd095e2b6aa /index.html
parent96744a133f3d421cdfcd9d18dd5f74981475fd5f (diff)
downloadvortrag-knn-c285b7bea0301fea4694484cdbeeca6a2565d72c.tar.gz
vortrag-knn-c285b7bea0301fea4694484cdbeeca6a2565d72c.zip
f*ck jsperf's crappy sigmoid implementation
Diffstat (limited to 'index.html')
-rw-r--r--index.html15
1 files changed, 8 insertions, 7 deletions
diff --git a/index.html b/index.html
index 7836a44..2e17c5c 100644
--- a/index.html
+++ b/index.html
@@ -138,14 +138,15 @@
<script type="text/javascript">
new VisIntegrater(function(c) {
weightsWrapper.afterLoad(function() {
- // TODO visualization
- // TODO shhht… find rows with diff<5 first
weightsWrapper.openIn(c);
- var row = Math.floor(Math.random()*bostonset.length());
- console.log(row);
- var inputs = bostonset.inputs(row);
- console.log(bostonset.asOutput(weightsWrapper.activate(inputs)[0]));
- console.log(bostonset.expectedOutput(row));
+ var testRows = [400, 175, 454, 481, 476, 364, 377, 75, 103, 84, 458, 483];
+ for(c=0; c<10; c++){
+ //var row = testRows[Math.floor(Math.random()*testRows.length)];
+ var row = Math.floor(Math.random()*bostonset.length());
+ var inputs = bostonset.inputs(row);
+ console.log("calculated", bostonset.asOutput(weightsWrapper.activate(inputs)[0]));
+ console.log("real", bostonset.expectedOutput(row));
+ }
});
}, function(c) {
weightsWrapper.remove(c);