Untitled



Vectorization


When we implement a learning algorithm using vectorization,

Learning how to write vectorized code will allow you to

So, vectorization provides a large speed up in this example. This is because NumPy makes better use of available data parallelism in the underlying hardware. GPU's and modern CPU's implement Single Instruction, Multiple Data (SIMD) pipelines allowing multiple operations to be issued in parallel. This is critical in Machine Learning where the data sets are often very large.


Untitled


The Numpy dot function is a vectorized implementation of the dot product operation between 2 vectors.