You are on page 1of 5

Basics of Neural

Network Programming

Vectorizing Logistic
deeplearning.ai
Regression
Vectorizing Logistic Regression
(1) 𝑇 (1) (2) 𝑇 (2) (3) 𝑇 (3)
𝑧 =𝑤 𝑥 +𝑏 𝑧 =𝑤 𝑥 +𝑏 𝑧 =𝑤 𝑥 + 𝑏
(1) (2) (3)
𝑎 =𝜎 (𝑧 ¿¿(1))¿ 𝑎 =𝜎 (𝑧 ¿¿(2))¿ 𝑎 =𝜎 (𝑧 ¿¿(3))¿

:input feature length


m: #samples in dataset

Andrew Ng
Basics of Neural
Network Programming

Vectorizing Logistic
deeplearning.ai Regression’s Gradient
Computation
Vectorizing Logistic Regression

Andrew Ng
Implementing Logistic Regression

J = 0, d = 0, d = 0, db = 0
for i = 1 to m:
=
=
+=
d=
d+=
d+=
db += d
J = J/m, d = d/m, d = d/m
db = db/m
Andrew Ng

You might also like