Lose your fear of equations!
If you transitioned into data science from "soft" sciences, you've already had a steep learning curve. Coding, data engineering, statistics... There is a lot to catch up on. And while there are plenty of true black box models in machine learning, just as many can and should be described in mathematical terms.
This tutorial is for everyone who is scared by formulae. We will learn how to quickly recognize which part of an equation matters and how changing individual parameters will affect it. We will make differential equations less scary and get a "feel" for the logistic function that goes beyond running Logreg in sklearn.
This session took place in track Data Handling & Engineering and was classified suitable for novice domain / novice python by the speaker.
Transcript (auto)
Auto-generated from the recording utilizing Open-Source AI. Speaker labels (Speaker 1, Speaker 2) reflect diarization, not identity. Timestamps refer to the recording.
Speaker 1 [00:06]
I keep throwing the slide because I'm really serious.
Speaker 2 [00:08]
I'm really serious about this. If you have a mathematics degree, if you did advanced mathematics, like if you did analysis one, linear algebra, you're probably not gonna be challenged by this. So you would-
Speaker 1 [00:19]
So you would probably have.
Speaker 2 [00:20]
probably have more if you went to another session of course it's still welcome to stay and laugh at me but especially if you did pure math you're gonna be in pain because I renamed the workshop to be called loser
Speaker 1 [00:32]
we called Luther's Fear of Math.
Speaker 2 [00:34]
Because it's not really about equations, it's really, we have people who just see something with numbers.
Speaker 1 [00:38]
something with numbers and
Speaker 2 [00:39]
numbers and letters and they just don't know what to do with it and if that's you then
Speaker 1 [00:45]
I'm going to try to help you to deal with it.
Speaker 2 [00:46]
to help you to deal with this. Oh, I have this also.
Speaker 1 [00:49]
So who is this for? Like I said, it's easier to say who it's not for.
Speaker 2 [00:52]
say who it's not for, because our community is so diverse that
Speaker 1 [00:54]
that we have
Speaker 2 [00:55]
We have lots of people who transition to data science from different areas and we need you We need people who are not like me like I look at
Speaker 1 [01:04]
I look at stuff and I'm like, oh, cool.
Speaker 2 [01:07]
And then we have lots of Elon Musks and they're doing things that don't really make sense for the society. So we really, really need people who come from social scientists, from philosophy and who understand the algorithms and understand what we're doing and help us shape policies and help us shape our industry.
Speaker 1 [01:24]
and My so to be
Speaker 2 [01:29]
Two years ago, I held another workshop, which was about rating algorithms, which is actually what I do.
Speaker 1 [01:33]
And I had this slide and I spent a lot of time talking about this expression here
Speaker 2 [01:38]
I thought wow cool I did a good job everybody understands it this is awesome this is easy and then two minutes later somebody said but sorry can you say again what is n and then I realized I'm coming into this with a massive
Speaker 1 [01:53]
It's a massive privilege.
Speaker 2 [01:54]
because I've been doing mathematics on paper and thinking about functions and approaching things in a certain way basically my entire life, like at least 10 years, now 15 with my job and not everybody has this background and so we have to try to make data science approachable.
Speaker 1 [02:12]
for people who don't
Speaker 2 [02:13]
don't necessarily think the way
Speaker 1 [02:15]
think the way somebody
Speaker 2 [02:15]
somebody like me things and this is what I'm trying to do with this workshop
Speaker 3 [02:21]
so
Speaker 2 [02:22]
This is very experimental
Speaker 4 [02:24]
um
Speaker 2 [02:26]
I don't know if it's gonna work. It's not possible to teach people 10 years of math in one session, 90 minutes.
Speaker 4 [02:34]
Thank you.
Speaker 2 [02:35]
But we can at least do some of it, and this is big, I encourage you all to use pen and paper, to do it for yourself while you do it.
Speaker 1 [02:45]
Like we already said.
Speaker 2 [02:46]
We already said if you have any questions, it's also going to be a lot of me asking you questions and asking you to think along with me. So speak up at any time.
Speaker 1 [02:54]
What I love about mathematicians
Speaker 2 [02:56]
is they have this kind of approach to things where like, I don't understand this and they don't go, oh, it's probably because I'm dumb. They go, I don't understand this. You're explaining it wrong. Explain it better to me. And this is how I want you to be in this thing. If you don't understand it, it's because I'm failing you and I'm not explaining it well.
Speaker 3 [03:13]
it well, so.
Speaker 2 [03:14]
just ask ask me to repeat myself this whole talk is like 90 slides which is more than one slide per minute
Speaker 1 [03:25]
Absolutely no
Speaker 2 [03:26]
No goal to hold through ever
Speaker 1 [03:27]
through everything, I would rather stop.
Speaker 2 [03:29]
stop halfway but everybody got what we were doing then get to the last slide but you leave here you're like what did I do I could have had a coffee in the meantime
Speaker 1 [03:39]
And if you're still wondering why do I need this,
Speaker 4 [03:42]
I've been wondering
Speaker 2 [03:43]
I've been wondering myself, this whole conference, because, for example, there was one talk I went to,
Speaker 1 [03:47]
There was one talk I went to, and the speaker just built an
Speaker 2 [03:50]
an entire speech recognition system in the session using LLMs, using open source. He didn't even mention Fourier transform, which if you work with sound, this is like the first thing you learn in the mathematical way to... convert sound into numbers.
Speaker 4 [04:08]
Thank you very much.
Speaker 1 [04:10]
So it's possible.
Speaker 2 [04:11]
it's possible to apply these things without any technical understanding and in the last 10 years the development has been huge like by now you don't even need to code
Speaker 1 [04:18]
you don't even need to code anymore.
Speaker 2 [04:19]
anymore, not really.
Speaker 1 [04:20]
But then I went to the next talk and this was about
Speaker 2 [04:23]
This was about time series.
Speaker 4 [04:24]
and
Speaker 1 [04:26]
detecting shifts in time series and suddenly we had this light here and then I was really enjoying myself
Speaker 2 [04:31]
because I was like looking around the audience like how many people has he
Speaker 1 [04:33]
but has he lost on this slide?
Speaker 2 [04:34]
lost in this How many has he lost on this slide?
Speaker 1 [04:36]
Okay, now he lost everything everybody
Speaker 2 [04:39]
And there was actually a question.
Speaker 1 [04:41]
a question in slido can you please explain this cost function it didn't get asked but i hope that while we're doing this in the end i have a slide where i explain this cost function so there's also kind of the level that we are trying to
Speaker 2 [04:53]
we're aspiring to here.
Speaker 4 [04:55]
You will
Speaker 2 [04:56]
you will be able to understand why
Speaker 1 [04:57]
why this is how it is and then I went to another really good talk by Katherine Dremel which was about
Speaker 3 [05:05]
Ah
Speaker 2 [05:06]
privacy matters in LLMs. She did a great job not doing mathematics and not showing the paper that she was actually there's a mathematical proof about how an LLM is going to memorize some of the training data which is a super huge
Speaker 1 [05:23]
huge privacy concern.
Speaker 2 [05:23]
privacy concern
Speaker 1 [05:25]
But still, even this small thing here, it's nice if you just see it and you understand what it means immediately.
Speaker 2 [05:32]
Immediately and this is
Speaker 1 [05:35]
I think this is feasible for everybody.
Speaker 3 [05:39]
So this
Speaker 1 [05:40]
These are our goals.
Speaker 2 [05:41]
You look at mathematical expression and you try to understand.
Speaker 1 [05:43]
you try to understand it, you will be a little bit more confident.
Speaker 2 [05:46]
more comfort and ballparking how it functions.
Speaker 1 [05:47]
parking how a function behaves.
Speaker 2 [05:49]
Maybe it's just a refresh of mathematics for you. It's not serious. It's not rigorous. So rigorous means I would be defining
Speaker 1 [05:55]
I would be defining everything with...
Speaker 2 [05:57]
with domains and I would be talking about different abilities and things and I will not do that it's too much
Speaker 1 [06:03]
It's too much. And you will need to exercise.
Speaker 2 [06:05]
exercise if so you you can you take this but then you actually have to apply this mathematics is like a language i think it's a language um so there's grammar there's expressions uh there's rules and the more you talk it the easier it becomes
Speaker 1 [06:20]
Yeah, so...
Speaker 3 [06:22]
So isn't it?
Speaker 1 [06:22]
This is the last chance to leave, I think.
Speaker 2 [06:27]
I will not be offended, I promise.
Speaker 1 [06:30]
So basically we're gonna look at basic arithmetic expressions. We're gonna look at exponents, spend a lot of time on logistics because logistics
Speaker 2 [06:36]
logistic functions are kind of the bread and butter of data scientists.
Speaker 4 [06:41]
and then
Speaker 1 [06:42]
And then on logarithms, derivatives we're going to attach a little bit,
Speaker 2 [06:46]
and then trigonometric functions in the end, if we have time for that.
Speaker 1 [06:46]
and then we're going to match.
Speaker 2 [06:49]
Aside about me, I already had a great introduction.
Speaker 1 [06:51]
So we can also just keep it. I'm currently principal data scientist at base eSports
Speaker 2 [06:56]
we do betting odds.
Speaker 4 [06:57]
I
Speaker 1 [06:58]
I studied physical engineering here in Berlin, then I did my PhD in control science.
Speaker 2 [07:03]
I was kind of trying to get into pure math like control science is on the border of engineering and mathematics optimal control is a mathematical faculty Yeah, I spent two years trying to prove that a certain matrix has certain eigenvalues. Then I finally give up and run a simulation
Speaker 1 [07:19]
simulation, learn to code.
Speaker 2 [07:20]
Learn to code realize it's about
Speaker 1 [07:21]
actually true
Speaker 2 [07:22]
It was a bad day.
Speaker 1 [07:24]
and then my PhD is
Speaker 2 [07:24]
my PhD is explaining why the matrix cannot have positive eigenvalues.
Speaker 1 [07:28]
negative
Speaker 2 [07:33]
And now I'm here, so. If you want to contact me with questions at this talk, if you want to keep in touch, you can add me on LinkedIn and I will look at it once a year.
Speaker 4 [07:44]
Um...
Speaker 2 [07:45]
I also tweet only when I'm at PyData because that's the only way to read.
Speaker 1 [07:49]
only way to reach out and kind of
Speaker 2 [07:51]
interact with by data organization.
Speaker 1 [07:53]
That I like otherwise
Speaker 2 [07:57]
Instagram is where you find me. It's mostly my jiu-jitsu stuff, but you can message me and I will definitely see the message. So let's start with some definitions. I called it lose your fear of equations. I'm actually gonna be talking more about formulas and equations, but just in general.
Speaker 1 [08:14]
A formula is going to be any string of symbols that make sense for a mathematician. An equation is then a formula that has equal signs. So this is when we say, OK, I'm going to solve for x. So this on the left becomes equal to five.
Speaker 2 [08:30]
and then a function
Speaker 1 [08:31]
is also going to be a formula that's gonna now connect an input value to an output value so for example here our input value is X and the output value we call it f of X so when X changes what I was on the left also changes
Speaker 2 [08:45]
also changes and usually that's what we're looking at when we are doing
Speaker 1 [08:48]
when we are doing data science and the good thing is we already know it from coding this is a
Speaker 2 [08:51]
coding, it's the same thing. When I code a function
Speaker 1 [08:53]
I code a function, I also have an input, and I have something.
Speaker 2 [08:54]
and I have something that comes out.
Speaker 1 [09:00]
It's not always simple like we have factors and equations that
Speaker 2 [09:03]
and the questions that can take you a lifetime to solve, like my PhD.
Speaker 4 [09:06]
or
Speaker 2 [09:06]
Who has heard of Fermat's Last Theorem? Two people, great. So if you haven't heard of it, there is a book, Fermat's Last Theorem. It's a history of the theorem and people trying to prove it. And I can really recommend it. It's a fantastic read. You don't have to understand mathematics at all to understand how amazing it is. Sorry? Fermat's Last Theorem.
Speaker 4 [09:47]
Um
Speaker 2 [09:48]
Yes, so in this workshop we look
Speaker 1 [09:49]
workshop we're looking at functions. Functions usually have names, the names are
Speaker 2 [09:53]
The names are can be completely random
Speaker 1 [09:55]
typically we have something like F, G, H and so on and then it depends on the field you run. Function can depend on one or more values so before usually we see f and we're gonna stay mostly with f .
Speaker 2 [10:07]
with FOFacts in this workshop.
Speaker 1 [10:09]
But it can also be like the G here depends on X and Y. Do I have a pointer? Yeah, I have a pointer cool
Speaker 3 [10:18]
So
Speaker 2 [10:19]
So this means that we can look at how does it behave when x changes, how does it behave when y changes.
Speaker 4 [10:24]
Thank you.
Speaker 2 [10:26]
The annoying thing is
Speaker 1 [10:29]
notation differs so people will often drop things for convenience so you will see something like this but it's still an equation but it's still a function and and you know it's from the context so the same as here like clearly it's a function but
Speaker 2 [10:44]
But if you're not used to this,
Speaker 1 [10:45]
not used to this you've got to be confused which is i think annoying when we see a t for example we usually think it's time but not always and epsilon is a kind of special like whenever you see epsilon you can think there's some
Speaker 2 [10:58]
you can think there's something really really small.
Speaker 4 [11:00]
Um.
Speaker 1 [11:04]
One thing is everything is not a dependent variable. So the thing in the brackets here we can assume to be constant even if it
Speaker 2 [11:10]
even if it's written with a letter.
Speaker 1 [11:12]
So for example, if I actually have samples on the next slide
Speaker 4 [11:15]
um
Speaker 1 [11:17]
And a function has a domain, so the domain is just the range of values that our input x is allowed to have.
Speaker 2 [11:25]
We have the same thing in coding. So if I have a function and it does something with integers or floats and I input a string, it's going to say you can't have a string here. So it's kind of the same thing here.
Speaker 1 [11:37]
here like I allow extra
Speaker 2 [11:38]
So, ask to take certain values.
Speaker 1 [11:39]
and everything that's...
Speaker 2 [11:41]
Not in those values, it just can't be put into the function. Once again, we are talking about real mass
Speaker 1 [11:49]
real mass, so spaces, sets.
Speaker 2 [11:50]
faces, sets, and so on.
Speaker 1 [11:51]
and so on.
Speaker 2 [11:52]
is all beyond the level of
Speaker 1 [11:54]
level of this workshop. So let's exercise.
Speaker 4 [11:58]
Um, the first.
Speaker 2 [11:58]
The first one,
Speaker 1 [12:00]
What f of x? What are the constants and what is the dependent variable? Yes, perfect. The second one.
Speaker 2 [12:16]
C and X, exactly.
Speaker 3 [12:17]
Exactly.
Speaker 1 [12:18]
I tried to trick you and the last one and yes yes and the function yes perfect
Speaker 3 [12:18]
So I tried to
Speaker 1 [12:33]
so the last one is basically I replace the X the f of X here and then I have a 3 T plus of this expression so I have a B C and the 3 and the function depends on the x and on the t.
Speaker 4 [12:47]
and
Speaker 1 [12:48]
If this was mechanics, I would be thinking t is time and x is position. So we're going to ask two questions today. First of all, we're going to ask how does the function behave? That's a different way of saying what values of...
Speaker 2 [13:03]
values of what outputs do we get for different inputs. Same as when we code.
Speaker 1 [13:08]
and the second question we're going to ask is we have these constants in the function so can we
Speaker 2 [13:13]
we maybe keep the function the way it is, but by adjusting the
Speaker 1 [13:13]
Maybe, maybe. Adjusting the constants, move it.
Speaker 2 [13:17]
move it somewhere where we want to have it. It's going to be more clear as we move on hopefully.
Speaker 4 [13:22]
They're all
Speaker 2 [13:23]
There also there's a lot more you can do
Speaker 1 [13:24]
lot more you can do but we don't care about that. So let's give it a try. So this is the function we're going to start with quadratic. What does it look for various levels of X?
Speaker 2 [13:36]
Yes, yeah, exactly.
Speaker 1 [13:41]
I'm also going to give you a hack, which I do a lot, is if I have a function, I'm just going to plot it. I'm going to look at it.
Speaker 2 [13:47]
look at it if I'm not sure how it looks.
Speaker 1 [13:48]
So here this is a parabola
Speaker 4 [13:51]
Thank you.
Speaker 1 [13:53]
It never gets negative, it grows quite fast.
Speaker 2 [13:58]
both for very small x and for very large x, and it has its minimum at minus one.
Speaker 1 [14:04]
Minimum at minus one. Okay, great. So some of you have...
Speaker 2 [14:09]
So some of you have laptops, so you can try it for yourselves.
Speaker 1 [14:19]
Yeah, so you can, so I...
Speaker 2 [14:22]
So I stay with this. It's really good to try and plot a function.
Speaker 1 [14:26]
a lot of function when you
Speaker 2 [14:27]
when you understand how it looks, but sometimes it's just not possible.
Speaker 1 [14:30]
This thing, I pulled it off the internet, and first of all I also don't know
Speaker 2 [14:36]
I also don't know exactly what it means. I didn't spend time looking into it.
Speaker 1 [14:40]
but In order to really understand what it means I would also need to know what is this Tita what is this alpha? What what what do these things even stand for which I don't know without reading the paper So the main knowledge is always going to
Speaker 2 [14:53]
is always going to matter when we're looking at functions because we're not doing pure math. We're always applying mathematics or something. But why do we need this in the first place? Why can't we just skip all this?
Speaker 1 [15:07]
because normally scientists who write
Speaker 2 [15:07]
Because normally... who write these things they talk to other scientists so they have to be really precise and that's where you see a paper there's somebody or a few people who sat there and they checked that everything is correct
Speaker 1 [15:18]
everything is correct and that's why we need to have these expressions on paper
Speaker 2 [15:21]
these expressions on papers.
Speaker 1 [15:22]
But if you're not in the subject matter, then you don't understand it and just because
Speaker 2 [15:25]
it and just because you don't understand it doesn't mean you're stupid it just means um you didn't spend five years working with this and so if you are reading a paper and you run something
Speaker 1 [15:34]
something like this it's probably also okay to just
Speaker 2 [15:34]
like this. okay to just skip it and not think oh i'm stupid but just think oh this is not for me so it doesn't mean you can't read the paper it doesn't mean that you can't read the abstract it doesn't mean that you can read the conclusions you just maybe don't read the theoretical proof
Speaker 1 [15:50]
the theoretical proof that's behind it.
Speaker 2 [15:53]
That's okay, because you can rely on people. Who checked it for you? You're looking like you have a question
Speaker 5 [16:15]
who are attending online are not able to hear what you're asking so it will be nice also for them to know why what is the speaker answering so just raise the hand I'll stay in the eyesight I can
Speaker 2 [16:27]
I can also repeat. Yeah, or maybe you can do it. I think it's probably easier with a lot of people in the big room. That's right. That was the remark. Yeah. Okay, cool. Can I ask a question then? Sure. So if we're reading a paper and we have these kind of long equations, which I hope you see, then maybe we can keep it thinking it's not for us, but if you're working on an algorithm, you have to be able to interpret it and then if you're a background student and you're a scientist, you can always propose it naturally. You have to know, right, because if you're implementing this in an algorithm, in your code, you have to understand this form of proof, right? Because otherwise, how do you, you cannot take it from, this was written for this reason, right? You cannot ignore it. So the remark here was, well, but if you have to implement this, then you have to understand it, so you can't just skip it. this is absolutely true and i'm making a small contribution today to help you to go in that direction this is exactly what this workshop is for
Speaker 4 [17:28]
Um, but also...
Speaker 2 [17:29]
but also at a certain level of
Speaker 1 [17:32]
Maths is actually not as complicated to be honest like this is something you can definitely learn to read You'll have to sit down and you
Speaker 2 [17:38]
sit down and you'll have to learn mathematics. There's just no way past it, unfortunately.
Speaker 1 [17:50]
Yeah, maybe before we go, like, for example,
Speaker 2 [17:54]
For example, without knowing the domain,
Speaker 1 [17:56]
what do I see or first of all I'm assuming there's a P and there's a vertical bar and we do and we are here in data science so I'm immediately thinking oh probably there's some probability of something so it's probably going to be between zero and one and then I'm thinking oh there's some event and this event depends on these two things occurring and then I see that there's many different partial states because there's a product here and there's a sum here and then at this point And I'm like, okay, this is...
Speaker 2 [18:22]
If I need to know more about this, then I'm going to have to sit down with a pen and paper.
Speaker 1 [18:27]
So this is what we are going to learn to do here.
Speaker 2 [18:29]
got to learn to do here.
Speaker 1 [18:33]
Like I said, I I'm gonna stick with this thing because
Speaker 2 [18:38]
This is the one I did in the workshop.
Speaker 1 [18:39]
one I did in the workshop and I think that everybody when they leave this room should
Speaker 2 [18:42]
should be able to understand what end
Speaker 1 [18:43]
understand what N does here. And we will get there, I promise. Before we do that, let's just do some ground rules.
Speaker 3 [18:51]
So
Speaker 1 [18:53]
Let's start with this one, who thinks it's 16?
Speaker 2 [18:59]
Who thinks it's one? Okay, we have three people brave enough to say it's one and nobody's 16, so...
Speaker 4 [19:07]
Thank you very much.
Speaker 1 [19:08]
I understand. I also wouldn't want to put myself.
Speaker 2 [19:10]
want to put myself on the spot in a question like this
Speaker 1 [19:12]
but let's just recap arithmetics let's start with the first one
Speaker 2 [19:18]
How much is this?
Speaker 1 [19:20]
Seven. Perfect. How much is this one? Perfect. How much is this one? Four thirds. Yeah, I don't need you to do that.
Speaker 2 [19:31]
December 4th, so that's as good an
Speaker 1 [19:32]
four thirds is good enough for me is it the same as this year yes yes it is so what about this it's a bit more complicated now six yes 16 divided by three
Speaker 2 [19:47]
Divided by 3, perfect.
Speaker 1 [19:48]
And last one, this one.
Speaker 2 [19:53]
I also don't remember.
Speaker 1 [19:58]
So 6 times 6, 36, divided by 3 is...
Speaker 2 [20:02]
is 12 minus 2 is 10 perfect
Speaker 4 [20:06]
Thank you.
Speaker 1 [20:08]
The funny thing about mathematicians, they usually
Speaker 2 [20:09]
mathematicians, they usually can't count.
Speaker 1 [20:14]
We already applied all the rules already very well, so I don't need to spend much time here, but this is really important. We have the brackets first, then we have the powers, then the division multiplication go together in the same order.
Speaker 2 [20:26]
same order
Speaker 1 [20:27]
Addition and subtraction go also together in the same order.
Speaker 2 [20:29]
in the same order.
Speaker 1 [20:30]
When we write numpy
Speaker 2 [20:33]
functions we already have to do this because the computer is gonna go precisely in this way so I think everybody is already very comfortable here with this but I still wanted to have it
Speaker 1 [20:42]
have it on the slides so let's go back to this one we're gonna do the brackets first which is 4 and then we're gonna so this is going to become this and then we're just gonna go straight and we're gonna end up at 16 so it's 16 bro
Speaker 2 [20:58]
If you want.
Speaker 1 [21:01]
If you if you'd like to have an exercise for yourself and call it together you can rewrite this to make it one and If you're in trouble or a doubt just pretend your path in the algorithm
Speaker 2 [21:12]
So just go straight
Speaker 4 [21:14]
Um
Speaker 1 [21:16]
What's important for us to remember is when you have additional subtraction these happen last so if you have
Speaker 2 [21:22]
something complicated plus something complicated then these are two separate things and we can look at them separately and then maybe in the end we're going to compare them
Speaker 1 [21:35]
They're going to compare them.
Speaker 2 [21:37]
splits our complex functions into parts. So what does addition actually do? How do we understand?
Speaker 1 [21:44]
understand if we have this plus in our function.
Speaker 4 [21:47]
If we...
Speaker 1 [21:48]
We're adding something.
Speaker 2 [21:50]
This is our function here.
Speaker 1 [21:53]
of x is x plus 3, it's pretty intuitive we have 3 x apples, we have 3 oranges now we have x
Speaker 2 [21:58]
X bus three things
Speaker 4 [22:00]
Thank you very much.
Speaker 3 [22:02]
And so...
Speaker 2 [22:03]
If we add...
Speaker 1 [22:05]
constant value to our function then we're just going to move the function in space so here is an example 3x plus 5 is the blue line
Speaker 2 [22:13]
Is anybody here colorblind? Cool. I went to the lightning talks yesterday and I was like, oh shit. I did not think about this
Speaker 4 [22:22]
Um.
Speaker 1 [22:24]
React does five, it's going to be our line here, and then we just add five, and it's just going to move the same direction.
Speaker 2 [22:32]
It's the same thing here.
Speaker 1 [22:33]
Same thing here, it doesn't look like
Speaker 2 [22:35]
still a constant of
Speaker 1 [22:36]
of five everywhere.
Speaker 2 [22:37]
everywhere, so here.
Speaker 1 [22:39]
So here, optics fool you.
Speaker 2 [22:42]
Anytime we add or subtract a constant value, we just move our function in space.
Speaker 4 [22:48]
Um
Speaker 2 [22:52]
also
Speaker 1 [22:53]
the Sigma here you see it sometimes this
Speaker 2 [22:56]
This is just an abbreviation for addition.
Speaker 1 [22:58]
for addition so if I have a sum like
Speaker 2 [23:03]
a1 plus a2 plus a3 plus i don't know a27 then i can also write it as a sum of i goes from 1 to 27 a i this is all it means just an abbreviation so every time you see this there's a sum happening
Speaker 4 [23:24]
Um
Speaker 2 [23:26]
If we don't have any questions so far, let's go to multiplication.
Speaker 3 [23:29]
So
Speaker 1 [23:32]
Now things become a bit more difficult.
Speaker 3 [23:34]
so
Speaker 1 [23:36]
Now my f of x is given by some constant b times x. If b is larger than 0, actually larger than 1, then it's super simple, and we all know this. I take 6x oranges b times.
Speaker 2 [23:50]
p times, now I have p times x oranges, so it's
Speaker 1 [23:54]
more As long as our X is positive.
Speaker 2 [23:59]
So if...
Speaker 1 [24:01]
We are going in the negatives then I think
Speaker 2 [24:03]
I think also everybody knows this, but just recapping, multiplying a positive by a negative is going to give you a negative number.
Speaker 1 [24:10]
So this is why here's our function 3x. From 0 it's positive, and then once x becomes negative, it's going to go into the negatives. And all of our multiplicative functions...
Speaker 2 [24:21]
questions.
Speaker 1 [24:22]
Path through zero because anything
Speaker 2 [24:23]
because anything times zero is zero.
Speaker 3 [24:27]
so
Speaker 1 [24:28]
What it means is we have to pay attention when we have our x here which values can
Speaker 2 [24:32]
which values can x take, because the same function can be positive, can be negative, it can become zero.
Speaker 1 [24:36]
it can become zero.
Speaker 4 [24:37]
Um...
Speaker 1 [24:38]
sometimes this will change
Speaker 2 [24:40]
this will change everything for us.
Speaker 4 [24:42]
And, uh...
Speaker 1 [24:44]
Again, the same as we had the sigma before.
Speaker 2 [24:48]
we were multiplying our A's instead of adding them, we would write them as this product.
Speaker 1 [24:59]
So remember in our big scale equation we had products at sums
Speaker 2 [25:03]
So it wasn't actually that scary. It was just products and sums of things
Speaker 1 [25:07]
Now we're getting into territory where we have to be a bit more careful.
Speaker 3 [25:14]
So
Speaker 1 [25:15]
As long as our...
Speaker 3 [25:17]
So, okay.
Speaker 4 [25:19]
Um
Speaker 1 [25:21]
As so f of X is a divided by X so a is constant and dividing by something that's changing so as long as
Speaker 2 [25:30]
as a is larger than one.
Speaker 1 [25:31]
We're perfectly fine. I have my cake. I'm dividing it into X piece
Speaker 2 [25:34]
into X pieces, the pieces get smaller and smaller and smaller.
Speaker 1 [25:37]
so here the
Speaker 2 [25:39]
We get closer and closer to zero.
Speaker 1 [25:41]
It's very it's very intuitive
Speaker 4 [25:44]
I think, um...
Speaker 1 [25:45]
But if X is between 0 and 1, this is where things actually explode, because now I'm dividing my cake by half pieces.
Speaker 2 [25:52]
by half pieces so I'm actually multiplying the pieces so the small the closer I get to zero
Speaker 1 [25:56]
to zero if on the x-axis it's called x-axis because it's the values of x the larger actually my division becomes and finally i cannot actually get to zero i'm not allowed to divide by zero ever so this is why we see this as this asymptotic approach towards the axis but never touching it except when you work with numpy
Speaker 2 [26:20]
If you try to divide by zero in NumPy, you will see warning, you're dividing by zero. And we'll just put an infinity.
Speaker 1 [26:28]
and suddenly you have divided by zero and didn't even know this.
Speaker 2 [26:31]
And in reality, you did something that you never.
Speaker 1 [26:34]
never were allowed to do. One thing where it happens, where you can
Speaker 2 [26:38]
What happens, where you can notice, is if you had integers, suddenly you have floats. You probably divide it by zero. It's a very high chance that's what happened, because infinity and also nones, they are float types in NiPy. So you have to be a bit careful there.
Speaker 1 [26:57]
What do we have to remember from this?
Speaker 2 [26:58]
from this
Speaker 1 [27:00]
is a version of multiplication but we can never divide by zero. The other thing we need to remember is multiplication of two negative numbers is positive.
Speaker 2 [27:08]
Negative numbers is positive.
Speaker 1 [27:11]
And also I would like to remark that there's a billion ways of writing division which are all the same.
Speaker 4 [27:15]
Thank you.
Speaker 1 [27:16]
So also it's the star here. Obviously we don't actually need it. We can drop it, but this is all means the same especially this a
Speaker 2 [27:22]
a
Speaker 1 [27:23]
times x
Speaker 2 [27:25]
times x,
Speaker 1 [27:25]
to the power of minus 1 is just a fancy way of writing this.
Speaker 3 [27:29]
so
Speaker 2 [27:30]
When you see negative exponents, this is what it means. Like I said, mathematics is a language, and this is the vocabulary we have. These are the things we need to know. Any questions so far?
Speaker 1 [27:58]
This is mean
Speaker 4 [28:00]
Um, the.
Speaker 2 [28:03]
This is a bit like a bit longer than the other two I actually didn't really do the math, to be honest.
Speaker 1 [28:15]
Yes, you ate a burp.
Speaker 2 [28:24]
And then we can simplify that to 9 9 12 so we can simplify that to 3 4
Speaker 1 [28:30]
I think, no. Yeah, doing live mass.
Speaker 2 [28:35]
like doing live coding. All of this is wrong, and so on.
Speaker 1 [28:42]
I just wanted to point out that
Speaker 2 [28:43]
point out that if you have this big division and this thing just flips and goes up
Speaker 4 [28:47]
Um, and also
Speaker 1 [28:49]
Just to have some fun. You probably never have to do this in real life.
Speaker 2 [28:51]
I don't have to do this in real life. So now this is
Speaker 1 [28:56]
our algorithm of how we're going to apply everything we just discussed remember we kept to every single function we're going to we're going to meet first of all we're going to ask in Pascal's house.
Speaker 2 [29:06]
What kind of values can X take?
Speaker 1 [29:08]
Then we're going to ask ourselves, can we split it into parts which are...
Speaker 2 [29:11]
parts which is plus and minus
Speaker 1 [29:15]
is the division. Can this thing become zero? Where do we have to take care?
Speaker 2 [29:20]
take care
Speaker 1 [29:21]
Then we're going to see if they have constant factors.
Speaker 2 [29:23]
constant factors that we can just lump together and ignore.
Speaker 1 [29:27]
Then we're going to see what happens if x becomes 0, if it's allowed to become 0 in 1, if not we can just skip this. Then we can see what happens if x is very large. And finally we're going to see what happens if x is negative, if it's allowed, and if it's very very small.
Speaker 2 [29:43]
very, very small. And we're going to execute this every single time.
Speaker 1 [29:48]
So let's start with this example. We did this before
Speaker 4 [29:51]
Thank you very much for your time.
Speaker 1 [29:52]
So the domain here is not defined. We can use anything Yeah, this part there's like three different parts there's no division, there's only one constant factor, if x is equal to 0, then this thing is equal to 5, if x becomes very large, then this term, the power term, becomes...
Speaker 2 [30:13]
and becomes the largest, so it's going to be dominated.
Speaker 1 [30:14]
going to be dominating the whole thing. And if x becomes very small, we have a power of 2. I didn't say this before, but you would probably know this. It's also going to be positive, and it's also going to be very large, so it's going to be doing the same thing. And then we have this parabola that we already saw in the plot.
Speaker 4 [30:33]
Um
Speaker 1 [30:34]
So just to formalize this, you sometimes see this expression. I'm not sure how to say it in English.
Speaker 2 [30:40]
It's also said in English, I think it's limus.
Speaker 1 [30:40]
I think it's Limes still, in German it's Limes.
Speaker 4 [30:43]
I just
Speaker 1 [30:44]
And this basically just means what happens to my function when x becomes some value that's written here. So, for example, this means what happens if x becomes zero or goes towards zero if it's allowed to become zero. Normally, we're going to see zero, infinity, minus infinity.
Speaker 2 [31:00]
because these are the most interesting parts.
Speaker 1 [31:03]
With exceptions. So again, like vocabulary, this is just fancy notation for asking this question.
Speaker 3 [31:13]
So
Speaker 1 [31:15]
Yeah, so this is just another slide saying the same thing.
Speaker 4 [31:21]
What happened?
Speaker 1 [31:22]
What happens for different values of x? What happens? This is our algorithm again here. Let's do the first one and you takers Yes, excellent allowed to be zero perfect Can we lump constants together Yeah, somebody said the bigger K is, the furthest will be away from the 0, 0 point.
Speaker 3 [31:55]
So
Speaker 1 [31:57]
The 0, 0 point means...
Speaker 3 [32:04]
so
Speaker 2 [32:09]
I'm going to have x, I'm going to have my f of x here, so this is 0.
Speaker 3 [32:15]
so if
Speaker 2 [32:16]
k plus m equals to 1, then I have 1 over x, which is something like this, and then if k is larger, I'm going to be dividing.
Speaker 1 [32:26]
dividing a larger thing by x.
Speaker 2 [32:27]
x so I'm going to be coming more here and so on
Speaker 4 [32:30]
Thank you.
Speaker 2 [32:33]
What happens if x is under zero? Yes, we just want to flip the sign, so we're going to be here. Let's go to the next one. Same thing. First of all, here we have some additional condition, which we need to have, because otherwise we're going to be dividing by zero, which we can't. Number two is fine, there's no parts. The divisor can't become zero. Can we lump together constant factors? Yes, so this is just some number.
Speaker 4 [33:14]
Um
Speaker 2 [33:16]
And then we just have x times some number.
Speaker 1 [33:21]
Oh, sorry.
Speaker 2 [33:23]
So question is it this like this or is it like this?
Speaker 1 [33:35]
Depending on Anne. Thank you, sir.
Speaker 2 [34:06]
Thank you. Thank you for those remarks. So the feedback from the audience is...
Speaker 1 [34:10]
I'm going too fast. I'm not giving people enough time to...
Speaker 2 [34:13]
enough time to think along.
Speaker 4 [34:15]
Thank you.
Speaker 1 [34:16]
I'm sorry about this. Let's go a bit.
Speaker 2 [34:18]
this let's go a bit slower
Speaker 3 [34:21]
so
Speaker 2 [34:23]
Let's take this one. Yes, question. It's something for natural numbers. So is it a bias to consider n is always larger than zero? Because that's why I said it's like this. I wouldn't assume anything. So the question was, n is something like natural numbers. Can I assume n is always positive? No, you cannot. Because it really depends on which field you end up in.
Speaker 1 [34:51]
in and can mean whatever.
Speaker 2 [34:53]
So natural numbers are going to be written like this
Speaker 1 [34:57]
a set of natural numbers.
Speaker 2 [34:59]
Then if you see this, then you could.
Speaker 1 [35:00]
then you can be absolutely sure this is natural numbers.
Speaker 2 [35:09]
Question about the second equation, does it always go through origin?
Speaker 1 [35:15]
Can anybody answer this question? Yes, you can answer, but yes, it goes.
Speaker 2 [35:24]
Yes, it goes. It always goes to the origin because when x becomes zero,
Speaker 1 [35:28]
zero any multiplication
Speaker 2 [35:29]
multiplication becomes zero thank you this was a very good question they are the same priority so we just go left to right
Speaker 1 [35:43]
Let's go left to right.
Speaker 2 [35:44]
So we're just going to go x times n divided by car. But also because they have the same priority, it doesn't matter if I do... It's the same, right? Yeah. Yeah, it's the same.
Speaker 5 [36:18]
Maybe a quick comment because for online people it's very difficult to follow what is going on this on this white board with the marker, so I'll just move this board to the left hand side with where there is more light and Just a request to you when you are writing something. Please make sure that you are not also like hindering the camera vision so
Speaker 1 [36:40]
Online people can also see. Sorry to...
Speaker 5 [36:42]
Sorry to interrupt.
Speaker 1 [36:43]
I didn't know there were online people. Hello, online people.
Speaker 4 [37:05]
Um
Speaker 2 [37:06]
I'm gonna skip the rest of the exercises just because of time
Speaker 1 [37:10]
you're very welcome to do them for yourselves and show me your
Speaker 2 [37:12]
your answers after.
Speaker 4 [37:14]
Thank you.
Speaker 2 [37:15]
As you saw here, what I did actually is every time I talked about it, I also drew it. I think this is super helpful to draw.
Speaker 1 [37:21]
food to draw
Speaker 2 [37:22]
for yourself the functions.
Speaker 1 [37:24]
because this way you can actually...
Speaker 2 [37:27]
And at least for me, myself, I don't think.
Speaker 1 [37:29]
think in
Speaker 2 [37:32]
But if I draw it, then it becomes much simpler
Speaker 1 [37:34]
much simpler and maybe
Speaker 4 [37:43]
Thank you.
Speaker 2 [37:44]
Can I stand here? Is it fine?
Speaker 1 [37:47]
Okay, just maybe the last one.
Speaker 2 [37:48]
Just maybe the last one, let's just say I have no idea how this looks. Then I'm just going to go, okay, let's say x is equal to 1. Then I have 1 over 1 plus k. And I'm just going to put some number, just for myself. I'm going to say, okay, let's say k is equal to 3, just for now. So I'm going to say, okay, let's say x is 0. Then I have 0 over k, which is 0. So I'm going to have a dot here. Let's say x is 1, then I'm going to have 1 over 4, which is here, x is equal to 2, then I have 2 over 5, so it's going to be somewhere here, and so on, and I'm going to just execute this through, and I'm going to do the same on the negative, also kind of like the function I showed before for myself, until I get, okay, maybe now I understand how it looks, you know?
Speaker 1 [38:46]
You can't always do it, sometimes it's going to be too complicated.
Speaker 2 [38:49]
Sometimes they also just don't know how a certain operator behaves.
Speaker 1 [38:52]
but oftentimes this is going to be good enough and like we had before this question
Speaker 2 [38:57]
this question but i have to understand this even if i don't know it this is what i'll do i'll sit down and i'll actually work through it piece by piece by piece until i have
Speaker 4 [39:08]
Thank you.
Speaker 2 [39:09]
intuition about what it does
Speaker 1 [39:12]
And the only difference between people who studied math and normal people is they just did the...
Speaker 2 [39:24]
did this for years and they and years and years and years and they became very very comfortable with doing it that's all question yes so when you have your first glance on any equation like you try to substitute like in your mind or do you look at like certain like what is it division is it is it like an exponential and then based on that you try to get like the first impression So the question is when
Speaker 1 [39:52]
is when I personally
Speaker 2 [39:53]
Or it's a person. Okay, somebody and I'm not a mathematician just to be very clear. I hope you did engineering not mathematics
Speaker 1 [40:00]
I wish.
Speaker 4 [40:02]
And, uh...
Speaker 3 [40:03]
So
Speaker 2 [40:04]
Do people look first? Sorry, can we use a microphone? I don't think I can repeat the question.
Speaker 1 [40:12]
be the question adequately.
Speaker 6 [40:18]
Okay, so I was saying when you have a first glance on the equation, in order to understand it, do you try to substitute with numbers like x is equal to 1, then y would be this, x is equal to 0, then y would be this? I mean in your mind and to get like the first impression of how it would be looking or do you rely more on the patterns like this is a division this multiplication this is a constant and then okay I think this would be exponential or this would be like that
Speaker 2 [40:50]
So I can't speak for all people, I think people are very different and the way people think is also very different.
Speaker 1 [40:56]
Me personally I do this like I do this with anything like the first thing I'm gonna do It's actually number three. I'm gonna see can
Speaker 2 [41:05]
Can there be a division by zero? This is always the first thing I'm doing because I think it's
Speaker 1 [41:09]
it's the most important one and then I'm just gonna go through all these things
Speaker 2 [41:14]
Another step that I might have to add is if I see something I've never seen before then I'm going to look it up first.
Speaker 1 [41:20]
But and it's also not failsafe. So if you have enough time, we're gonna go to
Speaker 4 [41:26]
Um
Speaker 2 [41:28]
parts where intuition fails us, but I think again it's good enough.
Speaker 1 [41:31]
it's good enough and good and good enough is what we're
Speaker 2 [41:32]
good enough is what we're striving for in AI most of the time.
Speaker 4 [41:36]
Um
Speaker 2 [41:37]
Does that answer your question?
Speaker 4 [41:40]
Um
Speaker 1 [41:42]
So this is a real-life example, which looks scary but actually isn't. This is the PageRank algorithm.
Speaker 2 [41:49]
Who here has done seen page rank before a few people cool
Speaker 3 [41:55]
So let's
Speaker 1 [41:56]
Let's just look at what D does. But first, normally a function doesn't just come like this. It comes with an explanation of what the actual parts do.
Speaker 3 [42:06]
So
Speaker 1 [42:07]
Here we have the i, which is all pages that link to p. So, okay, page rank of a page, p. So p is not probability, p is just a page. It's given by this plus d times, this is the sum, we talked about this before, this is just a sum over some pages i, and each page has its own page rank, and then the page has some number of links to our page that we're looking at, and then this thing converges and things happen. now we don't need to understand what exactly happens here i just want to talk about what does d do
Speaker 3 [42:46]
so
Speaker 1 [42:48]
How do we approach this? First of all, what domain can we have? This is something Kind of the main knowledge. It's kind of a bit common sense. I have 1 minus D plus plus something times D So normally it's going to be between
Speaker 2 [43:11]
between 0 and 1 here, right?
Speaker 3 [43:15]
So
Speaker 1 [43:17]
And the parts are connected by addition. The division here is irrelevant. We can assume this is positive. What happens if d is equal to 0? Yes, the second thing goes away.
Speaker 4 [43:34]
it's just
Speaker 1 [43:35]
It's just 1 over n. So 1 over all the.
Speaker 2 [43:37]
one over all the pages, so completely random.
Speaker 4 [43:39]
them.
Speaker 1 [43:40]
The page rank of page P is just one over all pages.
Speaker 2 [43:43]
one over all pages I have in my corpus.
Speaker 1 [43:45]
What happens if d is equal to 1? Yes, the first thing is 0, and the second thing is the only thing that matters. And so what does d do? Yes, it balances between our parts of the algorithm.
Speaker 2 [44:03]
part of the algorithm.
Speaker 3 [44:04]
So
Speaker 2 [44:05]
Not everybody here raised their hand saying, I know what PageRank is.
Speaker 1 [44:09]
So I hope now everybody still understands the
Speaker 2 [44:12]
the function of D in this algorithm.
Speaker 1 [44:15]
It just takes some constant value and balances how the importance of this versus the importance of the actual algorithm
Speaker 6 [44:33]
So I've been doing machine learning for a while, but this is a good example of an equation that becomes very mind-boggling for me because it's recursive. Could you comment on that? What can I do when I see something like PR depends on PR of something else?
Speaker 3 [44:53]
so
Speaker 2 [44:55]
Recursion is something I have trouble with myself. I'm a firm believer in not having recursion in your code ever.
Speaker 4 [45:01]
Thank you.
Speaker 1 [45:06]
It's a trick question I do have an answer have a good answer
Speaker 6 [45:11]
a good answer as well acknowledging that it's it's scary probably not only for for us
Speaker 2 [45:25]
So I read about this algorithm when I was preparing the talk basically, I know it's gonna convert at some point and When I look at this I'm I start with the finished product and
Speaker 1 [45:40]
finished product and I kind of think back so where did
Speaker 2 [45:41]
So where did we start from? So in the in the beginning there was just some random random rank. That's a page
Speaker 1 [45:46]
that the page had. Probably all the pages had the same rank. And then I mentioned, okay, now we're chugger, chugger, chugger.
Speaker 2 [45:51]
chugga chugga chugga chugga chugga chugga this went on
Speaker 1 [45:53]
chaga this went on for a while and then they probably went to different directions that's how i rejoice for myself
Speaker 2 [45:58]
I'm going to draw it for myself.
Speaker 1 [45:59]
Also this gentleman teaches machine learning so maybe he has a better answer to this
Speaker 6 [46:03]
I mean, a different way to express this is the eigenvalue thing, but I don't think that helps because I find eigenvalue scary as well.
Speaker 1 [46:16]
I love eigenvalues, but...
Speaker 6 [46:18]
it's not part of that I give you the mic
Speaker 2 [46:20]
But it's not part of this talk. We know that you'll have to blend this talk, unfortunately. Another question?
Speaker 7 [46:36]
Maybe I missed it, but how did you come up with the notion that D is...
Speaker 2 [46:38]
the notion that D is between C and D.
Speaker 7 [46:40]
Zero and one domain
Speaker 2 [46:41]
domain knowledge. So,
Speaker 7 [46:46]
I didn't read it. Yeah, it is my fault
Speaker 6 [46:47]
That's my fault.
Speaker 7 [46:49]
So the side comment was it is defined and
Speaker 2 [46:53]
and it says probability, yeah, so. No worries. This is a safe space. There are no stupid questions. I love that you had this question because it's actually super important.
Speaker 1 [47:03]
and it shows us
Speaker 4 [47:04]
Um, we'll be having.
Speaker 2 [47:05]
But we have to question everything when we look at formula
Speaker 1 [47:07]
formula like before we didn't make assumptions about n and we also can't make assumptions about d
Speaker 4 [47:14]
it's also
Speaker 1 [47:14]
It's also D because it's dampening in this case. Okay, bad news. Bad news number one, we're not going to do any of this probably. Bad news number two, you have so many different ways of...
Speaker 2 [47:30]
different ways of notation that depending on which field you come from you're going to be confused not because you don't know something but because you just never seen how they write that.
Speaker 4 [47:39]
And, um...
Speaker 1 [47:42]
I like this, I also use this, and this is just why.
Speaker 4 [47:51]
Um.
Speaker 1 [47:52]
Yeah.
Speaker 4 [47:54]
Um.
Speaker 1 [47:58]
We also...
Speaker 2 [48:00]
Are we back to our friend the big equation?
Speaker 1 [48:02]
which now remember you have the product
Speaker 2 [48:03]
Remember, you have the product and the sum.
Speaker 1 [48:07]
We already saw we have different ways to write division. People will also use whatever to replace Greek letters.
Speaker 2 [48:13]
place Greek letters to save time because
Speaker 1 [48:14]
because every time so these slides are made in google drive every time you see math i either
Speaker 2 [48:19]
I either went to Wikipedia and copied it, or I opened Jupyter,
Speaker 1 [48:23]
made a text box.
Speaker 2 [48:26]
text box in Jupyter and wrote latex in the text box and then I made a screenshot and I copied pasted it
Speaker 1 [48:30]
I copied pasted it over.
Speaker 2 [48:31]
I'm pretty sure there's more efficient ways to do it. I'm just old
Speaker 4 [48:34]
Thank you very much. Thank you.
Speaker 1 [48:35]
But that's why you will see some.
Speaker 2 [48:38]
see sometimes, for example,
Speaker 1 [48:39]
For example, in the normal decision,
Speaker 2 [48:40]
the normal distribution you have this but for scale but people also you often sometimes will just write s and this imply you just do it in your head
Speaker 1 [48:50]
also intentionally in these slides I'm doing it sometimes for you to be used to it and also different fields will have the same name for different constants
Speaker 2 [48:58]
for different constants.
Speaker 1 [48:59]
So again, this is really I really like the question before because you really have to read the fine
Speaker 2 [49:04]
read the fine print if you want to understand what's what.
Speaker 4 [49:07]
Thank you.
Speaker 1 [49:08]
And different fields have different patients for the same operation.
Speaker 2 [49:11]
the same operations even sometimes.
Speaker 4 [49:13]
Um, and also...
Speaker 1 [49:14]
And also combinations of constants are often just abbreviated.
Speaker 2 [49:16]
just abbreviate it and then you are left to find out for yourself what it means.
Speaker 1 [49:20]
So unfortunately, it's not always all very reader friendly
Speaker 2 [49:23]
reader friendly
Speaker 4 [49:25]
Um, so
Speaker 1 [49:26]
So this is our real-life example both of these are from Wikipedia One for some reason is a big F one is a small F
Speaker 4 [49:37]
Um
Speaker 1 [49:38]
One is written f of x, one is written f of x semicolon, and then two other values. This could also be f semicolon l and k and x0, but it's not. So approaching these functions, which domain? The domain is not specified, but is there any value of x that the function cannot take?
Speaker 2 [50:04]
function cannot take here.
Speaker 4 [50:13]
Um
Speaker 1 [50:15]
I'm not sure what you mean.
Speaker 3 [50:24]
Ah
Speaker 1 [50:25]
No, no, sorry like this actually only just means that F depends on X but you can also
Speaker 4 [50:30]
So my
Speaker 1 [50:31]
modify the values of mu and s in this. That's really all it means. So, actually I don't even want to do this, I just wanted to point out that if you look at this closely, you can see that this is the same function.
Speaker 3 [50:46]
So
Speaker 2 [50:47]
If I'm going to set L to 1, and I'm going to set S to 1, and then the one on the bottom becomes... No, sorry. Doing mathematics live.
Speaker 3 [51:23]
So we have
Speaker 2 [51:28]
And we have on the right, on the bottom.
Speaker 3 [51:34]
so
Speaker 2 [51:36]
In order for this to look the same, I have k equal to 1 over s, and I have mu equal to x0. So now if I put 1 over s here, this becomes, and then if I replace x0 with mu, this becomes, which is the same as this, right? So the connection between the two functions, let's call it big F of x and small f of x, is, I said, L equal to 1, k equal to 1 over s, and x0 equal to mu.
Speaker 1 [52:28]
And it's basically the same function, so we look completely different on the first class
Speaker 2 [52:31]
different on the first glance, but
Speaker 1 [52:33]
They're just variants of the same thing
Speaker 2 [52:35]
Does this make sense? If it doesn't make sense, do you just need more time or do you need me to explain it again?
Speaker 1 [52:52]
Okay, I'm already failing you, everybody.
Speaker 4 [53:00]
Okay.
Speaker 1 [53:01]
Maybe if you want like if you really want to understand this You could I'm gonna put the slides online after and you could just take it home with you and sit down with pen and paper
Speaker 2 [53:10]
with pen and paper and just do it for yourself.
Speaker 1 [53:15]
what can I substitute my constant with to go from this up to go from this one to this one you mean this semicolon it's not dependence now so this is just basically telling you okay access you access the variable I'm actually inputting and then mu and s are parameters that I
Speaker 2 [53:42]
that I can adjust in order to modify how the function looks.
Speaker 1 [53:48]
Moving on, just powers, powers are super important, so here already we had a power, e to the power of something, which is why I didn't want to go into this algorithm yet. Taking a to the power of x is just taking a...
Speaker 2 [54:04]
times A times A times A times X times.
Speaker 1 [54:07]
So it's kind of an abbreviation again
Speaker 3 [54:10]
So
Speaker 1 [54:12]
Let's play it through together. What happens for different values of A? So what happens if A is...
Speaker 2 [54:16]
What happens if a is equal to 0?
Speaker 1 [54:23]
So we have is
Speaker 2 [54:26]
0 and a is 1. So 0 times 0 times 0 times 0 is always going to be 0.
Speaker 1 [54:41]
What happens if A is large?
Speaker 2 [54:46]
It's going to explode, yes.
Speaker 1 [54:48]
What happens if A is very small?
Speaker 2 [54:56]
so cool I have two options I have very it's gonna get super small and I have it's gonna get approaching zero that depends on how you how you call very small it's very small
Speaker 1 [55:09]
It's very small.
Speaker 2 [55:11]
So very small can mean This is zero here Very small can be can mean I'm going towards zero or very small can be I'm going super negative So be careful when people say
Speaker 1 [55:26]
when people say something's getting very small.
Speaker 2 [55:28]
because it has two different meanings.
Speaker 3 [55:32]
So
Speaker 1 [55:35]
is negative then I have to know the value of X because we have one important rule which is if
Speaker 2 [55:48]
Then we have negative times negative, positive, times negative times negative, positive, and so on and so on. So a positive power always gives us a positive.
Speaker 1 [55:58]
value of the power. And this one we have...
Speaker 2 [56:02]
This is when we have curves like this. Remember before we had a quadratic equation?
Speaker 4 [56:08]
and
Speaker 1 [56:09]
If we have a negative, an impaired number of powers, then no matter how many... So then we're going to have...
Speaker 2 [56:19]
times A times A, positive no matter how many times, positive. And then the last guy is going to be negative. And this guy is going to flip our entire value of the power. So this is when we end up with something that as soon as A is negative, flips on the other side, but otherwise looks the same.
Speaker 1 [56:49]
And I think I said this before, if you see something to the negative power of something, it's just a fancy notation for division. So what's really important is 3 to the power of x is not the same as x to the power of 3.
Speaker 4 [57:06]
Um, because
Speaker 1 [57:07]
Because as X grows.
Speaker 4 [57:10]
Thank you.
Speaker 1 [57:12]
It's just multiplication So I'm gonna have 2 times 2 is 4 times or 3. Sorry So yeah, let's say X is equal to 2 then I'm gonna have 2 times 2 is 4 times 2 is 8 and so on and so forth But if I take 3 to the power of X
Speaker 2 [57:27]
Then it's
Speaker 1 [57:29]
goes time then it goes steps now with every value of X I'm I'm include I mean
Speaker 2 [57:38]
raising the number of times I'm taking this power.
Speaker 1 [57:43]
The value range here is between 0 and 7.5. It's not that much.
Speaker 2 [57:50]
and our
Speaker 1 [57:51]
X to the power of 3 is...
Speaker 2 [57:52]
So three is super small.
Speaker 1 [57:53]
small and our 3 to the power of x is already like by 20,000.
Speaker 2 [58:00]
So this is why when we say we have a mental growth of something, it's usually a bad thing because it goes super fast.
Speaker 1 [58:06]
super high super fast it also means for us that if we have 3 to the power of X plus X to the power of 3 then already when we are at 7.5 we don't really care about the second term anymore
Speaker 2 [58:20]
term anymore.
Speaker 1 [58:21]
we can just look at the first at the big one so things to remember taking everything to the power of zero is always going to be one other thing to remember is if you have an exponent it applies only to whatever it's attached to so
Speaker 3 [58:38]
So
Speaker 1 [58:39]
If something's in brackets, then it applies to the whole bracket. But if it's not in brackets, then it just applies to whatever, like here to the 2. And x to the power of 3 is very, very, very, very different from 3 to the power of x. And 3 to the power of x is the one you should be worried about.
Speaker 2 [58:53]
to be worried about.
Speaker 1 [58:59]
Yes, so this is a formal version of what I just said. Limits of x with infinity of x3 plus 3 to the power of x is going to become 3 to the power of x. And finally, the parent-impaired exponents, which you can remember if you remember these.
Speaker 2 [59:16]
this year. Any questions?
Speaker 3 [59:22]
so
Speaker 1 [59:24]
We still have our algorithm. We're gonna add another step now, which always check do we have any exponents and are they in a very late value range where the result is small or is a result large and Can the exponents get negative which would lead us to a division? So, let's try this guy
Speaker 2 [59:58]
to the power of 5 minus x divided by 20.
Speaker 3 [60:03]
so
Speaker 1 [60:05]
Are there any values x not allowed to take? No. No divisional subtraction. Is there division? Yes, but it's constant. Yes, but it's constant. It can never become 0. Perfect. Constant factors, we can't lump together. What happens for x equal to 0? Yes, it's just a constant value F.
Speaker 2 [60:42]
Write it like this, f of 0 is equal of 10, 10 to 520, which is the same as x 10 to 1 fourth.
Speaker 3 [60:52]
so
Speaker 1 [60:54]
Thank you.
Speaker 2 [60:57]
Squirrel two times. I'm ignoring squirrels in this workshop, but you're
Speaker 1 [61:00]
but you're correct. So it's something small.
Speaker 2 [61:03]
So it's smaller than 10.
Speaker 1 [61:04]
So it's smaller.
Speaker 2 [61:33]
So a comment from the audience is you can also just.
Speaker 1 [61:37]
also just simplify the in your head and then you don't have to follow the algorithm it
Speaker 2 [61:42]
some you can just make it easier for yourself that's true
Speaker 1 [61:47]
The thing is we want to do more and more and more complex
Speaker 2 [61:49]
and more and more complex things.
Speaker 1 [61:50]
and that's why I'm powering through the entire time.
Speaker 2 [61:53]
But you're absolutely right that sometimes things are straightforward enough that you just see what happens
Speaker 1 [61:58]
And sometimes you can also simplify. And yes, you can divide. So this is, yeah, of course.
Speaker 2 [62:05]
I can also, no, actually, no, I can't. Never mind.
Speaker 4 [62:08]
Thank you.
Speaker 3 [62:10]
So
Speaker 1 [62:10]
What happens if X becomes very large?
Speaker 6 [62:16]
There's an interesting point that jumps into my face when I look at this, when x is exactly 5. Yes. That helps. Yes.
Speaker 1 [62:28]
Perfect.
Speaker 2 [62:30]
What happens in that point when x is exactly 5? Yes. Because it's 0 to the power of 20, which is 1.
Speaker 1 [62:42]
lower exponential functions always going to go
Speaker 2 [62:43]
always gonna go through one
Speaker 1 [62:45]
Just super cool and if X is very large Yes, so if X
Speaker 2 [63:08]
Because we have something negative here, so we have 1 over 10. Sorry, like this. And this is going to be super, super small, approaching zero.
Speaker 1 [63:29]
And what happens if X is minus, sorry.
Speaker 2 [63:31]
one minute for everybody to look at this.
Speaker 1 [63:44]
So x is really large, so 5 minus x. This one? This one we just all agreed that this is going to be the case. Because x, so we have something to the power of 0. Then we have 10 and x to the power of 1, which is 10 to the power of 1. So 5 minus x, 5 minus 5 is 0?
Speaker 2 [64:21]
So it's 0 or 20 which is 0
Speaker 1 [64:23]
And so it's 10 to the power of zero.
Speaker 2 [64:25]
of zero
Speaker 3 [64:32]
so
Speaker 1 [64:33]
What happens if x is very small and by this I mean very negative?
Speaker 3 [64:46]
so
Speaker 2 [64:59]
So now I have something minus something negative which is positive so I can write So it's something really really large so the 20 becomes completely unimportant at some point It's just going to be something really huge is going to be
Speaker 1 [65:22]
And I plotted it. Here we are.
Speaker 2 [65:29]
This is a zero
Speaker 1 [65:31]
And you're right. We were right. The closer we go, the more positive we get, the closer we get to zero. We never get to zero. And then the more negative we get, the more we go. And this is just zoomed in between minus 10 and minus 7.5. We have like this approach here. So we just did this ourselves in our mind.
Speaker 2 [65:51]
in our mind.
Speaker 1 [65:53]
What we aspire to do from the beginning Moving on let's do this one
Speaker 3 [66:05]
so
Speaker 1 [66:06]
We already did this bit, but now we add another division to this. So let's break off what we already know here. First of all, remember that for 5, this will be 1. So what does the whole function take for x equal to 5? One half.
Speaker 2 [66:40]
one half
Speaker 1 [66:41]
So we know that if X grows large this whole thing gets very very small So what happens to this one? Very close to one correct and now we know that if this gets very negative this thing gets huge so the whole thing Gets to zero cool
Speaker 4 [67:07]
Um
Speaker 1 [67:09]
Do I have a blog? Yeah, okay
Speaker 4 [67:10]
Ah, okay.
Speaker 1 [67:12]
Now what did I do instead of a 20 I have a 200 you know That's exactly that's exactly
Speaker 2 [67:31]
That's exactly the question you have to ask.
Speaker 1 [67:34]
you have to we have to ask ourselves so how does the 20 modify our our speed because everything else the shape is going to stay the same the 20 for large values and for small values
Speaker 2 [67:44]
doesn't change anything. Can everybody see this?
Speaker 1 [67:49]
People are nodding.
Speaker 4 [67:50]
Thank you.
Speaker 1 [67:51]
The 5 is the same, so where the function goes through 1 also doesn't change. The only thing that changes is the shape of it. If you plot both next to each other, this one is the 20 and this one is the 200.
Speaker 2 [68:08]
And if you... Homework?
Speaker 1 [68:11]
sit down and work through why the 20 is steeper than the 200 and now remember in the beginning we had on my slide I had this
Speaker 2 [68:24]
function
Speaker 1 [68:26]
It's the same thing except now the 5 is now the RA The X is now the RB and the N is now at the 200 or 20 is now the N So it's going to behave the same way. It's also like all of these are Logistics, so they all go between 0 and 1 which
Speaker 2 [68:41]
and one which are the logistic function which we use all the time
Speaker 1 [68:44]
all the time and they all go through zero sorry through one they all go if there is no no concert here then they all goes with you um and then depending on how the divisor here is they're going to be more or less sloped and then divided, depending on which value you put here, this is where we're going to, this here is going to shift. So now, so for 5, if this were 0, then it would be, for x equal to 0, it's going to be equal to 1, and so on. Yes? In the very top of the matrix, you need things that are equal to 0. You're right. is a mistake on the slides this would this should be f of rb and not
Speaker 2 [69:44]
rb and not f of x.
Speaker 1 [69:45]
This is completely my fault.
Speaker 4 [69:47]
Um
Speaker 3 [69:53]
So
Speaker 1 [69:54]
What's the difference between this one here and this one?
Speaker 2 [70:03]
The X is now in the divisor
Speaker 3 [70:06]
So
Speaker 2 [70:07]
to be immediately safe with users.
Speaker 1 [70:08]
with you this
Speaker 2 [70:13]
S cannot be zero. Thank you. Please, please, if you remember one thing from here, remember that...
Speaker 1 [70:18]
You see this and you scream, X cannot be zero.
Speaker 3 [70:22]
So
Speaker 1 [70:23]
I had a really good comment as well.
Speaker 2 [70:24]
as well. So here you said XS20 does something special.
Speaker 3 [70:31]
so
Speaker 2 [70:35]
If x is equal to 20, then we have 1 over 1 plus 10 divided by 20, which is 1, so it's 1 11th.
Speaker 1 [70:48]
So we know our function is going to go through 111. What happens if x gets very large?
Speaker 4 [71:00]
So,
Speaker 1 [71:01]
So 20 divided by something like
Speaker 2 [71:03]
divided by something large is going to be almost zero.
Speaker 1 [71:06]
So 10 to 0 is going to be 1.
Speaker 2 [71:08]
0 is going to be 1.
Speaker 1 [71:09]
so it's going to be half perfect and What happens if X is very negative? I did not remember that I put all this on the slide, but yes, it's also half We can add for this thing and This is where Matt where numpy Why fools you? Because it just rolls.
Speaker 2 [71:41]
A straight line here. There is no straight line. This function is not defined for zero, but...
Speaker 1 [71:46]
But numpy just goes here, whatever, and then matplotlib just also goes here.
Speaker 2 [71:49]
dot leap just also goes, yeah, okay, I'm just going to connect the dots.
Speaker 1 [71:53]
So be careful here. I had it have a
Speaker 2 [71:56]
fat pink warning
Speaker 1 [71:57]
you're dividing by zero but i also all the time have fat pink porn you're setting
Speaker 2 [72:01]
warning you're setting with copy or data frames so i just learn to ignore the pink warnings and then this happens yes if you scatter also if you if you
Speaker 1 [72:14]
If you cancel the line and just plot the dots.
Speaker 2 [72:15]
just plot the dots. Okay. Can we finish this? Can we move on? We only have 15 minutes left. So my first time teaching this ever, I ran a version with my colleagues, but I changed so much that there's no comparison between that one and this one.
Speaker 1 [72:37]
one but be grateful you're taking getting this one because the first time was even faster
Speaker 4 [72:41]
um
Speaker 1 [72:42]
Anyway, E.
Speaker 2 [72:43]
I want to talk about E because you see E and you're like.
Speaker 1 [72:46]
Like, wow, this is bold.
Speaker 2 [72:48]
probably has some very strange meaning it's everywhere it's people say it's so important or
Speaker 1 [72:53]
oh it does this and it does this and it does this and it does this and it does this and it's just a number it's a very cool number it has lots of properties if you do mathematics you do beautiful things but it also has a value it's a rational like pi but it's just 2.71 something something something so if you see e to the power of something it's
Speaker 2 [73:16]
It's just a constant so you can treat it as just like any constant at all Like just like you treat pie you don't see pie or maybe you do but you don't see pie and you think oh, yeah
Speaker 1 [73:26]
think, oh, yes.
Speaker 2 [73:27]
Pythagoras and geometry, you just see, okay, 3.14, oh, haha, pi day, and so on.
Speaker 1 [73:36]
You can do it either same way. So now we're getting to our logistic function, which is why before I made you do all these different variations of it.
Speaker 2 [73:46]
variations of it.
Speaker 1 [73:47]
So that now we can go back to it. So x0, normally if you see x minus x0, then x0 is just...
Speaker 2 [73:55]
x0 is just some starting point for value x that it has to have.
Speaker 1 [73:59]
and then we have some exponent here, and we have some else here.
Speaker 3 [74:04]
So
Speaker 1 [74:08]
Not the exact points, but.
Speaker 2 [74:08]
points but what shape does this function roughly make a motion with your hands yes everybody's showing me the logistic perfect
Speaker 1 [74:17]
Like all of these are going to have a logistic and all of these are going to go from 0 to 1 Except if I change L. I just multiplied the entire thing by of course
Speaker 2 [74:29]
thing by a constant and as we saw
Speaker 1 [74:30]
And as we saw, multiplication just grows the scale of our thing.
Speaker 2 [74:33]
scalable thing
Speaker 3 [74:34]
So
Speaker 1 [74:35]
Now it's going to go between 0 and 2. And then different values of k we saw before with our 22.
Speaker 2 [74:42]
or 20 to 100,
Speaker 1 [74:44]
I'm just going to change how slanted this thing is.
Speaker 3 [74:48]
so
Speaker 1 [74:49]
And finally, our x0 is just going to move where we go through 0. So here we were going through 0, now we set x0 to 2, so we're going to go here, to 0.5, so this point shifted. So this way you can understand what different factors, different constants in this function are doing and how they are affecting it.
Speaker 2 [75:11]
they're affecting it. Does this make sense?
Speaker 1 [75:17]
And so a lot of the time when we're tuning something when we're just trying to find a combination of these constant facts
Speaker 2 [75:21]
of these constant factors where we already have a function but we wanted we wanted to go through
Speaker 1 [75:24]
we wanted to go through this dot and this dot and this dot and then we tinker with the values
Speaker 2 [75:29]
with the values until they do.
Speaker 1 [75:34]
normal distribution, another friend, so I think everybody knows
Speaker 2 [75:38]
knows normal distribution looks something like this
Speaker 1 [75:43]
Gaussian, exactly, I heard somebody say that in the crowd, and then depending on the value of mu and of sigma, it's going to be moving around. Just to save time, we're not going to exercise through all this again, but just like this is the one I just drew, which is mu is equal to zero and sigma is equal to one, this is the most standard one we see, and then if I change the value of mu in here in this bracket, it's going to shift, literally, and then if I change the value of sigma, I can control how high and how low it gets.
Speaker 2 [76:16]
And you can go home.
Speaker 1 [76:17]
and you can do the same thing we did before where we were putting in different values.
Speaker 2 [76:20]
in different values for different parameters.
Speaker 1 [76:22]
you can work through it by yourself. So then we have the cumulative distribution function of normal distribution. So cumulative distribution function is just statistics probability theory definition where I say okay I
Speaker 2 [76:40]
I have the sum of all values up to here,
Speaker 1 [76:40]
have
Speaker 2 [76:42]
sum of all values up to here, sum of all values up to here, and so on. And I plot this.
Speaker 1 [76:49]
I think we had this on a slide before actually, we were looking at this, and we did the substitution before.
Speaker 2 [76:58]
Substitution before already as well altogether
Speaker 1 [77:01]
And so now we see them here.
Speaker 3 [77:05]
so
Speaker 1 [77:09]
It's just the cumulative distribution function of the normal distribution. So this is how the normal distribution and the logistic connect to each other. And again, because of time, I'm not going to do it step by step. But these guys and these guys are...
Speaker 2 [77:29]
basically the same thing.
Speaker 1 [77:31]
And I hope I gave you the tools to sit down by yourself and understand this.
Speaker 2 [77:36]
And it will take some time, but I'm sure you'll get there.
Speaker 4 [77:40]
Um
Speaker 1 [77:43]
I really want to try and get through the algorithm, because I think the algorithm is super important.
Speaker 2 [77:49]
The logarithm is the inverse of power. So the same that division is the inversion of product and subtraction is the inversion of addition.
Speaker 1 [77:57]
or the other way around, logarithm the inverse of power. So if I'm saying I want to have the logarithm of some kind of base, so for example here I have a logarithm of base 10 of 1,000, then I'm actually asking by what power do I have to take 10 to arrive at 1,000? And in this case the answer is 3. So 10 to the power of 3 is 1,000. We have different basses. Normally, we use bass 2, bass 10 and bass E.
Speaker 4 [78:30]
Thank you.
Speaker 2 [78:30]
because they're just the most common ones. So base two logarithm.
Speaker 1 [78:33]
logarithm is
Speaker 2 [78:39]
which is why we use it base 10 is just
Speaker 1 [78:41]
is just because we have to
Speaker 2 [78:42]
We have 10 fingers, so we count in the base 10. So 10 is just, oh, no.
Speaker 1 [78:46]
our favorite number and E is a natural logarithm which is why E is special
Speaker 4 [78:51]
and
Speaker 2 [78:52]
remember just positive real number so if I
Speaker 1 [78:54]
So if I have a logarithm to the base of E, it's abbreviated Ln for natural logarithm But it's still just asking to what power do I have to take 2.71 in order to get X? Why are logarithms important? Before we go there like actually let's do this exercise. So what's a logarithm base 2 of 8? Three, perfect. Everybody does computer science. What's 16? What's this one?
Speaker 2 [79:27]
Some numbers, perfect.
Speaker 1 [79:30]
is good enough, it's some constant number, right?
Speaker 4 [79:32]
there is
Speaker 1 [79:34]
The reason why we see a lot of logarithms in our life is because we have all these cool
Speaker 4 [79:37]
call
Speaker 1 [79:40]
rules of the cooperation so it simplifies a lot of our mathematics if we just go to logarithm of something i just took it from wikipedia credit
Speaker 3 [79:49]
So provide
Speaker 1 [79:50]
provided the base is not equal to one and all of these are positive we can apply a Lot of a lot of formulae that help us Do mathematics with logarithms so
Speaker 3 [80:02]
so
Speaker 1 [80:04]
this one, if I have a product of two numbers and I take a logarithm, then I can just split it into a sum. So our 243 that we had, we can split it into 927, which is a logarithm of 9 log of 27, so 3 times 3 is 9, so this is 2, and 3 times 3 times 3 is 27, so this is 3, and so it's 5.
Speaker 4 [80:29]
And
Speaker 2 [80:30]
This is why people before we had computers
Speaker 1 [80:34]
They calculated a lot with logarithms because
Speaker 2 [80:37]
Because instead of doing huge numbers, they just had lookup tables and then they used the lookup tables and they converted their products into sums.
Speaker 1 [80:46]
And how we use it nowadays is we have logarithmic scales a lot.
Speaker 2 [80:53]
and it's important to understand them because again we see them in
Speaker 1 [80:57]
many places. And one example is decibel. So decibel is a logarithm to the power of 10, and it's a relation between some value p1 and p2. And then you take it times
Speaker 2 [81:10]
Then we'll take a time stand by convention.
Speaker 3 [81:12]
So
Speaker 1 [81:14]
When do we have zero decibel?
Speaker 2 [81:20]
Yes, and p1 equals p2.
Speaker 1 [81:22]
then logarithm
Speaker 3 [81:24]
So
Speaker 2 [81:25]
10 to the power of 0 is 1.
Speaker 3 [81:27]
So
Speaker 1 [81:29]
That's when we have 0 dB. And then if p1 is 10 times bigger than p2, we get 10 dB.
Speaker 2 [81:42]
decibel so
Speaker 1 [81:43]
And then, in order to get to 20 decibel, because this is a logarithm, we're now going to have P1 being 100 times of P1.
Speaker 2 [81:52]
times of B2.
Speaker 1 [81:55]
I don't know what I was trying to do here so every time that our p1 becomes ten times more ten times more
Speaker 2 [82:04]
10 times more, 10 times more, 10 times more,
Speaker 1 [82:06]
decibel value only increases
Speaker 2 [82:07]
The value only increases by 10.
Speaker 1 [82:10]
And this lets us plot it like this. So see, we have 30 decibel, but P1 over P2 is actually 1,000. And this makes it easier to display things
Speaker 2 [82:28]
things that scale non-linearly. Another real-life example is pH. pH is also actually a decimal
Speaker 1 [82:29]
that scale.
Speaker 2 [82:35]
scale. So I know I've always been confused by decibel. I always have to sit down and rethink this. So maybe if
Speaker 1 [82:44]
if it's the same for you I hope this helps you now a little bit
Speaker 4 [82:47]
Yes.
Speaker 1 [82:48]
Yeah, so this example here is if P1 to P2 is 1000, then we have a logarithm to the base of 10 of 1000, which is 3 times 10, so we end up at 3, and then times 10 is going to be 30 decibel increase. So it's actually 1,000 times louder. And that's also why we use log-log plots a lot.
Speaker 2 [83:15]
a lot. So if you've ever wondered why are we using log-log plots?
Speaker 1 [83:19]
because if I have something some function which some power function then in a logarithm it just becomes a straight line and so it's easier to compare for example here's f of X f of X squared f of X times 3 if I were to plot them
Speaker 4 [83:37]
Um
Speaker 2 [83:40]
In a normal scale, I would have f of x, f of x squared, and f of x of 10. It would just grow so fast that this one would just disappear.
Speaker 1 [83:53]
And that's, but in a log plot, I can actually
Speaker 2 [83:55]
I can actually see what's going on much better.
Speaker 1 [84:04]
Yeah, we have time. I think we still have time for this one. And then, unfortunately.
Speaker 2 [84:06]
Unfortunately, we didn't get...
Speaker 1 [84:07]
didn't get through everything i wanted but uh i think shannon entropy is super cool yes five minutes yes five minutes that's why
Speaker 4 [84:17]
Um, at the,
Speaker 2 [84:18]
I guess this workshop was a two-parter.
Speaker 4 [84:21]
Um, so.
Speaker 3 [84:22]
So
Speaker 1 [84:23]
Share an entropy of a random variable. I think this is super cool.
Speaker 2 [84:25]
That's a super cool thing.
Speaker 1 [84:26]
thing and it has a logarithm so first of all it's a probability so P is a probability and E is an event
Speaker 3 [84:34]
so
Speaker 1 [84:35]
call it a surprisal, which is how surprising in the event that probability P actually happens.
Speaker 2 [84:42]
Extreme case, a certain event has probability of 1.
Speaker 3 [84:46]
so
Speaker 1 [84:47]
Logarithms of one is zero is
Speaker 2 [84:49]
zero surprising.
Speaker 1 [84:53]
And then the smaller this value here becomes,
Speaker 2 [84:57]
the more surprising is actually happen so if it's like zero
Speaker 1 [85:00]
0.000 something then this is going to be huge we're going up here
Speaker 2 [85:05]
And then it's super surprising that the event happened.
Speaker 1 [85:09]
And we call this information in a surprisal.
Speaker 3 [85:14]
So
Speaker 1 [85:17]
and this is the same thing where the only difference is that here there's no base and here there's a base of 2. The base is completely irrelevant for this because we're only interested in the behavior of the logarithm. So what changed between the two expressions is yes, I added a base and I rewrote The one over something as a negative. I'm not gonna explain it now because of time
Speaker 4 [85:42]
Um
Speaker 1 [85:49]
what we actually looking at as we expected information from random trial, so we have events with the probability and We get some kind of information the information is given by this Expression so two examples are coin toss we have
Speaker 2 [86:04]
pointers. We have a coin.
Speaker 1 [86:05]
a coin, probability is 0.5.
Speaker 2 [86:06]
0.5 to the test will be the
Speaker 1 [86:07]
test will be the 0.5 tails and so the information of this one is going to be the sum of logarithm 0.5
Speaker 3 [86:18]
So this
Speaker 1 [86:21]
And then if you have a DITOS, and we have...
Speaker 2 [86:25]
and we have six different events. So it's six times one sixth, so the chance of each one event is much smaller, so the information we get is going to be larger.
Speaker 1 [86:35]
Because we are approaching this here.
Speaker 2 [86:38]
Some people are still not young.
Speaker 1 [86:40]
I'm really happy that somebody's following.
Speaker 4 [86:42]
Thank you.
Speaker 1 [86:43]
And so the Schellen entropy
Speaker 3 [86:45]
Is that
Speaker 1 [86:46]
just the sum over probabilities of all my events that can happen times the logarithm so that times the information that they give
Speaker 2 [86:55]
that they give us.
Speaker 1 [86:56]
the event and let's do an example to understand it so let's say we have a fair coin then we have two principal events each have probability of 0.5 so I have a sum over two events of 0.5 and we just can calculate this is going to come out to one so there is not so
Speaker 2 [87:18]
There's not much information coming from it.
Speaker 1 [87:21]
But if I have an unfair coin, so probability of heads is going to be 0.7, probability of tails is going to be 0.3. And again, I'm going to calculate, put it into this formula. I'm going to end up with a value that's smaller than 1.
Speaker 2 [87:34]
because there is a much higher information in this coin toss.
Speaker 1 [87:38]
because the probability of ending up with heads is...
Speaker 2 [87:40]
with heads is so much higher than mobility and up with tails that I know
Speaker 1 [87:43]
I know more about this coin by
Speaker 2 [87:44]
this coin by tossing it over and over again.
Speaker 1 [87:47]
And this is how people begin to crack code.
Speaker 2 [87:51]
because now they get information from the binary.
Speaker 1 [87:55]
the probability of how likely the binary is to
Speaker 2 [87:57]
binary is to express something or not express something.
Speaker 1 [88:01]
And, uh...
Speaker 2 [88:03]
We end up with this thing, which is also information theory.
Speaker 1 [88:06]
And unfortunately, I'm so sorry, I was going to do a lot more.
Speaker 2 [88:13]
I still hope this was helpful for everyone. I got across my two most important messages. I really wanted to talk about logarithms because I think they're difficult and important.
Speaker 1 [88:21]
difficult and important.
Speaker 2 [88:22]
and I really wanted to talk about the logistic and I want to give you an understanding of how
Speaker 1 [88:26]
how logistics are
Speaker 2 [88:27]
Logistics are super easy if you just touch them.
Speaker 1 [88:30]
at looking to them.
Speaker 2 [88:32]
and then now if you go
Speaker 1 [88:33]
Now if you go back to your data science.
Speaker 2 [88:35]
Data Science Bootcamp.
Speaker 1 [88:35]
boot camp or whatever got you into data science and
Speaker 2 [88:39]
You look at your activation functions, you will hopefully understand why they are the way they are.
Speaker 1 [88:42]
the way they are.
Speaker 2 [88:43]
and you will read this and you will have a much better understanding of what you're actually doing.
Speaker 1 [88:48]
And then from this, if you just go back to the slides, I'm sorry, I didn't do this. Where is the... If you just... Sorry. Yeah, here. If you just stick to this, and if you just teach yourself to always do this...
Speaker 2 [89:06]
and more and more comfortable until at some point you're just...
Speaker 1 [89:09]
Be like, okay. Ah, yeah, this probably like this
Speaker 2 [89:11]
probably like this oh yeah okay okay fine whatever I have an idea how it looks
Speaker 5 [89:17]
Thank you so much I think it's bold and courageous to even come up with a workshop like this to start with but of course with practice I think as her message practicing this every day will make us better in understanding. Just one question from my end. Do you have any recommendations from for for all of them like to follow any sort of tutorials or anything that helped you understand math better even for the beginners level like any youtube videos or channels that you specifically would like to recommend
Speaker 2 [90:04]
That's a great question. Unfortunately, no, I don't.
Speaker 1 [90:08]
because I didn't have to do it.
Speaker 2 [90:11]
For obvious reasons, I had to do it in school.
Speaker 4 [90:13]
Um,
Speaker 2 [90:14]
So when I said I want to learn real mathematics what I did is I got the homework for mathematics for analysis one for mathematicians and I just works to it myself and I think you could do the same thing, but just maybe with engineering. So if you take analysis one for engineers
Speaker 1 [90:31]
then this will give you all of this and more.
Speaker 2 [90:34]
And you just have to, but you have to work through it.
Speaker 1 [90:36]
work through it. So if mathematics
Speaker 2 [90:36]
In mathematics, you have to sit down, you have to exercise, you have to solve the equations.
Speaker 1 [90:44]
you get
Speaker 2 [90:45]
comfortable with it so just get any university coursework and just work yourself through it and that will give you that
Speaker 5 [90:52]
Okay. If I have your permission, may I recommend one channel that I really- Of course. So something that really helped me to understand math better, there is this channel called Three Blues, One Brown by Grant Sanderson, and he's amazing at explaining how it happens visually. Also, Darina helped us to look and start thinking in terms of plots which is intuitive and at least helps you think what the function is doing, and it's a great start. So, I saw one hand raised, so we'll take that as a last question for this round.
Speaker 2 [91:28]
I also have a question. Does anybody else have recommendations for channels, books, et cetera?
Speaker 5 [91:34]
Oh, great. So, yeah, please, I'll just go one by one. First, let's go to the question.
Speaker 7 [91:47]
My question is rather simple.
Speaker 1 [91:49]
rather simple wills.
Speaker 7 [91:49]
Will the slides be shared and where?
Speaker 2 [91:51]
I will share those slides.
Speaker 7 [91:53]
And where?
Speaker 2 [91:54]
Disco.
Speaker 5 [91:54]
It is good.
Speaker 7 [91:57]
Okay. Okay, thanks. And was there another one? No.
Speaker 2 [92:02]
So we're asking for recommendations.
Speaker 7 [92:09]
so I'm a physicist and I think it was a 2016 there was very popular blog post by a physics professor on how to learn physics and she went very deeply into the field because usually yeah we learn physics like in school but when we grew up so over well we are not motivated by the marks and she wrote very extensively on the resources the name of the person is uh susan rigetti yeah i will write it down there but the thing is that after this successive blog post on physics she wrote the same on mathematics and the list is actually huge because if you well yeah it's not only enough to just go maybe through through the equations, because probably that's what we learned today. It's real, real-life problems. And sometimes we need some motivation, well, to study math in the first place, not just in the sake of solving the equation, but in the sake of understanding maybe something bigger. And for that, I really recommend this Susan blog. I think it's very undervalued. But yeah, you can Google, basically, Susan Rigetti. And I'm writing it down now. It's S-U-S, Susan Rigetti. And the blog is So You Want to Study Mathematics. So find it on your website, and you'll get a huge list of the recommendations of the learning paths on the popular books, on the mathematical books, et cetera. So I think you'll find your personal website.
Speaker 2 [93:56]
Awesome, thank you. Now I wish I had Googled so I could have used it. Any other recommendations?
Speaker 5 [94:05]
We'll take due to time restrictions. I have to follow strictly. I have to stick to time. So we'll take one-
Speaker 1 [94:13]
We'll take one more recommendation. Everyone who does recommendations, when you leave in just...
Speaker 2 [94:16]
When you leave and just write it on this, I will put everything on the slides and then I will share the slides with the recommendations.
Speaker 1 [94:20]
with the recommendations let's do it like this
Speaker 5 [94:22]
Great. That would be also great. Or put it on Discord channel. That would be also helpful. Thank you, everyone.