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

Method trainPattern

src/recurrent/rnn.js:185–190  ·  view source on GitHub ↗

* * @param {Number[]} input * @param {Number} [learningRate] * @returns {number}

(input, learningRate = null)

Source from the content-addressed store, hash-verified

183 * @returns {number}
184 */
185 trainPattern(input, learningRate = null) {
186 const error = this.runInput(input);
187 this.runBackpropagate(input);
188 this.step(learningRate);
189 return error;
190 }
191
192 /**
193 *

Callers 6

trainMethod · 0.95
browser.min.jsFile · 0.80
browser.jsFile · 0.80
lstm.jsFile · 0.80
gru.jsFile · 0.80
rnn.jsFile · 0.80

Calls 3

runInputMethod · 0.95
runBackpropagateMethod · 0.95
stepMethod · 0.95

Tested by

no test coverage detected