63.1K subscribers
119 photos
1 video
1 link
Data science, Machine learning, and Artificial Intelligence. We post daily contents related to machine learning focusing on Numpy, Pandas, and ML effectively.
Download Telegram
NumPy is one of my favorite packages. Itโ€™s one of the most powerful numeric packages available on any programming languages..Tied with Python, it makes for a quick script fiddling with a lot of numbers..Did you know that you could develop your machine learning algorithms in NumPy? Thatโ€™s how I initially learned to implement my AI algorithms..Btw, does anyone have the answer to guruโ€™s question in the last line of code? ๐Ÿค”
.
๐Ÿ‘จโ€๐Ÿ’ป#NumPy
Letโ€™s continue our NumPy discussion, shall we? ๐Ÿ‘ .
I found NumPyโ€™s matmul and multiply confusing when I was starting out, so why not compare them in a post?
.
matmul is the equivalent of the dot product between two matrices, where the last dimension of the first matrix has to be equal to the first dimension of the second matrix. Easy, right? ๐Ÿ’ช
.
On the other hand, multiply is the convenient operation of taking two same size matrices and multiplying them element wise. This will come in handy when we talk about building deep neural nets ๐Ÿ”œ
.
Donโ€™t forget to swipe to see the code examples โ€ผ๏ธโ€ผ๏ธ
.
Question: NumPy has another operation called โ€œdotโ€ ๐Ÿคฏ what do you think that does (hint is in this post)
.
๐Ÿ‘จโ€๐Ÿ’ป#NumPy
Hello data scientists ๐Ÿ‘‹ and welcome to the post of the day ๐Ÿ™ .Itโ€™s time we talk about NumPy slicing. NumPy slicing is a very common technique to manipulate large data ๐Ÿ“Š.It can be used with any number of dimensions of data with the same syntax ๐Ÿค”.Here I was able to extract my favorite fruits from a large array of food items. Neat, right? ๐Ÿ’ก.Keep in mind array[:, 1:3] will take all the rows (:) and columns 1 and 2 of the dataset.
.
๐Ÿ‘จโ€๐Ÿ’ป#NumPy
Hiii data scientists ๐Ÿ‘‹๐Ÿ‘‹.Hope your week is off to a great start.I know I couldnโ€™t start mine properly without talking about some NumPy ๐Ÿคฆ๐Ÿปโ€โ™‚๏ธ.3 new functions and a useful concept for today, shall we? ๐Ÿ‘.zeros(), ones() and diag() are three super useful functions I use all the time using NumPy. They give us the three basic matrixes: matrix of zeros, ones, and a diagonal matrix with specific values, respectively ๐Ÿ‘Œ.Doing arithmetic with NumPy matrices is super easy, unless what youโ€™re doing is a matrix operation, all other operations occur at element level such a scalar multiplier and scalar addition ๐Ÿ™Œ.Liked todayโ€™s lesson? Let me know what you would like to learn next
.
๐Ÿ‘จโ€๐Ÿ’ป#NumPy
Hi data science enthusiasts ๐Ÿ‘‹ and welcome to part 5 of intro to NumPy.Today, we are gonna talk about broadcasting in NumPy ๐Ÿ”ข.Broadcasting is a powerful, useful yet tricky feature in NumPy. If you know it by heart and use it intentionally, you can simplify a lot of code ๐Ÿ‘Œ.However if itโ€™s used by mistake it can create bugs and a lot of headaches ๐Ÿ‘Ž.Thatโ€™s because in NumPy, you can easily do operations between matrices even if the matrices donโ€™t have the same shape.NumPy โ€œbroadcastsโ€ the smaller matrix (if valid for the operation) and repeats the operation per element, row, column, etc ๐Ÿค˜.In todayโ€™s code snippet, a matrix can be added to a scalar element-wise through this feature, a column vector can get added to every column, and a row vector can get added to every row.Again, really powerful stuff ๐Ÿ’ช๐Ÿ’ช.Hope youโ€™re enjoying the journey we are on so far as much as I am.
.
๐Ÿ‘จโ€๐Ÿ’ป#NumPy
Hello Data Science & NumPy enthusiasts ๐Ÿ‘‹๐Ÿ‘‹.Of course itโ€™s time for yet another episode on NumPy ๐Ÿ™.Stacking arrays horizontally and vertically is something I do almost everyday.When you train large networks, your data becomes very large arrays of features, and very often, itโ€™s needed to stack them to be able to feed them to the next layer of the network.So itโ€™s supeeeer helpful to know how to do that in NumPy and voila itโ€™s not so bad with np.vstack and np.hstack, you can stack up your arrays as long as the sizes match in the direction youโ€™re stacking ๐Ÿ‘.Happy stacking ๐Ÿ˜‚๐Ÿ‘Œ
.
๐Ÿ‘จโ€๐Ÿ’ป#NumPy
โ€ผ๏ธ To ensure every new post is visible to you, please turn on post notification at the top right of the post โ€ผ๏ธ.Welcome to part 7 of our journey through NumPy ๐Ÿ‘‹.When it comes to data manipulation, being able to filter data points of various ranges is a must ๐Ÿ‘.NumPy makes it really easy to filter data points and reset their values ๐Ÿ‘Œ.I use this technique daily in my job to get the data in the form I need before feeding it to my machine learning model ๐Ÿ™.How are you planning to use NumPy in your projects โ‰๏ธโ“
.
๐Ÿ‘จโ€๐Ÿ’ป#NumPy