Skip to content

Instantly share code, notes, and snippets.

@angeloped
Created August 27, 2021 09:26
Show Gist options
  • Save angeloped/bae79a0b1ee8f4a1caf63dd1998b9d7c to your computer and use it in GitHub Desktop.
Save angeloped/bae79a0b1ee8f4a1caf63dd1998b9d7c to your computer and use it in GitHub Desktop.
A purely pythonic implementation of Sigmoid function without external module.
# sigmoid.py
# A purely pythonic implementation of Sigmoid function
# without external module.
e=2.7182818284590452
def sigmoid(x):
return (1 / (1 + (e**-x)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment