Vectorization vs Non-Vectorization Python implementation

preview_player
Показать описание
import numpy as np
num = 10000000
import time
print(c)
print("Verctorize : " + str((end -start)*1000) + 'ms')
c =0
for i in range(num):
c += a[i]*b[i]
print(c)
print("Loop version : " + str((end -start)*1000) + 'ms')
Рекомендации по теме
Комментарии
Автор

I'd like to watch example of converting shit code implemented with loops to vectorized version. Thanks!

pythonfamily
Автор

Won't nano * 1000 equals micro Second?
In the video, it is mentioned millisecond @ 5:53

brijesh
Автор

you believe me or not im huge fan of you sir... you nailed the ML course from the roots you are teaching

navsiv
Автор

Awsome explanation....I was having difficulty to understand vecorization in Andrew ng deep learning course as I have no prior experience in python and any programming language....but your explanation just nailed it.

MsRAJDIP
Автор

sir.... im expecting more and more videos sir plz upload for me ...
i shared the chanel with my frns too as u said, plz plzzz add more videos thanks in advance

navsiv
Автор

sad to say that ML playlist have only 41 videos and that on KNN for practice purpose
i want more and more videos on PCA, AUC curve, Random Forest, SVM, error metrics, sentiment analysis pleaseee sir

navsiv