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

Method _prepTraining

src/neural-network.js:422–439  ·  view source on GitHub ↗

* * @param data * @param options * @protected * @return { data, status, endTime }

(data, options)

Source from the content-addressed store, hash-verified

420 * @return { data, status, endTime }
421 */
422 _prepTraining(data, options) {
423 this._updateTrainingOptions(options);
424 data = this._formatData(data);
425 const endTime = Date.now() + this.trainOpts.timeout;
426
427 const status = {
428 error: 1,
429 iterations: 0
430 };
431
432 this._verifyIsInitialized(data);
433
434 return {
435 data,
436 status,
437 endTime
438 };
439 }
440
441 /**
442 *

Callers 4

trainMethod · 0.95
trainAsyncMethod · 0.95
browser.min.jsFile · 0.45
browser.jsFile · 0.45

Calls 3

_formatDataMethod · 0.95
_verifyIsInitializedMethod · 0.95

Tested by

no test coverage detected