# Aprendizado de Máquina Computacional (2026/1) - A1: Introdução

https://www.youtube.com/watch?v=hCRqbf3OKiM
Translation: pt-BR

[00:00] Okay? Hey, say goodnight everyone, right?

[00:02] My name is Lucas Ferreira, I am

[00:04] professor here in the Department of

[00:06] Science and Computing at DCC, FMG, and myself.

[00:09] Okay, I'm going to minister here with you all.

[00:11] this learning discipline of

[00:12] computational supervised machine.

[00:15] And the idea of ​​today's lesson is to introduce,

[00:18] So, what is learning?

[00:20] supervised and also already see a

[00:22] first algorithm, uh, both for

[00:25] classification and regression, for us already

[00:27] Let's get started, right?

[00:31] to get down to business as quickly as possible

[00:33] possible. Yeah, and throughout the course,

[00:35] Obviously, we will iterate on

[00:37] Several types of techniques, okay? Oh, so much.

[00:41] And we're going to talk so much about issues.

[00:42] Both theoretical and practical, okay?

[00:45] Eh,

[00:47] the,

[00:49] So, first of all, just introduce

[00:51] A little bit here, right, about the team that will be playing.

[00:54] With you guys, right? We're a team.

[00:55] Small, yes, but well-qualified, okay? the

[00:59] [clearing throat]

[01:00] I am, you know, the main professor of

[01:02] discipline and Igor is with me, okay,

[01:04] Varejão, which he currently is

[01:06] Master's student here in computer science.

[01:08] of our program

[01:11] [clearing throat] It's from computing.

[01:13] This is from FMG. And here's his email address,

[01:16] Okay? Yeah, it's linked on Moodle too.

[01:20] But I've already left it here to make it easier.

[01:22] in case you are studying the material

[01:25] [clearing throat] and want to send

[01:26] Some message in the same format. It's here.

[01:28] My information, okay? Uh, just saying

[01:30] Just a little more about me, okay? Uh, I

[01:33] I completed my doctorate in computer science.

[01:35] also at the University of California in

[01:36] Holy Cross. Uh, I spent some time in

[01:39] Canada, then doing postdocs there.

[01:41] University of Alberta. And I work

[01:44] We've been around for quite a while now with AI, right? there

[01:48] perhaps

[01:50] 2013, when I started my master's degree. Then

[01:52] That's more than, you know, almost 10, almost.

[01:55] 15 years, actually.

[01:57] Eh, eh,

[02:00] So, my idea here is...

[02:02] Sharing with you is all I...

[02:04] I learned it then. I hope that

[02:07] in the gentlest way possible. My email is

[02:09] This one, okay? I prefer communication through

[02:13] this email and my personal page is

[02:15] Here, okay? if you want to know one

[02:17] a little more about my topics of

[02:19] research and recent works

[02:22] Published, the students I mentor,

[02:24] Well, you know? My life is academic, okay?

[02:27] All summarized here on my website. That's all.

[02:31] So, to give you an idea, right? I

[02:34] I work primarily with IAV. That

[02:37] It might seem a bit cliché nowadays, but...

[02:39] which in one way or another seems

[02:41] that everyone works using today.

[02:44] But I've been developing venous models for a while now.

[02:47] Quite a long time, right? My doctorate

[02:50] It was specifically in the musical generation,

[02:52] Okay? Using generative models.

[02:55] Well, things have progressed absurdly.

[02:57] Since then, okay? But at that time the

[03:00] People were still working with data.

[03:02] symbolic or given, you know, like

[03:03] sheet music or mi, right, today we already

[03:05] can generate music in the format of

[03:07] audio and, finally. So, this area progressed.

[03:10] very. I think some of you have already...

[03:12] They must have been playing around with these recent ones.

[03:14] music generators

[03:16] That's about right, okay? Eh,

[03:20] Actually, feel free to contact me.

[03:21] Stop, okay, guys? I can do it.

[03:23] Look at the chat here, but since it's quite...

[03:25] Something to monitor, feel free.

[03:27] To interrupt, okay? Yeah, and do

[03:30] Any questions?

[03:33] Well, I generally like to listen.

[03:38] Each one of you, okay? But I don't know if

[03:41] There will be time.

[03:44] Uh, we are, we are 23 people.

[03:46] Here, okay?

[03:48] Well, if everyone takes their time,

[03:50] if each one of us takes 30 seconds to

[03:52] If you introduce yourself, we'll take what you need.

[03:54] If it were 20, right, 20 minutes, maybe it's about

[03:56] You have 10 minutes to introduce yourself. Eh,

[04:01] I think there's still time, okay? We are not

[04:03] There were so many, I thought there would be more people.

[04:05] So, uh, I wanted to hear from you guys.

[04:07] Quickly, just the name like that, uh, if

[04:09] Therefore, you are free to open.

[04:11] The camera, therefore, is a good way to...

[04:13] to get to know you better, since we're

[04:14] distant. Make yourself at home, it's not...

[04:16] mandatory, but if you want I think

[04:18] It's possible, right? You can open the

[04:20] Camera, say your names, right? And me

[04:22] I mainly wanted to hear, you know, one more

[04:24] Just a little more about your background,

[04:26] right? I wanted to know a little more about

[04:28] experience in programming and science

[04:30] data. I know some of you already have

[04:32] some experience, some I imagine that

[04:33] So far so good, a good experience, maybe.

[04:36] They may already be working in the field, but I wanted

[04:38] to understand this a little more, even to

[04:39] achieving this means customizing the course better.

[04:42] For you guys, okay? Eh, e assim, aqui eu

[04:48] very much, but if you have programming in

[04:49] Python is even better, okay? Eh, e eu queria

[04:54] You guys here in graduate school, right? Then,

[05:01] There are currently 22 of us here.

[05:04] So, uh, if you can, you know, there's no

[05:07] a specific order, but whoever can...

[05:09] By introducing it, I would appreciate it.

[05:12] So, uh, let's go, putting it here now,

[05:15] right, our, uh, our border here,

[05:19] Right, our horizon, sorry.

[05:22] I organized this course in the following way.

[05:24] Cool, right? We have four weeks.

[05:26] So here are the dates for

[05:28] classes. Well, it's already worth highlighting.

[05:31] which, you know, we have here every week.

[05:33] We have classes on Wednesdays and Saturdays.

[05:35] as you're already used to.

[05:37] Uh, I split the course.

[05:41] in

[05:43] main techniques

[05:46] and machine learning, right,

[05:47] Machine learning. These are the

[05:49] main algorithms, right?

[05:52] of the area. And when we talk

[05:55] From each of them, we will have

[05:56] Different theoretical foundations, okay?

[05:58] Some of them are more grounded in

[06:00] peak, some of them are more

[06:02] based on

[06:04] Probability theory, okay? eh or

[06:07] including information theory, like

[06:10] This is the case with decision trees. Then

[06:12] You'll see that this is what's cool,

[06:14] Well, talking about these techniques is what everyone...

[06:16] They involve different algorithms.

[06:18] different premises and often

[06:19] different theoretical bases, despite

[06:21] You, right, solving a problem many

[06:23] Sometimes the same type of problem, right?

[06:25] theoretical foundation is somewhat

[06:26] different. So, at the beginning of each

[06:29] class, I'll try to review the following here.

[06:33] [clearing throat] theoretical basis

[06:34] most important things so that we too

[06:36] manage to level out understanding in

[06:40] some measure, at least, since some

[06:41] you guys have more, uh, uh, you've already seen, right?

[06:46] They have already taken science courses.

[06:47] exact sciences or engineering, right? In other words, already

[06:49] They are more familiar with this mathematical basis.

[06:51] strongly. Some of you may not.

[06:54] So I'm going to do this exercise of

[06:55] review, which I think is always

[06:57] Positive for everyone, okay? Well, the

[07:00] So, let's start today with these

[07:01] basic fundamentals and we'll see them soon.

[07:04] A pretty simple algorithm, right? Eh,

[07:06] which many of you have probably already experienced.

[07:08] Get to know them, or if you don't already, you will.

[07:10] intuitively, and I'll explain it in a moment.

[07:12] why, what is KN, what is K near

[07:14] neighbors, K near neighbors, right? They are

[07:16] K nearest neighbors. And then the

[07:19] People are going to talk about the fundamentals and then...

[07:20] to see an algorithm today, both for

[07:22] classification and regression, which already tells us

[07:25] Leave it like that from day one.

[07:26] Here, things are going very well, with plenty of action.

[07:30] like this. Then on Saturday it's at the place itself.

[07:32] calendar that I received, you know, from

[07:34] coordination, we have the holiday

[07:35] tomorrow, so there won't be class then.

[07:37] Saturday. Yeah, and then next week...

[07:42] We'll be back on Wednesday the 10th, I'll be there.

[07:44] Let's talk about linear regression, okay? methods

[07:46] even the most basic ones, but very

[07:48] Important even for understanding networks

[07:52] neural, including, a basis a basis

[07:54] quite important

[07:56] which is probably true for many of you as well.

[07:58] They've even seen it sometimes in other places.

[07:59] In statistical contexts, it is very common,

[08:00] right, you use linear regression for

[08:02] correlating variables and everything else. Eh,

[08:05] well, then next we'll do this, this

[08:07] Next week's class starts with

[08:09] regression models, then we'll...

[08:10] We'll talk about qualifying on Saturday, okay? AND

[08:12] then we'll see linear models of

[08:14] Classification, right? Percepttron and the

[08:16] Logistic regression, okay? There are two

[08:18] fairly simple models, both

[08:19] parametric methods here, as well as regression.

[08:21] linear, right? Hey, don't worry too much.

[08:25] With what I'm saying now, okay,

[08:26] people? I just want to focus on the

[08:27] Organization here. Well, anyway, so the

[08:30] People start here. Today we're going

[08:33] talk a little about regression and

[08:34] classification. Next week we

[08:36] the talk of linear regression in which for

[08:38] for regression problems in the fourth

[08:40] classification is with perceiver and

[08:43] logistic regression, which are two

[08:43] different algorithms, but very

[08:45] They're similar, right? Eh, pelo menos tem uma

[08:47] similar base. Yeah, then in the third week

[08:50] We'll continue with the classification, okay? Eh,

[08:55] Speaking of base ships, which is an algorithm.

[08:56] with a more probabilistic basis, right?

[08:59] Ah, and then decision trees, which are...

[09:05] regression, uh, based on uh the theory of

[09:08] That's information, okay? Eh, e que tem uma uma

[09:15] in relation to others. O e são modelos já

[09:19] Non-linear, okay? Eh,

[09:24] When we talk about more advanced models, let's...

[09:26] To put it that way, in the last week, networks

[09:32] right, which are the whole basis of deep

[09:33] learning. E SVM vai ser um modelo um

[09:44] linear. E aí já de cara vocês

[09:47] conseguem ver aqui, tá? Two columns

[09:50] Here, uh, I'll say in a moment that these are the ones.

[09:55] a schedule of practical tasks is already in place.

[09:58] predefined. So, we, me, I

[10:00] I planned three practical exercises for

[10:01] This subject, okay? Yeah, but I'm already from here.

[10:04] I'll talk about evaluation in a moment.

[10:07] you. Ah, my idea is that they

[10:10] have here approximately two

[10:12] weeks in duration so that you

[10:14] allow yourself a reasonable amount of time to achieve

[10:15] I can do it, but I'll talk a little more about it later.

[10:17] From each of them, okay?

[10:19] Eh,

[10:21] Well, uh, the classes, as I said, are

[10:23] Wednesdays and Saturdays. The schedules are

[10:24] Here, right? We'll meet on Wednesdays.

[10:26] From 7 pm to 10 pm. On Saturday we

[10:28] It's from 9 AM to 12 PM, okay? Yeah, there in

[10:32] Saturday afternoon there is a

[10:34] Tutoring with Igor, uh, from 1:30 PM to

[10:37] 4:30 PM, okay? OK? So, if these

[10:40] The schedules didn't make much sense, okay?

[10:42] Guys, stop it, let me know.

[10:44] That's what I'm trying to accommodate, it's not so...

[10:47] It's easy to change these times, but if in case

[10:49] A large majority of the class says: "No,

[10:51] "This is unfeasible and all that," uh,

[10:53] I can adjust those times, okay? Eh,

[10:55] The Zoom link is the same for everyone.

[10:58] meetings, including mentoring sessions, okay?

[11:00] Yeah, I'm going to record all the classes, the

[11:04] tutoring sessions, I don't know if Igor will go.

[11:06] record, but if you want, he can

[11:07] to record. Well, for those who can't...

[11:09] participate, sometimes you want to watch

[11:11] Something, see if you have any questions.

[11:12] over there and so on. Well, in case, right, no.

[11:17] need to, don't have the time there for

[11:19] Attend all classes, right, in full?

[11:21] You can come back later and watch it.

[11:23] material.

[11:25] Well, about the readings that I

[11:27] I commented, I'm using this textbook.

[11:29] Luiz Serrano here as a reference,

[11:32] Okay? It's a book like that, it's a

[11:34] The book is very high-level; it explains the...

[11:37] techniques, including in the order that I

[11:40] I specified it there, it's the order of

[11:41] own textbook. It's very easy to

[11:44] Read, with plenty of examples. He uses it very little.

[11:46] mathematical language, therefore, he tries

[11:49] relying too much on intuition,

[11:51] Okay, about the techniques. So, I think he

[11:54] It's a book, but... it would be more...

[11:57] coherent here for a more group

[11:59] varied. Well, the readings aren't

[12:01] They're mandatory, guys, okay? Yeah, especially because

[12:04] The book is not available. Yeah, he's a

[12:06] book whose value I don't know.

[12:08] of him, but like that, it's not a book.

[12:10] open. AND

[12:13] But anyway, I followed the classes and the...

[12:15] All ideas based on this book.

[12:18] Well, of course I bring a lot of things from...

[12:20] my own experience or that of others

[12:21] materials. So, when you have

[12:22] Something else specific that I think

[12:24] I hope it's cool for you to see, I will.

[12:25] to point at you, uh, at whoever has

[12:27] Interested, okay? In general, the readings here are...

[12:29] There will be one lesson for each chapter, in

[12:32] Today's special class, I think it will be...

[12:34] to involve two chapters of the book there, but

[12:36] But in general, each lesson is a chapter.

[12:38] from that book.

[12:41] Eh,

[12:43] Well, regarding reviews, then, how do I

[12:45] I said, we're going to have three jobs.

[12:46] Practical or TPs. Uh, the first one will be

[12:49] Regarding that, it will be a KNN implementation.

[12:50] that's what we're going to talk about today. Uh, a

[12:52] The second is an implementation of regression.

[12:54] linear and the third will be a TP of

[12:57] neural networks. Each one works dealing

[12:59] with a different learning problem

[13:00] so you have a different repertoire

[13:02] of different datasets and data types

[13:05] And also, each one has a technique, huh?

[13:08] Different, right? Ideally, then, I

[13:11] I am particularly very...

[13:14] in favor of implementation and such for

[13:16] I understand the techniques, but unfortunately

[13:18] We don't have time to implement them all.

[13:20] So I chose these three that I think

[13:22] que são bem representativas. Eh, and the

[13:26] The idea here, folks, is for us to get involved.

[13:28] In the very mass, try to build these

[13:29] algorithms in the most zero, between

[13:32] quotation marks, possible. I'm going to talk about that.

[13:34] for you it's a little more for

[13:38] Right in front, okay? We'll start with TP1,

[13:43] Initially, next week. Eh,

[13:45] Maybe I'll anticipate it a little bit already.

[13:46] depending on the

[13:49] The result that gives today's lesson, okay? But

[13:51] The implementations are all in

[13:53] Python, okay? Com a biblioteca no pai,

[13:55] as it says here. And we're going

[13:57] involve both classification methods

[13:58] How much regression. Uh, here in these

[14:02] work, the idea is really

[14:03] implementar as técnicas, sabe? Yeah, without

[14:06] use student libraries, type S

[14:08] Escalan ou ou outras. The idea is

[14:11] truly understanding the algorithm

[14:12] implementing it. Well, here I offer,

[14:14] Well, I offer all these jobs...

[14:16] base code, so you don't start from

[14:18] Zero, uh, they're going to be done via Google.

[14:21] Collab. And then you have cells there,

[14:24] you'll even have cells that...

[14:25] instruções bem definidas e tudo mais. AND

[14:28] Then you can follow it step by step.

[14:36] The script is well-guided like that, it guides.

[14:44] A dozen instructions, it's a pretty good script.

[14:47] Okay, step by step, right? And that's it.

[14:50] This includes help with monitoring, because if

[14:51] you guys are having trouble there in a

[14:53] part, right, the monitor manages to do that.

[14:55] part of helping you specifically. He is

[14:57] very clear, very easy to attack

[15:00] doubt.

[15:02] And then at the end of the course we

[15:04] There's a quiz, okay? What is a questionnaire?

[15:06] I'm not even going to call it a test, okay? Why

[15:08] So, the questionnaire hasn't changed, but

[15:09] so that you can have a verification

[15:11] theoretical as well as your understanding,

[15:13] Okay? So, we're going to have, I'm going to

[15:15] administering a questionnaire, which is, you know,

[15:16] It would be a multiple-choice test. Eh,

[15:20] And there I even leave more than

[15:22] an attempt,

[15:24] Right, so you can learn, including...

[15:27] Yeah, with your mistakes, like that, common,

[15:30] We'll try it, right?

[15:33] Sometimes an issue isn't so clear,

[15:34] You come back, you understand what you did wrong, okay?

[15:36] So, the goal here is for you to...

[15:39] Motivate her to really try, right, the best way possible.

[15:42] possible way and

[15:45] And then try to understand, you know, to have to

[15:48] I also want to give you an idea,

[15:49] right,

[15:51] Yeah, folks from the theoretical evolution of each

[15:53] One here, okay? So, I think we're going to

[15:55] to have good coverage, both practical

[15:56] both theoretical and theoretical, in order to be able to do these

[15:58] reviews.

[16:01] [clearing throat]

[16:02] Well, uh, about the organization of

[16:04] Discipline, that was it. I just wanted to highlight this.

[16:06] Here in the world, right, we have it, where is it?

[16:09] Here, then?

[16:11] You can speak, Daniel.

[16:15] That. It's just a question we have.

[16:17] It will not use the highest-level libraries.

[16:20] level. When implementing agreements

[16:22] neural, we're going to have to do the

[16:25] differentiation

[16:26] automatic in hand or

[16:28] no?

[16:29] That's a good question. Hey, just leave it here.

[16:32] name of

[16:35] Yeah, no. So, there I go, we go

[16:38] Understand gradient descent, okay? THE

[16:39] people will understand the part that is about

[16:42] which derivatives are important, of what

[16:44] That's what they're doing, okay? Yeah, but I

[16:47] I'll provide the gradient calculation shortly.

[16:49] For you. So, for those who don't

[16:50] Whether you want to take matters into your own hands or not

[16:52] If you are interested, I will explain it to you.

[16:55] intuition, right, about derivatives and why...

[16:57] They are indeed used. Eh, eh, what

[17:00] They're responding over there, right?

[17:02] It's practical when we're using it, right?

[17:04] derivatives to calculate the

[17:05] gradients. But I'll get to that part in a moment.

[17:08] specific to the work already offered, okay?

[17:10] Yeah, [snoring] so you don't need to

[17:13] Don't worry like that, for those who want to understand.

