1 00:00:00,470 --> 00:00:06,800 Hello, guys, and welcome back to our class, of course, about the complete introduction to data science 2 00:00:06,800 --> 00:00:07,710 with Python. 3 00:00:08,270 --> 00:00:13,580 So in this class, we are still going to work with Skype and we are going to have an introduction to 4 00:00:13,580 --> 00:00:16,100 special functions or the special cell package. 5 00:00:17,090 --> 00:00:22,760 So basically those types of functions are pretty cool because it gives you access to dozens and dozens 6 00:00:22,760 --> 00:00:30,290 of functions that will allow you to do really interesting things, such as having access to advanced 7 00:00:30,290 --> 00:00:32,270 math and statistical functions. 8 00:00:32,690 --> 00:00:38,840 So basically some examples of this, all of those functions will be, for example, the elliptic functions 9 00:00:38,840 --> 00:00:41,390 and integrals would be the bissel function. 10 00:00:41,570 --> 00:00:48,770 Every function you will have the derivative you will have spherical bessel functions. 11 00:00:49,400 --> 00:00:52,270 You have, for example, raw statistical functions. 12 00:00:52,280 --> 00:00:54,050 So plenty plain plenty of them. 13 00:00:55,130 --> 00:00:57,110 And all those functions are pretty interesting. 14 00:00:57,110 --> 00:01:04,130 If you guys have a really strong mathematical knowledge and one want to do really advanced advanced 15 00:01:04,130 --> 00:01:05,600 mathematical applications. 16 00:01:07,070 --> 00:01:11,120 So to have access to this package, it's pretty simple. 17 00:01:11,120 --> 00:01:16,180 The first thing that you guys would need to do is, as always, import your Skype. 18 00:01:16,550 --> 00:01:18,740 So this is exactly what we'll do right now. 19 00:01:18,740 --> 00:01:25,490 We'll import our Skype Skype as SB one. 20 00:01:25,490 --> 00:01:25,900 It's done. 21 00:01:25,910 --> 00:01:30,170 The next thing we want to do, we want to be able to work with our special functions. 22 00:01:30,170 --> 00:01:33,350 So we'll simply import the special set package. 23 00:01:33,770 --> 00:01:41,570 So from Skype, we want to import special, so we want to import all the special functions. 24 00:01:43,640 --> 00:01:48,950 So as I said, you guys will have access to plenty of those functions or really advanced mathematical 25 00:01:48,950 --> 00:01:49,350 functions. 26 00:01:49,670 --> 00:01:55,190 So what we'll do right now will simply test one of those functions, which is the Kelvyn function, 27 00:01:56,090 --> 00:01:58,460 and you guys will learn how to write it down. 28 00:01:58,490 --> 00:01:59,150 So pretty simple. 29 00:01:59,160 --> 00:02:02,660 The first thing that we want to do is simply write down a special. 30 00:02:03,980 --> 00:02:08,650 So we want to work with the special package inside of Skype. 31 00:02:08,690 --> 00:02:09,950 So write down special. 32 00:02:09,950 --> 00:02:15,740 But so we want to work with which function in this case, want to work with the Kelvyn function. 33 00:02:15,740 --> 00:02:23,870 So special that Kelvyn and next thing that we want to do is simply create will choose an argument, 34 00:02:23,870 --> 00:02:26,940 because inside of the Kelvyn function there is only one argument. 35 00:02:26,960 --> 00:02:33,600 So in this case, we will write down the 15 and we want to print all this or simply write down print 36 00:02:33,650 --> 00:02:36,350 or let's make a simple let's do it inside of a variable. 37 00:02:36,350 --> 00:02:37,880 So let's call this variable fun. 38 00:02:37,940 --> 00:02:42,220 One would be equal to special Kelvyn 15. 39 00:02:42,470 --> 00:02:45,830 What to do right now is simply print our variable fun one. 40 00:02:47,720 --> 00:02:48,110 All right. 41 00:02:51,460 --> 00:02:53,870 So let's run the up and see what it looks like. 42 00:02:53,890 --> 00:03:00,250 So basically we have everything that is set it up, which, as you can see, this is the answer of Kelvin 43 00:03:00,250 --> 00:03:00,740 15. 44 00:03:00,760 --> 00:03:02,990 So basically, this would be our answer right here. 45 00:03:03,340 --> 00:03:05,170 It's printed right there. 46 00:03:05,780 --> 00:03:06,050 All right. 47 00:03:06,050 --> 00:03:11,440 So as you can see, this is one of the hundreds of different special functions that we have access to. 48 00:03:12,040 --> 00:03:13,880 There are plenty and plenty and plenty of them. 49 00:03:13,900 --> 00:03:19,960 So basically, if you simply make a simple research on Google, you will be able to find out all of 50 00:03:19,960 --> 00:03:20,840 those functions. 51 00:03:21,580 --> 00:03:21,970 All right. 52 00:03:22,300 --> 00:03:27,260 Next thing that we are going to talk about are some really basic functions. 53 00:03:27,260 --> 00:03:32,470 So basically, in this case, we are going to talk about convenience functions. 54 00:03:32,470 --> 00:03:38,200 So basically those functions are, in my opinion, really simple to understand and will try a few of 55 00:03:38,200 --> 00:03:38,440 them. 56 00:03:38,770 --> 00:03:43,700 So basically, we are going to calculate the log of certain numbers. 57 00:03:43,700 --> 00:03:45,130 So X log Y. 58 00:03:45,160 --> 00:03:51,760 So basically we will do this function, will also do the exponential function and the expansion to function 59 00:03:52,030 --> 00:04:00,430 and also try some X and well, some costs and in functions just for you guys to see what it looks like. 60 00:04:01,270 --> 00:04:05,950 So let's start with the first function, which will be the X log Y function. 61 00:04:06,700 --> 00:04:08,380 So how exactly do you write it down? 62 00:04:08,410 --> 00:04:15,210 It's pretty simple to simply write down an equal one equal equal special dot. 63 00:04:15,220 --> 00:04:21,880 And in this case, right now, we want to have access to our function, which would be X log Y. 64 00:04:22,450 --> 00:04:26,220 So basically in this function, there are two arguments and what it will do, it will simply compute 65 00:04:26,410 --> 00:04:33,740 compute X multiplied by log white so that the result is zero if X equals zero. 66 00:04:34,870 --> 00:04:41,770 Basically, since we're multiplying X by log Y, if X is zero, logically it's going to be zero because 67 00:04:41,770 --> 00:04:44,620 zero multiplied by anything will be equal to zero. 68 00:04:45,340 --> 00:04:45,670 All right. 69 00:04:45,680 --> 00:04:47,050 So let's try this function out. 70 00:04:47,080 --> 00:04:49,450 So once again, you don't need to understand all those functions. 71 00:04:49,450 --> 00:04:53,950 You just need to understand the big picture and the concept of all this. 72 00:04:53,970 --> 00:04:56,230 So basically how to write those functions down. 73 00:04:56,740 --> 00:04:57,070 All right. 74 00:04:57,070 --> 00:05:00,160 So X, lugg Y. 75 00:05:01,180 --> 00:05:06,010 And right now, let's say the first argument of our function will be two. 76 00:05:06,310 --> 00:05:12,550 And the why of this argument that we have the X and the Y will be, let's say 10. 77 00:05:13,570 --> 00:05:16,110 And what a fun one if we're on the up. 78 00:05:16,470 --> 00:05:17,770 This would be our answer. 79 00:05:17,800 --> 00:05:24,580 So basically what it does, it simply multiplies X by X would be two by the log of 10. 80 00:05:24,610 --> 00:05:26,110 So in this case, it's going to be four. 81 00:05:26,110 --> 00:05:27,430 That's six zero five. 82 00:05:28,320 --> 00:05:28,680 All right. 83 00:05:28,690 --> 00:05:36,680 Next thing that we can we can do, we will try to use another function that will calculate exponential. 84 00:05:37,260 --> 00:05:43,150 And so basically we will compute then by how much times we want to basically what's going to be ten 85 00:05:43,330 --> 00:05:44,410 at the certain powers. 86 00:05:44,430 --> 00:05:48,380 So it could be 10 power, let's say ten or ten power to temperature. 87 00:05:48,770 --> 00:05:50,960 So it's a really simple function once again. 88 00:05:50,960 --> 00:05:52,590 So it's ten. 89 00:05:53,410 --> 00:05:55,840 So it's going to be written down the same way. 90 00:05:55,840 --> 00:05:59,430 So special that we exp in this case, ten. 91 00:06:00,100 --> 00:06:05,000 So once again, we want to have our ten at power, let's say five. 92 00:06:05,290 --> 00:06:10,240 So it's going to be ten multiplied by ten, multiplied by ten, multiplied by then multiplied by ten. 93 00:06:10,720 --> 00:06:12,120 So this would be our answer. 94 00:06:12,130 --> 00:06:16,810 If we put that ten at power 50, it's going to be a bit bigger. 95 00:06:16,820 --> 00:06:19,120 So as you can see, this would the answer. 96 00:06:19,150 --> 00:06:23,200 So basically it's going to be ten multiplied by ten, 15 times. 97 00:06:24,250 --> 00:06:24,650 All right. 98 00:06:24,670 --> 00:06:27,190 So this is for our second function. 99 00:06:27,970 --> 00:06:32,530 Another thing that you guys can do inside of convenience functions, you can calculate the cost the 100 00:06:32,530 --> 00:06:36,490 same and the ten of different things. 101 00:06:36,500 --> 00:06:41,370 So basically, this could be this can be used inside of trigonometric calculations. 102 00:06:41,770 --> 00:06:51,610 So if you guys work in the well with trigonometry, you can calculate you can calculate trigonometry, 103 00:06:51,850 --> 00:06:53,560 trigonometry calculations. 104 00:06:54,410 --> 00:06:57,300 Um, so we can try it out. 105 00:06:57,310 --> 00:07:00,250 We can try just to make the calculation for the cost, for example. 106 00:07:00,580 --> 00:07:01,630 So pretty simple. 107 00:07:01,930 --> 00:07:07,250 How we will write it down will simply be our variable right here. 108 00:07:07,270 --> 00:07:08,170 So fun. 109 00:07:08,170 --> 00:07:18,550 One special that it's going to be syn d.g because we want the degrees which in degrees and let's say 110 00:07:18,550 --> 00:07:21,940 we, we, we have thirty degrees so in this case thirty degrees. 111 00:07:22,210 --> 00:07:24,630 And we want to print this variable right here. 112 00:07:24,640 --> 00:07:28,690 So basically the set of 30 degrees will be this. 113 00:07:29,740 --> 00:07:32,680 We can do the exact same thing for six degrees for example. 114 00:07:34,170 --> 00:07:36,690 So the scent of 60 degrees will be this. 115 00:07:38,400 --> 00:07:43,470 Can do it for 90 degrees, so just you guys will see what it will look like. 116 00:07:43,740 --> 00:07:44,580 It gives us one. 117 00:07:44,910 --> 00:07:48,880 We can use the sand we can write down because it works pretty much the same way. 118 00:07:48,900 --> 00:07:51,140 So here we have this and we can write down costs. 119 00:07:52,950 --> 00:07:55,840 So as you can see, it's going to be minus or it's going to be zero. 120 00:07:55,860 --> 00:08:02,760 The answer is you can see those are just some examples of functions that well of special functions that 121 00:08:02,760 --> 00:08:03,180 exist. 122 00:08:03,430 --> 00:08:09,780 We can do plenty of other things and there are plenty of other functions that exist inside of special 123 00:08:09,780 --> 00:08:10,670 functions once. 124 00:08:10,770 --> 00:08:16,380 I'm not going to demonstrate them all because it's going to take us a lot of times a lot of time for 125 00:08:16,380 --> 00:08:16,950 nothing. 126 00:08:17,430 --> 00:08:24,630 But once again, just for you guys to understand that this package of SCoPI is really interesting if 127 00:08:24,630 --> 00:08:29,130 you guys want to make more advanced mathematical python abs. 128 00:08:29,520 --> 00:08:32,910 So that's a first class guys into our next class.