_.fill(urls, config.test.mirror);
_.fill(names, self._config.name);
function fill(val, rows, cols) { return matrix(rows, cols, _.fill(new Array(rows * cols), val)); }
_.fill(array, (e) => 0);
/* prediction procedure for bayeslda INPUT: b - object of type bayeslda x - m*n matrix containing n feature vectors of size m*1 OUTPUT: varargout - if classify is called with one output argument an array containing the mean value of the predictive distribution for each example in x is returned - if classify is called with two output arguments the mean value and the variance of the predictive distribution are returned Author: Ulrich Hoffmann - EPFL, 2006 Copyright: Ulrich Hoffmann - EPFL The algorithm implemented here was originally described by MacKay, D. J. C., 1992. Bayesian interpolation. Neural Computation 4 (3), pp. 415-447. */ classify(featureVectors) { featureVectors.push(_.fill(Array(featureVectors[0].length), 1)); featureVectors = matrix(featureVectors.length, featureVectors[0].length, _.flatten(featureVectors)); const m = multiply(transpose(this.w), featureVectors); return m.data; }
featureVectors.push(_.fill(Array(featureVectors[0].length), 1));