SlideShare uma empresa Scribd logo
1 de 58
Baixar para ler offline
Machine Learning
Andressa Sivolella
2
Cientista da Computação
Cientista de Dados (?)
Web/Software Designer
Quem sou eu?
3
Quem sou eu?
Cientista da Computação
Cientista de Dados (?)
Web/Software Designer
Engenheira e MsC em IC
Quem sou eu?
4
2007
2008 2011
2014
2016
Mestrado
StartUp
5
O que é Machine Learning
5
6
Sub-campo em Inteligência Artificial
Aprende com exemplos existentes
[ Diferente de um conjunto de regras ]
vs
Alguns Conceitos
7
Como identificar o tipo de uma bola?
vs
Script?
8
Abordagem de regras?
Cores?
Tipo de costura?
Tamanho?
...
9
Abordagem de Machine Learning
Classificador
Treinado a partir de
conjunto conhecido
(supervisionado)
Atributos
(features)
Resposta
(label/target/output)
10
Abordagem de Machine Learning
Classificador
Algoritmos encontram padrões
nas amostras conhecidas
Atributos
(features)
Resposta
(label/target/output)
11
● árvore de decisão
● rede neural
● regressão linear
● ensemble
● ...
Possíveis Classificadores
ClassificadorAtributos
(features)
Resposta
(label/target/output)
12
● árvore de decisão???
● rede neural
● regressão linear
● ensemble
● ...
Possíveis Classificadores
ClassificadorAtributos
(features)
Resposta
(label/target/output)
Este é o João...
13
"João joga tênis?"
14
15
João joga tênis?
Tempo
Umidade
Vento
...
Não joga
Joga
Árvore de Decisão
16
# Dia Tempo Umidade Vento Joga?
1 Ensolarado Alta Fraco Não
2 Ensolarado Alta Fraco Não
3 Nublado Alta Fraco Sim
4 Chuvoso Alta Forte Sim
5 Chuvoso Normal Fraco Sim
6 Chuvoso Normal Forte Sim
7 Nublado Normal Forte Sim
8 Ensolarado Alta Fraco Não
9 Ensolarado Normal Fraco Sim
10 Chuvoso Normal Fraco Sim
11 Ensolarado Normal Forte Sim
12 Nublado Alta Forte Sim
13 Nublado Normal Fraco Sim
14 Chuvoso Alta Forte Não
2 semanas de Janeiro
João joga tênis?
17
Tempo
Ensolarado
Nublado
Chuvoso
Umidade Vento
Joga
Alta Normal
Joga
Forte Fraco
Não Joga JogaNão Joga
Árvore de Decisão
18
# Dia Tempo Umidade Vento Joga?
1 Nublado Alta Fraco Sim
2 Ensolarado Alta Forte Não
3 Ensolarado Alta Fraco Não
4 Chuvoso Normal Fraco Sim
5 Chuvoso Alta Fraco Sim
6 Chuvoso Normal Forte Não
7 Nublado Alta Forte Sim
8 Chuvoso Alta Forte Não
9 Ensolarado Normal Fraco Sim
10 Chuvoso Alta Fraco Sim
11 Nublado Normal Fraco Não
12 Nublado Alta Forte Sim
13 Nublado Alta Fraco Sim
14 Ensolarado Alta Fraco Não
2 semanas de Julho
João joga tênis?
19
Árvore de Decisão
Tempo
Ensolarado
Nublado
Chuvoso
Umidade
NormalAlta
JogaNão Joga
Umidade
NormalAlta
Joga Não Joga
Vento
NormalFraco
Joga Não Joga
20
Sub-conjuntos (im)puros
Tempo
Ensolarado
Nublado
Chuvoso
Umidade Vento
0 / 4
Profundidade = 2 Puro
3 / 2
Impuro
2 / 3
Impuro
21
Sub-conjuntos (im)puros
Tempo
Ensolarado
Nublado
Chuvoso
Profundidade = 2
Joga
Não Joga Joga
Treinamento Supervisionado
22
Conjunto de
amostras
rotulado
23
Treinamento Supervisionado
100% de amostras
70%
Treino Teste
30%
24
Como comparar desempenho?
Palpite do Classificador
ClassificaçãoReal
Joga
Joga
Não Joga
NãoJoga
Verdadeiro
Positivo (TP)
Verdadeiro
Negativo (TN)
False
Negativo (FN)
False
Positivo (FP)
Matriz de Confusão
25
Como comparar desempenho?
Palpite do Classificador
ClassificaçãoReal
Joga
Joga
Não Joga
NãoJoga
Verdadeiro
Positivo (TP)
Verdadeiro
Negativo (TN)
False
Negativo (FN)
False
Positivo (FP)
Precisão =
TP
TP + FP
Recall =
TP
TP + FN
Acurácia =
TP + TN
Total
F1 Score = 2 .
Precisão . Recall
Precisão + Recall
2
6
Código, mostre-me código!
O que são modelos Ensemble
28
Exemplo: US Open
Em qual atleta eu posso apostar como
finalista do US Open?
Opinião 1
29
No passado, ele teve êxito em 68% de
seus palpites
Conhece bem o esporte
… mas tendencioso
Não é imparcial
Opinião 2
30
Acompanha apostas há 10 anos
Estuda atletas individualmente
Excelência em apostas esportivas
No passado, ela teve êxito em 73% de
seus palpites
Ⓡ
Opinião 3
31
Mais afinidade com atletas mulheres
Desconhece atletas novos
Não vem acompanhando o esporte
No passado, ela teve êxito em 70% de
seus palpites
Opinião 4
32
...
No passado, ela teve êxito em 62% de
seus palpites
Combinação das Avaliações
= 1 - (68% x 73% x 70% x 62%)
= 79% de acurácia
Guga Empresa Sharapova Galvão
Correlacionados
Acurácia
33
Ⓡ
Modelos Ensemble
Classificador 1
Classificador 2
Classificador 3
Classificador 4
Classificador N
Hipótese
Coletiva
Classificador Ensemble
34
H1
H2
H3
H4
HN
Modelos Ensemble
Guga
Galvão
Blabous
Sharapova
Hipótese
Coletiva
Classificador Ensemble
Voto
Majoritário
35
Classificadores
Árvore de Decisão 1
Árvore de Decisão 2
Árvore de Decisão 3
Árvore de Decisão 4
Árvore de Decisão N
Algoritmos da mesma natureza
SVM
Árvore de Decisão
Rede Neural
Deep Learner
Regressor Linear
Diversidade de Algoritmos
36
PositivoNegativo
Hipótese Coletiva
Classificadores
Árvore de Decisão 1
Árvore de Decisão 2
Árvore de Decisão 3
Árvore de Decisão 4
Árvore de Decisão N
+1
+1
-1
-1
-1
SVM
Árvore de Decisão
Rede Neural
Deep Learner
Regressor Linear
+2
-1
+3
-1
-1
37
38
Hipótese Coletiva: -1 Hipótese Coletiva: +2
Árvore de Decisão 1
Árvore de Decisão 2
Árvore de Decisão 3
Árvore de Decisão 4
Árvore de Decisão N
+1
+1
-1
-1
-1
SVM
Árvore de Decisão
Rede Neural
Deep Learner
Regressor Linear
+2
-1
+3
-1
-1
Classificadores
Alguns tipos de Ensemble
Com árvore de decisão como algoritmo base
Bagged Decision Tree
40
Bagged Decision Tree
41
Random Forest
42
Boosted Decision Tree (BDT)
43
BDT em ação...
44
BDT em ação...
45
Ensemble com outros algoritmos
Conjunto de Treino
Nearest Neighbor SVM
Decision Tree Random Forest AdaBoost
46
Na vida real...
4
8
...João joga tênis no Kinect...
49
Reconhecimento de Imagem
Bóson de Higgs
50
51
52
@asivolella
Para feedbacks, entre em contato =)
asivolella@ .com
Backup Slides
5
4
Vantagens de Ensemble
55
http://scott.fortmann-roe.com/docs/BiasVariance.html
http://www.csie.ntu.edu.tw/~b92109/course/Machine%20Learning/Cross-Validation.pdf
AdaBoost (Adaptative Boosting)
56
- Boost (shrinkage)
57
GradBoosted
58

Mais conteúdo relacionado

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

ML - ensemble methods [pt-br]