From 70c6f829714c271396693bcaf73832e27118cbb5 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sun, 10 Apr 2016 11:55:09 +0200 Subject: minor layout; delete old code (fixed rebase) --- index.html | 130 +++++++++++++++++-------------------------------------------- 1 file changed, 36 insertions(+), 94 deletions(-) (limited to 'index.html') diff --git a/index.html b/index.html index 9f29c09..49241c4 100644 --- a/index.html +++ b/index.html @@ -288,8 +288,8 @@

(Eine geht noch.)

-

- Berechneter MEDV-Wert: lade… - Erwarteter MEDV-Wert: lade… +

+ Berechneter MEDV-Wert: lade… - Erwarteter MEDV-Wert: lade…

@@ -302,12 +302,16 @@ weightsWrapper.openIn(c, true); weightsWrapper.jumpTo(0); function calc() { - var row = Math.floor(Math.random()*bostonset.length()), - inputs = bostonset.inputs(row), - calculated = bostonset.asOutput(weightsWrapper.calculate(inputs, 0)[0]), + var inputs, calculated, expected; + do { + var row = Math.floor(Math.random()*bostonset.length()); + inputs = bostonset.inputs(row); + calculated = bostonset.asOutput(weightsWrapper.calculate(inputs, 0)[0]); expected = bostonset.expectedOutput(row); - d3.select(c).select(".calculated").text(calculated.toString()); - d3.select(c).select(".expected").text(expected.toString()); + console.log("calc", calculated, expected); + } while (Math.abs(calculated - expected) < 15); + d3.select(c).select(".calculated").text(calculated.toString()); + d3.select(c).select(".expected").text(expected.toString()); } calc(); d3.select(c).select(".btn-calc").on("click", calc); @@ -367,63 +371,32 @@

Test :open_mouth:

-
- -
-

:blush:

-
- -
- -
- - - + +
+ +
-- cgit v1.3.1