[17:15] that's why those expressions are the

[17:17] derivatives, feel free to use them. I

[17:19] I even have some material that explains it.

[17:20] Yes, but those who don't want to can also opt out.

[17:22] simply abstracting that it is a

[17:23] gradient already calculated by someone in

[17:25] Okay, hand?

[17:27] Perfect. Thanks.

[17:29] The best part is seeing it like this, it's fun to do.

[17:31] That's it, that's how to implement things in

[17:34] hand, even if you don't derive it as

[17:37] equations, that's what you ultimately, in the end

[17:40] There's no magic to math, right? THE

[17:42] A derivative is a mathematical expression that

[17:44] You derive from an error function. Then

[17:46] just seeing that there maybe

[17:47] Demystify what a gradient is.

[17:49] Descendant, you know? Even if you don't

[17:51] have calculated the derivative by hand, that

[17:52] I think just seeing that already gives you a...

[17:54] demystified in the process as a whole,

[17:56] he knows? Well, my idea is a

[17:59] perfect.

[18:01] Well, uh, I started filling out the

[18:03] Moodle, I don't know if everyone has it.

[18:04] Access, but that's how it was supposed to be, right? I

[18:07] I'll see how it shows up for you.

[18:22] Okay, no, everything should be OK, right?

[18:24] So you should view it here.

[18:27] o mudo dessa forma, tá? Here I go

[18:29] Keep the whole schedule here, okay? That

[18:31] Here's a copy of what's in the slides.

[18:33] The links to the readings will appear.

[18:35] in this column. The links to the TPs will

[18:37] show up here as soon as they are.

[18:38] available. Go on, this text

[18:40] It will be clickable. Yeah, the readings too.

[18:43] There will be links and the slides will appear.

[18:45] Here are the videos too, okay? Then

[18:47] There will be a small slide button, a

[18:48] The little button here is a video for each lesson.

[18:50] If you have anything, code, anything

[18:52] The supplementary material will also be linked.

[18:53] Here in class, okay? So, throughout the

[18:55] course, this table here will be

[18:57] populated with links so you have everything

[19:00] the material here in a more eh view

[19:04] That's the broader perspective, okay? Yes, and if something

[19:07] The change will occur here in the schedule.

[19:08] This will also be reflected here.

[19:10] Okay, let's do a little table, right? The reviews are all there.

[19:12] here. The link to the book is here.

[19:14] Okay, that includes... If you click

[19:16] Here, you'll find the link to it. Uh, I

[19:18] I think you can even visualize it.

[19:20] Here, uh, partially. I think that's it.

[19:25] Manning has an account here.

[19:28] Free. If you want, uh,

[19:32] If you want to read the book online, that's fine. AND

[19:34] Here, look. I think you can do a

[19:36] free account for a few days and then he'll tell you

[19:39] You can read the book here, okay?

[19:41] Eh,

[19:44] the

[19:45] The book summary is here, okay? He's

[19:48] in this digital format, but look, we

[19:50] Okay, today we're going to talk about chapters one and

[19:52] Two, okay? Which is defining what is

[19:54] machine learning, talk about the types of

[19:55] machine learning, these two chapters

[19:57] Here, okay? Yeah, then after that, you know, we'll...

[20:00] For linear regression, okay? Eh,

[20:05] and then talk about classification with

[20:07] receptor in logistic regression. here,

[20:09] Oh, chapters 5 and 6 and so on, okay?

[20:12] Okay, let's talk about knife base, right? Hey, trees

[20:16] decision

[20:18] And then there are neural networks, SVM. And this chapter

[20:21] 12 from Ensemble will be in class.

[20:23] along with the tree, the classes, the class

[20:26] nine here in class, no, the class that the

[20:28] People talk about tree decisions, I'll talk about...

[20:29] of ensemble, which is this uh set of

[20:32] classifiers, when we mix

[20:34] more than one classifier to solve

[20:35] That's a problem, right? Or it matches, right?

[20:37] true.

[20:39] And that's it. So, we're going to cover a

[20:41] Almost the entire book is like that, of course.

[20:43] that some other detail might remain.

[20:44] Outside, but we'll just stop by.

[20:46] general information about this material. For those who don't

[20:48] For those who don't know Luiz, you can figure it out.

[20:50] Serrano is very famous on the internet, okay?

[20:53] He has a super popular channel on

[20:56] YouTube, okay? Uh, in terms of education, maybe one.

[20:59] one of the biggest educational channels is

[21:01] Machine learning today, along with

[21:04] Status Quest, right, Tree Blue and Brown.

[21:06] These are all very famous channels of,

[21:09] eh, teaching machine learning, deep

[21:12] learning. He has very good classes all the time.

[21:14] Very visual and very high level.

[21:17] So it's good, excellent material.

[21:19] introductory, because it covers a lot

[21:21] intuition, try to avoid the "eh as" a little.

[21:25] mathematical expressions and everything else for

[21:26] so that you understand this in a more...

[21:28] Intuitive, right? Oh, of course.

[21:30] Eventually, this may be superficial.

[21:32] too much, so you need one of a kind.

[21:34] I'm going further. So, uh, in my, in my

[21:37] discipline, I will try to do a

[21:39] A mix of that, okay? So, I'm going to

[21:40] I'll try to convey the intuition to you.

[21:42] as much as possible, but we won't.

[21:45] If we only stay at the high level, we will

[21:47] to get down to business, then I will

[21:48] need to go into more definitions

[21:49] formal, more mathematical and then of course

[21:53] I'm here to help whoever needs it.

[21:54] more difficulty.

[21:56] Yes, and even those who think that we are

[21:59] with a formalization or perhaps think that

[22:01] If the base is too simple, I

[22:02] I can also supply materials.

[22:04] advanced for anyone who wants it is a

[22:06] a slightly greater advancement in the content,

[22:10] Okay? So let's start with, first of all,

[22:11] Does anyone have a question besides this one?

[22:14] of neural networks?

[22:21] Okay. Okay. Then,

[22:24] Hey, Marco Arel, is it just a question or is it just a...

[22:25] Really?

[22:28] I'll assume it's just a thumbs up.

[22:29] No, it's OK, no problem.

[22:30] Thanks. Yeah, okay. So, let's go. Eh,

[22:34] Today we're going to talk about the objective.

[22:37] main supervised learning program,

[22:39] because it is

[22:42] We study learning.

[22:43] supervised, what is the objective?

[22:44] here and so, in general, you know, what the

[22:48] People are doing it with learning.

[22:49] prisoner and machine learning as

[22:51] It's all about learning functions. Yeah, and I'm going now.

[22:54] Let me tell you a little more about that. THE

[22:57] then right after this objectification, I will

[23:00] To discuss formalization and fundamentals.

[23:02] So here I'm going to define all the types.

[23:03] of the learning that we have today

[23:05] All good, right? The problems of

[23:06] classification and regression, I will define

[23:08] they more formally for us to have

[23:10] a very well-established definition

[23:13] What are these problems, okay? I go

[23:15] talking about data types, types of

[23:17] models as well. Uh, let's start talking here.

[23:19] of error functions, which are ideas

[23:21] All the centers here, okay? Stop for

[23:24] Machine Line or any algorithm

[23:27] Supervised learning, okay? Yeah, and

[23:30] So, to start with a technique, uh,

[23:33] Even today, I think it's cool that we...

[23:35] to begin discussing these fundamentals, but already

[23:36] To get your hands dirty here, you know?

[23:38] What's the point of programming this?

[23:39] necessarily, but it's worth talking about

[23:42] some kind of algorithm. And I'm going to say

[23:44] Something very simple, uh, to get us started.

[23:47] Here's the conversation. So, we're going to

[23:48] Talking about KNN or Kers neighbors, okay? Eh

[23:51] nearest little caves,

[23:55] because they are simple algorithms,

[23:57] for both classification and regression.

[23:58] So, it's a great place to start.

[24:01] here talking about algorithms of

[24:02] machine learning. And then we'll go.

[24:05] to see that the KNN is extremely he is

[24:07] all based on distance measurements,

[24:09] right? So, uh, for that we need

[24:10] discuss what distance measurements are

[24:12] And what are the main ones and what do they mean?

[24:14] This implies something about the algorithm, okay? OK. Good,

[24:18] So, uh, I'll start by saying here.

[24:22] From a computing point of view, okay,

[24:23] people? What I think is that, based on what I...

[24:25] I understand now, most of you have already posted it.

[24:27] Has it implemented anything yet?

[24:29] program, have you programmed in any

[24:30] Language, it doesn't matter which one here, okay?

[24:33] Well, I like to start by saying...

[24:37] So, right? We who have already programmed

[24:39] computers know what algorithms are

[24:41] traditionally implemented as

[24:43] functions, right? Functions from the point of view

[24:45] A real mathematician, right? So we can

[24:46] To think of it as a function f(x), right? We

[24:49] Here is an argument x that will be

[24:51] mapped via this function f to an output

[24:54] Okay, right? Well, it's an abstract function, okay?

[24:57] Yeah, but

[24:59] when are we going to implement a

[25:00] algorithm, we usually think of it

[25:02] like a function, uh, that has an input.

[25:05] And that's a way out, right? The input here is x and

[25:08] The output is y. So, we have a

[25:10] input, processes that input and gives a

[25:12] exit. The entity that processes this input is the

[25:14] function that is f. So, that's cool.

[25:16] think of algorithms as an abstraction

[25:17] mathematics, which is a function that

[25:19] basically maps an input into a

[25:22] Okay, that's the way out? So let's see some

[25:24] examples, simple examples here for

[25:26] Let's get started, okay? Let's think about a first one.

[25:28] The problem here is doubling a number. Then,

[25:31] If I wanted to write an algorithm...

[25:32] To double a number, I could think

[25:33] In a role, okay? That receives a number

[25:35] as an entry point. Here we will think about

[25:37] whole number. Uh, for example, eight. THE

[25:40] The function f that she has to perform is to take

[25:42] That number will return 16, okay? what is the

[25:44] Double is eight. Beauty? The same thing.

[25:48] Another example here would be 24, right? If

[25:50] if you take, apply F to input 24,

[25:53] But the output should be 48. Well, I hope so.

[25:57] that at this moment here it is not...

[25:59] What's difficult for most of you is...

[26:02] understand that this is an easy problem to

[26:04] Solve it with computers, right? This is a

[26:06] A problem like that is quite trivial for

[26:09] For those who already program, right? All you would need is...

[26:11] write a small function in Python,

[26:13] right? and f(x) = 2x. So this here is... is...

[26:18] the mathematical definition of the function, but

[26:20] In short, it's easy to think about how to write.

[26:21] a program that returns double one

[26:24] Whole number, okay? In Python in C,

[26:27] Whatever it is, okay? Okay, so we...

[26:29] This solution is great here.

[26:32] That's okay, too! Because the trivial problem

[26:34] It's very simple to solve, okay? But

[26:37] Now let's think about another problem.

[26:40] It's a little more difficult, okay?

[26:43] So let's think about the problem of

[26:46] shortest path between a city of

[26:48] origin and a destination city. So uh

[26:51] I brought this example here of

[26:53] Viçosa, Belo Horizonte, because before

[26:54] being here in BH, before working at

[26:56] FMG, I was at FV in Viçosa. Then

[26:58] I like this example here, which is a

[26:59] A trip that I took quite a lot. Yeah, so

[27:02] Imagine that we want one now.

[27:04] function that receives as input not only one

[27:06] one argument, but two arguments. And these

[27:07] The arguments represent cities, okay? Eh,

[27:10] City A, Vi Sosa and city B, Belo

[27:13] Horizon, okay? And I want one that is mine

[27:16] The function should return a list to me, okay? What are

[27:18] the cities I need

[27:20] To get there, you need to go to BH, leaving from

[27:24] Viçosa, but I want the minimum number.

[27:26] Okay? Not the minimum number of cities,

[27:27] Excuse me, but the shortest path is between

[27:30] These two cities, okay? And the answer

[27:33] Here, something like Viçosa would be expected.

[27:35] Teixeiras, Ponte Nova, Ouro Preto and Belo

[27:37] Horizon. So this is the path that

[27:38] People usually do. There is one

[27:40] Another path also for those who know

[27:41] This route has a path through Lafa there.

[27:44] Yeah, which is also so, maybe so good,

[27:47] Well, about this one, but in terms of

[27:48] mileage, okay, this path here is the

[27:50] smaller. Eh,

[27:53] Well, that's a valid problem, okay?

[27:58] It's a function; it takes two inputs and

[28:00] It returns an output. Yeah, but he doesn't anymore.

[28:03] It's so obvious, okay? uh, thinking about a

[28:07] A solution to this problem, right? Eh,

[28:11] Does anyone here know a solution for...

[28:12] This problem?

[28:22] He's the star.

[28:25] Yes, a star would solve that.

[28:26] problem. Yes, exactly. We

[28:29] There are some known algorithms here, okay? Eh

[28:32] that solve these problems is for

[28:34] people. So, for example, the algorithm of

[28:36] Daistra, Belmon Ford, Floyd V, they're all

[28:38] Algorithm names, okay? They don't need to

[28:40] Don't worry about those names, but they're...

[28:43] algorithms, that is, a sequence of

[28:45] steps that receive not only two cities,

[28:48] But, you know,

[28:50] thinking in a somewhat abstract way

[28:52] More generally, okay? you take two points

[28:55] In a graph, uh, it finds the smallest

[28:59] path between these two points in this

[29:00] in this graph. And in this case here, a graph.

[29:02] It could represent cities, right? And the

[29:04] edges between us

[29:06] They could represent the roads. And there,

[29:09] if you think about this problem of

[29:12] maps, right, which is the case here, uh,

[29:14] We could use one of these.

[29:15] There are algorithms there to solve the problem.

[29:17] They are eh

[29:20] Exact and optimal algorithms, okay?

[29:22] Complete inclusive. So, if you have one

[29:24] He will find a solution, he will.

[29:25] to find the best solution for you

[29:27] Possible, right? Eh,

[29:31] OK. So, that's something that

[29:33] We in computing have already solved that.

[29:34] Math too, right? Eh, and between

[29:37] other areas worked on it, right? Many of them and

[29:39] many years to find these

[29:41] algorithms here, prove that they

[29:42] They work, prove that they are great,

[29:44] uh, and to prove, you know, the complexity of

[29:46] Their time, in short, a series of things.

[29:48] Where am I going with this? Let's go

[29:51] Moving on to a third problem now. I

[29:55] I can upload an image now.

[29:59] Yeah, and that image might have an animal in it.

[30:00] within. Let's simplify things here.

[30:04] Let's assume it only has images of

[30:05] cats and dogs in our space

[30:07] images.

[30:09] But I want my role now to...

[30:11] Tell me if that image over there is a cat or is it...

[30:14] a dog,

[30:16] Okay? Uh, in other words, my... my entrance.

[30:19] It's no longer just a number, it's my entry.

[30:23] It's no longer a sequence of points, like

[30:26] In the case of problem B. My input

[30:28] now it is a two-dimensional arrangement of

[30:31] Pixels, right? In other words, each of these images

[30:33] here it is formed by a set of

[30:34] pixels, okay? So, if, in other words, I have

[30:36] a set of colors arranged there in

[30:38] a matrix, uh, I need to analyze

[30:41] these colors and talking about these ones

[30:43] There's a cat in this image, or here in this one.

[30:45] The image has a dog.

[30:48] Hey, does anyone have any idea how...

[30:49] solve this problem?

[30:52] In other words, someone

[30:52] neural networks,

[30:55] Apart from neural networks, you could

[30:57] to think of some kind of rule here for

[30:58] Solve this problem here?

[31:10] Well, folks, it's much more difficult, okay? Eh,

[31:14] Actually, right, the scientists from

[31:18] computing, engineers, mathematicians,

[31:19] Decades and decades and decades passed.

[31:21] trying to specify rules, okay,

[31:24] manually, intellectually,

[31:26] to solve this type of problem

[31:28] Detection is of images. In this case it is

[31:31] a problem better known as

[31:32] image classification, in fact,

[31:35] Well, that is to say, what's in a

[31:36] image, uh, not exactly the position

[31:39] of that thing, right, but if that's a

[31:41] image of a dog, of a cat, okay,

[31:43] of a car, of a, in short, of a

[31:45] tree. Uh, in other words, classify the

[31:50] object, the entity that is present

[31:51] In that image, right? Uh, that's a

[31:54] classic computer problem, in

[31:57] classic truth, specifically of

[31:58] computer vision, which is the area within

[32:00] including artificial intelligence that

[32:01] deals specifically with

[32:04] images, primarily recognition

[32:05] of images. So, people passed by.

[32:07] decades here studying this and not

[32:09] they were able to arrive at a solution is

[32:11] Great, okay? Yeah, and

[32:15] Around 2012, right, the community

[32:22] He discovers that if we used networks

[32:24] very, very large neural pathways eh

[32:28] and use GPUs to train these networks

[32:31] For a longer time, okay? Yeah, and in a way

[32:34] Faster too. And besides, right,

[32:37] had some little tricks for eh

[32:41] to be able to train these networks better,

[32:43] this problem has become a

[32:46] A much more acceptable resolution, okay? Then,

[32:49] to the point that today we are able to,

[32:51] depending, you know, on the test bases, the

[32:53] people are able to train their muscles.

[32:55] which are even better than beings

[32:56] humans, when identifying in this task

[32:59] To identify objects in images, okay?

[33:01] Because it doesn't seem obvious, does it? But not

[33:03] It's always obvious. So if I am sometimes

[33:05] I think the image is of a bird, but...

[33:09] The bird's class is not simply

[33:11] A bird, right? Sometimes you have to know.

[33:13] What exactly is the bird that's there?

[33:14] So often, human beings don't

[33:16] He can also get it right because he doesn't know.

[33:17] Which bird is that? Yeah, and there is

[33:20] neural network models that know

[33:21] to pinpoint exactly which bird it is

[33:23] A number of possible birds, okay?

[33:26] Then,

[33:28] Well, for this type of problem, folks,

[33:31] uh, of perception, for example, uh where

[33:35] Machine learning has its

[33:38] melhor desempenho, tá? In other words, there are

[33:41] problems of the world that we don't

[33:43] He can create rules for them.

[33:51] a series of real-world problems that

[33:52] People don't know how to specify rules.

[33:55] So, in these types of problems,

[33:59] Well, one of the solutions that we can...

[34:16] She understood? Então, ao invés da gente

[34:17] create an algorithm from our heads

[34:28] So, what do we do? We

[34:29] collects a lot of examples that we

[34:31] We know the answer, so we collect it.

[34:34] Examples of input and output like this.

[34:39] cats. We know they're cats. Then

[34:43] que é uma entrada, a saída é gato. To

[34:45] This image is of a dog, for this image

[34:47] It's a cat, but in this image it's a dog. He does

[34:49] and we collect this database that

[34:52] We know the answer. And we

[34:55] "trains," in quotation marks, here the word

[34:57] training, right, means finding a

[34:59] function, okay,

[35:02] who learns this mapping for us of

[35:04] Images on labels, in this case. Then,

[35:07] Eh,

[35:09] Imprisoned learning is nothing more than nothing.

[35:11] It's more than that, okay? So, to give

[35:13] One definition here, okay? The objective of

[35:15] Expressed learning is finding

[35:16] a function here, I'll call it

[35:18] fapia an entry x in a label y a

[35:21] starting from a dataset d

[35:23] Capitalize this, okay? Uh, so, yeah, yeah.

