From aafe02ddf1931659b9d42e403d8fcb37450afb43 Mon Sep 17 00:00:00 2001 From: makefunstuff Date: Tue, 9 Jul 2024 00:55:59 +0300 Subject: annotate sigmoid --- src/monkey_brain/perceptron.zig | 2 ++ 1 file changed, 2 insertions(+) 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)); } -- cgit 1.4.1-2-gfad0