Function sigmoid_derivative

Source
pub fn sigmoid_derivative(a: f64) -> f64
Expand description

The derivative of the sigmoid function with respect to the argument

ยงExamples

use com_croftsoft_core::math::math_lib::sigmoid_derivative;
assert_eq!(
  sigmoid_derivative(f64::NEG_INFINITY),
  0.0);
assert_eq!(
  sigmoid_derivative(-1.0),
  0.19661193324148185);
assert_eq!(
  sigmoid_derivative(0.0),
  0.25);
assert_eq!(
  sigmoid_derivative(1.0),
  0.19661193324148185);
assert_eq!(
  sigmoid_derivative(f64::INFINITY),
  0.0);