[35:27] It's a simple idea, okay? Eh, instead of

[35:29] people specify a function manually, a

[35:31] People are going to learn a function. Eh,

[35:34] So, a large part of this discipline will

[35:36] it's about how to represent these functions.

[35:39] and how to learn these functions,

[35:41] Basically, okay? and also how

[35:42] specify this dataset here

[35:44] in such a way that we can do

[35:45] this learning. It became clear what I

[35:47] Did I mention it, guys?

[35:52] Yes. Is that clear?

[35:53] Legal. Nice. So, feel free to

[35:56] new for

[35:58] Stop whenever you want.

[36:02] Okay, so let's take a step towards...

[36:04] Front here.

[36:06] And I wanted to put things in order now.

[36:08] perspective.

[36:10] Uh, so I wanted to use a diagram that comes from

[36:14] here to position

[36:15] learning within computing,

[36:18] But specifically within a, okay? Eh,

[36:21] so this

[36:24] Big blue set here, right? This one...

[36:26] The ellipse here represents the entire area.

[36:28] artificial intelligence.

[36:31] Eh,

[36:33] And in general, right, the area of

[36:35] AI, its goal is to build

[36:38] computer systems that simulate

[36:40] Human intelligence, right? And the

[36:42] human intelligence, it has several

[36:45] capabilities, right? She is the ability

[36:47] mainly to acquire new

[36:48] Skills, right? If we were

[36:50] To put it very briefly, right?

[36:54] Human intelligence lies in this aspect of our

[36:55] ability to acquire new

[36:56] Skills come with experience, okay? Eh,

[37:00] But there are other things too, right? THE

[37:01] Intelligence is not just about acquiring new

[37:03] skills, but, for example, we

[37:05] is able to reason about the things that

[37:07] We already know that, right? We

[37:09] has the capacity for deductive inference,

[37:11] right? And everything else, uh, that's all

[37:14] within the area of ​​intelligence

[37:16] artificial, that is, we want it, right?

[37:18] to reproduce human intelligence is

[37:21] inside the computer.

[37:24] And there inside there is a large area.

[37:26] It's called machine learning, right? Eh

[37:29] Or a sub-area call, okay? What are

[37:33] These are systems that learn to

[37:35] perform tasks from

[37:36] previous experiences without instructions

[37:39] explicit. So, exactly what I

[37:41] I mentioned it in the previous slide, it's in

[37:45] Machine learning, we don't want that.

[37:47] creating the rules to solve the

[37:50] problems. a gente quer especificar um

[37:52] dataset and let the

[37:54] computer learn these rules, okay, of

[37:56] mapeamento automaticamente, tá? I.e,

[37:59] This means without instructions.

[38:00] explícitas. Here, I don't want to create...

[38:03] as ações pro computador reproduzir. I

[38:06] I want him to learn on his own.

[38:12] Good,

[38:24] hand. Então, o computador vai aprender,

[38:30] autonomous.

[38:53] Good luck, okay? eh historicamente, hoje em

[39:22] [clearing throat]

[39:25] ser definidas por uma função f, tá? Eh

[39:32] falou no slide anterior. Uh, so in

[39:39] pareada com uma saída bem definida. Or

[39:43] algorithms, both the inputs and the

[39:45] exits. And then we are our

[39:48] The learning algorithm will learn

[39:50] The function that maps one to the other, right?

[39:53] So I'm calling this function f, a

[39:54] I'm calling the input x, and the output I'm calling the output x.

[39:56] I'm calling it Y, okay? And the group of pairs

[39:59] x y I'm calling it capital d, o

[40:00] Not a group, right? The whole thing.

[40:03] Well, in addition to learning...

[40:05] Under supervision, we learn.

[40:06] Unsupervised, okay? uh, that I'm going

[40:09] I'll talk more about that later, but the difference

[40:11] This is where we also want to learn.

[40:13] a function, but we don't have the

[40:16] Y output labels, in other words, we don't

[40:18] knowing the correct answer is associated with

[40:21] Our data. Actually, we don't

[40:23] We have those answers. we have a

[40:25] It's a lot of data that isn't so closely related.

[40:29] to a certain label. And then we don't

[40:33] Can you do this mapping from X to

[40:34] Yes, but we can do other things, eh

[40:38] functions or learn other functions. Put

[40:41] For example, we can learn from one.

[40:42] a grouping function, that is, a

[40:44] function that groups this data, okay, in

[40:46] classes

[40:48] based on similarity, for example.

[40:51] Yes, we can do things like

[40:52] dimensionality reduction, in short, has

[40:55] a series of interesting problems

[40:57] that we can solve with

[40:59] unsupervised learning

[41:01] We also have learning through

[41:02] Reinforcement, okay? That is an idea

[41:05] considerably different from those two

[41:07] Here, right? In reinforcement learning, the

[41:09] We have an agent, okay? Oh, more

[41:12] explicitly defined, okay? and in a

[41:15] environment, we assume that this agent

[41:16] will interact with this environment in

[41:19] It's in cycles and with each interaction it

[41:22] receives a reward from this environment.

[41:24] And then he learns from those

[41:26] rewards. So the modeling here is

[41:29] Quite different even from those two. Inclusive

[41:31] The theoretical basis here is quite...

[41:35] almost separating so much of

[41:37] basic learning references by

[41:38] Reinforcement is different from learning.

[41:42] Expressioned, not assumed, okay?

[41:44] Well, we're not going to talk about learning.

[41:46] For reinforcement, uh, not for learning, no.

[41:49] Supervised in this subject, okay?

[41:50] Because our focus is on learning.

[41:51] supervised.

[41:54] And more recently, in the history of

[41:57] AI, right, machine learning, the

[41:59] people have in the methods of generative engineering,

[42:01] which have existed for many, many years,

[42:04] Okay? However, they became more evident.

[42:07] now recently, mainly with

[42:10] the advances in language models,

[42:12] right, and one of the big models of

[42:14] language. And they became, you know, maybe one of the

[42:18] Most talked-about topics in the media today,

[42:20] precisely because of chatbots, right?

[42:23] based on LLMs, GPT chat, Jemini,

[42:25] Cloud and others, okay? Yeah, us too.

[42:29] We're not going to talk about regenerative surgery here.

[42:30] disciplina, tá? Yeah, because it's a

[42:33] [clearing throat]

[42:34] also, the content is more advanced than

[42:37] that needs us to talk

[42:39] first a learning process, then

[42:46] Here, okay? Eh, então o caminho mais comum

[42:52] supervisionado, tá? and then

[43:01] more different. Então, inclusive, essas

[43:18] Okay, here?

[43:22] Eh,

[43:24] bom, então vamos lá. Now we

[43:27] here. Espero que não assustem muito

[43:29] you. Eh, eu gosto de notação

[43:34] Okay? Mas para deixar as coisas mais eh

[43:50] Okay, now? em aprendizado

[44:02] comum nos livros, tá? I'll explain...

[44:15] esse conjunto de dados rotulados D? D is

[44:17] um conjunto, gente. So, here it is. D

[44:23] esse primeira parênteses aqui, ó. Okay?

[44:30] exemplo do meu conjunto de dados. That one

[44:33] An example of my dataset contains,

[44:37] Okay? One entry X here, okay? This one

[44:40] Here is the entry index and this

[44:42] The input is paired with an output Y1,

[44:46] Okay? In other words, this Y1 is paired with this

[44:49] with this x1 input. So, this this

[44:52] super written here in parentheses one

[44:54] represents the index or number of that

[44:57] example in the dataset. Then,

[44:59] Note that I'm starting here, I have to

[45:01] First example, and I have one, I'll assume.

[45:03] That I have M, okay? M for Maria, eh,

[45:08] examples in my dataset. I already

[45:09] I'm going to show you some cases here.

[45:13] real numbers where these variables here will have

[45:15] Concrete numbers, okay? So nothing here

[45:18] It's more than just a set, okay? Oh de

[45:21] I have X and Y pairs, and I have m of those pairs, okay?

[45:27] Okay, one more thing, folks, I'm going to use

[45:30] this note here in bold

[45:33] for a variable that represents a

[45:34] vector, right? So, note that little x.

[45:37] Here it's somewhat stylized in bold.

[45:39] Because it's a vector, not a scalar, okay?

[45:42] Well, in other words, it's a list of numbers.

[45:44] This number here is not in bold.

[45:46] Because it's a single value, okay? I'm going now.

[45:48] I'll show you an example of this.

[45:51] Well, it's just some simple things that...

[45:53] People need to understand and stay

[45:55] used to it this way, because that's also

[45:57] It makes things easier later on, when we...

[46:00] I'll be implementing these things, okay?

[46:03] this note will make things easier

[46:04] including the implementation afterwards, because

[46:07] this mathematical notation is much more

[46:08] easy for you to put things in

[46:10] code of what you will be reading in

[46:12] Portuguese, okay? Things. So,

[46:15] for those who are used to taking notes

[46:17] mathematics, right, this set here is

[46:20] contained, okay? this symbol here, uh, no,

[46:25] uh, in a space here, okay, that's in a

[46:30] dimension here the numbers, the vectors

[46:33] Real D dimensions, right? That little finger

[46:36] Here's the size of the X vector, okay? Eh,

[46:43] And the other side here, right, means that

[46:47] the labels here so contained in a

[46:50] Set C, okay? So, RD here is the

[46:54] set of vectors, right? Defined in

[46:58] Real numbers with D dimensions, okay? Yeah, and that

[47:02] set C here is my set of

[47:04] label or set of classes.

[47:08] Eh,

[47:10] I'll show you some examples of this in a moment.

[47:11] Let's be clear, okay everyone? So, let's go.

[47:13] coming back here to... Eh, including one of them is

[47:16] the following. If we had that

[47:18] problem of image classification,

[47:21] Right, my x here would be this image.

[47:25] aqui do gato. So we would have to

[47:26] take this image, represent it as

[47:30] That's right, okay? That would be my x.

[47:36] learn. No, she doesn't show up here.

[47:37] because I'm talking about my set of

[47:39] There's still data, but my 'y' here would be...

[47:49] where each pair here would be an image

[48:00] and so on. Até uma última aqui,

[48:01] For example, okay? Que seria uma imagem, por

[48:06] Okay? Well, to make it perfectly clear, the

[48:16] tem nomes específicos, tá? So, the

[48:21] of characteristics,

[48:23] Okay? Eh, porque a entrada é sempre em

[48:28] sempre especificada como um vetor. AND

[48:32] characteristics.

[48:35] Eh,

[49:29] On the computer, okay? Seria o nosso RD.

[49:38] whatnot. Eu vou dar mais exemplos e aí eu

[49:41] abro para dúvidas, tá? Because I think

[49:57] seriam esses X, I e Y I, tá? So let's go

[50:03] Okay? Todo mundo aqui deve usar e-mail e

[50:11] e-mails como spam ou não. AND

[50:13] automatically there you have a box of

[50:15] spam, you open your spam manager there.

[50:18] Email, right, your email server,

[50:19] He is responsible, he can detect

[50:21] whether the email is spam or not. So he does

[50:24] this via learning techniques

[50:26] machine.

[50:28] Well, because it's also a problem that...

[50:29] people don't know how to create rules for

[50:31] that. I don't know if you've thought about this, but

[50:33] how do you get a set, a

[50:35] email that is a string, that is, that

[50:37] It is a sequence of characters and creates

[50:39] rules that define what is spam, the

[50:42] What isn't it? Yeah, you could even

[50:45] to think like this: "Ah, if there's a lot of

[50:46] There's a dollar sign in there, it must be spam, because

[50:49] If you're talking about money, you can create...

[50:51] Whatever rules you want, okay?

[50:54] Yeah, and maybe I'll even have some success with

[50:56] that.

[50:58] Oh, the problem is that it will inevitably happen.

[51:01] an email with these characteristics that

[51:03] This is not spam. Or worse still, or even worse.

[51:06] No, or more commonly, it's the following: your

[51:08] Spammer, right? The person who's sending it to you.

[51:09] spam, she's going to

[51:12] probably understand the rules of your

[51:15] The system is there, and they will try to circumvent it. Then,

[51:17] when you create rules that are too obvious

[51:19] thus, your system becomes easily

[51:21] It can be circumvented. Yeah, and then you start to have the

[51:23] Same problem again. You have to

[51:24] Update your rules. Then you have a

[51:26] certain is adversarial dynamics here with

[51:29] with the people who are cheating the

[51:31] The system is up to you, and you're the one creating the rules.

[51:33] So, it's very difficult to specify here.

[51:35] how to find, which words

[51:37] Which sequence of characters characterizes spam?

[51:39] Words, in short, right? That's a lot.

[51:41] difficult. So, in general, this is done

[51:43] via machine learning as well, just like

[51:44] the detection program there

[51:45] image classification. So here it is.

[51:48] An email, right? Hello, Lucas. Yeah, without the

[51:50] your purchase details, aviation, bird

[51:52] green. I bought a ticket here from BH.

[51:54] to Viçosa and then this email arrived for

[51:56] me. This isn't spam, that's what comes over there.

[51:58] My ticket included and everything. But it could

[52:01] to have an email, could have another

[52:02] The email there looks similar, right? Hi Lucas, you

[52:04] He won R$1 million, okay? Hey, click

[52:06] Here to receive the money. Then,

[52:09] How do I know that this is kind of...

[52:10] That one says Spain and the other one doesn't.

[52:12] right? So, this is a machine problem.

[52:15] learning. Well, in this case here, my 11th,

[52:18] See here? What is Xi? The X1

[52:20] This is an email, it's this text here, look,

[52:23] Okay?

[52:25] Well, so somehow, I have to

[52:26] take this text from the email and

[52:28] transform it into a vector,

[52:30] Okay? Yeah, and one way to do that is very...

[52:33] Simply create a dictionary of

[52:36] words, for example, the dictionary of

[52:38] Portuguese,

[52:40] and you associate an index

[52:43] for each of these words.

[52:46] So you start there from the letter A,

[52:47] So, the letter A is number zero, right? A a

[52:50] The word abea, which is aba, the word aba is

[52:52] Number one, right? The word pineapple is the

[52:56] number two. And the words will go there.

[52:58] With zebra stripes, right? Z, zebra, zebu, zolu,

[53:02] anyway. And then they'll be indexed there.

[53:04] of those words, there will be 200,000 something.

[53:05] thing, because there are I don't know how many thousands

[53:08] words in Portuguese.

[53:10] But you create a vector, I don't know, of

[53:11] 200,000 1000 positions, where each position

[53:15] It represents a word.

[53:17] And then you go through this text from the email.

[53:19] And see if the word "hello" is there,

[53:21] You go there and check the box next to "hello".

[53:25] If hello appears again, you're just another

[53:26] One, there are two left here. Hey, Lucas too.

[53:29] It is a valid word, which is a name.

[53:31] own, but there will be a position there that

[53:32] It is associated with Lucas. If Lucas shows up,

[53:34] você coloca um ali. In other words, you will

[53:39] Eh,

[53:41] From this medium, put all of this into a vector.

[53:44] with the size of your vocabulary, where

[53:46] Each dimension is associated with a word.

[53:49] In other words, you do a count of

[53:56] each position has the count of that

[53:59] [clearing throat]

[53:59] In other words, any email that arrives

[54:02] scheme.

[54:12] Okay? Eh, e nesse caso, a minha dimensão

[54:24] millions, because we have many

[54:25] palavras possíveis, tá? So,

[54:38] words. A gente tem um nome disso,

[54:40] You've heard of it, right? É uma técnica de de

[54:50] This word occurs.

[54:53] And in this case, our classroom space...

[54:56] Here, it's binary because either is spam.

[54:59] Or it isn't, you understand? There are only two labels.

[55:01] possible.

[55:04] So note that the label here is from

[55:08] Any email, okay? Let's take this

[55:10] email one here, let's assume that this

[55:11] The text here is x1 and y1 is non-span.

[55:14] So it would be zero up here, okay? Yeah, and

[55:19] If you were to take another example here,

[55:20] It would be a second email.

[55:22] Okay? Uh, that email I mentioned, you

[55:23] He won R$1 million, then he would be here.

[55:25] You won R$1 million more, right? Uh, a

[55:27] counting these words and here would be the

[55:30] Number one, because it's spam, okay? So, the

[55:33] Our problem here is called...

[55:36] classification

[55:38] because I have a finite number of

[55:40] labels to choose from and in particular

[55:43] binary classification, because I only

[55:44] I have two labels, which is zero, not

[55:47] spam or a spam.

[55:50] Was that example clear, everyone?

[55:57] OK. Okay, let's move on to the next one.

[56:01] Another fairly common problem is...

[56:03] Recognition of handwritten digits.

[56:05] So, uh, for those who have heard of

[56:08] Regarding this problem, right, a set of data

[56:09] Eminist is very popular.

[56:12] What is this set here? In this set

[56:15] What do we have in terms of data? we

[56:17] It has a series of images.

[56:20] images, okay, of digits that were

[56:22] Written by people. So, the digits

[56:24] Here, from zero to nine. So, each line

[56:27] This image shows a digit that someone

[56:30] he wrote. Então, uma pessoa foi lá e fez

[56:33] zero, another person went there, wrote the

[56:35] zero, such, such, such. Note that each zero

[56:36] They are different from each other when you

[56:42] digit zero. The same goes for line one,

[56:45] é a mesma coisa pra linha dois, tá? Eh,

[56:48] three and so on. Well, note that,

[56:53] even to the point of distinguishing one from the other.

[56:56] So, what's the goal here? You

[57:02] image of a digit within the digit itself

[57:05] que ele representa, tá? So, if I

[57:11] from this zero here to mine to mine

[57:17] that she return the digit zero here to me,

[57:21] Okay? Se eu fizesse para essa imagem aqui,

[57:39] There, okay? Cada pixel tem um valor entre 0

[57:42] e 255. Não importa muito, tá gente? to

[58:10] mais do que intensidade de cor, tá? Eh,

[58:19] por exemplo, não é o contrário, tá? Zero

[58:22] é preto e 255 é o branco completo. AND

[58:29] gray,

[58:30] Okay? Eh, então se pegasse lá o valor 100

[58:38] black. Eh, então você vai ter um vetor

[58:50] Eh, that represents an image. And these

[59:27] representar uma única imagem, tá? Eh,

[59:44] dados usando vetores, tá? We

[59:59] They're already there in pretty columns. Then,

[01:00:01] each column there would be a dimension of

[01:00:03] your vector. So, finally, everything you

[01:00:06] can represent it as a vector, you

[01:00:07] can, in theory, learn is a

[01:00:10] function using machine learning.

[01:00:12] Well, and a large part of the story is like that.

[01:00:15] machine learning was also

[01:00:16] understand how to represent things from

[01:00:18] different data types using

[01:00:19] vectors, right? Well, in this problem

[01:00:23] Here, we continue to have a problem.

[01:00:24] of classification, because I only have 10

[01:00:27] possible labels, that is, my space

[01:00:28] C labels, okay? It is a set that

[01:00:32] contains the elements 0 1 2 3 4 5 6 7 8 9.

[01:00:35] In other words, I now have 10 labels.

[01:00:37] possible, that is, it remains

[01:00:38] My options are limited, but they are greater.

[01:00:41] more than two. So, my

[01:00:42] The classification here is called

[01:00:43] Multiclass, okay? In other words, I have

[01:00:45] several classes are possible here for my uh

[01:00:49] as an answer to my problem. Well, for

