Browse and solve 1,200+ machine learning coding challenges on Deep-ML. Filter by difficulty (beginner, intermediate, advanced) and category (linear algebra, machine learning, deep learning, NLP, computer vision). Write Python solutions in the browser and get instant feedback against test cases.
Deep-ML | Sigmoid Activation Function UnderstandingSigmoid Activation Function Understanding
Write a Python function that computes the output of the sigmoid activation function given an input value z. The function should return the output rounded to four decimal places.
Example:
Input:
z = 0
Output:
0.5
Reasoning:
The sigmoid function is defined as σ(z) = 1 / (1 + exp(-z)). For z = 0, exp(-0) = 1, hence the output is 1 / (1 + 1) = 0.5.