From 23796d0099468875fc24feaea626ccc993191a6b Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 6 Apr 2016 19:46:49 +0200 Subject: add boston slide --- code/bostonset.js | 21 ++++++++++++++++++++- code/weightviswrapper.js | 1 + index.css | 9 +++++++++ index.html | 37 ++++++++++++++++++++++++++++++++++++- 4 files changed, 66 insertions(+), 2 deletions(-) diff --git a/code/bostonset.js b/code/bostonset.js index 50b9d38..f5f1264 100644 --- a/code/bostonset.js +++ b/code/bostonset.js @@ -9,6 +9,7 @@ var Bostonset = (function() { this.dataScaler.setScales([[0.00632, 0.0, 0.46, 0.0, 0.385, 3.561, 2.9, 1.1296, 1.0, 187.0, 12.6, 0.32, 1.73], [88.9762, 100.0, 27.74, 1.0, 0.871, 8.78, 100.0, 12.1265, 24.0, 711.0, 22.0, 396.9, 37.97]]); this.targetScaler = new MinMaxScaler(); this.targetScaler.setScales([5.0, 50.0]); + this.readyHooks = []; } Bostonset.prototype.load = function(url) { @@ -22,15 +23,33 @@ var Bostonset = (function() { } self.data.push(arr); }); + self.readyHooks.forEach(function(hook) { hook(); }); }); }; + Bostonset.prototype.afterLoad = function(cb) { + if (!this.ready) { + this.readyHooks.push(cb); + } else { + cb(); + } + }; + + Bostonset.prototype.attributes = function() { + console.log(attrs); + return attrs; + }; + Bostonset.prototype.length = function() { return this.data.length; }; + Bostonset.prototype.rawData = function(row) { + return this.data[row]; + }; + Bostonset.prototype.rawInputs = function(row) { - return this.data[row].slice(0, -1); // leave out MEDV + return this.rawData(row).slice(0, -1); // leave out MEDV }; Bostonset.prototype.inputs = function(row) { diff --git a/code/weightviswrapper.js b/code/weightviswrapper.js index 1f17b55..94f6306 100644 --- a/code/weightviswrapper.js +++ b/code/weightviswrapper.js @@ -199,6 +199,7 @@ var WeightVisWrapper = (function() { /* helps with impress.js' stepenter/stepleave events */ // TODO move into its own file +// TODO must be a step's direct child var VisIntegrater = (function() { function VisIntegrater(enterCb, leaveCb, selector) { var self = this; diff --git a/index.css b/index.css index ae81e85..13e9525 100644 --- a/index.css +++ b/index.css @@ -51,6 +51,9 @@ p.center { top: 50%; bottom: 50%; } +table.center { + margin: auto; +} .hidden { display: none; @@ -64,3 +67,9 @@ p.center { .axis text { font-size: large; } + +#overview { display: none; } +.impress-on-overview .step { + opacity: 1; + cursor: pointer; +} diff --git a/index.html b/index.html index 078708a..d0e7b28 100644 --- a/index.html +++ b/index.html @@ -140,7 +140,7 @@ -
+

Künstliche neuronale Netze

Neuron - künstliches Neuron

@@ -153,6 +153,41 @@ Mehrschichtiges Perzeptron
+ +
+

Das Problem – Die Boston-Häuserdatenreihe

+
+

:homes:

+
+
+ +
+ +
+ +