Mercurial > hg > tvii
view tvii/sigmoid.py @ 16:b95fe82ac9ce
more notes to self
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 03 Sep 2017 13:17:33 -0700 |
parents | |
children | bf8bd42f8cd7 |
line wrap: on
line source
""" sigmoid function: 1/(1 + e^-z) """ import math def sigmoid(z): return 1./(1. + math.exp(-z))