SlideShare a Scribd company logo
1 of 77
Dominika Puzio
Intel
Machine Learning dla programistów
Machine Learning Hype
Machine Learning Hype
Rosnąca ilość danych i potrzeba ich analizy i przetwarzania
Rosnąca moc obliczeniowa i coraz mniejszy koszt przetwarzania
danych:
• 40% spadek kosztu serwerów oraz
• 90% spadek kosztu storage’u w ciągu ostatniej dekady
• prawo Moore’a
Machine Learning Hype
Wielcy świata IT podgrzewają atmosferę
Machine Learning Hype - TensorFlow
09.11.2015: open-source release under Apache License 2.0
Machine Learning Hype – TensorFlow (Deep
Dream)
Machine Learning Hype – TensorFlow (Deep
Dream)
Machine Learning Hype – TensorFlow (Deep
Dream)
Machine Learning Hype – TensorFlow (Deep
Dream)
Machine Learning Hype – TensorFlow (Deep
Dream)
http://deepdreamgenerator.com/
Machine Learning Hype – AlphaGo
08.03.2016: AlphaGo wygrał 4:1 z Lee Se-dol, mistrzem świata w Go
Machine Learning Hype – AlphaGo, Tay
08.03.2016: AlphaGo wygrał 4:1 z Lee Se-dol, mistrzem świata w Go
23.03.2016: Microsoft uruchamia (i zamyka po 16h) Tay – bota Twitterowego,
który miał się uczyć z konwersacji z użytkownikami Twittera
Teoria
Machine Learning - definicja
„Giving a computer ability to learn, without being explicitly
programmed.”
Arthur Lee Samuel, 1959
Machine Learning - definicja
„Giving a computer ability to learn, without being explicitly
programmed.”
Arthur Lee Samuel, 1959
Machine learning explores the study and construction of
algorithms that can learn from and make predictions on data.
Machine Learning - definicja
„Giving a computer ability to learn, without being explicitly
programmed.”
Arthur Lee Samuel, 1959
Machine learning explores the study and construction of
algorithms that can learn from and make predictions on data.
Such algorithms operate by building a model from example inputs
in order to make data-driven predictions or decisions expressed as
outputs, rather than following strictly static program instructions.
Machine Learning
Domain
Expertise
Data
Processing
Statistical
Reasearch
Data
Science
Machine
Learning
Machine Learning – przykładowe zadanie
Machine Learning – przykładowe zadanie
Rozpoznawanie gatunku irysa:
Iris virginica Iris versicolor Iris setosa
Machine Learning – przykładowe zadanie
Rozpoznawanie gatunku irysa:
Machine Learning – czym jest model
Machine Learning – czym jest model
To zależy od algorytmu:
• Wzór matematyczny (lub wiele wzorów: GLM)
• Drzewo decyzyjne (lub wiele drzew: RF, GBM)
• Sieć neuronowa (ANN)
• Wiele warstw sieci neuronowych (Deep Learning)
Przykładowy algorytm
Drzewo decyzyjne zbudowane algorytmem ID3 (Iterative Dichotomiser 3)
ID3 – problem do rozwiązania
Dane zebrane w ankiecie ulicznej:
Źródło: http://people.revoledu.com/kardi/tutorial/DecisionTree/index.html
ID3 – problem do rozwiązania
Jaki środek transportu wybierze osoba:
Gender Car ownership Travel cost ($)/km Income Level Transportation mode
Female 1 Cheap High ?
Wynikowe drzewo decyzyjne
ID3 – budowanie drzewa
1. Wybieramy atrybut, który daje największy przyrost informacji
2. Wstawiamy go do drzewa jako kolejny wierzchołek
3. Usuwany atrybut ze zbioru danych treningowych
4. Wracamy do punktu 1
Zawartość informacyjna zbioru danych
Entropia – miara różnorodności (impurity) zbioru
𝑝𝑗 − 𝑝𝑟𝑎𝑤𝑑𝑜𝑝𝑜𝑑𝑜𝑏𝑖𝑒ń𝑠𝑡𝑤𝑜 𝑤𝑦𝑠𝑡ą𝑝𝑖𝑒𝑛𝑖𝑎 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑢 𝑗
𝐸𝑛𝑡𝑟𝑜𝑝𝑖𝑎 =
𝑗
−𝑝𝑗 log2 𝑝𝑗
Entropia zbioru klas
𝐸(𝑆) = −
4
10
log2
4
10
−
3
10
log2
3
10
−
3
10
log2
3
10
Entropia zbioru klas
𝐸(𝑆) = −
4
10
log2
4
10
−
3
10
log2
3
10
−
3
10
log2
3
10
=1.571
ID3 – przyrost informacji dla atrybutu
𝐼(𝐴) = 𝐸 𝑆 ...
𝐼 𝐴 − 𝑝𝑟𝑧𝑦𝑟𝑜𝑠𝑡 𝑖𝑛𝑓𝑜𝑟𝑚𝑎𝑐𝑗𝑖 𝑧 𝑎𝑡𝑟𝑦𝑏𝑢𝑡𝑢 𝐴
𝐸 𝑆 − 𝑒𝑛𝑡𝑟𝑜𝑝𝑖𝑎 𝑧𝑏𝑖𝑜𝑟𝑢 𝑘𝑙𝑎𝑠 𝑤 𝑧𝑏𝑖𝑜𝑟𝑧𝑒 𝑡𝑟𝑒𝑛𝑖𝑛𝑔𝑜𝑤𝑦𝑚
ID3 – przyrost informacji dla atrybutu
𝐼(𝐴) = 𝐸 𝑆 −
𝐴 𝑖
𝐸 𝐴𝑖 …
𝐼 𝐴 − 𝑝𝑟𝑧𝑦𝑟𝑜𝑠𝑡 𝑖𝑛𝑓𝑜𝑟𝑚𝑎𝑐𝑗𝑖 𝑧 𝑎𝑡𝑟𝑦𝑏𝑢𝑡𝑢 𝐴
𝐸 𝑆 − 𝑒𝑛𝑡𝑟𝑜𝑝𝑖𝑎 𝑧𝑏𝑖𝑜𝑟𝑢 𝑘𝑙𝑎𝑠 𝑤 𝑧𝑏𝑖𝑜𝑟𝑧𝑒 𝑡𝑟𝑒𝑛𝑖𝑛𝑔𝑜𝑤𝑦𝑚
𝐴𝑖 − 𝑝𝑜𝑑𝑧𝑏𝑖ó𝑟 𝑧𝑏𝑖𝑜𝑟𝑢 𝑡𝑟𝑒𝑛𝑖𝑛𝑔𝑜𝑤𝑒𝑔𝑜, 𝑤 𝑘𝑡ó𝑟𝑦𝑚 𝑤𝑎𝑟𝑡𝑜ść 𝑎𝑡𝑟𝑦𝑏𝑢𝑡𝑢 𝐴 𝑤𝑦𝑛𝑜𝑠𝑖 𝑖
𝐸 𝐴𝑖 − 𝑒𝑛𝑡𝑟𝑜𝑝𝑖𝑎 𝑧𝑏𝑖𝑜𝑟𝑢 𝑘𝑙𝑎𝑠 𝑤 𝑧𝑏𝑖𝑜𝑟𝑧𝑒 𝐴𝑖
ID3 – przyrost informacji dla atrybutu
ID3 – przyrost informacji dla atrybutu
𝐼 𝐴 − 𝑝𝑟𝑧𝑦𝑟𝑜𝑠𝑡 𝑖𝑛𝑓𝑜𝑟𝑚𝑎𝑐𝑗𝑖 𝑧 𝑎𝑡𝑟𝑦𝑏𝑢𝑡𝑢 𝐴
𝐸 𝑆 − 𝑒𝑛𝑡𝑟𝑜𝑝𝑖𝑎 𝑧𝑏𝑖𝑜𝑟𝑢 𝑘𝑙𝑎𝑠 𝑤 𝑧𝑏𝑖𝑜𝑟𝑧𝑒 𝑡𝑟𝑒𝑛𝑖𝑛𝑔𝑜𝑤𝑦𝑚
𝐴𝑖 − 𝑝𝑜𝑑𝑧𝑏𝑖ó𝑟 𝑧𝑏𝑖𝑜𝑟𝑢 𝑡𝑟𝑒𝑛𝑖𝑛𝑔𝑜𝑤𝑒𝑔𝑜, 𝑤 𝑘𝑡ó𝑟𝑦𝑚 𝑤𝑎𝑟𝑡𝑜ść 𝑎𝑡𝑟𝑦𝑏𝑢𝑡𝑢 𝐴 𝑤𝑦𝑛𝑜𝑠𝑖 𝑖
𝐸 𝐴𝑖 − 𝑒𝑛𝑡𝑟𝑜𝑝𝑖𝑎 𝑧𝑏𝑖𝑜𝑟𝑢 𝑘𝑙𝑎𝑠 𝑤 𝑧𝑏𝑖𝑜𝑟𝑧𝑒 𝐴𝑖
𝑘 − 𝑙𝑖𝑐𝑧𝑏𝑎 𝑤𝑖𝑒𝑟𝑠𝑧𝑦 𝑤 𝑧𝑏𝑖𝑜𝑟𝑧𝑒𝐴𝑖
𝑁 − 𝑙𝑖𝑐𝑧𝑏𝑎 𝑤𝑖𝑒𝑟𝑠𝑧𝑦 𝑤 𝑧𝑏𝑖𝑜𝑟𝑧𝑒 𝑡𝑟𝑒𝑛𝑖𝑛𝑔𝑜𝑤𝑦𝑚
𝐼(𝐴) = 𝐸 𝑆 −
𝐴 𝑖
𝑘
𝑁
𝐸(𝐴𝑖)
ID3 – szukamy atrybutu na pierwszy wierzchołek
ID3 – szukamy atrybutu na pierwszy wierzchołek
ID3 – szukamy atrybutu na pierwszy wierzchołek
ID3 – szukamy atrybutu na pierwszy wierzchołek
𝐸 = −
4
5
log2
4
5
−
1
5
log2
1
5
= 0.722
ID3 – szukamy atrybutu na pierwszy wierzchołek
𝐸 = −
4
5
log2
4
5
−
1
5
log2
1
5
= 0.722 𝐸 = 0 𝐸 = 0
ID3 – szukamy atrybutu na pierwszy wierzchołek
𝐸 = −
4
5
log2
4
5
−
1
5
log2
1
5
= 0.722 𝐸 = 0 𝐸 = 0
𝐼𝑡𝑟𝑎𝑣𝑒𝑙_𝑐𝑜𝑠𝑡 = 1.571 −
5
10
∗ 0.722 +
3
10
∗ 0 +
2
10
∗ 0 = 1.210
ID3 – szukamy atrybutu na pierwszy wierzchołek
Wybieramy atrybut dający największy przyrost informacji:
ID3 – szukamy atrybutu na pierwszy wierzchołek
Wybieramy atrybut dający największy przyrost informacji:
ID3 – budujemy drzewo
ID3 – budujemy drzewo
ID3 – budujemy drzewo
ID3 – budujemy drzewo
ID3 – budujemy drzewo
ID3 – budujemy drzewo
𝐸 = 0
𝐸 = 1
ID3 – budujemy drzewo
𝐸 = 0
𝐸 = 1
𝐼 𝐺𝑒𝑛𝑑𝑒𝑟 = 0.322
ID3 – budujemy drzewo
𝐸 = 0
𝐸 = 1
𝐼 𝐺𝑒𝑛𝑑𝑒𝑟 = 0.322
ID3 – budujemy drzewo
𝐸 = 0
𝐸 = 0𝐸 = 1
𝐸 = 0.918
𝐼 𝐺𝑒𝑛𝑑𝑒𝑟 = 0.322
ID3 – budujemy drzewo
𝐸 = 0
𝐸 = 0𝐸 = 1
𝐸 = 0.918
𝐼 𝐶𝑎𝑟_𝑜𝑤𝑛𝑒𝑟𝑠ℎ𝑖𝑝 = 0.171𝐼 𝐺𝑒𝑛𝑑𝑒𝑟 = 0.322
ID3 – budujemy drzewo
𝐸 = 0
𝐸 = 0𝐸 = 1
𝐸 = 0.918
𝐼 𝐺𝑒𝑛𝑑𝑒𝑟 = 0.322 𝐼 𝐶𝑎𝑟_𝑜𝑤𝑛𝑒𝑟𝑠ℎ𝑖𝑝 = 0.171
ID3 – budujemy drzewo
𝐸 = 0
𝐸 = 0 𝐸 = 0𝐸 = 1
𝐸 = 0.918 𝐸 = 0.918
𝐼 𝐺𝑒𝑛𝑑𝑒𝑟 = 0.322 𝐼 𝐶𝑎𝑟_𝑜𝑤𝑛𝑒𝑟𝑠ℎ𝑖𝑝 = 0.171
ID3 – budujemy drzewo
𝐸 = 0
𝐸 = 0 𝐸 = 0𝐸 = 1
𝐸 = 0.918 𝐸 = 0.918
𝐼 𝐺𝑒𝑛𝑑𝑒𝑟 = 0.322 𝐼 𝐶𝑎𝑟_𝑜𝑤𝑛𝑒𝑟𝑠ℎ𝑖𝑝 = 0.171 𝐼𝐼𝑛𝑐𝑜𝑚𝑒_𝑙𝑒𝑣𝑒𝑙 = 0.171
ID3 – budujemy drzewo
ID3 – budujemy drzewo
Drzewo wynikowe
Drzewo decyzyjne – atrybuty o wartościach
ciągłych
Iris data set
Obserwacje na temat pracy Data
Scientista
Zadania Data Scientista
Zadania Data Scientista
• Wybór odpowiednich atrybutów
Zadania Data Scientista
• Wybór odpowiednich atrybutów
• Wybór odpowiedniego algorytmu
Zadania Data Scientista
• Wybór odpowiednich atrybutów
• Wybór odpowiedniego algorytmu
• Dobór parametrów algorytmu
Zadania Data Scientista
• Wybór odpowiednich atrybutów
• Wybór odpowiedniego algorytmu
• Dobór parametrów algorytmu
• Ocena jakości wygenerowanego modelu
H2O on TAP
H2O
H2O
Źródło: https://www.thoughtworks.com/radar/platforms
TAP – Trusted Analytics Platform
Trusted Analytics Platform (TAP) is open source software, optimized for
performance and security, that accelerates the creation of cloud-native
applications driven by Big Data Analytics.
TAP – Trusted Analytics Platform
Trusted Analytics Platform (TAP) is open source software, optimized for
performance and security, that accelerates the creation of cloud-native
applications driven by Big Data Analytics.
TAP makes it easier for developers and data scientists to collaborate by
providing a shared, flexible environment for advanced analytics in public and
private clouds.
TAP – Trusted Analytics Platform
TAP – Trusted Analytics Platform
YARN HDFS
Zookeeper Hive
Hbase
Hue
Kafka
H2O on TAP
TAP UI YARN
H2O on TAP
TAP UI YARN
server
H2O on TAP
TAP UI YARN
server
Demo
TAP
http://trustedanalytics.org/
https://github.com/trustedanalytics

