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

Function likely

browser.js:342–354  ·  view source on GitHub ↗

* * @param {*} input * @param {NeuralNetwork} net * @returns {*}

(input, net)

Source from the content-addressed store, hash-verified

340 * @returns {*}
341 */
342function likely(input, net) {
343 var output = net.run(input);
344 var maxProp = null;
345 var maxValue = -1;
346 for (var prop in output) {
347 var value = output[prop];
348 if (value > maxValue) {
349 maxProp = prop;
350 maxValue = value;
351 }
352 }
353 return maxProp;
354}
355
356},{}],3:[function(require,module,exports){
357"use strict";

Callers 1

likely.jsFile · 0.50

Calls 1

runMethod · 0.45

Tested by

no test coverage detected