Sigmoid Activation
EasyMachine LearningMath
Description
Given a number x, return the sigmoid 1 / (1 + e^(-x)), rounded to 4 decimal places.
Examples
Input:
x = 0Output:
0.5Explanation:
Passing 0 through the logistic function yields 0.5.
Input:
x = 2Output:
0.8808Explanation:
Passing 2 through the logistic function yields 0.8808.
Input:
x = -1Output:
0.2689Explanation:
Passing -1 through the logistic function yields 0.2689.
Constraints
- •
-100 ≤ x ≤ 100