But what is Machine Learning? : A complete starter pack
Mayuri Madhur30:572021
O deep learning não está substituindo o machine learning, ele faz parte dele
O preço de revenda de um carro é fácil de estimar só pela idade, até que o estado de conservação e a quilometragem entram na tabela e a conta de cabeça desmorona. É essa lacuna que o machine learning preenche, diz Mayuri Madhur, engenheira de desenvolvimento de software da Flipkart, e quem está começando costuma se perder no jargão. Então, onde ficam de fato os modelos clássicos, os ensembles, o aprendizado por reforço e as redes neurais, e quando cada um vence?
Tenha um mapa em linguagem simples dos tipos de machine learning e de quando escolher cada um
Mayuri Madhur, Software Development Engineer na Flipkart, oferece a iniciantes um mapa estruturado de machine learning: o que é, por que difere da programação tradicional e onde se encaixa na IA. Ela percorre o aprendizado supervisionado e não supervisionado clássico, o aprendizado por reforço, os ensembles e as redes neurais, e defende que a escolha do modelo depende do problema, e não do hype em torno do deep learning.
“Na primeira abordagem, nós fazemos o raciocínio. Na segunda abordagem, a máquina faz o raciocínio.”
“Por isso, os dados são a coisa mais importante para fazer nossas máquinas aprenderem. Quanto mais diversos os dados, melhor o resultado.”
What you will learn
Diferenciar a programação tradicional baseada em regras do machine learning, em que a máquina deriva as regras a partir dos dados e das saídas.
Situar o machine learning dentro da IA, e as redes neurais e o deep learning dentro do machine learning.
Distinguir aprendizado supervisionado de não supervisionado, e classificação de regressão, com exemplos do dia a dia.
Explicar como stacking, bagging e boosting combinam aprendizes fracos em um modelo mais forte.
Escolher entre um modelo ensemble e uma rede neural com base nas necessidades de tempo real e na complexidade do problema.
Details
Level
Beginner
Format
Tech talk
Technical depth
Introductory technical
For
Student, Early career, Career changer
Length
30:57
Published
July 2021
Questions this talk answers
Em que o machine learning difere da programação tradicional?
Na programação tradicional, as pessoas escrevem as regras e a máquina produz as saídas; no machine learning, a máquina recebe os dados e as saídas e descobre as regras sozinha. Essas regras aprendidas podem agir de forma diferente sobre diferentes tipos de dados.
Redes neurais e deep learning são a mesma coisa que machine learning?
Não. O machine learning é uma parte do campo mais amplo da IA, as redes neurais são um tipo de machine learning e o deep learning é a forma moderna de construir, treinar e usar redes neurais.
Qual é a diferença entre classificação e regressão?
A classificação coloca os dados em categorias, como se um aluno foi aprovado ou reprovado, enquanto a regressão prevê um número, como a porcentagem que o aluno tirou.
Quando você deve usar aprendizado por reforço?
Quando você não tem dados, mas tem um ambiente de simulação, de modo que o sistema aprenda com recompensas e penalidades pelas próprias ações, como fazem os carros autônomos.
Você deve sempre escolher uma rede neural em vez de um modelo clássico ou ensemble?
Não. Madhur compara a escolha à de um carro esportivo e um caminhão carregado: ensembles como random forest atendem a necessidades de tempo real, enquanto redes neurais servem para problemas muito complexos e imprevisíveis.
Programação tradicional vs machine learning (84 s)
K-means explicado com quiosques de kebab (58 s)
O deep learning vai engolir o machine learning? (84 s)
Let's get started. Hello and welcome everyone. Thank you so much for joining in today. I am Mayuri Madhur, a software developer from India. Today we are going to go through the very basic, like foundation level information about machine learning. So if you're very new and confused about how to move forward in this domain, you are at the right level.
And even otherwise it would be a good brush up. So let's get started. So the agenda for today is pretty, pretty clear. What is machine learning? Why do we need it? Then some basics around machine learning and its relation with AI. And then we'll dive deeper into the details of the types of machine learning. Speaker: Okay. So what is machine learning? Machine learning is the science and art of programming computers so that they can learn from the data that is provided to them. And its goal is also pretty clear. Predict results based on the incoming data.
Speaker: Okay. So that was what is machine learning. But why do we want machines to learn? In the traditional programming, we input the data to the machines. Machines give us the output based on some rules that we set to it. In machine learning, we input the data and the output of it to the machines. Machines try to find out the relation between the two and figures out the rules.
Speaker: Based on which the machine is going to make predictions based on which the machine is going to make predictions about the upcoming data or incoming data in the later stages. Speaker: So in the first approach, the rules are rigid and same for all kinds of data. In the second approach, the rules are formed out of relationship between the data and the output. So these rules which are formed will be different.
Speaker: Different and act differently on different kinds of data. In the first approach, we do the thinking. In the second approach, machine does the thinking. Speaker: So, okay, you might think that why can't we just feed the rules and let the machine do the input and output part? Why do we need the machines to learn? What is the need here? For that, let's take a step back.
Speaker: You are given this data set with the age of the car and the resale price of the car that you are going to get. So if you resell your brand new car, then you are going to get $20,000. If the age of the car is $19,000. It's one year. Then you're going to get $19,000. If the age of the car is two years, $18,000. Three years, $17,000.
Speaker: Without a second thought, you will be able to tell that at the age of four, the car is going to get you $16,000. But what about this situation? When I add a little more information to this data set? I have added the car. Speaker: The car's condition and the odometer reading as well. Now, how about now? How are we going to be able to predict the cost of the car as conveniently now? So there exists a lot of problem statements where we are not able to do all the cost of the car.
Speaker: As conveniently now. So there exists a lot of problem statements where we are not able to do a lot of thinking and calculation. And that is where machine learning comes into picture. Speaker: So I hope we don't have any doubts until now. Speaker: Okay. So components of machine learning. Speaker: So what is the most important component one can think of from the definition?
Speaker: Data. Whenever we make a prediction, we take into consideration the previous observations which were made, the previous data that we have. Speaker: Hence, data is the most important thing for making our machines learn. The more diverse the data, the better is the result. Speaker: There are two types of data, manual and automatic. Manual is of better quality and expensive and automatic data is of lesser quality and cheap.
Speaker: Google captures data from us all the time. Whenever it asks us to identify images for capture, it is actually fetching data from us. Free labor. Speaker: So the next important component is features. The other factors for a machine to look at. And that is what the machine is learning from. Speaker: And that is what is trying to. That is the point from where the machine is fetching the data or learning to make the predictions. It is very important to choose the right features.
Speaker: Because they are the affect the machine learning the most. Not all details in the data might be important. We need to consider only the ones which will matter the most while predicting the data or for the learning of the machine. Speaker: So not all the details will be necessary. That is something we have to keep in our mind.
Speaker: Sometimes the features might not be explicitly visible in data. Speaker: And then we have to derive those features from our data set. Speaker: The most obvious component is the algorithm. So it's just how you solve a problem. Right. Speaker: Algorithm identifies the relation in the data and uses these relations to predict the results. It affects the precision performance and the size of the model.
Speaker: So as you can see that machine learning is at the heart, is at the intersection of data features and algorithms. Speaker: Okay. This is super important. Look at this picture for once. Speaker: Artificial intelligence is a whole field of study. It's like chemistry or biology or physics. It's a whole field of study. Machine learning is a part of it, but not all of it.
Speaker: AI has other parts as well, like NLP. Neural networks similarly are a type of machine learning. Speaker: They are not the complete machine learning. There are, they are a type of machine learning. Speaker: They are super important, but they are not the only ones there. And deep learning. Deep learning is the modern way of building, training and using neural networks.
Speaker: The study of neural networks has been around for a very long time now, but it gained its present day importance and boom with the advancement of the computational powers and the technology in the recent years. Speaker: So basically deep learning is the new architecture. Speaker: So these are the main types of machine learning, classical machine learning, reinforcement learning, ensembles, neural networks.
Speaker: And we are going to go through the details of each one of them now. Speaker: Classical machine learning comprises mainly of two types, supervised and unsupervised learning. Supervised learning is when the data you have is labeled. Speaker: Unsupervised learning is when you don't supervise the model, you let the model work on its own to discover the information, which is inherited to the data.
Speaker: Supervised learning is like having a teacher to teach you. And the teacher has the data labeled for you. For example, if you point towards a mango and call it as an orange, then the teacher is going to tell you that you're wrong. Speaker: And it's an, it's a mango. It's not an orange. So that is what supervised learning basically means.
Speaker: Supervised learning is of two types, classification and regression. Speaker: Classification in the student, whether they have passed or failed. Speaker: But as for regression models, the result would be the percentage scored by the student. Speaker: Classification as its name suggests is basically categorizing the data based on the features or attributes that we have in hand, like classifying emails as spam or not.
Speaker: Classifying a patient to be cancer, to be having cancer or not. Speaker: Now we are going to go through a few classification models. Speaker: This is a simple spam filter used until 2010. It uses name based classifier name based classifier is among the earliest and simplest machine learning models. Speaker: The earliest models were based on pure statistical formulae application on the data.
Speaker: It is based on Bayes theorem calculating the probability of occurrence of mail being spam. Speaker: Then the number of good letters and spam letters as shown in this in this slide. Speaker: So the class with higher probability is chosen as the label later. Speaker: This was not used for spam filters because basically hackers became smarter and they started adding more good words or more good letters to the email.
Speaker: This was also called Bayesian poisoning decision tree. Speaker: Let's have Daisy here and deciding her weekend plan. Speaker: And oh, by the way, she's fully vaccinated so she can go out. Speaker: So if it is raining, she is going to stay in. Speaker: If not, she's going to go out. Speaker: If she's staying in and there is cable signal, she will watch a movie.
Speaker: If not, she can play board games. Speaker: If she's going out, then if it is too sunny, she could go for movies. Speaker: If not, then she could go for shopping. Speaker: This is how a decision tree is made. Speaker: The machine comes up with such questions to split the data best at each step. Speaker: The higher the branch, the broader the question.
Speaker: Decision trees are widely used in highly responsible places like diagnostics, medicine, finances. Speaker: They might not be used purely, but they're on sample. Speaker: Random forest is extremely popular and is faster than your networks. Speaker: Support vector machines. Speaker: The main objective is to segregate the given data in the best possible way. Speaker: The distance between the either nearest point is known as the margin.
Speaker: And the data points which are present at the farthest distance or on the margin are known as the support vectors. Speaker: The objective is to select a hyper plane that the with the maximum possible margin between the support vectors in the given data set. Speaker: These are fairly accurate and used to be extremely popular until neural networks became so easily accessible to us.
Speaker: And even today support vector machines find great significance at some problem zones. Speaker: But the algorithm inside is basically of the order O of N square in terms of time complexity. Speaker: So it takes a lot of time with a large data set in comparison to the other classical models like decision tree or K and N or NAV base.
Speaker: Regression is basically classification where we forecast a number instead of a category. Speaker: Examples are car price by its mileage traffic by time of the day demand volume by the growth of the company. Speaker: Regression is perfect when something depends upon time. Speaker: And it's super smooth inside. Speaker: The machine simply tries to draw a line that indicates average correlation.
Speaker: When the line is straight, it is linear regression. Speaker: When it is curved, it's polynomial regression. Speaker: Technically speaking, the model is basically trying to bring out these coefficients in the equation, Speaker: which will help us minimize the cost function. Speaker: So simply put, the machine is going to come up with the coefficients during the training.
Speaker: These coefficients are the one it is going to try to find during the training. Speaker: Okay, a special mention to logistic regression. Speaker: If this is your hair moment, you're not alone. Speaker: The first time I came across this fact, I also scratched my head. Speaker: So you can think of logistic regression as a special case of linear regression where the outcome variable is categorical, Speaker: where we are using log of odds as dependent variable.
Speaker: In other words, it predicts the property of occurrence of an event by fitting the data to a log it function, Speaker: or basically by putting a threshold to the probability which the regression model had predicted or calculated. Speaker: Unsupervised learning was invented a bit later in 1990s. Speaker: It is used less often, but sometimes you just don't have any options.
Speaker: You'll usually have different groups of users that can be split across a few criteria. Speaker: These criteria can be as simple as age, gender and or as complex as persona or their purchase procedure. Speaker: Unsupervised learning can help you accomplish this task automatically. Speaker: One of the one of the most popular unsupervised learning types is clustering.
Speaker: Clustering algorithms will run through your data and find these natural clusters if they exist. Speaker: For your customers, that might mean one cluster of 30 something artists and the other one of millennials who own dogs. Speaker: You can typically modify how clusters are being taken in your data. Speaker: Like how many clusters do you want? Speaker: And how many clusters are we looking at?
Speaker: Which lets you adjust the granularity of these groups. Speaker: There are various different types of clustering algorithms which are out there. Speaker: And the most popular one is K means clustering. Speaker: Clustering your data points into a number K of mutually exclusive clusters. Speaker: A lot of complexity surrounds around how you're going to pick that data or the right number for K.
Speaker: Apple Photos and Google Photos use more complex clustering. Speaker: They are looking for faces in the photos to create albums of your friends. Speaker: Now the app doesn't know how many friends you have or how do they look? Speaker: But it's trying to find the common facial features and that is one of the applications of clustering.
Speaker: Another popular issue is image compression. Speaker: When saving the image to PNG, you set the palette to let's say 32 colors. Speaker: It means clustering will help you find all the reddish pixels, calculate the average red and set it for all the red pixels. Speaker: So the fewer the colors, the lower the file size and hence more profit.
Speaker: Here we are trying to illustrate K means clustering with the help of putting kiosks in the best or the optimal way. Speaker: Here the value of K is three. Speaker: So first of all, you put your three centers or the kebab kiosks at random places. Speaker: And then you watch how your buyers choose the nearest one.
Speaker: And then you move the kiosk closer to the center of their popularity. Speaker: And you keep doing this unless you have found the perfect spots for your kebab kiosks. Speaker: These are a few other popular unsupervised learning methods. Speaker: Dimensionality reduction is basically when we try to project our data to a lower dimensional subspace, which captures the gist of the data.
Speaker: Dimensionality reduction has principle component analysis and latent semantic analysis techniques, which are useful for data pre-processing and topic modeling. Speaker: You can also find it useful for recommendation systems and collaborative filtering. Speaker: It's barely possible to fully understand this machine abstraction, but it's possible to see some correlation on closer look. Speaker: Some of these correlate with the user's age.
Speaker: For example, kids play Minecraft and watch cartoons more often and others correlate with the movie journal or user hobbies. Speaker: Association rule learning is no revolution. Speaker: Businesses have been using it for gaining more profit for a very long time now. Speaker: It includes all the methods to analyze shopping carts, automate marketing strategies and other event related tasks.
Speaker: When you have a sequence of something and want to find patterns in it, you can try association rule learning. Speaker: For example, putting diapers next to baby food or peanuts next to beer counter can help the store grow in terms of the profit earned. Speaker: In this picture, we can see a robot. Speaker: It is put in an environment and asked to make a move.
Speaker: When it goes near fire, it is given a penalty. Speaker: Suppose it goes near to the water tap and closes it to stop water wastage. Speaker: And it is rewarded in this way. Speaker: It learns by its own actions. Speaker: What is good? Speaker: And what is that? Speaker: Just like babies in machine learning world. Speaker: This is called reinforcement learning.
Speaker: So then you don't have any data, but you do have a simulation environment. Speaker: That's when reinforcement learning comes into picture. Speaker: Another example of this kind is self driving cars. Speaker: They are put in a simulating environment. Speaker: There they might use two different approaches, model based and model free. Speaker: Model based means that car needs to memorize a map or its part.
Speaker: But it's pretty outdated approach because it's impossible for a self driving car to learn the complete planet. Speaker: So in model free learning, the car doesn't memorize every moment, but tries to generalize situation and act rationally when obtaining a maximum reward. Speaker: Ensemble methods. Speaker: So in this picture, there are a bunch of kids playing touch and tell.
Speaker: They are asked to touch an elephant and describe what it is to them. Speaker: Each of them gives the description of what they touched. Speaker: Now, individually, they might not be able to guess that it's an elephant. Speaker: But when we put all their observations together, we'll get the right answer. Speaker: This is an example of ensemble methods.
Speaker: Ensemble is the art of combining diverse set of learners, individual models together to improvise on the stability and predictive power of models. Speaker: The main principle behind the ensemble model is that a group of weak learners come together to form a strong learner, thus increasing the accuracy of the model. Speaker: Some of the popular ones are random forest and gradient boosting.
Speaker: They are typically used in object detection and search methods. Speaker: So one of the popular ensemble methods is stacking output of several parallel methods. Speaker: Parallel models is passed as the input to the last one, which makes the final decision. Speaker: But use different algorithms because same algorithm on the same data set won't make any sense.
Speaker: But at the final layer, regression is mostly preferred. Speaker: But more popular than stacking is bagging and boosting. Speaker: So bagging is bootstrapping plus aggregating training some classifiers. Speaker: So what we are going to do here is we are going to generate random subsets of the data set that is given to us. Speaker: And we are going to model or we are going to train the same classifier on these different data sets, which were randomly generated out of the original data set.
Speaker: And we are going to take the result as the maximum voted or as the average, as the final answer, as the ensemble answer. Speaker: And the other more popular one is boosting. Speaker: Algorithms are trained one by one sequentially. Speaker: Each subsequent one paying most of us attention to the data points that were mispredicted by the previous one.
Speaker: We use subsets of our data, but this time they are not randomly generated. Speaker: Now in each sub sample, we take a part of the data that the previous algorithm failed to process. Speaker: Thus, we make a new algorithm learn to fix the errors which were made by the previous one. Speaker: Neural networks. Speaker: A neural network is a class of computing system.
Speaker: They are created from a very simple processing nodes formed into a network. Speaker: They are inspired by how our brains work, although it is not as complex as our brains right now. Speaker: So the basic unit of computation in a neural network is a neuron, which is based on the basic computational units of our brains. Speaker: Any neural network is basically a connection collection of neurons and connections between them.
Speaker: Neuron is a function with a bunch of inputs, as you can see, a bunch of inputs and one output. Speaker: It takes simply takes all the inputs, does some computation on top of it and presents the result at the output. Speaker: When the connection is like the channel between these neurons, they have only one parameter, the weight.
Speaker: So during building a neural network, these connections like the weights of the connections and these generator functions of the neurons are the things which are being generated. Speaker: Convolutional neural networks. Speaker: They are used to search for objects on photos and in videos, face recognition, style transfer, generating and enhancing images, Speaker: creating effects like slow motion and improving image quality.
Speaker: Nowadays, CNNs are used in all the cases that involve pictures and videos. Speaker: So if you have to understand how this works, let's do this. Speaker: We will divide the whole image of the cat into eight cross eight pixel blocks and assign to each a type of dominant line. Speaker: It can be horizontal, vertical, or one of the vertical, one of the diagonals.
Speaker: It can also be that several would be highly visible. Speaker: As you can see, several will be highly visible. Speaker: This happens and we are not always absolutely confident. Speaker: Output would be several tables of sticks. Speaker: Um, which, um, uh, in fact, the simplest features representing object edges in the image. Speaker: There are images on their own, but build with sticks.
Speaker: And, uh, we are going to once again, uh, carve out eight cross eight pixels. Speaker: Um, uh, and we are going to do this matching and see if they match together all over again. Speaker: And we are going to do this for, uh, several times. Speaker: So this operation is called new is, is called convolution. Speaker: Convolution.
And, uh, this is what gave the name for the method. Speaker: Convolution can be represented as a layer of neural network because each neuron is, uh, uh, can act as any function. Speaker: The current networks gave us useful things like, uh, neural machine translation, uh, speech recognition, Speaker: and voice synthesis in smart assistance. Speaker: It is basically about learning through a network of neurons, while keeping the information Speaker: learned till now with it, because of this internal memory, RNNs can remember important things Speaker: about the input that they have received, which allows them to be very precise in predicting Speaker: what is coming next, which makes them best for sequential data like voice, text or music.
Speaker: So this is what the world map of machine, uh, machine learning will look like. Speaker: So machine learning basically has a classical learning, which has a supervised and unsupervised learning. Speaker: Uh, and then it has, uh, ensemble methods, which consists of stacking, bagging, boosting. Speaker: Reinforcement learning is when we don't have the data, but we do have a simulating environment.
Speaker: Uh, neural networks, uh, are, uh, are something inspired from how our brain works. Speaker: And, uh, this is what basically, uh, machine learning is all about. Speaker: Uh, but here are a few things I would like to address. Speaker: Uh, like there are some myths, like, uh, we all have must have often heard, uh, stuff like is deep learning Speaker: Going to eat away machine learning or something like that on some of the websites.
Speaker: Uh, so now, since we are clear that neural networks are a part of machine learning Speaker: and data, a deep learning is a new way of, uh, a new architecture for, uh, neural networks. Speaker: So when you're comparing a neural network to any of the classical models or even their ensemble, for example, Speaker: Decision tree is the model and that it's ensemble is called random forest.
Speaker: And, uh, if you're comparing any classical model or the ensemble to a neural network, Speaker: it's like you're comparing a sports car to a loaded truck. Speaker: So each one of them have their own pros and cons, and you have to, uh, pick for yourself Speaker: that, uh, what is it that this is going to do for you?
Speaker: Like how and which one would be the best for your problem statement? Speaker: For example, you, if you want your data to be, uh, you know, if, if your problem Speaker: statement requires the data to come, uh, the, you know, the stuff to be real time, then it Speaker: it would be better to go for, uh, uh, random forest than, uh, going for a neural network.
Speaker: But again, that is, uh, like, for example, when you open your, uh, camera phone's camera, and it Speaker: it is trying to drop boxes around your face. Speaker: Uh, that is something what, uh, random forest is doing. Speaker: That is something what ensemble model is doing. Speaker: But if your problem is extremely very complex and your data is extremely very, um, unpredictable Speaker: and very difficult, and that's just what your problem is demanding, then you can go for a neural network.
Speaker: So that is, uh, something I wanted to give you as a takeaway. Speaker: And, uh, if you're wondering where to get started from, these are some of the good, uh, resources Speaker: with which you can get started. Speaker: And thank you.
Transcribed automatically; names checked against the speaker record. Select a time to jump there.
Article based on this talk
Onde o machine learning se encaixa na IA, e qual tipo serve para o seu problema?
Mayuri Madhur mapeia modelos clássicos, aprendizado por reforço, ensembles e redes neurais para quem está começando.
Em resumo
Machine learning é a parte da IA em que os computadores descobrem as regras a partir dos dados, em vez de recebê-las prontas, e se divide em quatro grandes famílias: aprendizado clássico, aprendizado por reforço, ensembles e redes neurais. Mayuri Madhur, Software Development Engineer na Flipkart, guia iniciantes por cada família com exemplos do dia a dia e defende que nenhum tipo vence em todos os casos. O deep learning não está prestes a engolir o machine learning; ele é uma forma de construir redes neurais, que por sua vez são um ramo do machine learning.
Principais aprendizados
Uma visão mais clara de machine learning, ideal para quem procura um ponto de partida.
Esclarece alguns equívocos comuns sobre machine learning e ciência de dados.
Uma sessão bem básica que explica o que é machine learning e onde ele se situa na IA.
Por que ensinar uma máquina a aprender
Madhur começa com uma definição: "Machine learning é a ciência e a arte de programar computadores para que eles possam aprender com os dados que lhes são fornecidos." (0:30). O objetivo, diz ela, é prever resultados a partir dos dados recebidos.
Ela contrasta isso com a programação tradicional. Nela, as pessoas fornecem dados e regras à máquina e obtêm saídas. No machine learning, as pessoas fornecem os dados e as saídas correspondentes, e a máquina encontra a relação e forma as regras. Essas regras não são rígidas; elas agem de forma diferente sobre diferentes tipos de dados. O resumo dela é direto: "Na primeira abordagem, nós fazemos o raciocínio. Na segunda abordagem, a máquina faz o raciocínio." (2:13)
Para mostrar por que isso importa, ela usa uma tabela de revenda de carros. Quando o preço depende apenas da idade, qualquer pessoa consegue prever o próximo valor. Acrescente o estado de conservação e a quilometragem, e a conta de cabeça deixa de funcionar. Muitos problemas reais se parecem com a segunda tabela, e é aí que entra o machine learning.
Dados, features e o lugar do machine learning na IA
Madhur cita três componentes: dados, features e algoritmos. Os dados vêm primeiro: "Por isso, os dados são a coisa mais importante para fazer nossas máquinas aprenderem. Quanto mais diversos os dados, melhor o resultado." (4:12). Ela observa que dados rotulados manualmente têm mais qualidade, mas são caros, enquanto dados coletados automaticamente são mais baratos, porém de menor qualidade, e aponta os captchas de identificação de imagens como uma forma de o Google reunir dados rotulados.
As features são os fatores a partir dos quais a máquina aprende, e nem todo detalhe de um conjunto de dados importa; às vezes é preciso derivar features úteis. O algoritmo encontra relações nos dados e influencia a precisão, o desempenho e o tamanho do modelo.
Em seguida, ela desfaz uma confusão comum sobre escopo: "A inteligência artificial é um campo de estudo inteiro. É como a química, a biologia ou a física." (6:18). O machine learning é uma parte dela, as redes neurais são um tipo de machine learning e "o deep learning é a forma moderna de construir, treinar e usar redes neurais." (6:51)
Aprendizado clássico: supervisionado e não supervisionado
O machine learning clássico se divide em aprendizado supervisionado, em que os dados são rotulados, e aprendizado não supervisionado, em que o modelo descobre a estrutura sozinho. "O aprendizado supervisionado é como ter um professor para ensinar você." (8:16)
O aprendizado supervisionado abrange classificação e regressão. Madhur apresenta os filtros de spam naive Bayes (e como os spammers os derrotaram enchendo os e-mails de palavras "boas"), as árvores de decisão (ilustradas pela Daisy planejando o fim de semana) e as support vector machines, que ela descreve como precisas, mas lentas em grandes conjuntos de dados. Sobre regressão, ela oferece uma definição elegante: "Regressão é basicamente classificação em que prevemos um número em vez de uma categoria." (12:35). A regressão logística, explica, aplica um limiar às probabilidades previstas para gerar categorias.
O aprendizado não supervisionado é usado com menos frequência, mas às vezes não há alternativa. O clustering encontra grupos naturais de clientes, rostos em apps de fotos ou cores em uma imagem a ser comprimida. No exemplo de K-means, ela posiciona três quiosques de kebab ao acaso, observa qual deles os compradores escolhem e vai movendo os quiosques em direção aos centros de demanda. Ela também aborda a redução de dimensionalidade para recomendações e o aprendizado de regras de associação para padrões de carrinho de compras.
Aprendizado por reforço e ensembles
O aprendizado por reforço se aplica a outra situação: "Então você não tem nenhum dado, mas tem um ambiente de simulação." (19:51). Um robô é penalizado perto do fogo e recompensado por fechar uma torneira aberta, aprendendo com as próprias ações. Os carros autônomos, explica ela, preferem o aprendizado sem modelo (model-free), que generaliza situações em vez de memorizar mapas.
Para os ensembles, Madhur usa crianças descrevendo partes de um elefante: sozinhas, elas erram; juntas, acertam. "O princípio central do modelo ensemble é que um grupo de aprendizes fracos se une para formar um aprendiz forte, aumentando assim a precisão do modelo." (21:16). Ela explica stacking, bagging (treinar um classificador em subconjuntos aleatórios e votar) e boosting (treinar modelos em sequência, cada um corrigindo os erros do anterior).
Redes neurais e a escolha da ferramenta certa
Redes neurais são redes de nós de processamento simples inspiradas no cérebro, em que cada neurônio recebe entradas, faz um cálculo e repassa uma saída, e cada conexão tem um peso. As redes convolucionais dominam o trabalho com imagens e vídeos: "Hoje em dia, as CNNs são usadas em todos os casos que envolvem imagens e vídeos." (25:19). As redes recorrentes mantêm uma memória interna, o que se adapta a dados sequenciais como voz, texto e música.
Madhur encerra com o mapa completo e um mito que vale abandonar: o deep learning não vai engolir o machine learning. Comparar um modelo clássico ou ensemble com uma rede neural, diz ela, é como comparar um carro esportivo com um caminhão carregado. Quando os resultados precisam ser em tempo real, uma random forest pode servir melhor; quando o problema e os dados são muito complexos e imprevisíveis, uma rede neural compensa o custo.
Assista à palestra
"But what is Machine Learning? : A complete starter pack", de Mayuri Madhur (31 minutos): https://www.womentech.net/video/mayuri-madhur-what-machine-learning-complete-starter-pack
Sobre a palestrante
Mayuri Madhur é Software Development Engineer na Flipkart, na Índia, depois de ter trabalhado como desenvolvedora de software na Sabre, e é formada em Ciência da Computação e Engenharia pelo National Institute of Technology Patna. Entusiasta de pesquisa em ciência de dados e machine learning, ela participa de projetos colaborativos e busca ativamente oportunidades de aplicar machine learning.
Perguntas que esta palestra responde
Em que o machine learning difere da programação tradicional?
Redes neurais e deep learning são a mesma coisa que machine learning?
Qual é a diferença entre classificação e regressão?
Quando você deve usar aprendizado por reforço?
Você deve sempre escolher uma rede neural em vez de um modelo clássico ou ensemble?
Rascunho gerado com IA a partir da transcrição da palestra. Revisão editorial pendente.
Frameworks and ideas mentioned
Supervised learning
Unsupervised learning
Reinforcement learning
Naive Bayes
Bayes' theorem
Decision trees
Random forest
Support vector machines
Linear regression
Polynomial regression
Logistic regression
K-means clustering
Principal component analysis
Latent semantic analysis
Association rule learning
Stacking
Bagging
Boosting
Gradient boosting
Convolutional neural networks
Recurrent neural networks
Cite this talk
Mayuri Madhur. "But what is Machine Learning? : A complete starter pack." WomenTech Network, 2021. https://www.womentech.net/video/mayuri-madhur-what-machine-learning-complete-starter-pack