1 00:00:00,550 --> 00:00:01,800 Welcome back. 2 00:00:01,810 --> 00:00:05,950 In this section we're going to look at num pie. 3 00:00:06,070 --> 00:00:13,750 And now I'm very excited about this section because num pie is basically the backbone of all data science 4 00:00:13,750 --> 00:00:16,610 machine learning and numerical computing in Python. 5 00:00:16,840 --> 00:00:21,390 And that's actually what num pie stands for in a sense for numerical python. 6 00:00:21,610 --> 00:00:24,200 And what is num pie. 7 00:00:24,220 --> 00:00:29,430 Well in all of machine learning no matter what kind of data that you're working with. 8 00:00:29,530 --> 00:00:35,350 Now this could be a data frame like we saw in the previous section on panders num pi is going to form 9 00:00:35,350 --> 00:00:42,790 the foundation of turning your data into a series of numbers and then what a machine learning algorithm 10 00:00:42,790 --> 00:00:47,350 will do is work out the patterns in those numbers. 11 00:00:47,350 --> 00:00:54,250 So if we refer back to our machine learning modelling framework we've got Step 1 is Problem Definition 12 00:00:54,550 --> 00:00:59,940 Step 2 is Data Evaluation features modelling and experiments. 13 00:01:00,220 --> 00:01:06,340 And if we have a look at what tools we can use in this section we're going to be focused on num pi num 14 00:01:06,340 --> 00:01:08,950 pi comes into the data analysis section. 15 00:01:09,010 --> 00:01:14,800 However as you'll see in the future and what we just reference before is that machine learning although 16 00:01:14,800 --> 00:01:20,270 it's referred to as modelling is essentially taking data turning it into numbers. 17 00:01:20,350 --> 00:01:25,870 And in this case with NUM pi usually the form of a nun pi array which will have plenty of experience 18 00:01:25,870 --> 00:01:30,280 with after this section and then finding patterns in those numbers. 19 00:01:30,280 --> 00:01:40,340 So almost across this entire pipeline num PI will come into play now why num pi or the main reason we 20 00:01:40,340 --> 00:01:43,280 use num pi instead of pure Python. 21 00:01:43,280 --> 00:01:49,400 I mean you can do numerical calculations in Python but usually if we want to do large scale numerical 22 00:01:49,400 --> 00:01:54,450 calculations we refer to num PI because it's fast. 23 00:01:54,650 --> 00:02:02,110 And now the reason why it's fast is because behind the scenes there's optimizations written in C code. 24 00:02:02,240 --> 00:02:09,440 The beautiful thing about the NUM pi package is that you can use these C code optimizations using pure 25 00:02:09,440 --> 00:02:10,150 Python. 26 00:02:10,220 --> 00:02:16,580 That means you don't have to know C to be able to use num pi and Python it is a bit easier to write 27 00:02:16,580 --> 00:02:17,460 than pure C. 28 00:02:17,480 --> 00:02:20,230 So that's the advantage of using num pi. 29 00:02:20,300 --> 00:02:27,170 Now it gets these optimizations in speed through a process called vector ization via a term num pi uses 30 00:02:27,590 --> 00:02:34,610 called broadcasting which is essentially just avoiding writing loops when you're writing calculations 31 00:02:35,000 --> 00:02:40,940 because if you're writing loops to make calculations such as in Python to calculate over a list that 32 00:02:40,940 --> 00:02:46,640 can form some eventual slowdowns if you have a list say of of millions of different numbers which becomes 33 00:02:46,700 --> 00:02:52,340 common practice when we're working on machine learning projects and as we mentioned before num pi is 34 00:02:52,340 --> 00:02:58,790 the backbone of other Python scientific packages now pi actually forms the basis of the pandas package 35 00:03:00,290 --> 00:03:02,510 so what are we going to cover in this section. 36 00:03:03,050 --> 00:03:07,880 Well of course we're always going to be focused on the most useful functions the ones that you can start 37 00:03:07,880 --> 00:03:09,570 using straight away. 38 00:03:09,590 --> 00:03:14,150 We'll have a look at different nameplate data types and attributes of those data types. 39 00:03:14,150 --> 00:03:19,310 Now the main one is an NDA Ray but we'll have a look at that in another video. 40 00:03:19,400 --> 00:03:21,910 We'll look at how to create arrays are raised. 41 00:03:21,920 --> 00:03:24,370 You can think of as a list of numbers. 42 00:03:24,470 --> 00:03:27,690 We'll have a look at how to view arrays and matrices. 43 00:03:27,710 --> 00:03:34,190 Now matrix or a matrices you can imagine as a combination of different arrays will then look at how 44 00:03:34,190 --> 00:03:40,730 to manipulate and compare arrays will then finish up with sorting arrays which is sorting out different 45 00:03:40,730 --> 00:03:47,540 lists of numbers and then some practical use cases of where arrays get used or where num pi can be used 46 00:03:47,540 --> 00:03:55,090 to turn data into lists of numbers so where can you get help if you get stuck. 47 00:03:55,110 --> 00:04:00,510 Well the steps you want to try and follow is to follow along with the code so as we're going through 48 00:04:00,510 --> 00:04:06,390 the video as we're working through our Jupiter notebook through the introduction to num pi lessons you 49 00:04:06,390 --> 00:04:08,280 want to follow along as best you can. 50 00:04:08,310 --> 00:04:12,000 Now if you can't keep pace or if I'm going too fast that's all right. 51 00:04:12,000 --> 00:04:13,220 Feel free to stop it. 52 00:04:13,290 --> 00:04:18,360 Go back practice something on your own but you should be practicing writing the code and running it 53 00:04:18,390 --> 00:04:19,980 as much as possible. 54 00:04:20,250 --> 00:04:21,960 So that's step to try it for yourself. 55 00:04:21,960 --> 00:04:23,150 Try to run the code. 56 00:04:23,280 --> 00:04:28,980 Remember the saying If in doubt run the code if you get stuck on a certain function or a certain thing 57 00:04:28,980 --> 00:04:29,780 that we've covered. 58 00:04:29,910 --> 00:04:35,520 You can try to search for it here you'll probably come across stack overflow or the official name pi 59 00:04:35,520 --> 00:04:37,380 documentation. 60 00:04:37,380 --> 00:04:39,350 Then after that once you've searched for. 61 00:04:39,660 --> 00:04:43,230 If you find something on stack overflow or the NUM pi documentation. 62 00:04:43,230 --> 00:04:48,720 The important thing is to keep trying again enter the code that you find in the Jupiter notebook. 63 00:04:48,840 --> 00:04:50,040 Practice running it. 64 00:04:50,040 --> 00:04:55,890 If in doubt run the code and then finally if you're still stuck don't forget you can always ask for 65 00:04:55,890 --> 00:04:56,330 help. 66 00:04:56,340 --> 00:05:01,050 There's no such thing as a stupid question because if you have a question it's likely someone else has 67 00:05:01,050 --> 00:05:02,230 the same question. 68 00:05:02,430 --> 00:05:06,810 You can ask on stack overflow or in any other resource you can find. 69 00:05:06,900 --> 00:05:10,480 All right with that being said that's an introduction of num PI. 70 00:05:10,590 --> 00:05:14,610 It's the foundation it's the backbone of other data science and scientific packages. 71 00:05:14,610 --> 00:05:16,020 But let's get in in code. 72 00:05:16,050 --> 00:05:17,090 Let's see what it's all about.