f0nzie
9/7/2017 - 12:35 AM

Compute the sigmoid of x

Compute the sigmoid of x

def sigmoid(x):
    """
    Compute the sigmoid of x

    Arguments:
    x -- A scalar or numpy array of any size

    Return:
    s -- sigmoid(x)
    """
    
    s = 1 / ( 1 + np.exp(-x))
    
    return s