var Bostonset = (function() { var attrs = ["crim", "zn", "indus", "chas", "nox", "rm", "age", "dis", "rad", "tax", "ptratio", "black", "lstat", "medv"]; function Bostonset() { this.data = []; // fixed constants exported from training data this.dataScaler = new MinMaxScaler(); 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) { var self = this; d3.csv(url).get(function(e, data) { if (e) console.log(e); data.forEach(function (el) { var arr = []; for (c=0; c