UNPKG

encog

Version:

Encog is a NodeJs ES6 framework based on the Encog Machine Learning Framework by Jeff Heaton, plus some the of basic data manipulation helpers.

32 lines (27 loc) 775 B
var ActivationFunction = require('../activationFunction'); /** * The Linear layer is really not an activation function at all. The input is * simply passed on, unmodified, to the output. This activation function is * primarily theoretical and of little actual use. Usually an activation * function that scales between 0 and 1 or -1 and 1 should be used. * @constructor * @class ActivationLinear */ class ActivationLinear extends ActivationFunction { constructor() { super("ActivationLinear"); } /** * @inheritDoc */ derivativeFunction() { return 1.0; } /** * @return {ActivationLinear} The object cloned; */ clone() { return new ActivationLinear(); } } module.exports = ActivationLinear;