[01:00:52] Finally, here's an example.

[01:00:56] third example here, which is example

[01:00:58] furniture price forecasting. Now the

[01:01:00] Our problem changes considerably.

[01:01:02] because here I want to grab one now

[01:01:05] property, imagine a house, uh, or a

[01:01:08] apartment, and I have features

[01:01:10] of this apartment, for example,

[01:01:13] size of the property, you know, that kind

[01:01:15] The apartment is 200 m², I have the

[01:01:17] their location, for example, like this,

[01:01:19] longitude is latitude, longitude

[01:01:22] of this property. Uh, I have it here

[01:01:26] number of bedrooms in the property, I can

[01:01:28] have the distance to the subway station

[01:01:30] closest to this property, I can have

[01:01:34] It's an index, I don't know, a neighborhood code.

[01:01:36] about this property, anything you

[01:01:39] to think that it matters here to evaluate

[01:01:41] The price of a property, okay? distance

[01:01:43] to the best school in the city, distance

[01:01:46] to the nearest hospital, if there is one.

[01:01:50] trade, if you don't have it, then, you

[01:01:51] one could, in short, use various types of

[01:01:55] Information here, okay? Eh, that is

[01:01:58] generally what you see on a website of

[01:01:59] Real estate there, right? Those data from

[01:02:01] property there, the number that appears.

[01:02:04] So you wanted to estimate the value of that.

[01:02:06] property. So, let's assume you have,

[01:02:08] Are you curious to know what it is?

[01:02:09] The price of a property is what you saw there.

[01:02:13] I don't know, it's on Instagram and it doesn't have the price.

[01:02:15] there because sometimes it's very expensive, but

[01:02:17] You're curious and you wanted to train a

[01:02:18] The model that gives you that price is

[01:02:23] estimated. So, you put the number there.

[01:02:25] of rooms, put the location there,

[01:02:27] put whatever you have of that piece of furniture there and

[01:02:29] The function magically gives you a prediction.

[01:02:32] of the value of that piece of furniture.

[01:02:36] So, note that it's different here.

[01:02:39] The main difference is that now,

[01:02:41] since we're talking about a value

[01:02:42] numerically, we have infinite

[01:02:44] possibilities,

[01:02:46] Okay? Well, in other words, there's no more space.

[01:02:49] The number of labels is finite here.

[01:02:53] Ah, and that's why we call this...

[01:02:55] Regression problem, okay? Because I

[01:02:57] I want to predict a real value here. THE

[01:02:58] My C, my space, okay? labels here

[01:03:03] C, that is, my vectors, my

[01:03:05] No, my Y labels are not vectors.

[01:03:08] scalars that are real numbers, or

[01:03:10] In other words, I have endless possibilities.

[01:03:12] Here, okay? So, in that case, we

[01:03:15] Call the problem a regression, okay? Yeah, and

[01:03:19] Here in particular I used this one.

[01:03:20] In the case of real estate, which I'm also involved in.

[01:03:22] Speaking of structured data, right? Put

[01:03:24] How structured? Because generally

[01:03:25] these types of data here, such as real estate,

[01:03:27] They're coming, they're already decided, they

[01:03:28] They're saved, right? they are cataloged in

[01:03:31] Real estate tables and everything else.

[01:03:33] So, the very definition of the property already

[01:03:36] It usually comes in a table with data that

[01:03:40] It's that they usually import there about

[01:03:41] that data, about that type of, you know,

[01:03:44] of an entity.

[01:03:46] Uh, and here's the D, right, my A

[01:03:48] dimensionality of my space

[01:03:51] of characteristics, that is, the size

[01:03:53] of my vector, it depends on the number of

[01:03:54] columns that I have in that table.

[01:03:56] Okay? So, if I have a table with

[01:03:57] 1000 properties, I have 10 columns.

[01:03:59] representing the data for that property or

[01:04:02] We'll talk more later.

[01:04:04] correctly in the characteristics of that

[01:04:05] property. If I have 10 there

[01:04:07] characteristics, my D will be equal to

[01:04:10] 10. If I had 100 characteristics,

[01:04:11] My D was going to be equal to 100. Why?

[01:04:12] Because my vector will have 100 positions.

[01:04:14] or 100 dimensions. If I had 10, I would have

[01:04:16] 10. If I had three, I would have three

[01:04:18] dimensions.

[01:04:19] So, in summary, folks, we have...

[01:04:22] two main types of problems in

[01:04:25] machine learning, classification and

[01:04:26] regression, okay? And the classification, she

[01:04:29] It can be subdivided into classification.

[01:04:31] Binary and multiclass classification, okay?

[01:04:34] Well, it depends on the number of labels.

[01:04:35] What you have available is for your

[01:04:38] predict function. Is everything alright so far?

[01:04:47] Legal. Okay? So, I hope that...

[01:04:50] mathematical notation shouldn't have scared you.

[01:04:51] very. Well, you'd better get used to it.

[01:04:55] with her, because they are standard annotation.

[01:04:57] That's right, okay? Well, several articles use

[01:05:01] this note, several teachers and

[01:05:05] Books use the same notation here.

[01:05:07] So, it's good to get used to it.

[01:05:08] when you come across her again

[01:05:09] It will be easier to understand what's coming.

[01:05:12] ahead.

[01:05:15] Okay, so now a little more

[01:05:17] intuitively, since we've already passed

[01:05:18] For the more mathematical part here, okay? she

[01:05:21] It will come back, but I just wanted to give it.

[01:05:23] Here's a preview for you of these.

[01:05:25] Two types of problems, right?

[01:05:27] classification and regression. When the

[01:05:29] People talk about classification,

[01:05:31] We're thinking here about a dataset.

[01:05:33] And here it is visually represented by

[01:05:35] These little dots here on the screen, okay? Where

[01:05:37] each point here is from my set of

[01:05:40] data

[01:05:42] Here I'm talking about a set of

[01:05:43] Two-dimensional data, right? Imagine that I

[01:05:45] I have feature one here on the Y-axis,

[01:05:47] The characteristic of the X-axis. And the color, okay.

[01:05:52] This little ball represents the label.

[01:05:55] of that data. So, this problem here is

[01:05:56] binary. Either the ball is green or it is

[01:05:58] red, no matter what

[01:05:59] meaning. Yeah, and she has two.

[01:06:02] dimensions, the X dimension and the Y dimension.

[01:06:04] So, she has two characteristics, okay?

[01:06:07] Eh,

[01:06:09] If there were three, we would have to come in one.

[01:06:10] three-dimensional space,

[01:06:12] Okay? Well, if there were more, it wouldn't be possible.

[01:06:14] View.

[01:06:16] Well, anyway, when we talk about

[01:06:18] classification, we have a set

[01:06:19] of the dataset, that is, our D

[01:06:21] here it equals the number of balls, the

[01:06:22] Our D size is the same size as the

[01:06:24] Number B, the capital D, okay everyone?

[01:06:27] Uh, that is, the cardinality of D, the

[01:06:29] The number of pairs I have is

[01:06:32] the number of balls that are here, the D

[01:06:35] minuscule, which is the dimensionality of my

[01:06:37] The problem is twofold, because I only have...

[01:06:39] here or or see is two, because I have

[01:06:41] two dimensions here, dimension Y and

[01:06:43] dimension X.

[01:06:45] Okay? And my label space C

[01:06:47] capitalized and it's two as well, because I

[01:06:50] I have green balls, only green ones and

[01:06:52] Red ones here to choose from. I.e,

[01:06:53] I have two possible classes. When

[01:06:55] I'm talking about classification, what does that mean?

[01:06:56] Who wants to do this? We want that

[01:06:57] our function, let's understand it as

[01:07:00] a linear function, that is, a straight line through

[01:07:01] Meanwhile, uh, I want to find a

[01:07:03] The function that separates the space, right? Hey, here

[01:07:09] in the case of the green balls with the

[01:07:10] red dots.

[01:07:12] So, my role here is to

[01:07:14] represented by this line here, okay? Eh,

[01:07:16] It doesn't have to be just a straight line, okay? Yeah, but

[01:07:20] We'll see that linear models

[01:07:21] They are literally straight lines that when they are

[01:07:24] applied for classification, what

[01:07:25] What will these lines do? Separate the space

[01:07:27] of green balls of the balls

[01:07:28] red. Uh, or separate, imagine that

[01:07:31] Red here would be spam and green wouldn't.

[01:07:33] spam. And each of these little balls here is a

[01:07:35] Text from an email. So, everything that's

[01:07:39] Below the line here is considered

[01:07:40] No spam. Everything that's above the line

[01:07:43] This is considered spam here. Remember that each

[01:07:45] Is spam a vector? Here's the thing: I

[01:07:48] I would be using only two words for

[01:07:50] represent each

[01:07:52] email, because I only have it here.

[01:07:54] Two characteristics, right? I only have the

[01:07:55] The X-axis and the Y-axis. Uh,

[01:07:59] But I have a green label here so I don't...

[01:08:01] spam, and that is, it's for not spam and

[01:08:04] red for expansion. So, what is it?

[01:08:06] My role was that she had to separate

[01:08:08] really here in the email space,

[01:08:11] Okay,

[01:08:12] the spans and not the expansions.

[01:08:15] Yeah, so then, and then when I have that

[01:08:17] With this straight line in hand, I can grab one.

[01:08:19] Any new email address you have here, I'll...

[01:08:21] I don't know if it's green or red.

[01:08:23] But if I have this function here and the no

[01:08:25] my new email that arrives in my

[01:08:27] customer there, if I check that the

[01:08:31] The little ball is above the line, I'm going to say

[01:08:33] This email here is spam, it's not spam that

[01:08:34] I was going to see it, right? This platform isn't spam.

[01:08:36] Because it's green. Now if 9 arrives and

[01:08:38] If it falls here, I'll say it's spam.

[01:08:41] Because it's below the line. In other words, I

[01:08:43] I can separate space from God.

[01:08:49] Here, in this case, or rather, in a way...

[01:08:50] in general, from my examples in the set of

[01:08:52] data, uh,

[01:08:55] Physically, even so, I can still trace it.

[01:08:57] a boundary that separates the data.

[01:09:01] Well, regression, regression is a bit...

[01:09:03] different. Note that now in regression

[01:09:04] There's another dataset here that...

[01:09:06] também bidimensional, tá? Yeah, so

[01:09:08] Let's assume that each of these little balls here

[01:09:09] It's a property. Now I have two, I have

[01:09:12] two characteristics that we will discuss here

[01:09:14] Let's assume it was the size of the property, okay?

[01:09:16] Oh, and the number of rooms, okay? Eh,

[01:09:22] I'm sorry, I'm sorry, sorry everyone. Here in

[01:09:24] eixo Y seria o valor do imóvel, tá? And in

[01:09:30] property. Então, conforme o tamanho do

[01:09:31] Property grows, property prices increase.

[01:09:35] Okay? So, in regression, I want, given

[01:09:38] I want any new little ball here.

[01:09:40] prever o valor dela, tá? Uh, so in

[01:09:47] which can assume a linear function,

[01:09:49] Okay? It's a straight line, I want

[01:09:50] find a straight line that best passes through

[01:09:52] These points here, okay? In other words, I want

[01:09:55] find the straight line that best passes through here,

[01:09:56] because I want to adjust it to these

[01:09:58] Points, okay? Yeah, and then when you have one

[01:10:02] new point here now,

[01:10:05] Okay?

[01:10:06] Uh, I just need to project this point here onto

[01:10:08] Straight up and see what the value is here, okay?

[01:10:09] What is the value associated with that?

[01:10:11] point and then I can uh

[01:10:16] I can estimate the value of that here.

[01:10:17] property. So, I can now answer.

[01:10:20] It's not the value of any property.

[01:10:21] It matters, just giving its size here.

[01:10:24] In square meters, for example, okay?

[01:10:27] Uh, so this regression problem

[01:10:29] Visually, right, the way we

[01:10:31] sees the regression problem is

[01:10:32] to find, you know, a straight line, for example,

[01:10:34] that passes through these points. It is not necessary

[01:10:37] It's a straight line, but we're only going to...

[01:10:38] Keep it simple, okay? Yeah, and in terms of classification,

[01:10:42] we want to separate the space between

[01:10:45] zero label and one or more than one label,

[01:10:48] if that's the case. Beauty?

[01:10:54] Okay?

[01:10:56] Yeah, OK. So now here, just changing the

[01:11:00] overview, right, for learning purposes, no.

[01:11:01] supervised. Uh, the goal here

[01:11:04] It's also about learning a function, okay? H,

[01:11:06] people. But as I said

[01:11:07] previously, we no longer have the

[01:11:09] labels or classes associated with

[01:11:12] to the feature vectors.

[01:11:14] Well, we still have a group of

[01:11:16] Data D here, okay? Eh,

[01:11:20] So we have here a set

[01:11:22] of feature vectors as well. I'm

[01:11:24] using M here to represent the

[01:11:26] number of examples in my set

[01:11:28] of data. Note that I don't have it now.

[01:11:31] more pairs, I do have just one.

[01:11:32] A set of vectors, right? Which are

[01:11:34] contained here in my RD, which is my

[01:11:37] D-dimensional vector space, right?

[01:11:40] So, if I don't have a label

[01:11:42] To get out, how do I... what do I do?

[01:11:43] right? How do I learn a function?

[01:11:45] What is x in Y? It does not give. It's not possible because it's not possible.

[01:11:48] It has the Y. and [clearing throat] it doesn't have

[01:11:50] because the problem doesn't offer anything to you

[01:11:52] Okay, this label? Eh,

[01:11:57] And so here, we're not going to...

[01:12:00] to be able to do this type of mapping,

[01:12:03] therefore the category that the type of

[01:12:05] Learning changes, partly because techniques...

[01:12:08] They're going to change completely here,

[01:12:10] Okay? That's why we distinguish between them.

[01:12:12] Right here are these learning areas, right?

[01:12:14] or those kinds of problems, sorry, of

[01:12:16] supervised learning and learning

[01:12:18] unsupervised.

[01:12:21] So, let's make it perfectly clear here that in

[01:12:22] We don't have unsupervised learning.

[01:12:24] The Y and I labels. Note that they have disappeared here in

[01:12:27] My dataset, they disappeared, that's it.

[01:12:30] Labels, okay? So, what do I do?

[01:12:32] I can do that, right?

[01:12:34] Well, there are a number of problems.

[01:12:36] interesting things that we can

[01:12:37] solve with non-techniques

[01:12:40] supervised. The most common one is

[01:12:43] grouping.

[01:12:44] Okay, so imagine this, imagine

[01:12:47] I have a dataset here.

[01:12:48] Eh

[01:12:51] From customers, okay? Imagine, for example,

[01:12:55] I have clients on Amazon there, uh,

[01:12:58] Imagine Amazon e-commerce, right?

[01:13:01] And I want to understand the profile of these people.

[01:13:03] customers. So, like, they buy

[01:13:06] things,

[01:13:07] Okay? And that's quite common.

[01:13:09] including this approach. Imagine that I

[01:13:11] I have a vector that is the same there, similar to the...

[01:13:14] In the case of spam. Imagine that I have a

[01:13:17] vector where each dimension of that vector

[01:13:19] represents a product that exists in

[01:13:20] Amazon. Existem, sei lá, não sei quantos

[01:13:23] millions or billions of products, I don't know,

[01:13:25] You have no idea. Vamos supor que tem 10

[01:13:27] Millions of products on Amazon. You

[01:13:31] can create a vector of 10 million

[01:13:33] positions,

[01:13:37] bought or how many times did the person

[01:13:41] Okay?

[01:13:57] I don't know, a little stool.

[01:14:02] She'll have one, one, and one of those three there.

[01:14:04] items.

[01:14:06] Eh,

[01:14:10] outras coisas diferentes. Imagine a

[01:14:13] different. Então, a gente não tem

[01:14:15] rótulos associados a esses clientes. THE

[01:14:18] We have a vector that represents the

[01:14:20] number of times they bought

[01:14:24] Amazon.

[01:14:33] Okay?

[01:14:46] So, there are algorithms for...

[01:14:49] Okay? So, there are algorithms for...

[01:14:49] That's what you give a dataset.

[01:14:53] unlabeled and these algorithms group

[01:14:57] for you, this data is grouped into groups that...

[01:15:00] People call them clusters in English, right?

[01:15:02] So here, for example, visually it has

[01:15:06] Clearly there are four groups here, right?

[01:15:09] in this dataset.

[01:15:12] Oh, and what about those clustering algorithms?

[01:15:14] find these groups for us and you

[01:15:15] They return here which groups they are.

[01:15:19] Over there, these guys here form a group,

[01:15:20] These guys form another [group], these guys

[01:15:21] They form another one, those guys form another one.

[01:15:23] Okay? And you can pass the number of

[01:15:25] groups that you want. It goes like this:

[01:15:26] "Group them into threes for me, group them into

[01:15:27] "Four, group into five." And then he goes.

[01:15:29] Try to make optimal groupings here.

[01:15:32] Yeah, in that dataset. So that

[01:15:35] It is very useful for doing analysis of

[01:15:37] data, for example, to understand profiles

[01:15:39] From a client's perspective, it's about finding structures, right?

[01:15:42] or similarities between data examples and

[01:15:45] To do data exploration, you know.

[01:15:48] from different databases to

[01:15:49] to understand if there is a relationship between things

[01:15:51] there. Uh, that's a classic example of

[01:15:54] unsupervised learning.

[01:15:57] Question, Juliana.

[01:16:00] Well, in that case, that grouping is...

[01:16:02] made with the data, it's like this, the

[01:16:04] Customer profile, let's suppose, right, the

[01:16:07] how much he buys, how often he

[01:16:09] purchase, age,

[01:16:11] Well, the location, it would be those.

[01:16:13] data. And this data is usually

[01:16:16] acquired through the uh in this case

[01:16:19] on Amazon's own example website,

[01:16:21] right?

[01:16:21] In your case, do you have the registration for...

[01:16:23] client that you could put there

[01:16:24] Age, right? Several things from the profile there,

[01:16:27] right? How many times a person logs in per day.

[01:16:30] You can put a million things in it.

[01:16:31] Here, right? Yeah, about characteristics.

[01:16:34] And, and one more thing that is

[01:16:35] That's interesting. Do you see the pattern of

[01:16:37] consumption also by the person, right? You want

[01:16:38] I need to know what she buys there. Hey, what's up?

[01:16:41] A simple way to do this would be...

[01:16:43] to make this gigantic vector with the

[01:16:45] person's purchase count for each

[01:16:47] product. Uh, and then this data would come from...

[01:16:52] own website, right, the person's interaction site.

[01:16:53] from the user's perspective with the website there.

[01:16:56] OK. Thanks.

[01:16:58] You're welcome.

[01:17:01] Any more questions?

[01:17:06] No. Okay. Then, another type of

[01:17:08] An unsupervised problem is what...

[01:17:09] people call it a reduction of

[01:17:10] dimensionality.

[01:17:13] Well, it's a problem that helps us to

[01:17:17] reduce, including the size of the vectors

[01:17:20] which represent our data.

[01:17:22] So imagine, imagine that one, that one.

[01:17:24] The problem I mentioned is the case of...

[01:17:28] real estate.

[01:17:30] So, when I want to predict the o o

[01:17:34] value of a property, I'll have one there

[01:17:35] series of features, size of

[01:17:38] property, location,

[01:17:41] Number of rooms, right? If there was a reform

