This Gist was automatically created by Carbide, a free online programming environment.
-
-
Save alufers/82d60bf8ee322ac487dbd62797f72579 to your computer and use it in GitHub Desktop.
untitled
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sigm = function(z) { | |
return 1 / (1 + Math.pow(2.71828, -z)); | |
} | |
var sigm2 = function(x1, w1, x2, w2, bias) { | |
return 1 / (1 + Math.exp(-(x1 * w1 * x2 * w2) - bias)); | |
} | |
var data = []; | |
for (var i = -100; i < 100; i++) { | |
data.push(sigm2(i / 100, 1, 2, 2, 0)); | |
} | |
data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///Matrix test\\ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment