MCPcopy
hub / github.com/BrainJS/brain.js / RandomMatrix

Function RandomMatrix

browser.js:3458–3470  ·  view source on GitHub ↗
(rows, columns, std)

Source from the content-addressed store, hash-verified

3456 _inherits(RandomMatrix, _Matrix);
3457
3458 function RandomMatrix(rows, columns, std) {
3459 _classCallCheck(this, RandomMatrix);
3460
3461 var _this = _possibleConstructorReturn(this, (RandomMatrix.__proto__ || Object.getPrototypeOf(RandomMatrix)).call(this, rows, columns));
3462
3463 _this.rows = rows;
3464 _this.columns = columns;
3465 _this.std = std;
3466 for (var i = 0, max = _this.weights.length; i < max; i++) {
3467 _this.weights[i] = (0, _random.randomF)(-std, std);
3468 }
3469 return _this;
3470 }
3471
3472 return RandomMatrix;
3473}(_2.default);

Callers

nothing calls this directly

Calls 2

_classCallCheckFunction · 0.70

Tested by

no test coverage detected