[01:17:45] Recently, a series of things. THE

[01:17:47] year the property was built,

[01:17:50] Yeah, and stuff. Bu, isso que acontece muitas

[01:17:55] times,

[01:17:57] Okay? Yeah, there are many...

[01:18:00] available features

[01:18:04] by the very way in which this data

[01:18:05] were collected. So, sometimes, I know

[01:18:07] There, at the real estate agency, people collected...

[01:18:08] These are various types of data, 300, 400

[01:18:12] characteristics,

[01:18:14] Okay? Eh, different,

[01:18:16] simply because they were

[01:18:17] available there and they put it on the base

[01:18:19] of data. This happens a lot, it's very common.

[01:18:22] common in processes like this, uh,

[01:18:24] commercial, industrial, you have

[01:18:26] This database is available with a

[01:18:27] There are a lot of features there, okay, that

[01:18:29] Someone collected it. Hey, so when are you going to...

[01:18:33] to be hired as a data scientist,

[01:18:36] Well, a problem that arises naturally is

[01:18:38] the size of these vectors. As I said

[01:18:40] Here, I'm drawing attention to this.

[01:18:41] Many, many times, right? Imagine the

[01:18:43] In the case of Amazon, there are millions of

[01:18:45] products. So, if each user, I already

[01:18:48] I have millions of users, if each

[01:18:50] user to have millions of

[01:18:51] characteristics, okay? Well, we start

[01:18:54] to have practical problems here from you

[01:18:56] can no longer train the models or

[01:18:58] you don't have enough data to

[01:18:59] train these models, because [snoring]

[01:19:01] This is for you to find patterns here.

[01:19:03] you have to have a lot of vectors

[01:19:05] They're similar, aren't they? Yeah, but like the

[01:19:07] The vectors are very large, it's very

[01:19:08] It is difficult to find vectors that are very

[01:19:10] similar if you have 1 million

[01:19:12] characteristics in these vectors, right?

[01:19:17] characteristics is a problem h very

[01:19:20] common in machine learning. AND

[01:19:23] because sometimes they are too big,

[01:19:25] Okay? Well, in the case of image-based ones, the same

[01:19:28] Something I told you guys, right? You

[01:19:29] There's a 1 megapixel image there, they are

[01:19:31] milhões de pixels já, né? So, how is it?

[01:19:36] Uh, one of the ways to deal with

[01:19:38] This is this technique, these are the techniques.

[01:19:42] They will take them and reduce the size of these.

[01:19:45] vectors. Of course, with some loss of

[01:19:47] Information, okay everyone? When we

[01:19:49] reduces the number of features,

[01:19:52] some kind of information reduction to

[01:19:54] People will have it. That's all that happens, at

[01:19:56] Sometimes it's not much, you know? To the

[01:19:58] Sometimes it almost reaches zero, in fact, when

[01:20:00] When you think of the following, for example

[01:20:02] that I like to give, imagine that you

[01:20:04] If you have a property forecast, do you want to?

[01:20:05] to predict the value of the property,

[01:20:07] Yeah, and you have 10,000 features there.

[01:20:10] of the property. I'm exaggerating here, okay?

[01:20:11] people? 10,000 is a lot, but let's assume...

[01:20:13] that it had 300, which is something more

[01:20:15] realistic. You have 300 300

[01:20:17] characteristics for each property that it has

[01:20:19] in their database there. And imagine,

[01:20:21] Imagine the city of São Paulo, the city

[01:20:22] From Rio de Janeiro, right?

[01:20:25] How many properties wouldn't there be in that one?

[01:20:27] In that list over there. Eh,

[01:20:32] and that's all that happens in the problem of

[01:20:34] real estate, right, very often you'll...

[01:20:36] to have a column there that is the size of

[01:20:38] property

[01:20:39] and another column there which is the number of

[01:20:41] rooms.

[01:20:43] There you have it: property 30 m² 1/4, 20 m² 1/4, 50

[01:20:49] m² 1/4. Then you start to see it like this, look,

[01:20:51] 70 m² 2/4, 70 m² sometimes has 3, I don't know.

[01:20:56] Then 100 m², 100-something m², three as well.

[01:20:58] Then suddenly 200 plus starts to become 4

[01:21:00] 5. In other words, that is the point where I

[01:21:02] I want to arrive at a point where there is a high correlation.

[01:21:05] between property size and the number of

[01:21:07] rooms. That's natural too, right?

[01:21:09] The greater the number of rooms, the greater

[01:21:10] in terms of property size, it usually increases

[01:21:12] The number of rooms. Sometimes it happens,

[01:21:13] Right, some outlier cases like that, there are some

[01:21:15] Huge properties there that only have 1/4 of their capacity. AND

[01:21:18] Kind of strange, right? Você, mas tem. And the

[01:21:20] People call that an outlier, right? Or

[01:21:22] In practice, it's like having a

[01:21:24] column, a column from your table, or

[01:21:26] that is, a characteristic

[01:21:28] A, which is highly correlated with

[01:21:31] a characteristic B,

[01:21:34] when you are going to train a function for

[01:21:36] mapping X to Y, they kind of carry the

[01:21:39] same information,

[01:21:41] Okay? Then you can eliminate one of them.

[01:21:45] that your ability to predict

[01:21:48] It remains the same, because the second

[01:21:50] This column doesn't add much to the discussion.

[01:21:53] information problem for discrimination

[01:21:56] the value of this piece of furniture. That made sense.

[01:21:58] What did I say?

[01:22:02] I hope so. So, the algorithms...

[01:22:04] dimensionality reduction

[01:22:05] They usually act in this way. They will

[01:22:08] try to find a correlation

[01:22:10] between columns.

[01:22:12] And those columns that are high

[01:22:14] correlation,

[01:22:15] we can eliminate it because at least

[01:22:18] One of them, right? Because they are, let's

[01:22:20] to say it like that, uh

[01:22:24] What's the word? They are

[01:22:26] redundant. That. They are a little

[01:22:28] redundant.

[01:22:29] Ask away, Lucas.

[01:22:32] Professor, I just have one question regarding

[01:22:34] these reduction models.

[01:22:37] Yeah, like, it's very common for you to use

[01:22:39] this as a tool in the part of

[01:22:41] data engineering, in short, you yourself

[01:22:43] he explained.

[01:22:44] But then, at what point do you

[01:22:45] it really becomes a problem of and the

[01:22:47] people can work with this to

[01:22:48] solving a problem of eh no

[01:22:51] supervised, kind of like we

[01:22:52] I would be working with a problem of

[01:22:54] regression, then working with regression

[01:22:56] linear, like, there's a situation like that.

[01:22:58] We would work with these models.

[01:23:00] specifically to give the result that

[01:23:03] Are we looking for that? No, no, no, no,

[01:23:04] no. I think that's both the case and the fact that

[01:23:05] He has this, this, this kind of bias.

[01:23:08] to actually work in engineering.

[01:23:09] That. Here we usually go

[01:23:11] applying these techniques is before

[01:23:14] apply a learning method

[01:23:16] supervised. That's precisely why...

[01:23:17] We're saying that these are problems, not...

[01:23:18] supervised. We're not even going to talk about it.

[01:23:22] scope. Eh, elas, no caso aqui, elas são

[01:23:27] problems. Esse é o mais clássico que

[01:23:51] Because it's like you have a

[01:23:53] Very high dimensionality here, okay?

[01:23:55] he can't find many

[01:23:59] These standards, he would need many

[01:24:02] vetores são muito grandes, tá? Yeah, so

[01:24:07] Okay? Quanto maior dimensionalidade no

[01:24:11] Well, so if you, and as is usually the case...

[01:24:20] Yeah, to deal with the lack of data.

[01:24:23] So, generally when we reduce the

[01:24:24] dimensionality, we even gain in

[01:24:25] Performance, okay? So, these are techniques.

[01:24:28] Here, they'll call them assistants for our

[01:24:30] learning context here

[01:24:31] supervised, but you can use this

[01:24:33] For a number of other things, okay? Eh,

[01:24:36] you can use reduction

[01:24:38] dimensionality and along with deep

[01:24:40] learning, you can use reduction of

[01:24:41] dimensionality for compression, finally,

[01:24:45] There are a number of other uses here, but

[01:24:47] They're not coming, they're avoiding the issue a bit.

[01:24:49] but you'll never see an algorithm of

[01:24:51] dimensionality reduction for

[01:24:52] solve the problem, to find the

[01:24:54] function that a pen x y. That they don't

[01:24:56] They're going to do it, okay?

[01:24:57] But more as an aid than an actual solution.

[01:24:59] As a final solution, right? Exactly,

[01:25:01] Exactly, exactly, exactly.

[01:25:02] Thanks.

[01:25:07] [clearing throat]

[01:25:08] Okay. Well, we're not going to spend much.

[01:25:09] Time here, because that's not the focus, okay?

[01:25:11] people? It's almost 10 already, for now it's 10

[01:25:12] pras paraas 9. I wanted to talk a little bit

[01:25:15] But I wanted to start talking about Cainin.

[01:25:17] even today.

[01:25:19] Okay, so let's talk about the last type.

[01:25:23] Regarding learning here, I'm not going to talk about

[01:25:24] Generative engineering today, because otherwise it would be...

[01:25:26] Too tiring, okay? uh, more

[01:25:29] Reinforcement learning is a technique.

[01:25:31] considerably different, where the

[01:25:33] people still want to learn something

[01:25:34] function. Well, in other words, because it's learning.

[01:25:36] With a machine, we'll always want...

[01:25:37] Learn a function. A diferença agora é

[01:25:39] that the way we present

[01:25:40] Learning this function is different, okay?

[01:25:43] Uh, the function in reinforcement learning

[01:25:44] It is usually called pi, not f, not

[01:25:46] h. A a letra na literatura de de

[01:25:49] learning by learning by

[01:25:51] reinforcement is usually pi, which is

[01:25:54] it represents what we call a

[01:25:55] policy. A função, inclusive tem um

[01:26:03] a little. Então essa função pi aqui, ela

[01:26:10] Action, okay? A entrada aqui é um estado do

[01:26:13] agente e a saída é uma ação a, tá? Then

[01:26:21] possíveis? Eh, o que que é o estado? the

[01:26:29] por reforço para entender, tá? Eh,

[01:26:40] reinforcement. Então, imagina aqueles robôs

[01:26:57] reinforcement. Eh, as ações aí, o robô seria o

[01:27:09] vertical. Às vezes dá para andar na

[01:27:10] diagonal também. So, generally he

[01:27:12] tem aqui eh quatro ações, né? North,

[01:27:15] sul, leste, oeste, oito ações, né? There

[01:27:17] noroeste, sudeste, nordeste, né? and

[01:27:20] south-west.

[01:27:24] mais uma que é a destrucção. Yeah, and

[01:27:35] example. Não sei, seria uma forma de

[01:27:38] sense. Então, a gente tem aqui oito

[01:27:51] information. Por exemplo, eh, a posição

[01:27:54] do a posição do robô na sala, né? There

[01:28:12] se tá chegando perto ou não. So, but

[01:28:47] condição da bateria e tudo mais. Then,

[01:28:50] tem que retornar uma ação, tá? Yeah, so

[01:28:55] Reinforcement is not just for, it doesn't only serve to

[01:28:57] solve robotics problems.

[01:28:59] But it's a very fertile ground for...

[01:29:02] where this is reinforcement learning

[01:29:04] It might be used more often.

[01:29:07] Oh, another place where learning takes place.

[01:29:09] with reinforcement is widely used are in

[01:29:10] games. So for those who know Alfa

[01:29:12] He scored that goal, he won against the best.

[01:29:14] Goal scorer, uh Alfa Gol, Gol is a

[01:29:17] game, right, Chinese and stuff, kind of like

[01:29:19] A board like that, it's a game that's even more...

[01:29:22] Older than chess.

[01:29:23] So, if you want to train an agent

[01:29:25] who plays this game, uh,

[01:29:28] What you can do is the following, the

[01:29:29] The game state would be the agent's state.

[01:29:32] In other words, the state of would be the

[01:29:33] board configuration. Think about the game

[01:29:35] In chess, it would be the chessboard itself.

[01:29:37] It would be my S, that is, the position of

[01:29:39] Each piece on the board, okay? Given these

[01:29:42] positions, you have to return, that

[01:29:44] The function has to return a move, okay?

[01:29:47] Well, then that would be another application.

[01:29:49] very common here for learning by

[01:29:51] reinforcement, which is training an agent that

[01:29:53] Learn to play a game automatically.

[01:29:55] Uh, so the agent here we have in

[01:29:58] reinforcement learning, we have a

[01:29:59] a cycle, we have an agent of one

[01:30:01] One side, an environment on the other, okay? And they are

[01:30:03] Two separate entities, okay? Eh,

[01:30:07] at each instant of time, then the

[01:30:08] The modeling here is a loop like this,

[01:30:10] Okay? Well, those are interactions.

[01:30:14] between the agent and the environment, right? So the

[01:30:17] The environment starts by offering us things.

[01:30:19] a state, this initial state S here,

[01:30:22] Initially S0, right? So we

[01:30:24] Receive this state, okay? Along with this

[01:30:27] state, I haven't said this until now, but

[01:30:29] along with this state, necessarily the

[01:30:30] People need to receive a reward.

[01:30:32] Okay? In other words, initially this may

[01:30:34] It must be zero, because otherwise, the system

[01:30:36] It's just begun, okay? Yeah, but then the

[01:30:39] people have to, sorry, that was left out of

[01:30:42] Okay, everyone? animation. So, uh,

[01:30:45] when he receives a state, a

[01:30:46] as a reward, he has to perform a

[01:30:48] action in this environment and this action here will

[01:30:50] generate, okay, a new state here, ST +1,

[01:30:53] with a new ST + 1 reward. This

[01:30:56] The cycle here repeats until the number T.

[01:30:58] Capitalize here the T nations, okay? Yeah, and

[01:31:01] In this iteration, you expect the agent to...

[01:31:04] Eh

[01:31:05] Maximize the rewards. So the

[01:31:08] The goal here is to maximize the sum of

[01:31:10] Rewards over time, okay? Then

[01:31:13] What happens? Initially the agent

[01:31:14] It starts randomly, he starts taking

[01:31:16] That kind of penalty, because I don't know, he

[01:31:18] He goes, walks straight and hits the wall, but he

[01:31:20] somehow you have to learn from

[01:31:21] That's it, understand? [snoring] Yeah, and then he

[01:31:23] He says: "No, next time if mine,

[01:31:24] If I want to maximize the reward, you

[01:31:26] You have to say it like this: "Ah, if he hit me,

[01:31:27] I don't know, you could give a reward.

[01:31:29] "Negative for him." Yeah, and then he starts...

[01:31:31] over time understand that if he

[01:31:33] He wants to maximize that reward,

[01:31:35] start avoiding those actions that lead

[01:31:37] He is for penalties and then he with

[01:31:41] over time, by interacting in this

[01:31:42] environment, okay, he'll learn to

[01:31:44] Maximize the rewards. For example,

[01:31:46] In the case of a game of chess, he would...

[01:31:48] start by playing randomly in

[01:31:49] at the beginning, but then with each move you have

[01:31:52] which is somehow telling him if

[01:31:55] was that movement good or

[01:31:57] That was bad, okay? Eh, and then when does it end?

[01:31:59] game, you have this signal more

[01:32:01] Clearly, victory or defeat, okay? And there

[01:32:03] you can, at the end of a match, you

[01:32:06] can train your agent with the

[01:32:08] game results and say: "Next

[01:32:09] "Do better this time." And then it happens, if you

[01:32:11] repeat this several several several several times

[01:32:12] Sometimes, okay? Uh, the agent is going to start to

[01:32:15] to act optimally or at least

[01:32:16] subotic, okay? Yeah, and that works really well.

[01:32:20] Good for gaming, works very well for

[01:32:21] robotics. It has a number of problems.

[01:32:23] Here, it takes time to converge, it takes time.

[01:32:25] For training, okay? because he has it

[01:32:27] It really does have this paradigm.

[01:32:29] It's all about trial and error, okay? Then he

[01:32:32] It usually starts randomly, then

[01:32:33] vai vai aprendendo. So that

[01:32:36] It usually takes a while, but it works great.

[01:32:40] Well, and it's very useful when you don't have...

[01:32:41] There is data, because the environment itself...

[01:32:44] It generates this data for you, okay? Then

[01:32:48] Well, for collecting in robotics, it's a

[01:32:51] A very common occurrence, right? Do you want to train?

[01:32:53] an arm that moves to grab a

[01:32:56] certa eh um certo objeto? Or else it has

[01:32:59] one has a very interesting project of

[01:33:01] Berkeley is where they train a robot to

[01:33:08] make a robot with two arms that will

[01:33:09] There, take a piece of clothing and fold it neatly.

[01:33:11] isso é muito difícil. It's very difficult.

[01:33:13] even creating a dataset of how...

[01:33:15] você faria isso de maneira ótima. Then,

[01:33:24] robô assim, ó. Okay? Yeah, and then you save it.

[01:33:33] Regarding movement, okay? How much is this

[01:33:36] That's expensive, folks, it could be done like this and

[01:33:38] It would be a supervised approach, right?

[01:33:39] You take a human being, you replicate the

[01:33:41] Human movement there, many, many times.

[01:33:43] Sometimes, okay? Well, to teach the robot to...

[01:33:46] move. The problem is that there is so much.

[01:33:47] The possible configurations are endless.

[01:33:49] right? There are endless combinations.

[01:33:51] possible arm movements for

[01:33:53] You fold a piece of clothing. So, uh, it is

[01:33:57] It's impractical for you to create a dataset.

[01:33:58] of that. So, in those cases, uh, you have

[01:34:02] That's much easier for you to model.

[01:34:04] this as reinforcement learning and giving

[01:34:05] a penalty for the robot when it

[01:34:07] to make a mistake. Uh, a common penalty is the

[01:34:09] Next, you are every second you

[01:34:14] Deduct one point from him, understand? Yeah, and

[01:34:17] then you force him along to do it

[01:34:19] to do things as quickly as possible

[01:34:20] Possible, right? Yeah, and then you can give a

[01:34:24] one, for example, every time he

[01:34:25] leaning against the clothing, you can give a

[01:34:27] One more point, because it's okay to lean on it.

[01:34:29] Changing the clothes isn't the solution to the problem, but

[01:34:30] If he leans on me, it's better than not.

[01:34:31] Lean in, right? Yeah, so every time he

[01:34:33] Lean in, you'll give her an extra point.

[01:34:34] So, over time, he begins to

[01:34:35] understand that he has to hold on

[01:34:37] clothing. If he has to, he has to get up

[01:34:38] For the clothing, you give one point. Every time

[01:34:40] He starts bending something, you

[01:34:41] Give an extra point. Yeah, sure, that's it.

[01:34:44] It's not very easy to...

[01:34:45] implement in this way in terms of

[01:34:46] engineering, but it can be done,

[01:34:49] Okay? Well, anyway, I'm even rambling on.

[01:34:52] More than I wanted. Yeah, but it's a

[01:34:55] That's a very interesting area too, okay? from a

[01:34:57] until it's rarely talked about like that, if it is

[01:35:00] considered today with, right, if you're going to take

[01:35:01] LLMs and generative engineering, it seems that everything

[01:35:04] This dominates, right, AI, but there's a whole...

[01:35:06] gigantic area here, uh, facing

