about summary refs log tree commit diff
path: root/src/monkey_brain
diff options
context:
space:
mode:
authormakefunstuff <[email protected]>2024-07-08 23:55:59 +0200
committermakefunstuff <[email protected]>2024-07-08 23:55:59 +0200
commitaafe02ddf1931659b9d42e403d8fcb37450afb43 (patch)
treed4e77fe62c5b0bc87632485f1968fb6c87bc013d /src/monkey_brain
parent8f2c7c513bc54bf127ff2ab00da1694fb981f442 (diff)
downloadtinkerbunk-aafe02ddf1931659b9d42e403d8fcb37450afb43.tar.gz
annotate sigmoid
Diffstat (limited to '')
-rw-r--r--src/monkey_brain/perceptron.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/monkey_brain/perceptron.zig b/src/monkey_brain/perceptron.zig
index c65fc41..893bb16 100644
--- a/src/monkey_brain/perceptron.zig
+++ b/src/monkey_brain/perceptron.zig
@@ -7,6 +7,8 @@ const training_set_size: usize = 4;
 const learning_rate: f64 = 0.1;
 const epochs: u64 = 1000000;
 
+// https://en.wikipedia.org/wiki/Sigmoid_function - more details
+// https://www.youtube.com/watch?v=TPqr8t919YM
 fn sigmoid(x: f64) f64 {
     return 1.0 / (1.0 + math.exp(-x));
 }