Compute a logistic function or its derivative
logistic(xi, u_log, s_log) logistic_deriv(xi, u_log, s_log)
xi | X vector |
---|---|
u_log | Inflexion point (x-value of the sigmoid's midpoint) |
s_log | Steepness of the curve |
Logistic function
Derivative of the Logistic function
More informations can be found in the wikipedia page
logistic(1:10,5,0.1)#> [1] 4.248354e-18 9.357623e-14 2.061154e-09 4.539787e-05 5.000000e-01 #> [6] 9.999546e-01 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00logistic_deriv(1:10,5,0.1)#> [1] 0.000000e+00 9.357623e-13 2.061154e-08 4.539581e-04 2.500000e+00 #> [6] 4.539581e-04 2.061154e-08 9.357623e-13 4.248354e-17 1.928750e-21