[01:35:10] for these learning problems by

[01:35:12] reinforcement.

[01:35:14] Beauty? Okay, let's move on here, because I...

[01:35:19] I think I'm taking it to where we are.

[01:35:21] Taking more time, I like to talk

[01:35:22] I get excited about these things, okay? Eh,

[01:35:26] Okay, let's get down to earth, then.

[01:35:30] Here and back to learning.

[01:35:31] supervised, which is the subject of our

[01:35:33] discipline. The rest of the entire course will

[01:35:34] That's what it's about. So, I want it now.

[01:35:35] Let's take it a step further, okay? And to delve deeper

[01:35:38] a little more on this modeling of

[01:35:40] supervised learning.

[01:35:43] Well, I'll repeat it for the third time.

[01:35:47] This time here, right? We want to find one.

[01:35:48] function F, which is a P, is an input X and

[01:35:50] A Y label, okay? Based on data D,

[01:35:54] Okay?

[01:35:55] To do this, folks, how does one...

[01:35:57] People, how do you learn an H function? Now is

[01:36:00] This is the point I wanted to talk about now.

[01:36:02] In a more general way, okay? Independent

[01:36:04] What is the algorithm here now?

[01:36:06] The approach here is operational, from machine.

[01:36:11] Learning, okay? We have three stages.

[01:36:15] People call it a performance function,

[01:36:17] I'm calling her P, okay? right? This P

[01:36:19] uppercase is a performance function,

[01:36:20] no matter what it is now for

[01:36:22] while. Yeah, she's going to measure the quality.

[01:36:24] than? From my H function, okay? My

[01:36:27] function H is the function I want. Hey,

[01:36:29] It remained inconsistent. Sorry. Here,

[01:36:31] the. This is the function H, okay? Yeah, I'm going

[01:36:35] Update the slides. Here is H and here

[01:36:38] It should be H as well. So, I want

[01:36:39] find a function H,

[01:36:41] A P X in Y. OK? I have a set

[01:36:43] of the data available to me. Those

[01:36:46] Data is labeled. So, I have a

[01:36:47] feature vector on one side and one

[01:36:49] other label. And I need, in addition

[01:36:53] Okay, guys, I need a way to...

[01:36:54] measure

[01:36:56] It's the quality of the function that I learned.

[01:36:59] Okay? I'll call this metric P.

[01:37:02] uppercase for now and she will measure the

[01:37:04] quality of my job.

[01:37:06] Well, it doesn't really matter how it is now, but

[01:37:08] let's go. How does the process work?

[01:37:10] learning here

[01:37:14] Supervised? So, the first step

[01:37:16] It's about collecting data, okay? Regardless of

[01:37:18] The problem here, whether it's real estate, you'll...

[01:37:20] collect a list of properties, you will

[01:37:21] colocar os preços deles. If it were

[01:37:24] image classification, you would have it there

[01:37:27] cachorro, gato, cachorro e tal. Uh, if

[01:37:29] If it were expansion detection, you would have

[01:37:31] a list of emails and each email

[01:37:33] You have to tell this email to be spam, not...

[01:37:34] and? Yes, it isn't. So you have to collect

[01:37:35] this data. Isso tudo vai parar num

[01:37:37] dataset that we are

[01:37:38] Calling it with a capital D,

[01:37:40] Okay? Okay, so what's next?

[01:37:46] data, okay? Eh,

[01:37:51] Okay? Eu já vou falar o porquê, mas tem a

[01:37:54] ver com a qualidade de nossas funções. THE

[01:37:57] people want to measure the quality of our

[01:38:03] previsão, certo? We're talking about

[01:38:13] So, what's the idea here? I want

[01:38:15] to train a function, I want to find a

[01:38:18] function in a part of my data and I want

[01:38:22] Evaluate it elsewhere, okay? Why?

[01:38:27] Because I want to make sure that mine

[01:38:29] The model will do well or will...

[01:38:32] [clearing throat] get it right

[01:38:33] Examples he had never seen.

[01:38:37] Why?

[01:38:38] Because in the worst-case scenario, he could have

[01:38:41] I memorized my database and then

[01:38:43] it would only work for that base of

[01:38:45] data and it wouldn't work for anything else.

[01:38:48] Okay? So, when we talk about

[01:38:50] Machine learning, we talk about

[01:38:54] It's generally about forecasting, okay? And for

[01:38:57] to measure forecast quality, we

[01:39:00] we need to evaluate our H functions in

[01:39:03] data that they did not see during the

[01:39:05] Training, okay? to measure

[01:39:07] generalization, even, to measure how much

[01:39:09] that this function is able to solve

[01:39:11] problems she's never seen before,

[01:39:13] Basically, okay? And to evaluate the

[01:39:17] my role in problems that she never

[01:39:18] Look, I have to separate a portion of

[01:39:19] I have the data that I know the answer to, but

[01:39:21] but that my role has never seen,

[01:39:24] Okay? I need to know the answer here.

[01:39:26] So we can measure it later, right? But go ahead, I

[01:39:29] I'll only use it for that. So, the second

[01:39:30] The next step is to separate this dataset.

[01:39:33] slice it yourself, take a part that...

[01:39:35] People will call it a part of training,

[01:39:37] another part that we're going to call

[01:39:38] validation, another part that

[01:39:40] People will call it a test. And what's

[01:39:42] One part can't be in another, okay?

[01:39:45] And then these sets, mathematically

[01:39:47] Speaking of which, these sets are disjoint.

[01:39:48] Okay? What's in an element that is

[01:39:50] One set doesn't include the other, okay? Eh,

[01:39:55] So we have these three.

[01:39:56] subconjuntos. Beauty? Então, esses três

[01:39:58] Subsets, what do we do?

[01:40:00] Here now? It got complicated, didn't it? It bifurcated.

[01:40:03] So, let's move on to step two here. After

[01:40:06] to separate the data, we will train

[01:40:07] our model, that is, we will

[01:40:11] Okay? Eh, então aqui de novo, gente, eu

[01:40:24] tudo nos slides depois. So, what

[01:40:26] it happens? When I go to train one

[01:40:30] What does my job look like?

[01:40:37] looking for,

[01:40:38] Okay? Eu tenho que falar assim: "Ah, não

[01:40:42] possíveis funções. I need

[01:40:48] a straight line.

[01:40:51] Eh, there are infinitely many straight lines, right?

[01:41:06] So, the first thing we

[01:41:09] é definir meu espaço de funções. What

[01:41:46] Why? Porque o espaço de funções de

[01:42:09] Okay? Eu não consigo falar para você

[01:42:15] precisa buscar. right? Something like that,

[01:42:17] você precisa buscar. right? Something like that,

[01:42:19] a esses pontos. OK? Se você especificar

[01:42:24] algorithm that solves this problem.

[01:42:28] que busca por qualquer coisa, tá? That,

[01:42:30] isso, isso é impossível, tá? Yeah, we

[01:42:45] straight lines. Retas são definidas, né, com

[01:43:05] parâmetros, tá? If I didn't have

[01:43:08] specified that I am looking for

[01:43:09] straight lines, there was no way to know that,

[01:43:12] What are the parameters, what are they, how

[01:43:14] That's what I'm looking for, there's no way around it, it's...

[01:43:16] Impossible, understand? Yes, so we

[01:43:17] We need to define our [something] here.

[01:43:20] functional space. And that's extremely

[01:43:22] important. Each algorithm of

[01:43:24] Machine learning will define a

[01:43:25] Different type of function, okay? and a no

[01:43:28] You will be able to search in the other person's space.

[01:43:29] Basically, everyone looks for things in their own space.

[01:43:33] Yeah, that's partly why it's so difficult to

[01:43:36] to hit the nail on the head, people, to argue

[01:43:38] It is categorically clear that an algorithm is very...

[01:43:39] Better than the other, okay? If someone speaks

[01:43:41] This is probably already clear to you and

[01:43:44] Please disregard this, okay? There is even one

[01:43:47] theorem, right, which I'm not going to talk about here,

[01:43:50] But it's called No Free Lunch Theorem, right?

[01:43:52] It's the "no" theorem... there's no lunch

[01:43:55] Free, right? Yeah, basically.

[01:43:59] That's exactly what it says, okay? Oh, that

[01:44:02] There is no algorithm, actually.

[01:44:03] better than the other. Eh,

[01:44:07] and precisely because the space of functions

[01:44:09] Each algorithm is different from the other.

[01:44:12] Uh, and so, uh, it's not possible for you.

[01:44:16] to make this categorical analysis that a

[01:44:18] This is a fundamental thing. Decision trees

[01:44:20] They are better than linear regression, because

[01:44:22] For example, okay? They will do better in

[01:44:25] some dataset or other, but

[01:44:27] absolutely speaking without in all

[01:44:29] datasets, no, that's not possible.

[01:44:31] Okay, I'll tell you. Yeah, that's why we

[01:44:34] It studies various algorithms, not just one.

[01:44:38] The good thing, and that's where this space comes in, is...

[01:44:40] functions, we need to define what

[01:44:42] which is a function

[01:44:44] and how to find that best function.

[01:44:48] Como encontrar essa melhor função? the

[01:44:50] People call it a training algorithm.

[01:44:51] Each machine learning technique has some

[01:44:53] has defines a function and a form of

[01:44:56] find that best function. Yeah, each

[01:44:59] One does it in a different way.

[01:45:02] Yes, but he will receive this training.

[01:45:05] as an entry

[01:45:07] two slices of our dataset, of our

[01:45:09] A dataset, right? The slice of

[01:45:11] treinamento e a fatia de validação. And the

[01:45:13] People will stay here in this second phase.

[01:45:15] Okay?

[01:45:25] This process here until we have

[01:45:28] a good performance in our group

[01:45:31] validation.

[01:45:33] Então, esse devalide aqui, tá? It's mine

[01:45:41] Eh,

[01:45:43] Okay? Antes disso, perdão, eu vou treinar

[01:45:48] training.

[01:45:51] Beauty? That. E eu vou pegar essa função

[01:45:59] P, usando os meus dados de validação. Or

[01:46:12] uma um valor de qualidade. For example,

[01:46:26] vi. Vamos supor que são eh imagens aqui

[01:46:41] training. Agora quando eu vou

[01:46:44] validation,

[01:46:46] Okay? So, what happens then? Those

[01:46:53] Okay? So, what happens? Se o modelo

[01:47:03] validation. Então, qual objetivo aqui no

[01:47:08] essa performance de validação. I am

[01:47:10] Doing this here, look. O tempo que eu o

[01:47:13] if you have. Basicamente, quanto mais tempo eu

[01:47:14] tiver para iterar aqui, melhor. It does not have

[01:47:16] o número exato aqui, tá? We

[01:47:19] projects. Então, se tiver um mês para

[01:47:27] performance. Vamos supor que eu acertei

[01:47:31] enough. Então aí, beleza, eu venho

[01:47:51] Então, são mais novos sem exemplos. There

[01:47:56] aqui que saiu da etapa dois, ó. Then

[01:48:00] Trained H, he's coming here, okay? There

[01:48:04] I get my test and training set.

[01:48:07] It's this workout, sorry, and test, okay?

[01:48:10] Now again, but now it's in

[01:48:14] my test set. And that is the

[01:48:16] Final performance of my model, okay? Note

[01:48:19] that detest is different from due,

[01:48:23] Okay? In other words, why is it different?

[01:48:25] Because when I keep doing this cycle

[01:48:26] Here, I'm tilting my model.

[01:48:28] for that implicitly

[01:48:31] I'm enveloping my model.

[01:48:34] for validation. Even though I don't

[01:48:36] have you seen, uh,

[01:48:40] even though when it comes to training the

[01:48:42] model, my model hasn't seen the

[01:48:45] validation data, how do I stand?

[01:48:47] repeating this process over and over again

[01:48:50] Sometimes, trying to optimize this here

[01:48:52] metrics, basically you're introducing

[01:48:55] bias towards this validation set

[01:48:59] here. So, uh, the results

[01:49:02] expected, right, from your model they are not

[01:49:04] These, these are the ones here, look, in the detest.

[01:49:07] This will probably amount to...

[01:49:08] Slightly less than validation, okay?

[01:49:11] But this value here is the expected value.

[01:49:13] In other words, if you apply your model

[01:49:15] now it is

[01:49:18] No, in real life there, you grab and take, take.

[01:49:21] From the laboratory, put into production, the

[01:49:24] This is the one expected in production, okay?

[01:49:27] Not this one, but this one, okay?

[01:49:30] Eh,

[01:49:32] And that's a very reliable metric.

[01:49:34] Including statistics, okay? This metric

[01:49:37] of detest.

[01:49:39] Well, many of you might ask:

[01:49:40] "No, but I've seen a lot of people doing it."

[01:49:42] not having this validation set. THE

[01:49:43] "Do people do test training?" Yes, you know?

[01:49:46] There's a lot out there, okay? Is it ideal? No

[01:49:51] solve. It often solves the problem. When

[01:49:55] Which sometimes solves the problem?

[01:49:57] If you have limited data,

[01:50:00] How are you doing? It becomes difficult to

[01:50:01] to validate, to divide things into three.

[01:50:03] Sometimes you have, imagine that you

[01:50:04] working with medical imaging, someone

[01:50:06] He said that he works with, uh, with

[01:50:08] Veterinarian, right? Yeah, sometimes you have

[01:50:10] There are pictures of animals there. I remember when

[01:50:12] I was there in Viçosa, right, department.

[01:50:14] There's a really strong veterinary school there, and then I

[01:50:17] I remember we used to hear about several

[01:50:18] projects that people want to estimate

[01:50:20] weight of a cow, for example, with an image of

[01:50:22] photographic. There's a camera there that keeps passing by.

[01:50:25] the ox, you want, you just want to come to

[01:50:28] image, she estimates the body mass of

[01:50:30] That's awesome, isn't it? Eh, usando uma câmera de

[01:50:33] Ideally, it would be low cost.

[01:50:36] Eh,

[01:50:38] and this problem is even an easy problem to

[01:50:40] You can get the data, okay? Because you

[01:50:42] Put the camera in the pasture and stay there,

[01:50:44] The problem is that you have to write it down.

[01:50:45] the weight of the animal, so you have to

[01:50:46] pass it over the scale to get the

[01:50:47] That's a real fact, right? So, it's easy if

[01:50:49] you have an intern there to do

[01:50:51] that. Hmm. But let's think of another one.

[01:50:54] Examples of diseases, for instance. Then

[01:50:56] You have an X-ray of an animal there with

[01:50:58] Cancer, for example, right? Ah, a being

[01:51:01] Human, really. And first of all, you

[01:51:03] You need individuals with cancer, right?

[01:51:06] Well, secondly, you need a

[01:51:08] image, from a specific piece of equipment

[01:51:10] To capture these images, right? Perhaps

[01:51:13] magnetic resonance imaging, something

[01:51:15] So, right? right? So, the collection of

[01:51:17] Data is very expensive, you have to do that, it involves

[01:51:20] ethical problems that you, in the end, don't even

[01:51:22] everyone will want to offer this type

[01:51:23] de dados, né? So, it's very...

[01:51:26] It's difficult for you to access that data, it is.

[01:51:28] It is very expensive to collect this data.

[01:51:36] Okay? Não tem como você na internet, você

[01:51:39] Find it, you understand?

[01:51:45] from the. Nesse caso, você

[01:51:47] It's just a matter of separating training and testing, including

[01:51:54] prefers. Se você quiser uma uma

[01:52:01] Validation, playing the test. If you

[01:52:04] If you want to have one, it's greater confidence in

[01:52:11] It's ideal. O o paradigma ideal é esse

[01:52:13] Here, okay? de ter essas três splits aqui,

[01:52:18] beauty?

[01:52:23] Okay? Até aqui acho que devo tá falando

[01:52:26] to have seen.

[01:52:37] Yeah, right? Quando os dados são rotulados,

[01:52:48] ambiente, tá? We call it

[01:52:53] Okay? Eh, o mesmo paradigma funciona em

[01:52:58] people? Eh, a diferença é como que

[01:53:00] How do these metrics work, how does the

[01:53:02] people specify these P metrics, such as

[01:53:04] That's because we train these models, or

[01:53:05] In other words, how do we specify...

[01:53:06] the functional space, how do we

[01:53:08] specifies the training algorithm,

[01:53:10] Okay? And how do we evaluate this here with

[01:53:11] this metric P. So, like, uh,

[01:53:15] mainly box number two here goes

[01:53:17] That should be our focus in this subject, okay? THE

[01:53:20] We're going to talk about various techniques here.

[01:53:22] which will define different spaces of

[01:53:23] functions and different algorithms of

[01:53:25] training. Along with this process, the

[01:53:27] people will stay will evaluate

[01:53:29] Study evaluation metrics, okay? Yeah, and

[01:53:33] also techniques here such as to separate

[01:53:35] These are the data here, okay? So that's it, we

[01:53:37] You'll see, it's along with the techniques that are

[01:53:41] Box number two, okay?

[01:53:45] Eh,

[01:53:47] okay

[01:53:49] good. The first little box there, collection of

[01:53:51] data, okay? Well, I don't have it here, it doesn't have it.

[01:53:55] There's a lot to talk about because, well,

[01:53:58] It depends a lot, it depends a lot on

[01:54:00] several of the types of problems you have,

[01:54:02] Like I said, right? If you have images

[01:54:03] medical professionals, the data collection will be from a

[01:54:04] way. If you're talking about spam, then...

[01:54:06] Spam detection will be handled by someone else. Eh,

[01:54:09] image classification, prediction of

[01:54:12] Furniture, in short, all of that will have collections.

[01:54:15] of difference data. But what does the

[01:54:16] people can talk about the types of

[01:54:18] data?

[01:54:20] Well, in literature it's very common you

[01:54:21] talking about these types of data

[01:54:24] structured and unstructured. Then,

[01:54:26] I just wanted to say that the data

[01:54:28] Structured data consists of tabular data, therefore

[01:54:30] These are data that already come in tables.

[01:54:32] Of course, right? Uh, Excel data,

[01:54:35] Spreadsheet, okay? Everything you have in

[01:54:37] company spreadsheet, whatever you want

[01:54:39] to imagine that it's already done, these are facts that

[01:54:41] They are naturally stored in

[01:54:43] A table, you can think of it as data.

[01:54:44] structured, right? They are naturally

[01:54:46] structured because that's how we

[01:54:48] stores them naturally, okay, in

[01:54:50] tables. Eh, então, por exemplo, aqui,

[01:54:55] Well, in the case of real estate, there's a...

[01:54:57] in a table of properties, each row, one

[01:54:59] apartment or a house. Here you have the

[01:55:01] square meter size, the neighborhood here,

[01:55:03] number of rooms and at the end here you

[01:55:05] It has the label. So, uh, the

[01:55:09] These are the first columns here.

[01:55:15] they will be our vector of

[01:55:16] characteristics, okay? In other words, each line

[01:55:18] Here, uh, the first ones, let's suppose.

[01:55:21] that had n columns here, the first ones

[01:55:23] n - 1 columns would be the as

[01:55:26] characteristics of each example. Then,

[01:55:28] these n -1

[01:55:31] uh, columns of this first row

[01:55:33] This would be the feature vector of that

[01:55:35] property. And the label for this property here is...

[01:55:37] its price. Uh, here, let's suppose, in,

[01:55:40] Yeah, thousands of reais, R$ 600,000, I know.

[01:55:43] There, R$ 350,000. Here are apartments in

