This is a logistic sigmoid function:
I know x. How can I calculate F(x
Good answer from @unwind. It however can't handle extreme negative number (throwing OverflowError).
My improvement:
def sigmoid(x): try: res = 1 / (1 + math.exp(-x)) except OverflowError: res = 0.0 return res