ASCI Logo
ASCI
Programs
Practice DSA
Degrees & Careers
Pricing
Log inGet Started

Quick Navigation & Search

Search curriculum tracks, DSA problems, systems theory and tools...

deep learning-specialization

Curriculum Index

Current LevelInitiate
0/ 500 XP
Gravit Certificate:
100% Required
  • 1.1 Vectorized Logistic Regression for Binary Classification
  • 1.2 Computing Binary Cross-Entropy Loss
•
1
2
3
4
5
6
7
8
9
10
Module 1: Deep Neural Network Foundations & Backprop•Lesson 1

1.1 Vectorized Logistic Regression for Binary Classification

### Vectorized Sigmoid Activation
The sigmoid function maps any real scalar into the interval $(0, 1)$ representing probability:
$$\sigma(z) = \frac{1}{1 + e^{-z}}$$

example.pyPython 3.11
import math
def sigmoid(z):
return 1 / (1 + math.exp(-z))
print(round(sigmoid(0), 2)) # 0.5
Python 3.11
•
Interactive Challenge
+70 XP
Challenge Objective

Evaluate sigmoid at z=0 and print 'SIGMOID_ZERO: 0.5'.

solution.py
UTF-84 SpacesAuto-saved
cpython3.11:~/workspace
CPython 3.11.8 (WASM)
$python3 -u solution.py
Click "Compile & Run" (or press Ctrl + Enter) to compile AST, verify bytecode, and execute the solution.