Skip to content

Instantly share code, notes, and snippets.

@MattSkiff
Created March 11, 2020 07:26
Show Gist options
  • Select an option

  • Save MattSkiff/70bdcad471e92061c39237619157e6e8 to your computer and use it in GitHub Desktop.

Select an option

Save MattSkiff/70bdcad471e92061c39237619157e6e8 to your computer and use it in GitHub Desktop.

Revisions

  1. MattSkiff created this gist Mar 11, 2020.
    15 changes: 15 additions & 0 deletions sigmoid_viz.R
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    # 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))