More Related Content

Featured

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)
 

Featured (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...
 

JDD 2016 - Dominika Puzio - Machine Learning Dla Programistow

  • 3. Machine Learning Hype Rosnąca ilość danych i potrzeba ich analizy i przetwarzania Rosnąca moc obliczeniowa i coraz mniejszy koszt przetwarzania danych: • 40% spadek kosztu serwerów oraz • 90% spadek kosztu storage’u w ciągu ostatniej dekady • prawo Moore’a
  • 4. Machine Learning Hype Wielcy świata IT podgrzewają atmosferę
  • 5. Machine Learning Hype - TensorFlow 09.11.2015: open-source release under Apache License 2.0
  • 6. Machine Learning Hype – TensorFlow (Deep Dream)
  • 7. Machine Learning Hype – TensorFlow (Deep Dream)
  • 8. Machine Learning Hype – TensorFlow (Deep Dream)
  • 9. Machine Learning Hype – TensorFlow (Deep Dream)
  • 10. Machine Learning Hype – TensorFlow (Deep Dream) http://deepdreamgenerator.com/
  • 11. Machine Learning Hype – AlphaGo 08.03.2016: AlphaGo wygrał 4:1 z Lee Se-dol, mistrzem świata w Go
  • 12. Machine Learning Hype – AlphaGo, Tay 08.03.2016: AlphaGo wygrał 4:1 z Lee Se-dol, mistrzem świata w Go 23.03.2016: Microsoft uruchamia (i zamyka po 16h) Tay – bota Twitterowego, który miał się uczyć z konwersacji z użytkownikami Twittera
  • 14. Machine Learning - definicja „Giving a computer ability to learn, without being explicitly programmed.” Arthur Lee Samuel, 1959
  • 15. Machine Learning - definicja „Giving a computer ability to learn, without being explicitly programmed.” Arthur Lee Samuel, 1959 Machine learning explores the study and construction of algorithms that can learn from and make predictions on data.
  • 16. Machine Learning - definicja „Giving a computer ability to learn, without being explicitly programmed.” Arthur Lee Samuel, 1959 Machine learning explores the study and construction of algorithms that can learn from and make predictions on data. Such algorithms operate by building a model from example inputs in order to make data-driven predictions or decisions expressed as outputs, rather than following strictly static program instructions.
  • 18. Machine Learning – przykładowe zadanie
  • 19. Machine Learning – przykładowe zadanie Rozpoznawanie gatunku irysa: Iris virginica Iris versicolor Iris setosa
  • 20. Machine Learning – przykładowe zadanie Rozpoznawanie gatunku irysa:
  • 21. Machine Learning – czym jest model
  • 22. Machine Learning – czym jest model To zależy od algorytmu: • Wzór matematyczny (lub wiele wzorów: GLM) • Drzewo decyzyjne (lub wiele drzew: RF, GBM) • Sieć neuronowa (ANN) • Wiele warstw sieci neuronowych (Deep Learning)
  • 23. Przykładowy algorytm Drzewo decyzyjne zbudowane algorytmem ID3 (Iterative Dichotomiser 3)
  • 24. ID3 – problem do rozwiązania Dane zebrane w ankiecie ulicznej: Źródło: http://people.revoledu.com/kardi/tutorial/DecisionTree/index.html
  • 25. ID3 – problem do rozwiązania Jaki środek transportu wybierze osoba: Gender Car ownership Travel cost ($)/km Income Level Transportation mode Female 1 Cheap High ?
  • 27. ID3 – budowanie drzewa 1. Wybieramy atrybut, który daje największy przyrost informacji 2. Wstawiamy go do drzewa jako kolejny wierzchołek 3. Usuwany atrybut ze zbioru danych treningowych 4. Wracamy do punktu 1
  • 28. Zawartość informacyjna zbioru danych Entropia – miara różnorodności (impurity) zbioru 𝑝𝑗 − 𝑝𝑟𝑎𝑤𝑑𝑜𝑝𝑜𝑑𝑜𝑏𝑖𝑒ń𝑠𝑡𝑤𝑜 𝑤𝑦𝑠𝑡ą𝑝𝑖𝑒𝑛𝑖𝑎 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑢 𝑗 𝐸𝑛𝑡𝑟𝑜𝑝𝑖𝑎 = 𝑗 −𝑝𝑗 log2 𝑝𝑗
  • 29. Entropia zbioru klas 𝐸(𝑆) = − 4 10 log2 4 10 − 3 10 log2 3 10 − 3 10 log2 3 10
  • 30. Entropia zbioru klas 𝐸(𝑆) = − 4 10 log2 4 10 − 3 10 log2 3 10 − 3 10 log2 3 10 =1.571
  • 31. ID3 – przyrost informacji dla atrybutu 𝐼(𝐴) = 𝐸 𝑆 ... 𝐼 𝐴 − 𝑝𝑟𝑧𝑦𝑟𝑜𝑠𝑡 𝑖𝑛𝑓𝑜𝑟𝑚𝑎𝑐𝑗𝑖 𝑧 𝑎𝑡𝑟𝑦𝑏𝑢𝑡𝑢 𝐴 𝐸 𝑆 − 𝑒𝑛𝑡𝑟𝑜𝑝𝑖𝑎 𝑧𝑏𝑖𝑜𝑟𝑢 𝑘𝑙𝑎𝑠 𝑤 𝑧𝑏𝑖𝑜𝑟𝑧𝑒 𝑡𝑟𝑒𝑛𝑖𝑛𝑔𝑜𝑤𝑦𝑚
  • 32. ID3 – przyrost informacji dla atrybutu 𝐼(𝐴) = 𝐸 𝑆 − 𝐴 𝑖 𝐸 𝐴𝑖 … 𝐼 𝐴 − 𝑝𝑟𝑧𝑦𝑟𝑜𝑠𝑡 𝑖𝑛𝑓𝑜𝑟𝑚𝑎𝑐𝑗𝑖 𝑧 𝑎𝑡𝑟𝑦𝑏𝑢𝑡𝑢 𝐴 𝐸 𝑆 − 𝑒𝑛𝑡𝑟𝑜𝑝𝑖𝑎 𝑧𝑏𝑖𝑜𝑟𝑢 𝑘𝑙𝑎𝑠 𝑤 𝑧𝑏𝑖𝑜𝑟𝑧𝑒 𝑡𝑟𝑒𝑛𝑖𝑛𝑔𝑜𝑤𝑦𝑚 𝐴𝑖 − 𝑝𝑜𝑑𝑧𝑏𝑖ó𝑟 𝑧𝑏𝑖𝑜𝑟𝑢 𝑡𝑟𝑒𝑛𝑖𝑛𝑔𝑜𝑤𝑒𝑔𝑜, 𝑤 𝑘𝑡ó𝑟𝑦𝑚 𝑤𝑎𝑟𝑡𝑜ść 𝑎𝑡𝑟𝑦𝑏𝑢𝑡𝑢 𝐴 𝑤𝑦𝑛𝑜𝑠𝑖 𝑖 𝐸 𝐴𝑖 − 𝑒𝑛𝑡𝑟𝑜𝑝𝑖𝑎 𝑧𝑏𝑖𝑜𝑟𝑢 𝑘𝑙𝑎𝑠 𝑤 𝑧𝑏𝑖𝑜𝑟𝑧𝑒 𝐴𝑖
  • 33. ID3 – przyrost informacji dla atrybutu
  • 34. ID3 – przyrost informacji dla atrybutu 𝐼 𝐴 − 𝑝𝑟𝑧𝑦𝑟𝑜𝑠𝑡 𝑖𝑛𝑓𝑜𝑟𝑚𝑎𝑐𝑗𝑖 𝑧 𝑎𝑡𝑟𝑦𝑏𝑢𝑡𝑢 𝐴 𝐸 𝑆 − 𝑒𝑛𝑡𝑟𝑜𝑝𝑖𝑎 𝑧𝑏𝑖𝑜𝑟𝑢 𝑘𝑙𝑎𝑠 𝑤 𝑧𝑏𝑖𝑜𝑟𝑧𝑒 𝑡𝑟𝑒𝑛𝑖𝑛𝑔𝑜𝑤𝑦𝑚 𝐴𝑖 − 𝑝𝑜𝑑𝑧𝑏𝑖ó𝑟 𝑧𝑏𝑖𝑜𝑟𝑢 𝑡𝑟𝑒𝑛𝑖𝑛𝑔𝑜𝑤𝑒𝑔𝑜, 𝑤 𝑘𝑡ó𝑟𝑦𝑚 𝑤𝑎𝑟𝑡𝑜ść 𝑎𝑡𝑟𝑦𝑏𝑢𝑡𝑢 𝐴 𝑤𝑦𝑛𝑜𝑠𝑖 𝑖 𝐸 𝐴𝑖 − 𝑒𝑛𝑡𝑟𝑜𝑝𝑖𝑎 𝑧𝑏𝑖𝑜𝑟𝑢 𝑘𝑙𝑎𝑠 𝑤 𝑧𝑏𝑖𝑜𝑟𝑧𝑒 𝐴𝑖 𝑘 − 𝑙𝑖𝑐𝑧𝑏𝑎 𝑤𝑖𝑒𝑟𝑠𝑧𝑦 𝑤 𝑧𝑏𝑖𝑜𝑟𝑧𝑒𝐴𝑖 𝑁 − 𝑙𝑖𝑐𝑧𝑏𝑎 𝑤𝑖𝑒𝑟𝑠𝑧𝑦 𝑤 𝑧𝑏𝑖𝑜𝑟𝑧𝑒 𝑡𝑟𝑒𝑛𝑖𝑛𝑔𝑜𝑤𝑦𝑚 𝐼(𝐴) = 𝐸 𝑆 − 𝐴 𝑖 𝑘 𝑁 𝐸(𝐴𝑖)
  • 35. ID3 – szukamy atrybutu na pierwszy wierzchołek
  • 36. ID3 – szukamy atrybutu na pierwszy wierzchołek
  • 37. ID3 – szukamy atrybutu na pierwszy wierzchołek
  • 38. ID3 – szukamy atrybutu na pierwszy wierzchołek 𝐸 = − 4 5 log2 4 5 − 1 5 log2 1 5 = 0.722
  • 39. ID3 – szukamy atrybutu na pierwszy wierzchołek 𝐸 = − 4 5 log2 4 5 − 1 5 log2 1 5 = 0.722 𝐸 = 0 𝐸 = 0
  • 40. ID3 – szukamy atrybutu na pierwszy wierzchołek 𝐸 = − 4 5 log2 4 5 − 1 5 log2 1 5 = 0.722 𝐸 = 0 𝐸 = 0 𝐼𝑡𝑟𝑎𝑣𝑒𝑙_𝑐𝑜𝑠𝑡 = 1.571 − 5 10 ∗ 0.722 + 3 10 ∗ 0 + 2 10 ∗ 0 = 1.210
  • 41. ID3 – szukamy atrybutu na pierwszy wierzchołek Wybieramy atrybut dający największy przyrost informacji:
  • 42. ID3 – szukamy atrybutu na pierwszy wierzchołek Wybieramy atrybut dający największy przyrost informacji:
  • 48. ID3 – budujemy drzewo 𝐸 = 0 𝐸 = 1
  • 49. ID3 – budujemy drzewo 𝐸 = 0 𝐸 = 1 𝐼 𝐺𝑒𝑛𝑑𝑒𝑟 = 0.322
  • 50. ID3 – budujemy drzewo 𝐸 = 0 𝐸 = 1 𝐼 𝐺𝑒𝑛𝑑𝑒𝑟 = 0.322
  • 51. ID3 – budujemy drzewo 𝐸 = 0 𝐸 = 0𝐸 = 1 𝐸 = 0.918 𝐼 𝐺𝑒𝑛𝑑𝑒𝑟 = 0.322
  • 52. ID3 – budujemy drzewo 𝐸 = 0 𝐸 = 0𝐸 = 1 𝐸 = 0.918 𝐼 𝐶𝑎𝑟_𝑜𝑤𝑛𝑒𝑟𝑠ℎ𝑖𝑝 = 0.171𝐼 𝐺𝑒𝑛𝑑𝑒𝑟 = 0.322
  • 53. ID3 – budujemy drzewo 𝐸 = 0 𝐸 = 0𝐸 = 1 𝐸 = 0.918 𝐼 𝐺𝑒𝑛𝑑𝑒𝑟 = 0.322 𝐼 𝐶𝑎𝑟_𝑜𝑤𝑛𝑒𝑟𝑠ℎ𝑖𝑝 = 0.171
  • 54. ID3 – budujemy drzewo 𝐸 = 0 𝐸 = 0 𝐸 = 0𝐸 = 1 𝐸 = 0.918 𝐸 = 0.918 𝐼 𝐺𝑒𝑛𝑑𝑒𝑟 = 0.322 𝐼 𝐶𝑎𝑟_𝑜𝑤𝑛𝑒𝑟𝑠ℎ𝑖𝑝 = 0.171
  • 55. ID3 – budujemy drzewo 𝐸 = 0 𝐸 = 0 𝐸 = 0𝐸 = 1 𝐸 = 0.918 𝐸 = 0.918 𝐼 𝐺𝑒𝑛𝑑𝑒𝑟 = 0.322 𝐼 𝐶𝑎𝑟_𝑜𝑤𝑛𝑒𝑟𝑠ℎ𝑖𝑝 = 0.171 𝐼𝐼𝑛𝑐𝑜𝑚𝑒_𝑙𝑒𝑣𝑒𝑙 = 0.171
  • 59. Drzewo decyzyjne – atrybuty o wartościach ciągłych Iris data set
  • 60. Obserwacje na temat pracy Data Scientista
  • 62. Zadania Data Scientista • Wybór odpowiednich atrybutów
  • 63. Zadania Data Scientista • Wybór odpowiednich atrybutów • Wybór odpowiedniego algorytmu
  • 64. Zadania Data Scientista • Wybór odpowiednich atrybutów • Wybór odpowiedniego algorytmu • Dobór parametrów algorytmu
  • 65. Zadania Data Scientista • Wybór odpowiednich atrybutów • Wybór odpowiedniego algorytmu • Dobór parametrów algorytmu • Ocena jakości wygenerowanego modelu
  • 67. H2O
  • 69. TAP – Trusted Analytics Platform Trusted Analytics Platform (TAP) is open source software, optimized for performance and security, that accelerates the creation of cloud-native applications driven by Big Data Analytics.
  • 70. TAP – Trusted Analytics Platform Trusted Analytics Platform (TAP) is open source software, optimized for performance and security, that accelerates the creation of cloud-native applications driven by Big Data Analytics. TAP makes it easier for developers and data scientists to collaborate by providing a shared, flexible environment for advanced analytics in public and private clouds.
  • 71. TAP – Trusted Analytics Platform
  • 72. TAP – Trusted Analytics Platform YARN HDFS Zookeeper Hive Hbase Hue Kafka
  • 73. H2O on TAP TAP UI YARN
  • 74. H2O on TAP TAP UI YARN server
  • 75. H2O on TAP TAP UI YARN server
  • 76. Demo