ڷ HOME > ڷ > ڷ
 
[Ȱ뿬] pracma package
16-04-05 11:36 369
 
install.packages("pracma")
library(pracma)
x <- seq(-6, 6, length.out = 101)
## sigmoid(x, a = 1, b = 0). y = 1/(1 + e^{-a (x-b)})
y1 <- sigmoid(x)
y2 <- sigmoid(x, a = 2)
## Not run:
plot(x, y1, type = "l", col = "darkblue",
         xlab = "", ylab = "", main = "Sigmoid Function(s)")
lines(x, y2, col = "darkgreen")
grid()