[01:55:46] BH.

[01:55:48] Well, another example would be, for example...

[01:55:50] example,

[01:55:52] Uh, a dataset like this one is more

[01:55:56] different, uh, from, how can I put it,

[01:56:00] Internet ad generation.

[01:56:03] Well, so when today most of the

[01:56:05] portals that have ads, I don't know, on

[01:56:07] YouTube, for example, when you enter

[01:56:08] On YouTube, there are ads there.

[01:56:11] banner formats and such, it's for each

[01:56:14] person, when when I enter that

[01:56:16] site, when each of you enters

[01:56:18] on that site, right, uh, the banners are

[01:56:20] different.

[01:56:22] Why? Because the chance of me clicking

[01:56:23] in an advertisement,

[01:56:25] I, Lucas, click on an advertisement,

[01:56:26] Unlike one of you. Then I'm going to get it.

[01:56:29] o nome Rafael aqui. It is different from

[01:56:32] If you click on the same ad as me,

[01:56:33] did you understand? And each one has a profile.

[01:56:35] different from consumption.

[01:56:37] So, what happens? What do they

[01:56:38] What do portals do? When you enter the

[01:56:40] site, it doesn't show one, it doesn't show

[01:56:43] A random ad for you. He

[01:56:45] calculates within all ads

[01:56:48] click,

[01:56:50] did you understand? So, ex of a

[01:56:51] machine learning algorithm that

[01:56:52] choose the best ad for

[01:56:54] put it there. How do they train?

[01:56:56] These algorithms? Eles coletam

[01:57:01] It's basically click logs.

[01:57:05] So, YouTube, what does it do? If

[01:57:14] assim, o ID do anúncio, tá? And then it clicked.

[01:57:22] He watched the video, but didn't click on the ad, then...

[01:57:34] user interaction with the website

[01:57:43] there for that specific user,

[01:57:47] because, therefore, the user's location, the

[01:57:50] different, so you can uh

[01:57:53] estimate a better ad there for

[01:57:55] that user,

[01:57:57] Okay? It is also structured data, not

[01:57:58] It seems so, perhaps a more comprehensive example.

[01:57:59] Surprising here, but it's a fact.

[01:58:01] structured that you keep in a

[01:58:02] There's a little table there where you define which ones.

[01:58:05] features you want to consider

[01:58:06] here.

[01:58:08] Now that it's unstructured data. In

[01:58:10] In general, textual data are not

[01:58:12] structured. Why? Because we

[01:58:13] There's a sequence of here now, right?

[01:58:16] characters. We don't know the size.

[01:58:17] From this sequence, right? The email can be

[01:58:19] big, it can be small, anyway, it can be

[01:58:22] uppercase letter lowercase letter. we

[01:58:23] does not know the a priori structure of that

[01:58:25] text. So, we call that...

[01:58:27] Unstructured data, okay? Eh,

[01:58:29] We also need to have techniques.

[01:58:31] Vectorization. We, like the data

[01:58:32] They are unstructured, we need

[01:58:34] Okay, let's transform this into a vector? Eh,

[01:58:37] And then we need to think about how

[01:58:38] to do that yet, because they are not

[01:58:40] structured in vector format. Here's the data already

[01:58:42] They are structured as vectors.

[01:58:44] Right, naturally. So, that's not the case.

[01:58:46] Vectorization step. Here it is, uh, here I

[01:58:49] I have to take this text, transform it.

[01:58:50] in a vector. Same thing in image. THE

[01:58:53] The image is also not a vector.

[01:58:55] Naturally, right? She, she's even more

[01:58:57] easy to vectorize, but we have to

[01:58:59] Also, transform it into a vector, okay? One

[01:59:01] Another type of example here is audio,

[01:59:02] Okay? I don't know if I posted it here, but eh

[01:59:07] Audio is also a type of data.

[01:59:08] structured. So when you get there

[01:59:11] those systems that translate text,

[01:59:12] You're using WhatsApp today, right? He does

[01:59:14] that. When you send an audio message there to

[01:59:16] someone, uh, then you open the application,

[01:59:18] It has to be transcribed from there, right? Then

[01:59:21] You click transcribe, and it transforms the

[01:59:23] Audio in a text. This is an algorithm of

[01:59:25] Machine learning as well.

[01:59:26] It's probably a neural network, right? Eh,

[01:59:30] that takes this audio, processes this audio

[01:59:32] and offers that as an exit strategy. The input is audio.

[01:59:34] An audio signal like this, okay? Eh, that is

[01:59:37] That's a really huge number, isn't it? And and

[01:59:41] This results in a sequence of outputs.

[01:59:43] words.

[01:59:46] Uh, it's a function that maps audio.

[01:59:48] Basically, it's a string.

[01:59:51] Yeah, it's not easy at all either.

[01:59:54] to think of a function via rules that does

[01:59:56] this mapping. So, that's why

[01:59:57] Machine learning works here in

[01:59:59] Overall, it's much better than any algorithm.

[02:00:01] based on rules that any being

[02:00:02] It's very unlikely that humans have invented it, because it's very...

[02:00:04] It's difficult to think of how to do that. Eh,

[02:00:09] and audio is also a non-standard piece of data

[02:00:11] structured, because it is not a either

[02:00:12] tabulated data. you have to vectorize from

[02:00:14] somehow, transform this audio into a

[02:00:15] feature vector.

[02:00:17] That's right. That's great. If I have a vector of

[02:00:19] characteristics of the other side of the output

[02:00:21] It also has a text, so I have to

[02:00:22] Vectorize the text as well. And then I have

[02:00:24] That's when I can learn something.

[02:00:26] A function that maps one to the other, right? Then

[02:00:29] whenever you have data that

[02:00:31] you have to vectorize, generally that

[02:00:33] The problem is unstructured, okay?

[02:00:38] good? Regarding the models, what is the little box?

[02:00:40] Two there, that's going to be our focus.

[02:00:42] discipline. Okay? There are many, many

[02:00:44] machine learning algorithms and

[02:00:47] each one will consider a space of

[02:00:49] different functions. Linear regression is a

[02:00:52] regression algorithm that assumes that

[02:00:55] The functions are linear. So he just

[02:00:57] You can learn linear functions, right?

[02:01:00] He just can't learn.

[02:01:01] It's a quadratic function, there's no way around it.

[02:01:03] Okay? the scope of the algorithm, eh, the, or

[02:01:06] In other words, in a more formal way, uh, the

[02:01:10] space for characteristics or forgiveness,

[02:01:12] linear regression function space

[02:01:15] These are linear functions. Regression

[02:01:17] logistics, classification algorithm,

[02:01:20] Okay? Yeah, also linear, it has that name.

[02:01:24] regression, but he but he of

[02:01:26] Classification, that's really confusing, okay?

[02:01:29] Well, logistic regression is a

[02:01:30] a classification algorithm that assumes a

[02:01:33] space for logistics functions, which is a

[02:01:36] A very common function in the economy, right? Eh,

[02:01:39] I'll show you later when the

[02:01:40] People will talk about her, but it's a space for

[02:01:43] defined, concrete, infinite functions

[02:01:47] but well defined.

[02:01:51] This one is more versatile, both classification

[02:01:53] how much regression,

[02:01:55] Eh,

[02:01:58] represented as decision trees,

[02:02:01] Okay? Ou seja, você vai ter nós ali, que

[02:02:02] These are decision points, and that's where you'll have...

[02:02:05] So, yes or no, you're going to have

[02:02:08] uh, that the model will uh

[02:02:21] example. Então, ele vai pegar assim, por

[02:02:38] Look, ah, the property is in such and such neighborhood, it is.

[02:02:41] In the center? Yes. No. Oh, no. So, the

[02:02:44] The property has a subway nearby.

[02:02:49] Yes. Ah, so if it's in the center, it has... eh eh

[02:02:54] It has four, it has more than 3/4, it's in

[02:02:55] downtown, there's a subway nearby, oh, so the

[02:02:57] This piece of furniture is worth this much. Then,

[02:03:00] so we train a model

[02:03:01] which will include inferring what the

[02:03:04] Questions to ask that are best, okay?

[02:03:08] Eh, it foresees this property. But

[02:03:11] Either way, we assume that the

[02:03:12] A function is a decision tree, therefore, and

[02:03:15] we search for the best tree for a

[02:03:17] given dataset. So, again,

[02:03:19] There's no secret, folks. Each algorithm

[02:03:20] Assuming it has a certain restriction, which is...

[02:03:23] type of function he can find.

[02:03:25] There's no way a tree can make a decision, because

[02:03:27] For example, uh, something you'll see

[02:03:29] later on, but the tree of

[02:03:31] She'll learn her decision, she'll remember.

[02:03:33] Remember when we talked about

[02:03:33] classification? Classification is trying to

[02:03:35] separating the space for labels is from

[02:03:38] Examples. So, we have the little balls.

[02:03:39] Red and green, okay? The tree of

[02:03:42] In that decision, she could only cut the space.

[02:03:43] Orthogonally like this, look.

[02:03:45] So she can never cut the space.

[02:03:48] diagonally, you can't because

[02:03:51] because the functions are limited to

[02:03:53] These trees, okay? Uh, so this is a

[02:03:55] The algorithm has limitations; it doesn't work, it doesn't.

[02:03:58] can learn to draw a straight line at 45º

[02:04:00] Like this, look. He's going to have to do a lot.

[02:04:02] Like this, step by step, to achieve

[02:04:04] to approximate that line, but he never

[02:04:06] You can draw a straight line like that.

[02:04:09] Well, and a straight line in a linear direction already

[02:04:10] She manages, but she also only stays

[02:04:12] limited to a straight line. the decision tree

[02:04:14] It can draw multiple orthogonal lines.

[02:04:17] So there are advantages and disadvantages, okay? Of

[02:04:19] New, no free snacks. Here the

[02:04:21] The theorem states that there is no better algorithm.

[02:04:22] than the other. Eh,

[02:04:26] the closest cavios here we

[02:04:29] it assumes distance as a central function.

[02:04:31] So, the premise here is that data

[02:04:34] Next ones have the same label, okay? Or

[02:04:36] In other words, I look at my neighbors, if they

[02:04:37] My neighbors are green, I

[02:04:39] I'm green too. Basically, that's it.

[02:04:41] So here's the premise, here's the premise.

[02:04:42] Here, we're talking about similarity, okay? Yes, sorry, it is

[02:04:45] Distance is proximity, okay? Yeah, so

[02:04:49] this algorithm is strictly uh

[02:04:52] It is limited by the distance metric.

[02:04:54] which you define here.

[02:04:56] Uh, base ship, yeah, a base algorithm.

[02:04:59] Naive, right? another algorithm that

[02:05:01] assume here h

[02:05:04] one of the basic theorems as a function, as

[02:05:08] Function space, okay? So you

[02:05:10] We can do it, we'll use the theorem of

[02:05:11] The basis for this is finding the probability.

[02:05:15] Okay, conditional, that is, probability.

[02:05:18] of a given example of a given vector of

[02:05:20] characteristic X having label Y, right?

[02:05:26] Uh, so here we're going to use the

[02:05:27] probabilistic modeling even for

[02:05:28] solve the problem.

[02:05:31] Yeah, SVM. SVM is very similar to

[02:05:33] Linear regression, okay? He takes up space.

[02:05:35] of straight lines. However, uh, the algorithm of

[02:05:40] The search here is different.

[02:05:42] Well, in linear regression, the algorithm

[02:05:44] optimization to find that best

[02:05:46] Straight, okay? Yeah, we have several, even.

[02:05:49] Possible, but one of the ones we're going to...

[02:05:51] Seeing is the descending gradient. He will

[02:05:53] Try it, he'll start with a straight line.

[02:05:54] It's random and will try to adjust.

[02:05:56] iteratively this line for the points is

[02:06:00] which are properties, for example. So, the

[02:06:02] One can start with a straight line like this in

[02:06:03] Zero, I don't know, and then trying to adjust it.

[02:06:05] iteratively like this. He already has SVM.

[02:06:08] a much more sophisticated algorithm,

[02:06:10] Okay? To find that optimal line that

[02:06:13] It separates spaces, for example, from spam.

[02:06:15] No spam. Eh,

[02:06:18] And we'll see that he has...

[02:06:20] one, it has a very sophisticated design.

[02:06:23] to find that line. In fact, he

[02:06:25] It has much stronger guarantees than...

[02:06:27] linear regression. Yeah, and that's why he went.

[02:06:28] It's an algorithm that's still around today, right? It's very...

[02:06:30] popular, but it was an algorithm that

[02:06:31] It greatly revolutionized the field of

[02:06:32] machine learning, because it has

[02:06:34] very strong theoretical guarantees, uh, that

[02:06:37] the other algorithms previously did not

[02:06:38] he had. artificial neural networks, another

[02:06:41] group of algorithms, guys, that's it

[02:06:44] They occupy the space of composite functions.

[02:06:47] So, neural networks, they are nothing more than

[02:06:48] They are, uh, algorithms for learning.

[02:06:51] these functions. So, f of g, of h, of

[02:06:53] x, right, they remember these functions in

[02:06:55] School, right? F of g, you have a function

[02:06:58] It's a compound, right? you have e f, which is a

[02:07:00] external function that receives as an argument

[02:07:02] another function that is a g, by its

[02:07:04] It could, in turn, receive another function that

[02:07:06] if we can call it t and so on

[02:07:08] in front. Então, as redes neurais elas

[02:07:10] They make up functions to try to separate the

[02:07:16] Non-linear functions, okay? Hey, from

[02:07:19] Algorithms here, perhaps neural networks.

[02:07:23] because they have that flexibility of

[02:07:29] complexity. In fact, there is one.

[02:07:30] algorithm that proves that it is a network

[02:07:33] artificial neural networks are infinite

[02:07:35] neurons, of course, that's an algorithm.

[02:07:37] Theoretical, right? It's a theorem that

[02:07:40] Theoretically, obviously, right?

[02:07:42] these conditions, but if you had

[02:07:44] infinite neurons, a neural network

[02:07:46] It can bring any function closer.

[02:07:47] That's basically it. So, the neural network

[02:07:49] It's basically a universal approximator.

[02:07:52] Okay? Yeah, so,

[02:07:55] Well, it's actually interesting to think that maybe...

[02:07:59] That's why these models are so successful, uh,

[02:08:02] Nowadays, they took a while to, you know,

[02:08:04] Historically, networks have been slow to...

[02:08:06] Revenge, okay? Yeah, even in the 90s,

[02:08:10] So, uh, not just the 90s, but even

[02:08:14] when we talk about networks

[02:08:15] neural, I'm going to talk about the history of

[02:08:17] neural networks, they had high and

[02:08:18] bass like that, and very strong bass,

[02:08:20] inclusive. So, uh, it's surprising.

[02:08:24] to look and say: "Wow, even with

[02:08:26] with those bass notes that almost

[02:08:29] They generated a great deal of distrust.

[02:08:30] In these algorithms, then they come and if

[02:08:32] They become today what they have become in

[02:08:34] This AI revolution of the 2010s...

[02:08:37] front."

[02:08:39] Finally, folks, there's a series of

[02:08:40] algorithms, we're going to study them all.

[02:08:41] These ones here, okay? Yes, of course.

[02:08:47] There's a lot more to say than we can.

[02:08:49] It will be covered in the subject.

[02:08:52] So, uh,

[02:08:55] But anyway, I wanted to give this overview.

[02:08:56] general that each algorithm represents

[02:08:58] a function in a certain way and has an e

[02:09:00] It also defines an algorithm for

[02:09:02] Finding that best function is a matter of...

[02:09:06] In a specific way, okay? Any questions?

[02:09:09] Hey everyone!

[02:09:15] Okay, things can happen, they are more...

[02:09:17] General information now, okay? So, we're going.

[02:09:19] From the most general perspective. To be more specific.

[02:09:22] Eh,

[02:09:23] So, I think that today, not even

[02:09:25] We might not even have time to cover it.

[02:09:26] KNN, maybe not, right? It's already 9:30.

[02:09:30] So, I think we're going to

[02:09:32] I'll wrap this up here on the next slides.

[02:09:35] this part of the foundation

[02:09:37] And then we'll talk about KNN next time.

[02:09:40] classroom,

[02:09:42] No problem, okay everyone? we

[02:09:43] He can cover everything easily.

[02:09:47] Well, the third part there, which is the

[02:09:49] Model evaluation, third box

[02:09:51] From our diagram there, right, it's a measure.

[02:09:54] Performance, which I called P, okay?

[02:09:57] Yeah, but it's more common for us to say it like this, huh,

[02:10:01] There are two common ways to evaluate these.

[02:10:03] models, okay? we have these these uh

[02:10:06] performance functions that increase the greater

[02:10:08] It's better, or rather, it's even more common to use the function.

[02:10:18] Okay? Well, then it's more common to evaluate the

[02:10:20] quantity of error rather than evaluating the

[02:10:21] number of correct answers. Quantity

[02:10:24] We want to maximize our success.

[02:10:26] We want the amount of error.

[02:10:27] minimize. So, the two things are...

[02:10:29] inversely proportional. Here is

[02:10:32] It's more common for us to talk about minimization.

[02:10:34] rather than maximization,

[02:10:35] Okay? So, that's why I'm going to give you an idea.

[02:10:37] Here's how to evaluate models, okay? Eh,

[02:10:41] But we'll see several ways.

[02:10:42] different throughout the course. That's all

[02:10:45] not to remain solely in the abstract realm either.

[02:10:46] Here, so we have some examples, okay?

[02:10:50] Yeah, but the P performance function there,

[02:10:53] Or am I now calling it the function of

[02:10:54] error, L, which comes from the English word for loss,

[02:10:59] error function, it will evaluate the function

[02:11:02] here f. Again, I'm going to review these.

[02:11:04] slides so that they stay

[02:11:07] evaluate the function h, okay? Em um dado

[02:11:10] test or validation dataset,

[02:11:13] Okay?

[02:11:16] Well, then she fundamentally must

[02:11:19] to measure how far the predictions of

[02:11:21] model, I'm calling the forecast here.

[02:11:23] The Y-shaped hat model, okay everyone? Then

[02:11:25] So, imagine I have a model.

[02:11:28] F here now, that's what I want.

[02:11:32] Evaluate my F-model or function. Model

[02:11:36] people? Uh, so I want to evaluate the

[02:11:42] Okay? Well, for all vectors of

[02:11:45] characteristics here, Xi, then X1, X2,

[02:11:51] Based on my F model, it will return to me.

[02:11:53] A prediction here, Little Red Riding Hood. That

[02:11:55] The hat comes from the prediction. And it will meander,

[02:11:57] return a Y label, expected hat

[02:12:09] 1.

[02:12:11] How do I measure the error? Eu comparo

[02:12:14] with my real label here, look, that I

[02:12:15] I have. So I compare this prediction Y

[02:12:23] and Y1 I and, in the case of Y1, Y hat. I make

[02:12:27] This applies to 2, 3, and 4. So I'm going to...

[02:12:30] to have for each example from my set of

[02:12:33] Then I can add all of that up and have a

[02:12:37] average. If I want, I can split it.

[02:12:38] based on the number of examples.

[02:12:41] I can divide by m here, look. We are all

[02:12:44] the errors, divided by m. I have the error.

[02:12:45] average,

[02:12:47] Okay? Eh,

[02:12:54] Error, okay? Uma coisa que é importante de

