Numpy Interview Questions | Numpy Interview Questions For Artificial Intelligence And Machine Learning

Kb Tutorials

Subscribe Here





Numpy Interview Questions For Artificial Intelligence And Machine Learning


Hello, friends in this tutorial. We are going to seen them by, like interview questions. This is for the artificial intelligence machine, learning and data science case. So just like you guys. I am also beginner to this course on on the machine learning part. So whatever that I know a lot of that, I have a knowledge on this life, baby. I am going to share you. Few interview questions on top of it again. So there were few questions. I have so let’s get started. So how do you import so here? I am using Anaconda, Jupiter Jupiter. I’d here and so first of all, let me import this important and by as NP Yeah, then create an array of 10 zeros here. Okay, so how do we create with the help of? Np Dot goes then. Okay, that should create an array of 10 zeros as you can see. Once I enter shift and and output will be coming here, Okay, So that is a function of Q. Eight second function, second question is create an array of 10 ones. So that should be like once is a method we have, so it means so. I have passed a thing, so I got that value. Create an array of 10 fives here so they were asking five tens. So I’ll be like sorry. 10 fights away. So here, let me q8 first and NP dad. I don’t need this, okay. I’ll let me do like that. Once of this way, then this will create ten ones, so I’ll multiply by five rate of ten fights like this, Okay, create an array integer from 10 to 50 into 50 We need to create, okay. This is my output like this. We need the output should come so for that part. I’ll be doing this NP. Dad, we have a function in Numpy range lower this. It is lower limit is 10 and higher limit is if I give 50 it will get till 14 and upper limit is not included. So I will be giving 51 then. I’ll get till 10 to 50 like this. Okay, no, the next question. The other variation is create an array of even integers from 10 to 50 here. We need to give 10 to 50 even integers, so for that, the same concept, arrange into 51 now for the even integers that means. I have to hear a incremented by 1 by default. Okay, you have incremented by 1 here. I have to increment by 2 so I am mentioning the 2 over here now. I got that, okay. Then this is interesting guys. Create a matrix 3 by 3 values ranging from 0 to light here. Okay, so what? I’ll do is NP dot a range of 0 to yet if I do like this. I’ll get 1 2 3 4 5 6 7 8 OK, then let me do like this. I’ll get 9 elements now. Okay, this one. I’ll use reshape method display like this, okay, so from 9 elements, I am dividing that list to the 2 3 by 3 array here. Okay, create a 3 by 3 identity matrix. It’s a very simple question. Guys use this tab or else just type in t. MP Dot, use this one. You three. You will automatically get that, okay. Then the next question is use lamp. I to generate a random number between 0 & 1 okay. This one is simple, use random of and zero to one so obviously. I’ll get 0 to 1 This is a 1 okay, if I execute one more time. Execute one more time as you can see. The values will be changing use numpy to generate an array of 25 and m a Nimbus samples, some standard deviation distribution. Okay, here they wanted a standard deviation. Distribution of 25 random numbers sample. Okay, let me try a deviation sample and of use random function here 25 Now you can see. We got 25 for 25 elements. We got that value, okay. This will be like from minus 1 to 1 then q8 a following matrix way of 10 matrix. V Dot it a this is very important notion. List q8 an array of 20 linearly spaced points between 0 and 1 between 0 & 1 They want 20 linearly spaced points, so we have this function called line space, so we’re going to use that one line space 0 comma 1 comma, 20 between 0 to 1 it will divide 20 elements modeling. It is linspace online space. Yeah, Linspace. Then this is this section is about indexing now. Okay, so from 2×2 matrix, how we can get different different values, so this section we’ll talk about that so first it is generating one to twenty five elements, and I am trying to reshape it to the five by five matrix. Here, okay, then I need to display this output. This is my output! If you observe here, it is eight zero one two second, though, it is starting from second row to well 17 and 22 and first to come right. So how I am going to use that. At half of it is ash to start from zero one two second row. It has to display all the rows from there. Okay, this then for the columns. I am using this comma here and zero and one from the first one first column. All other columns, okay. I hope it’s clear to you. Guys see first. We have to focus about those rows. It should be starting from two and all the rows. Then the columns should be starting from one all the columns. If I just execute this now, you can see. We got the values properly. Okay, then 20:20 will be it. How you can get the twenty from this two by two matrix it. Is it here, okay, so how? I am going to get that zero One zero one, two three, Todd. Whoa, it is it. Third row and 0 1 2 3 4 4 2 kala. Good, what happened, okay. This is indexing lice. Not a function should be getting now then. This is also interesting guys to 712 That is it where – 7 – well? Is it here, OK? So you should start from – 7 – l-let me. – 2 7 2 and 0 1 2 Okay, so 3 so from 0 to 3 That means it includes 0 1 & 2 OK, loose and which column 0 1 first column, right. We’ll execute this my output like this okay now. I have to be this, is it? 1 1 row 3 columns 1 by 3 Matrix. But I want to buy one map to e by 1 matrix for that. Let me reshape it. Three rows, one column. You can see, we got the output that we are looking for. That is, that’s why. I said it’s very useful. Then 21 22 23 24 and this one. Okay, so this is very simple Guys. All the columns of 0 All the columns of this is well, it’s actually now all the columns of 0 all the columns of last row, okay, so 0 1 2 3 4 4 so my code will be like this at half hood low, all the colors you can see because the values properly. This is also same, but before last, so this, is it 3 to 5 That means 3 comma 4 of all the colors properly. Now do the following. Okay, values on, okay, Sum of all the elements that will be calculated using this function identify standard deviation will be used with function of the values. Get the sum of all the columns in a match. This is really interesting. This matey dot here. If you use like this, we got, they will get this to identify, but to get all the columns. We just need to use 0 here will get that all the columns sum in a column wise like this 21 You have 7 7 will get like that. If you use axis is equal to 1 here, you will get o wise some fifteen. Forty sixty five. Ninety, right, so oh, wise 15 is. Pi plus one five, five plus five 10 10 plus five. Fifteen like this. Okay, so these are the couple of non. Pi like the interview questions I have, and I’ll keep posting few other questions as well. If you have any doubt on this, let me know in a comment section so that I can help you more on this and don’t forget to subscribe my channel and also guys. Please do if you have. If you want the questions, do follow this one. This is my blog where I have posted all the questions and answers. So please do go to this blog as well. Thank you so much for watching. Thank you bye.

0.3.0 | Wor Build 0.3.0 Installation Guide

Transcript: [MUSIC] Okay, so in this video? I want to take a look at the new windows on Raspberry Pi build 0.3.0 and this is the latest version. It's just been released today and this version you have to build by yourself. You have to get your own whim, and then you...

read more