Skip to content

Instantly share code, notes, and snippets.

@MattSkiff
Created March 11, 2020 07:26
Show Gist options
  • Save MattSkiff/70bdcad471e92061c39237619157e6e8 to your computer and use it in GitHub Desktop.
Save MattSkiff/70bdcad471e92061c39237619157e6e8 to your computer and use it in GitHub Desktop.
Make sigmoid simple viz to go in dissertation
# author: matthew skiffington
# purpose: make sigmoid simple viz to go in dissertation
sigmoid.func <- function(x) {
sapply(
FUN = function(x) {
x = (exp(x)/(1+exp(x)))
},
X = x,
simplify = T
)
}
x.vec <- seq(-60000,60000)/10000
y.vec <- sigmoid.func(x.vec)
plot(type = 'l',x=x.vec,y=y.vec,xlab = "x",ylab = "y",main = "The Sigmoid Activation Function",ylim = c(0,1),xlim = c(-6,6))
@MattSkiff
Copy link
Author

sigmoid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment