34 min total

Deep Learning

Logistic regression & vectorization

Logistic regression & vectorization

Feature vector: representation of data into numerical format that can be processed by ML algorithms

Notation used below:

Logistic regression & vectorization — diagram

The feature vector x has nₓ components: x ∈ ℝⁿˣ.

Logistic regression

Logistic regression & vectorization — diagram
Logistic regression & vectorization — diagram

Broadcasting

Broadcasting is a technique that allows NumPy to perform element-wise operations on arrays of different shapes by automatically expanding their dimensions to match.

np.dot(a, b) performs a matrix multiplication on a and 𝑏, whereas 𝑎∗𝑏 performs an element-wise multiplication.

Logistic regression & vectorization — diagram

Matrix multiplication

Logistic regression & vectorization — diagram

Element-wise multiplication

Logistic regression & vectorization — diagram