This is a logistic sigmoid function:

I know x. How can I calculate F(x
you can calculate it as :
import math
def sigmoid(x):
return 1 / (1 + math.exp(-x))
or conceptual, deeper and without any imports:
def sigmoid(x):
return 1 / (1 + 2.718281828 ** -x)
or you can use numpy for matrices:
import numpy as np #make sure numpy is already installed
def sigmoid(x):
return 1 / (1 + np.exp(-x))