()
| 1117 | }]); |
| 1118 | |
| 1119 | function NeuralNetwork() { |
| 1120 | var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 1121 | |
| 1122 | _classCallCheck(this, NeuralNetwork); |
| 1123 | |
| 1124 | Object.assign(this, this.constructor.defaults, options); |
| 1125 | this.hiddenLayers = options.hiddenLayers; |
| 1126 | this.trainOpts = {}; |
| 1127 | this._updateTrainingOptions(Object.assign({}, this.constructor.trainDefaults, options)); |
| 1128 | |
| 1129 | this.sizes = null; |
| 1130 | this.outputLayer = null; |
| 1131 | this.biases = null; // weights for bias nodes |
| 1132 | this.weights = null; |
| 1133 | this.outputs = null; |
| 1134 | |
| 1135 | // state for training |
| 1136 | this.deltas = null; |
| 1137 | this.changes = null; // for momentum |
| 1138 | this.errors = null; |
| 1139 | this.errorCheckInterval = 1; |
| 1140 | if (!this.constructor.prototype.hasOwnProperty('runInput')) { |
| 1141 | this.runInput = null; |
| 1142 | } |
| 1143 | if (!this.constructor.prototype.hasOwnProperty('calculateDeltas')) { |
| 1144 | this.calculateDeltas = null; |
| 1145 | } |
| 1146 | } |
| 1147 | |
| 1148 | /** |
| 1149 | * |
nothing calls this directly
no test coverage detected