[02:12:57] Speaking of which, right? As funções de erro, elas são

[02:13:04] a value of zero. Yeah, but

[02:13:09] There is no such thing as a negative error.

[02:13:12] Well, the strange error to say is -5.

[02:13:16] Yeah, so you're getting five right. That it?

[02:13:19] So, the error always ranges from zero to one.

[02:13:27] L, de f, melhor a função f, tá? Okay? Or

[02:13:32] improve the function. In other words, it's a measure.

[02:13:34] This is a real error, a quality issue, right?

[02:13:35] Okay, about performance and all that. That's what I call a

[02:13:37] The opposite measure, right? We are measuring

[02:13:39] Here I make mistakes and I don't get it right. So, a

[02:13:42] The function with zero errors is zero, right? a function

[02:13:45] f with zero error, it will then predict

[02:13:48] correctly all the labels in the example

[02:13:51] of the data sets D here. Then,

[02:13:54] That means I got all of them right.

[02:13:55] Real labels here. That means that

[02:13:59] the and returns the hat i, she always

[02:14:02] You got the real label right here, okay? Eh,

[02:14:09] and as a rule, these error functions

[02:14:11] They are normalized, as I said.

[02:14:13] For you, like this, to stay

[02:14:17] So, generally we have a function.

[02:14:18] of error that we usually

[02:14:20] divide the error by the number of

[02:14:22] Examples, uh, so that this value does not

[02:14:32] examples, because the total there is 1000

[02:14:34] There will probably be more errors, right?

[02:14:36] more than the sum of three errors.

[02:14:38] So, in order for these measures to be effective

[02:14:39] differences

[02:14:41] or standardized, it usually divides

[02:14:43] based on the number of examples. Eh, é mais para

[02:14:48] Results, okay? So, a very big mistake

[02:14:52] Here, mainly in regression, okay?

[02:14:57] average square or ms, okay? This function of

[02:14:59] The error appears in a lot of places in

[02:15:04] also,

[02:15:05] matemática, sem dúvida, né? In the area of

[02:15:13] machine, okay? this error that appears all the time

[02:15:14] place. So, what's good here? AND

[02:15:18] The mean squared error. So what is it?

[02:15:20] The squared error? It's about catching, right, the o y

[02:15:23] This hat here is the result of my

[02:15:25] model,

[02:15:27] Subtract from the actual label. Let's assume that

[02:15:29] I was talking about the price of

[02:15:30] property. Vamos supor que o meu eu tenho

[02:15:32] um imóvel aqui de 3/4, tá? And mine

[02:15:35] Model F here, here I have 3/4. My

[02:15:39] Let's assume the actual label was 800, okay?

[02:15:48] isso ao quadrado, tá? To accommodate

[02:15:55] Eh

[02:15:59] negative. Então, esse quadrado aqui a

[02:16:01] people we use to turn the mistake

[02:16:03] sempre positivo. As I told you

[02:16:06] right? Então, esse quadrado a gente faz,

[02:16:12] which facilitates the training of some

[02:16:19] basically. E depois a gente vê isso eh

[02:16:22] that this can help in training

[02:16:23] neural networks, of neural networks and even of

[02:16:28] Okay? Então isso tem várias várias razões

[02:16:30] para para esse quadrado aqui. Hey, so,

[02:16:34] beauty? Aí eu faço isso para todos esse

[02:16:38] m é número de exemplos. So I'll take it.

[02:16:57] foi zero. Then I'll move on to the next one, the third.

[02:16:59] Let's suppose the prediction was 500.

[02:17:05] Square, right? That's 25,000, right? right?

[02:17:10] That's it, and so on until m, okay? Then,

[02:17:20] 1000 elementos nessa soma. I have one

[02:17:42] elementos nesse somatório aqui. It was left

[02:17:50] Okay

[02:17:52] beauty? Then,

[02:17:54] Eh,

[02:17:57] To finish up here, I think that...

[02:17:59] Guys, there are two more slides here, uh,

[02:18:03] I wanted to talk a little more about

[02:18:04] Examples of validation and testing, okay,

[02:18:06] people? that there are situations there that will

[02:18:08] what will happen from now on, which I already

[02:18:15] Uh, and I want to explain more.

[02:18:17] deeply why do we divide the

[02:18:19] dataset in three eh

[02:18:22] training subsets, validation,

[02:18:25] teritis.

[02:18:27] Well, we do this to measure, like I...

[02:18:29] I said, generalization of the model. So, the

[02:18:31] What is generalization? the ability to

[02:18:33] Prediction based on data that has never been seen before.

[02:18:35] before,

[02:18:36] Okay? Okay, but let's understand this a little bit.

[02:18:39] more

[02:18:41] from the point of view now of

[02:18:43] dataset,

[02:18:46] how do we use these these

[02:18:48] These are disjoint slices of these datasets.

[02:18:50] So, our current one, as I already

[02:18:52] I said, this is just another way of

[02:18:53] to present the that diagram

[02:18:55] previous, folks, perhaps to illustrate the

[02:18:58] Here's an idea from a different angle, okay? So, the

[02:19:00] people use our set of

[02:19:01] training to train the model. That

[02:19:04] I've said this before.

[02:19:07] Well, the validation set we use

[02:19:09] to select the best model during

[02:19:10] The training, okay? And the test set

[02:19:13] We use it to report the result.

[02:19:15] end. I've already told you this. I

[02:19:17] I'm separating them now, doing the

[02:19:18] diagram from the point of view of the dates of

[02:19:20] of forgiveness, of the subsets here,

[02:19:24] Okay? Look how interesting,

[02:19:28] when what can happen during

[02:19:30] The training, okay? What do we do?

[02:19:33] People keep training our model.

[02:19:35] Here, okay? Experimentally, we become

[02:19:38] running experiments like this, training,

[02:19:39] helping the model and training it is even

[02:19:44] Or while, you know, the error is high in

[02:19:47] training set. I already did that.

[02:19:49] I also mentioned it there earlier, I'm just...

[02:19:51] rewriting here. So, while mine

[02:19:53] if the model has a very high error in

[02:19:55] Training, I'll stay here training.

[02:19:58] He's a model. One hour, let's suppose that I

[02:20:00] I have a very low error rate. Let's suppose

[02:20:02] I only got one wrong out of 100.

[02:20:04] image.

[02:20:06] Okay, all good? Then I'll pass it on, okay, to

[02:20:09] validation set.

[02:20:11] Now, you know, the order here got out of whack.

[02:20:13] that's what I wanted. Mas é o seguinte, gente,

[02:20:15] this problem here, when the

[02:20:19] people have a model

[02:20:21] which has a very high error rate overall

[02:20:24] Training, okay? This characteristic

[02:20:27] which we call underadjustment, okay? Eh,

[02:20:33] He trained, but he has a very high error rate.

[02:20:35] training, we call that

[02:20:36] subajuste ou underfit, tá? Uh, in

[02:20:42] still very high in training.

[02:20:45] Well, when,

[02:20:52] paraa validação, tá? We want

[02:20:54] selecionar o melhor modelo agora. What

[02:20:56] What could happen? Eu posso ter um erro

[02:21:00] very high validation level. So here

[02:21:01] houve um certo contraste, né? I had

[02:21:07] training, but when I applied the

[02:21:27] erra 50 na validação. In other words, when

[02:21:29] essa diferença é muito alta, tá? We

[02:21:35] In English, right? Eh, vocês já devem ter

[02:21:50] Okay? Então, seu modelo não generalizou,

[02:21:55] training.

[02:21:57] It doesn't help much. Então, quando isso

[02:22:24] Okay, everyone? Você só consegue ajustar

[02:22:26] in training. Então, às vezes você tem

[02:22:31] Interesting, isn't it? Para quem já estudou

[02:22:47] Its value, okay? Eh,

[02:22:51] In optimization, you have to look for

[02:22:53] these parameters, by these by these

[02:22:55] arguments that minimize the function.

[02:22:56] Imagine the quadratic function, you have

[02:22:57] that you find the point here, which is the

[02:22:59] minimum point of the function, right, that a

[02:23:01] function, a parabola like this, you

[02:23:03] To find this point here, right?

[02:23:05] Well, when you find the point, you

[02:23:07] have you already found the solution to your problem?

[02:23:09] optimization, of your problem of

[02:23:10] optimization. You found the spot there.

[02:23:11] minimum. [clearing throat]

[02:23:13] Well, in machine learning, we

[02:23:14] It also has an optimization problem.

[02:23:16] We want to find what we're looking for, and we want to minimize the...

[02:23:18] Error, okay? Então, a ideia mesmo, a gente

[02:23:20] It has an error function, okay? what

[02:23:23] Logically, it is dependent on the...

[02:23:25] training and validation set Then

[02:23:27] You might think that the error function is

[02:23:28] the same, but when you apply it to

[02:23:30] training, it has a format. When

[02:23:32] You apply it to the test, it has

[02:23:34] Another format, okay? But do you want to?

[02:23:36] finding that you can only optimize

[02:23:39] the training error,

[02:23:41] Okay? It's your algorithm, actually, of

[02:23:43] optimization or the algorithm of

[02:23:45] training, he'll find it, right?

[02:23:48] minimum error or minimum point here

[02:23:51] in the training data. But in

[02:23:53] The depth you want to measure, you want, your

[02:23:55] The ultimate goal is minimization in

[02:23:57] validation set,

[02:23:59] Okay? So, the optimization here is...

[02:24:02] indirect,

[02:24:04] Okay? So this is one of the main ones.

[02:24:05] differences in mathematical optimization,

[02:24:08] So, uh, combinatorics, right, or not, or

[02:24:12] continuous, right, uh,

[02:24:16] machine learning. Machine learning is

[02:24:17] very similar to comization, but the

[02:24:19] The difference is that's what we need.

[02:24:21] We optimize training, but deep down we...

[02:24:24] wants to minimize validation. So, it is

[02:24:27] Optimization is always an indirect approach here, okay?

[02:24:29] Yeah, and cool. The time you finish

[02:24:32] here,

[02:24:36] when you finish this process with a

[02:24:38] low error rate in training and low

[02:24:40] validation, then you use the set of

[02:24:41] test, you will report a result and

[02:24:43] The process is over, a cycle has ended there.

[02:24:46] our

[02:24:48] supervised learning process.

[02:24:51] Then you can continue, right? Of course, one

[02:24:52] project lifecycle, that's where you

[02:24:54] It stays that way each year, for example, you do

[02:24:56] one cycle of that or several cycles

[02:24:58] That one, right? Well, it's not always collection of

[02:25:01] The data is very fast. So, sometimes

[02:25:03] You spend months there collecting data,

[02:25:04] then you spend more months training the

[02:25:06] model, then you carry a result, then

[02:25:09] You put it into production, then the year changes,

[02:25:11] then you collect more data and then you

[02:25:13] spends more months training the model, then

[02:25:15] You create a production. Finally, these

[02:25:17] Cycles repeat indefinitely, okay? Eh

[02:25:20] In those environments, it's a production environment.

[02:25:25] To really wrap things up right now, I

[02:25:27] I just wanted to show a visualization.

[02:25:29] of these cases of underadjustment, overadjustment and

[02:25:32] everything else. Uh, so, assuming here a

[02:25:35] classification case, a problem of

[02:25:37] classification,

[02:25:39] Yeah, imagine this again, right? These

[02:25:41] little balls are my examples of my

[02:25:42] dataset. I have two here.

[02:25:44] characteristics, right? The axis, the X-axis, and the

[02:25:47] Y-axis. Oh, and the label is those colors.

[02:25:50] Red and green. So there's mine

[02:25:51] The function here is my H-model, that

[02:25:53] linear function here that separated this

[02:25:56] A space like this right here. Okay? Then,

[02:25:58] Visually, you can see that the a

[02:25:59] The separation is really bad, isn't it? Because she

[02:26:01] You messed up a lot here, look. Okay? Yeah, she

[02:26:04] You were wrong. Let's assume that these little green ones

[02:26:06] Here, okay? Everything that's below the line

[02:26:08] It should be red. Then,

[02:26:10] She already missed these four green ones here.

[02:26:12] Okay? And everything that was above the straight line.

[02:26:14] It should be green. So, she got everything wrong.

[02:26:15] This here, okay? you got these wrong

[02:26:18] all the little balls here, you missed this one and

[02:26:20] You got all of these wrong, okay? So,

[02:26:23] she made a very high mistake in my

[02:26:24] training set. Let's assume that

[02:26:26] This is our training kit.

[02:26:27] Okay, guys? Eu deveria ter podia ter

[02:26:28] other little balls drawn here

[02:26:30] teste, mas não não importa, tá? Then

[02:26:36] my data, in my training data,

[02:26:39] assuming that these balls are data

[02:26:45] Here for you guys, right? Quando a hipótese,

[02:26:50] That's the meaning, okay? Hipótese, função e

[02:26:53] Okay, model? There are three synonyms when I

[02:26:55] falar isso. That's why we use

[02:27:03] hipótese, tá? Why? Because

[02:27:06] our hypothesis that there is a straight line,

[02:27:08] for example, that separates the space or

[02:27:10] There is a tree that separates the space.

[02:27:15] solve the problem. Therefore, hypothesis,

[02:27:17] Okay? So, when the hypothesis is...

[02:27:21] It adjusts poorly to the training data.

[02:27:23] hypothesis or function fits poorly to

[02:27:25] training data, showing low

[02:27:27] forecasting performance, in this case,

[02:27:28] both in training and in testing,

[02:27:30] Okay? Yeah, but if you're in training, you'll go.

[02:27:32] It's in the test too.

[02:27:34] Well, that's called underadjustment, okay? That's all

[02:27:37] Here's a preview of what I already had.

[02:27:39] spoken more mathematically there, uh,

[02:27:43] Or algebraically, perhaps on the slide.

[02:27:46] previous. That's an overadjustment. It's already a

[02:27:49] the most extreme case here, where there is a

[02:27:50] a function that fits perfectly here,

[02:27:53] Okay? To the data.

[02:27:56] In other words, here, uh, of course I don't.

[02:28:00] I've drawn the test data here, but already

[02:28:02] It's intuitively understandable that the a

[02:28:04] The function is very specific here, right?

[02:28:07] So she's probably memorizing it.

[02:28:08] This tooth here, okay? Okay, so let's go.

[02:28:11] to assume that these green ones here, she

[02:28:13] He got everything right and all, but remember that I

[02:28:15] I said that I was below the line.

[02:28:17] It should be red, okay? Uh, so here

[02:28:20] She would be wrong, these three here. Eh,

[02:28:25] If in the test, right, these are the points here

[02:28:27] If they were red, she would have gotten those wrong.

[02:28:29] Three here. Yeah, and several points of

[02:28:33] border here, she was probably going to

[02:28:34] to err, precisely because she has a

[02:28:36] That's a very specific border, right?

[02:28:40] Yeah, so she's probably here.

[02:28:42] memorizing this excerpt here and she will

[02:28:45] She must be wrong, she must be right.

[02:28:47] Perfectly here in training, but

[02:28:50] she must make a lot of mistakes here

[02:28:52] Validation, okay? So here in Portuguese

[02:28:55] when the hypothesis fits the

[02:28:56] training data, showing high

[02:28:58] forecasting performance across the set of

[02:29:00] training, lower in the set of

[02:29:02] Test or validate here, okay?

[02:29:06] Finally, what would a um uma be?

[02:29:08] Is the visualization of the adjustment adequate? Then,

[02:29:10] Here we already have a curve.

[02:29:12] Here, it's better than that one.

[02:29:16] linear, a little worse in the data of

[02:29:19] Training here, because she made a mistake, okay?

[02:29:21] See here, huh? She made a few mistakes.

[02:29:23] Examples, okay? Oh, you made a mistake there.

[02:29:27] Training, right? She made a mistake, for example,

[02:29:28] These are all the things that fall within the curve.

[02:29:30] Okay, folks, this would be green. Everything that

[02:29:32] If it's outside, it would be red, okay? Then,

[02:29:34] she got those three red ones wrong

[02:29:36] Basically, that's it, okay? Eh,

[02:29:40] so she made few mistakes in training and

[02:29:42] It will probably make few mistakes in either.

[02:29:43] Test it, okay? Because it has a curve.

[02:29:46] Less general, okay? She has one

[02:29:48] curve, simpler curve, and because it is more

[02:29:51] Simply put, it's a bit more general than

[02:29:53] than the other. And being more general, she

[02:29:55] Can you generalize better? Eh, from

[02:29:58] New, this example here is a little more...

[02:29:59] to give intuition rather than to be more

[02:30:02] That's right, okay? Well, here you can see that the

[02:30:04] The adjustment is a little more flexible, okay?

[02:30:07] A little more is generic and that's the most.

[02:30:11] in general and this consequently ends up a

[02:30:14] better generalization. In other words, we

[02:30:15] learned the pattern of the data here, which is

[02:30:17] This concave pattern here, okay? Yeah, and no

[02:30:21] that whole cut-up function, which is

[02:30:23] more a matter of memorization than a

[02:30:25] That's a generalization, okay? So, in other

[02:30:28] words, when the hypothesis fits

[02:30:29] based on training data,

[02:30:31] demonstrating predictive self-performance,

[02:30:33] both in the training set and

[02:30:34] in the test suite, then in that case,

[02:30:35] We have a suitable adjustment. And that

[02:30:37] which is our ultimate goal, is to train

[02:30:39] The model because it has an adjustment.

[02:30:41] That's right, okay? Yeah, and then we'll go

[02:30:44] to experimentally work in

[02:30:46] our model until we have one

[02:30:47] proper adjustment, that is, a good one.

[02:30:50] training error and also a good error

[02:30:54] Validation or testing, okay?

[02:30:58] Well, I think that's it, folks. Now

[02:31:00] There are three for the 10. So, like this, I'm going to

[02:31:02] That's all for now. I had planned

[02:31:04] I'll talk about KNN here, but maybe I'll...

[02:31:06] I got excited, huh?

[02:31:09] on the subject. I think it's too much.

[02:31:10] That's important, okay? Well, understanding these things well

[02:31:13] basic fundamentals, because this will be

[02:31:15] extend throughout the entire course. I go

[02:31:16] Speaking of hypotheses now, I'm going to talk about...

[02:31:17] In the realm of hypothesis, I'm going to talk about

[02:31:18] training algorithm, I'll talk about

[02:31:20] dataset, structured data,

[02:31:22] Okay? vectorization, vector space

[02:31:26] Vectors, that sort of thing. Sure, a

[02:31:27] People will continue talking, but like this,

[02:31:29] these terms should already be

[02:31:30] more familiar, familiar to you,

[02:31:32] Okay? Yeah, and from now on I'm going to use

[02:31:35] I'll review them as needed.

[02:31:37] as I need to enter a num num

[02:31:39] in a slightly more formalized way

[02:31:40] advanced, [snoring]

[02:31:41] But this is the foundation of everything, okay everyone? THE

[02:31:44] From now on, we're going to start here.

[02:31:45] Seeing techniques is for training.

[02:31:48] models, mainly.

[02:31:50] Any more questions? End?

[02:31:56] No. Well, it's getting late, isn't it, folks? Good,

[02:31:58] Thank you for your attention. Good evening to

[02:32:00] everyone. See you later. Thanks.

[02:32:03] Thank you, professor. The class was great.

[02:32:05] Ah,

[02:32:05] That's great, everyone.

[02:32:06] Excellent lesson!

[02:32:07] Thanks. M.
