Skip to content

Instantly share code, notes, and snippets.

@alufers
Forked from carbide-public/ untitled.carbide.md
Created August 26, 2016 14:16
Show Gist options
  • Save alufers/82d60bf8ee322ac487dbd62797f72579 to your computer and use it in GitHub Desktop.
Save alufers/82d60bf8ee322ac487dbd62797f72579 to your computer and use it in GitHub Desktop.
untitled
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
///Matrix test\\
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment