Hello, guys, and welcome back to our class, of course, about the complete introduction to data science
with Python.
So in this class, we are still going to work with Skype and we are going to have an introduction to
special functions or the special cell package.
So basically those types of functions are pretty cool because it gives you access to dozens and dozens
of functions that will allow you to do really interesting things, such as having access to advanced
math and statistical functions.
So basically some examples of this, all of those functions will be, for example, the elliptic functions
and integrals would be the bissel function.
Every function you will have the derivative you will have spherical bessel functions.
You have, for example, raw statistical functions.
So plenty plain plenty of them.
And all those functions are pretty interesting.
If you guys have a really strong mathematical knowledge and one want to do really advanced advanced
mathematical applications.
So to have access to this package, it's pretty simple.
The first thing that you guys would need to do is, as always, import your Skype.
So this is exactly what we'll do right now.
We'll import our Skype Skype as SB one.
It's done.
The next thing we want to do, we want to be able to work with our special functions.
So we'll simply import the special set package.
So from Skype, we want to import special, so we want to import all the special functions.
So as I said, you guys will have access to plenty of those functions or really advanced mathematical
functions.
So what we'll do right now will simply test one of those functions, which is the Kelvyn function,
and you guys will learn how to write it down.
So pretty simple.
The first thing that we want to do is simply write down a special.
So we want to work with the special package inside of Skype.
So write down special.
But so we want to work with which function in this case, want to work with the Kelvyn function.
So special that Kelvyn and next thing that we want to do is simply create will choose an argument,
because inside of the Kelvyn function there is only one argument.
So in this case, we will write down the 15 and we want to print all this or simply write down print
or let's make a simple let's do it inside of a variable.
So let's call this variable fun.
One would be equal to special Kelvyn 15.
What to do right now is simply print our variable fun one.
All right.
So let's run the up and see what it looks like.
So basically we have everything that is set it up, which, as you can see, this is the answer of Kelvin
15.
So basically, this would be our answer right here.
It's printed right there.
All right.
So as you can see, this is one of the hundreds of different special functions that we have access to.
There are plenty and plenty and plenty of them.
So basically, if you simply make a simple research on Google, you will be able to find out all of
those functions.
All right.
Next thing that we are going to talk about are some really basic functions.
So basically, in this case, we are going to talk about convenience functions.
So basically those functions are, in my opinion, really simple to understand and will try a few of
them.
So basically, we are going to calculate the log of certain numbers.
So X log Y.
So basically we will do this function, will also do the exponential function and the expansion to function
and also try some X and well, some costs and in functions just for you guys to see what it looks like.
So let's start with the first function, which will be the X log Y function.
So how exactly do you write it down?
It's pretty simple to simply write down an equal one equal equal special dot.
And in this case, right now, we want to have access to our function, which would be X log Y.
So basically in this function, there are two arguments and what it will do, it will simply compute
compute X multiplied by log white so that the result is zero if X equals zero.
Basically, since we're multiplying X by log Y, if X is zero, logically it's going to be zero because
zero multiplied by anything will be equal to zero.
All right.
So let's try this function out.
So once again, you don't need to understand all those functions.
You just need to understand the big picture and the concept of all this.
So basically how to write those functions down.
All right.
So X, lugg Y.
And right now, let's say the first argument of our function will be two.
And the why of this argument that we have the X and the Y will be, let's say 10.
And what a fun one if we're on the up.
This would be our answer.
So basically what it does, it simply multiplies X by X would be two by the log of 10.
So in this case, it's going to be four.
That's six zero five.
All right.
Next thing that we can we can do, we will try to use another function that will calculate exponential.
And so basically we will compute then by how much times we want to basically what's going to be ten
at the certain powers.
So it could be 10 power, let's say ten or ten power to temperature.
So it's a really simple function once again.
So it's ten.
So it's going to be written down the same way.
So special that we exp in this case, ten.
So once again, we want to have our ten at power, let's say five.
So it's going to be ten multiplied by ten, multiplied by ten, multiplied by then multiplied by ten.
So this would be our answer.
If we put that ten at power 50, it's going to be a bit bigger.
So as you can see, this would the answer.
So basically it's going to be ten multiplied by ten, 15 times.
All right.
So this is for our second function.
Another thing that you guys can do inside of convenience functions, you can calculate the cost the
same and the ten of different things.
So basically, this could be this can be used inside of trigonometric calculations.
So if you guys work in the well with trigonometry, you can calculate you can calculate trigonometry,
trigonometry calculations.
Um, so we can try it out.
We can try just to make the calculation for the cost, for example.
So pretty simple.
How we will write it down will simply be our variable right here.
So fun.
One special that it's going to be syn d.g because we want the degrees which in degrees and let's say
we, we, we have thirty degrees so in this case thirty degrees.
And we want to print this variable right here.
So basically the set of 30 degrees will be this.
We can do the exact same thing for six degrees for example.
So the scent of 60 degrees will be this.
Can do it for 90 degrees, so just you guys will see what it will look like.
It gives us one.
We can use the sand we can write down because it works pretty much the same way.
So here we have this and we can write down costs.
So as you can see, it's going to be minus or it's going to be zero.
The answer is you can see those are just some examples of functions that well of special functions that
exist.
We can do plenty of other things and there are plenty of other functions that exist inside of special
functions once.
I'm not going to demonstrate them all because it's going to take us a lot of times a lot of time for
nothing.
But once again, just for you guys to understand that this package of SCoPI is really interesting if
you guys want to make more advanced mathematical python abs.
So that's a first class guys into our next class.