Week 2 - Python and Vectorization

Vectorization if non-verctorized:

if vectorized:

it is much faster

Vectorizing Logistic Regression b is real number, it will be automatically changed to vector to be added each element of matrix (python broadcasting)

A note on python/numpy vectors to simplify code and to avoid bug, don't use rank 1 array

Read More