SlideShare uma empresa Scribd logo
1 de 52
Understanding basics of
Machine Learning
Pranav Ainavolu
Microsoft MVP | Senior Developer at Realpage
@a_pranav | http://pranavon.net/
Agenda
1) data science
2) prediction
3) process
4) models
5) AzureML
data science
• key word: “science”
• try stuff
• it (might not | won’t) work
the first time
• this might work…question
• wikipedia timeresearch
• I have an ideahypothesis
• try it outexperiment
• did this even work?analysis
• time for a better ideaconclusion
machine learning
• finding (and exploiting) patterns in data
• replacing “human writing code” with
“human supplying data”
• system figures out what the person wants
based on examples
• need to abstract from “training” examples
to “test” examples
• most central issue in ML: generalization
machine learning
•split into two (ish) areas
•supervised learning
• predicting the future
• learn from past examples to predict future
•unsupervised learning
• understanding the past
• making sense of data
• learning structure of data
• compressing data for consumption
neat applications applications
neat applications
• spam catchers
• ocr (optical character recognition)
• natural language processing
• machine translation
• biology
• medicine
• robotics (autonomous systems)
• etc…
7
prediction
making decisions
making decisions
•what kinds of decisions are we making?
• binary classification
• yes/no, 1/0, male/female
• multi-class classification
• {A, B, C, D, F} (Grade),
{1, 2, 3, 4} (Class),
{teacher, student, secretary}
• regression
• number between 0 and 100, real value
9
process
data
clean
transform
maths
model
predict
data
Class Outlook Temp. Windy
Play Sunny Low Yes
No Play Sunny High Yes
No Play Sunny High No
Play Overcast Low Yes
Play Overcast High No
Play Overcast Low No
No Play Rainy Low Yes
Play Rainy Low No
? Sunny Low No
label (y)
play / no play
features
outlook, temp, windy
values (x)
[Sunny, Low, Yes]
Labeled dataset is a collection of (X, Y) pairs.
Given a new x, how do we predict y?
clean / transform / maths
Class Outlook Temp. Windy
Play Sunny Lowest Yes
No Play ? High Yes
No Play Sunny High KindOf
Play Overcast ? Yes
Play Turtle Cloud High No
Play Overcast ? No
No Play Rainy Low 28%
Play Rainy Low No
? Sunny Low No
need to clean up data
need to convert to model-able form (linear algebra)
yak shaving
Any apparently useless activity
which, by allowing you to
overcome intermediate difficulties,
allows you to solve a larger
problem.
I was doing a bit of yak shaving
this morning, and it looks like it
might have paid off.
http://en.wiktionary.org/wiki/yak_shaving
clean / transform / maths
Class Outlook Temp. Windy
Play Sunny Low Yes
No Play Sunny High Yes
No Play Sunny High No
Play Overcast Low Yes
Play Overcast High No
Play Overcast Low No
No Play Rainy Low Yes
Play Rainy Low No
? Sunny Low No
need to clean up data
need to convert to model-able form (linear algebra)
model
Class Outlook Temp. Windy
Play Sunny Low Yes
No Play Sunny High Yes
No Play Sunny High No
Play Overcast Low Yes
Play Overcast High No
Play Overcast Low No
No Play Rainy Low Yes
Play Rainy Low No
? Sunny Low No
predict
PLAY!!!
Class Outlook Temp. Windy
? Sunny Low No
models
how do we build them?
linear classifiers
•in order to classify things properly we need:
• a way to mathematically represent examples
• a way to separate classes (yes/no)
•“decision boundary”
•excel example
•graph example
17
MODELS
linear classifiers
•dot product of vectors
• [ 3, 4 ] ● [ 1, 2 ] = (3 × 1) + (4 × 2) = 11
• a ● b = | a | × | b | cos θ
• When does this equal 0?
•why would this be useful?
• decision boundary can be represented using a single vector
18
MODELS
perceptron
…and other linear models
linear classifiers
•Frank Rosenblatt, Cornell 1957
• let’s make a line (by using a single vector)
• take the dot product between the line and the new point
• > 0 belongs to class 1
• < 0 belongs to class 2
• == 0 flip a coin we don’t know
• for each example, if we make a mistake, move the line
20
MODELS
perceptron
point demo
perceptron
what if….
kernel methods
models
kernel methods
2𝑛 +
𝑛
2
= 2n +
𝑛 𝑛−1
2
features….
perceptron
•minimize mistakes by moving w
arg min
(𝒘,𝒃)
1
2
𝒘 2
subject to:
𝑦𝑖 𝒘 ∙ 𝒙𝒊 − 𝑏 ≥ 1
REMINDER
perceptron
•eventually this becomes an optimization problem
𝐿 𝛼 =
𝑖=1
𝑛
𝛼𝑖 −
1
2
𝑖,𝑗
𝛼𝑖 𝛼𝑗 𝑦𝑖 𝑦𝑗 𝒙𝑖
𝑇
𝒙𝑗
subject to:
𝛼𝑖 ≥ 0,
𝑖=1
𝑛
𝛼𝑖 𝑦𝑖 = 0
REMINDER
perceptron
•eventually this becomes an optimization problem
𝐿 𝛼 =
𝑖=1
𝑛
𝛼𝑖 −
1
2
𝑖,𝑗
𝛼𝑖 𝛼𝑗 𝑦𝑖 𝑦𝑗 𝒙𝑖
𝑇
𝒙𝑗
subject to:
𝛼𝑖 ≥ 0,
𝑖=1
𝑛
𝛼𝑖 𝑦𝑖 = 0
REMINDER
perceptron
•eventually this becomes an optimization problem
𝐿 𝛼 =
𝑖=1
𝑛
𝛼𝑖 −
1
2
𝑖,𝑗
𝛼𝑖 𝛼𝑗 𝑦𝑖 𝑦𝑗 𝑘 𝒙𝑖, 𝒙𝑗
subject to:
𝛼𝑖 ≥ 0,
𝑖=1
𝑛
𝛼𝑖 𝑦𝑖 = 0
REMINDER
dot product
perceptron
•Frank Rosenblatt, Cornell 1957
• let’s make a line (by using a single vector)
• take the dot product between the line and the new point
• > 0 belongs to class 1
• < 0 belongs to class 2
• == 0 flip a coin we don’t know
• for each example, if we make a mistake, move the line
30
REMINDER
kernel (one weird trick….)
•store dot product in a table
𝒙0
𝑇
𝒙0 ⋯ 𝒙0
𝑇
𝒙𝑗
⋮ ⋱ ⋮
𝒙𝑖
𝑇
𝒙0 ⋯ 𝒙𝑖
𝑇
𝒙𝑗
•call it the “kernel matrix” and “kernel trick”
•project into any space and still learn a linear model
MODELS
support vector machines
•this method is the basis for SVM’s
•returns a set of vectors (<< n) to make decision
•essentially changed the space to make it separable
MODELS
kernels
•polynomial kernel
𝐾 𝒙, 𝒚 = 𝒙 𝑇
𝒚 + 𝑐 𝑑
•RBF kernel
𝐾 𝒙, 𝒚 = exp −
𝒙 − 𝒚 2
2
2𝜎2
MODELS
1
34
what if….
neural networks
models
neural networks
neural networks
Play?
ℎ1
ℎ2
ℎ3
𝐵1
LINEAR METHODS
decision trees
models
decision trees
Class Outlook Temp. Windy
Play Sunny Low Yes
No Play Sunny High Yes
No Play Sunny High No
Play Overcast Low Yes
Play Overcast High No
Play Overcast Low No
No Play Rainy Low Yes
Play Rainy Low No
? Sunny Low No
decision trees
•how should the computer split?
• information gain (with entropy)
• entropy measures how disorganized your
answer is.
• information gain says:
• if I separate the answer by the values in a
particular column, does the answer become
*more* organized?
decision trees
•calculating information gain:
• 𝐻 𝑦 – how messy is the answer
• 𝐻 𝑦 𝑎) – how messy is the answer if we
know a?
𝐼𝐺 𝑦, 𝑎 = 𝐻 𝑦 − 𝐻 𝑦 𝑎)
𝑎 ∈ 𝐴𝑡𝑡𝑟(𝑥)
decision trees
demo
POPULAR MODELS
do they work?
testing
how well is it doing?
Train Test
Use 80% Use 20%
AzureML
putting it all together
48
process reminder (same on Azure)
data
clean
transform
maths
model
predict
experiments
putting it all together
50
Truth
true false
Guess
positive
𝑡𝑟𝑢𝑒 𝑝𝑜𝑠𝑖𝑡𝑖𝑣𝑒 𝑓𝑎𝑙𝑠𝑒 𝑝𝑜𝑠𝑖𝑡𝑖𝑣𝑒 𝑝𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 =
𝑡𝑝
𝑡𝑝 + 𝑓𝑝
negative
𝑓𝑎𝑙𝑠𝑒 𝑛𝑒𝑔𝑎𝑡𝑖𝑣𝑒 𝑡𝑟𝑢𝑒 𝑛𝑒𝑔𝑎𝑡𝑖𝑣𝑒
𝑟𝑒𝑐𝑎𝑙𝑙 =
𝑡𝑝
𝑡𝑝 + 𝑓𝑛
𝑎𝑐𝑐𝑢𝑟𝑎𝑐𝑦 =
𝑡𝑝 + 𝑡𝑛
𝑡𝑝 + 𝑡𝑛 + 𝑓𝑝 + 𝑓𝑛
confusion matrix
Thank you!

Mais conteúdo relacionado

Mais procurados

Machine Learning presentation.
Machine Learning presentation.Machine Learning presentation.
Machine Learning presentation.
butest
 
Basics of Machine Learning
Basics of Machine LearningBasics of Machine Learning
Basics of Machine Learning
butest
 

Mais procurados (20)

Machine learning basics
Machine learning basics Machine learning basics
Machine learning basics
 
Managing machine learning
Managing machine learningManaging machine learning
Managing machine learning
 
Deep learning Introduction and Basics
Deep learning  Introduction and BasicsDeep learning  Introduction and Basics
Deep learning Introduction and Basics
 
Machine Learning and Real-World Applications
Machine Learning and Real-World ApplicationsMachine Learning and Real-World Applications
Machine Learning and Real-World Applications
 
Semi-Supervised Learning
Semi-Supervised LearningSemi-Supervised Learning
Semi-Supervised Learning
 
Building a performing Machine Learning model from A to Z
Building a performing Machine Learning model from A to ZBuilding a performing Machine Learning model from A to Z
Building a performing Machine Learning model from A to Z
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Machine Learning presentation.
Machine Learning presentation.Machine Learning presentation.
Machine Learning presentation.
 
Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Le Machine Learning de A à Z
Le Machine Learning de A à ZLe Machine Learning de A à Z
Le Machine Learning de A à Z
 
Machine learning the next revolution or just another hype
Machine learning   the next revolution or just another hypeMachine learning   the next revolution or just another hype
Machine learning the next revolution or just another hype
 
Introduction to machine learning and model building using linear regression
Introduction to machine learning and model building using linear regressionIntroduction to machine learning and model building using linear regression
Introduction to machine learning and model building using linear regression
 
Module 1 introduction to machine learning
Module 1  introduction to machine learningModule 1  introduction to machine learning
Module 1 introduction to machine learning
 
Introduction to-machine-learning
Introduction to-machine-learningIntroduction to-machine-learning
Introduction to-machine-learning
 
Introduction to deep learning workshop
Introduction to deep learning workshopIntroduction to deep learning workshop
Introduction to deep learning workshop
 
Lecture 01: Machine Learning for Language Technology - Introduction
 Lecture 01: Machine Learning for Language Technology - Introduction Lecture 01: Machine Learning for Language Technology - Introduction
Lecture 01: Machine Learning for Language Technology - Introduction
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Basics of Machine Learning
Basics of Machine LearningBasics of Machine Learning
Basics of Machine Learning
 
Statistical learning intro
Statistical learning introStatistical learning intro
Statistical learning intro
 

Semelhante a Understanding Basics of Machine Learning

9.b-CMPS 403-F20-Session 9-Intro to ML II.pdf
9.b-CMPS 403-F20-Session 9-Intro to ML II.pdf9.b-CMPS 403-F20-Session 9-Intro to ML II.pdf
9.b-CMPS 403-F20-Session 9-Intro to ML II.pdf
AmirMohamedNabilSale
 

Semelhante a Understanding Basics of Machine Learning (20)

Machine Learning on Azure - AzureConf
Machine Learning on Azure - AzureConfMachine Learning on Azure - AzureConf
Machine Learning on Azure - AzureConf
 
DeepLearningLecture.pptx
DeepLearningLecture.pptxDeepLearningLecture.pptx
DeepLearningLecture.pptx
 
Deep learning from scratch
Deep learning from scratch Deep learning from scratch
Deep learning from scratch
 
Ml ppt at
Ml ppt atMl ppt at
Ml ppt at
 
Machine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis IntroductionMachine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis Introduction
 
Data Science and Machine Learning with Tensorflow
 Data Science and Machine Learning with Tensorflow Data Science and Machine Learning with Tensorflow
Data Science and Machine Learning with Tensorflow
 
Artificial Intelligence, Machine Learning and Deep Learning
Artificial Intelligence, Machine Learning and Deep LearningArtificial Intelligence, Machine Learning and Deep Learning
Artificial Intelligence, Machine Learning and Deep Learning
 
Deep learning with TensorFlow
Deep learning with TensorFlowDeep learning with TensorFlow
Deep learning with TensorFlow
 
9.b-CMPS 403-F20-Session 9-Intro to ML II.pdf
9.b-CMPS 403-F20-Session 9-Intro to ML II.pdf9.b-CMPS 403-F20-Session 9-Intro to ML II.pdf
9.b-CMPS 403-F20-Session 9-Intro to ML II.pdf
 
Hardware Acceleration for Machine Learning
Hardware Acceleration for Machine LearningHardware Acceleration for Machine Learning
Hardware Acceleration for Machine Learning
 
supervised.pptx
supervised.pptxsupervised.pptx
supervised.pptx
 
Support Vector Machines Simply
Support Vector Machines SimplySupport Vector Machines Simply
Support Vector Machines Simply
 
Machine Learning from a Software Engineer's perspective
Machine Learning from a Software Engineer's perspectiveMachine Learning from a Software Engineer's perspective
Machine Learning from a Software Engineer's perspective
 
Machine learning from a software engineer's perspective - Marijn van Zelst - ...
Machine learning from a software engineer's perspective - Marijn van Zelst - ...Machine learning from a software engineer's perspective - Marijn van Zelst - ...
Machine learning from a software engineer's perspective - Marijn van Zelst - ...
 
مدخل إلى تعلم الآلة
مدخل إلى تعلم الآلةمدخل إلى تعلم الآلة
مدخل إلى تعلم الآلة
 
Deep learning from a novice perspective
Deep learning from a novice perspectiveDeep learning from a novice perspective
Deep learning from a novice perspective
 
Online learning, Vowpal Wabbit and Hadoop
Online learning, Vowpal Wabbit and HadoopOnline learning, Vowpal Wabbit and Hadoop
Online learning, Vowpal Wabbit and Hadoop
 
Deep Learning in Recommender Systems - RecSys Summer School 2017
Deep Learning in Recommender Systems - RecSys Summer School 2017Deep Learning in Recommender Systems - RecSys Summer School 2017
Deep Learning in Recommender Systems - RecSys Summer School 2017
 
[Paper Reading] Attention is All You Need
[Paper Reading] Attention is All You Need[Paper Reading] Attention is All You Need
[Paper Reading] Attention is All You Need
 
Machine Learning using Support Vector Machine
Machine Learning using Support Vector MachineMachine Learning using Support Vector Machine
Machine Learning using Support Vector Machine
 

Mais de Pranav Ainavolu

Designing cross-platform User Interface with native performance using Xamarin...
Designing cross-platform User Interface with native performance using Xamarin...Designing cross-platform User Interface with native performance using Xamarin...
Designing cross-platform User Interface with native performance using Xamarin...
Pranav Ainavolu
 
Building Android, iOS and Windows 8 Apps with Windows Azure Mobile Services
Building Android, iOS and Windows 8 Apps with Windows Azure Mobile ServicesBuilding Android, iOS and Windows 8 Apps with Windows Azure Mobile Services
Building Android, iOS and Windows 8 Apps with Windows Azure Mobile Services
Pranav Ainavolu
 
Whats New in the Visual Studio 2013 IDE
Whats New in the Visual Studio 2013 IDEWhats New in the Visual Studio 2013 IDE
Whats New in the Visual Studio 2013 IDE
Pranav Ainavolu
 

Mais de Pranav Ainavolu (20)

Containerization with Azure
Containerization with AzureContainerization with Azure
Containerization with Azure
 
ASP.NET Core Overview
ASP.NET Core OverviewASP.NET Core Overview
ASP.NET Core Overview
 
Microsoft Azure - Introduction
Microsoft Azure - IntroductionMicrosoft Azure - Introduction
Microsoft Azure - Introduction
 
Cross platform mobile app development with Xamarin
Cross platform mobile app development with XamarinCross platform mobile app development with Xamarin
Cross platform mobile app development with Xamarin
 
Starting Mobile Development
Starting Mobile DevelopmentStarting Mobile Development
Starting Mobile Development
 
Connected & Disconnected Apps with Azure Mobile Apps
Connected & Disconnected Apps with Azure Mobile AppsConnected & Disconnected Apps with Azure Mobile Apps
Connected & Disconnected Apps with Azure Mobile Apps
 
Xamarin Dev Days - Xamarin.Forms
Xamarin Dev Days - Xamarin.FormsXamarin Dev Days - Xamarin.Forms
Xamarin Dev Days - Xamarin.Forms
 
Native iOS, Android apps using Xamarin.Forms dotnetConf2016 Hyderabad
Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 HyderabadNative iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad
Native iOS, Android apps using Xamarin.Forms dotnetConf2016 Hyderabad
 
Xamarin Forms
Xamarin FormsXamarin Forms
Xamarin Forms
 
Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...
Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...
Automated Testing & Auto Scaling your Apps with Microsoft & Open Source Techn...
 
Building A Conversational Bot Using Bot Framework and Microsoft
Building A Conversational Bot Using Bot Framework and MicrosoftBuilding A Conversational Bot Using Bot Framework and Microsoft
Building A Conversational Bot Using Bot Framework and Microsoft
 
The Internet of Things with Azure Service Bus
The Internet of Things with Azure Service BusThe Internet of Things with Azure Service Bus
The Internet of Things with Azure Service Bus
 
Dev/Test Scenarios in the DevOps World
Dev/Test Scenarios in the DevOps WorldDev/Test Scenarios in the DevOps World
Dev/Test Scenarios in the DevOps World
 
Using Visual Studio to build XAML Universal Apps
Using Visual Studio to build XAML Universal AppsUsing Visual Studio to build XAML Universal Apps
Using Visual Studio to build XAML Universal Apps
 
Designing cross-platform User Interface with native performance using Xamarin...
Designing cross-platform User Interface with native performance using Xamarin...Designing cross-platform User Interface with native performance using Xamarin...
Designing cross-platform User Interface with native performance using Xamarin...
 
Building Windows Store apps with HTML & Javascript
Building Windows Store apps with HTML & JavascriptBuilding Windows Store apps with HTML & Javascript
Building Windows Store apps with HTML & Javascript
 
Building Android, iOS and Windows 8 Apps with Windows Azure Mobile Services
Building Android, iOS and Windows 8 Apps with Windows Azure Mobile ServicesBuilding Android, iOS and Windows 8 Apps with Windows Azure Mobile Services
Building Android, iOS and Windows 8 Apps with Windows Azure Mobile Services
 
Whats New in the Visual Studio 2013 IDE
Whats New in the Visual Studio 2013 IDEWhats New in the Visual Studio 2013 IDE
Whats New in the Visual Studio 2013 IDE
 
Building Apps for Office 2013
Building Apps for Office 2013Building Apps for Office 2013
Building Apps for Office 2013
 
Whats New in Excel 2013
Whats New in Excel 2013Whats New in Excel 2013
Whats New in Excel 2013
 

Último

Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
amitlee9823
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men 🔝Ongole🔝 Escorts S...
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men  🔝Ongole🔝   Escorts S...➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men  🔝Ongole🔝   Escorts S...
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men 🔝Ongole🔝 Escorts S...
amitlee9823
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
karishmasinghjnh
 
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night StandCall Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
only4webmaster01
 
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
gajnagarg
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
amitlee9823
 
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
gajnagarg
 
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
gajnagarg
 

Último (20)

Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men 🔝Ongole🔝 Escorts S...
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men  🔝Ongole🔝   Escorts S...➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men  🔝Ongole🔝   Escorts S...
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men 🔝Ongole🔝 Escorts S...
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Detecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachDetecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning Approach
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night StandCall Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
 
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
 

Understanding Basics of Machine Learning

  • 1. Understanding basics of Machine Learning Pranav Ainavolu Microsoft MVP | Senior Developer at Realpage @a_pranav | http://pranavon.net/
  • 2. Agenda 1) data science 2) prediction 3) process 4) models 5) AzureML
  • 3. data science • key word: “science” • try stuff • it (might not | won’t) work the first time • this might work…question • wikipedia timeresearch • I have an ideahypothesis • try it outexperiment • did this even work?analysis • time for a better ideaconclusion
  • 4. machine learning • finding (and exploiting) patterns in data • replacing “human writing code” with “human supplying data” • system figures out what the person wants based on examples • need to abstract from “training” examples to “test” examples • most central issue in ML: generalization
  • 5. machine learning •split into two (ish) areas •supervised learning • predicting the future • learn from past examples to predict future •unsupervised learning • understanding the past • making sense of data • learning structure of data • compressing data for consumption
  • 7. neat applications • spam catchers • ocr (optical character recognition) • natural language processing • machine translation • biology • medicine • robotics (autonomous systems) • etc… 7
  • 9. making decisions •what kinds of decisions are we making? • binary classification • yes/no, 1/0, male/female • multi-class classification • {A, B, C, D, F} (Grade), {1, 2, 3, 4} (Class), {teacher, student, secretary} • regression • number between 0 and 100, real value 9
  • 11. data Class Outlook Temp. Windy Play Sunny Low Yes No Play Sunny High Yes No Play Sunny High No Play Overcast Low Yes Play Overcast High No Play Overcast Low No No Play Rainy Low Yes Play Rainy Low No ? Sunny Low No label (y) play / no play features outlook, temp, windy values (x) [Sunny, Low, Yes] Labeled dataset is a collection of (X, Y) pairs. Given a new x, how do we predict y?
  • 12. clean / transform / maths Class Outlook Temp. Windy Play Sunny Lowest Yes No Play ? High Yes No Play Sunny High KindOf Play Overcast ? Yes Play Turtle Cloud High No Play Overcast ? No No Play Rainy Low 28% Play Rainy Low No ? Sunny Low No need to clean up data need to convert to model-able form (linear algebra) yak shaving Any apparently useless activity which, by allowing you to overcome intermediate difficulties, allows you to solve a larger problem. I was doing a bit of yak shaving this morning, and it looks like it might have paid off. http://en.wiktionary.org/wiki/yak_shaving
  • 13. clean / transform / maths Class Outlook Temp. Windy Play Sunny Low Yes No Play Sunny High Yes No Play Sunny High No Play Overcast Low Yes Play Overcast High No Play Overcast Low No No Play Rainy Low Yes Play Rainy Low No ? Sunny Low No need to clean up data need to convert to model-able form (linear algebra)
  • 14. model Class Outlook Temp. Windy Play Sunny Low Yes No Play Sunny High Yes No Play Sunny High No Play Overcast Low Yes Play Overcast High No Play Overcast Low No No Play Rainy Low Yes Play Rainy Low No ? Sunny Low No
  • 15. predict PLAY!!! Class Outlook Temp. Windy ? Sunny Low No
  • 16. models how do we build them?
  • 17. linear classifiers •in order to classify things properly we need: • a way to mathematically represent examples • a way to separate classes (yes/no) •“decision boundary” •excel example •graph example 17 MODELS
  • 18. linear classifiers •dot product of vectors • [ 3, 4 ] ● [ 1, 2 ] = (3 × 1) + (4 × 2) = 11 • a ● b = | a | × | b | cos θ • When does this equal 0? •why would this be useful? • decision boundary can be represented using a single vector 18 MODELS
  • 20. linear classifiers •Frank Rosenblatt, Cornell 1957 • let’s make a line (by using a single vector) • take the dot product between the line and the new point • > 0 belongs to class 1 • < 0 belongs to class 2 • == 0 flip a coin we don’t know • for each example, if we make a mistake, move the line 20 MODELS
  • 25. kernel methods 2𝑛 + 𝑛 2 = 2n + 𝑛 𝑛−1 2 features….
  • 26. perceptron •minimize mistakes by moving w arg min (𝒘,𝒃) 1 2 𝒘 2 subject to: 𝑦𝑖 𝒘 ∙ 𝒙𝒊 − 𝑏 ≥ 1 REMINDER
  • 27. perceptron •eventually this becomes an optimization problem 𝐿 𝛼 = 𝑖=1 𝑛 𝛼𝑖 − 1 2 𝑖,𝑗 𝛼𝑖 𝛼𝑗 𝑦𝑖 𝑦𝑗 𝒙𝑖 𝑇 𝒙𝑗 subject to: 𝛼𝑖 ≥ 0, 𝑖=1 𝑛 𝛼𝑖 𝑦𝑖 = 0 REMINDER
  • 28. perceptron •eventually this becomes an optimization problem 𝐿 𝛼 = 𝑖=1 𝑛 𝛼𝑖 − 1 2 𝑖,𝑗 𝛼𝑖 𝛼𝑗 𝑦𝑖 𝑦𝑗 𝒙𝑖 𝑇 𝒙𝑗 subject to: 𝛼𝑖 ≥ 0, 𝑖=1 𝑛 𝛼𝑖 𝑦𝑖 = 0 REMINDER
  • 29. perceptron •eventually this becomes an optimization problem 𝐿 𝛼 = 𝑖=1 𝑛 𝛼𝑖 − 1 2 𝑖,𝑗 𝛼𝑖 𝛼𝑗 𝑦𝑖 𝑦𝑗 𝑘 𝒙𝑖, 𝒙𝑗 subject to: 𝛼𝑖 ≥ 0, 𝑖=1 𝑛 𝛼𝑖 𝑦𝑖 = 0 REMINDER dot product
  • 30. perceptron •Frank Rosenblatt, Cornell 1957 • let’s make a line (by using a single vector) • take the dot product between the line and the new point • > 0 belongs to class 1 • < 0 belongs to class 2 • == 0 flip a coin we don’t know • for each example, if we make a mistake, move the line 30 REMINDER
  • 31. kernel (one weird trick….) •store dot product in a table 𝒙0 𝑇 𝒙0 ⋯ 𝒙0 𝑇 𝒙𝑗 ⋮ ⋱ ⋮ 𝒙𝑖 𝑇 𝒙0 ⋯ 𝒙𝑖 𝑇 𝒙𝑗 •call it the “kernel matrix” and “kernel trick” •project into any space and still learn a linear model MODELS
  • 32. support vector machines •this method is the basis for SVM’s •returns a set of vectors (<< n) to make decision •essentially changed the space to make it separable MODELS
  • 33. kernels •polynomial kernel 𝐾 𝒙, 𝒚 = 𝒙 𝑇 𝒚 + 𝑐 𝑑 •RBF kernel 𝐾 𝒙, 𝒚 = exp − 𝒙 − 𝒚 2 2 2𝜎2 MODELS 1
  • 34. 34
  • 41. decision trees Class Outlook Temp. Windy Play Sunny Low Yes No Play Sunny High Yes No Play Sunny High No Play Overcast Low Yes Play Overcast High No Play Overcast Low No No Play Rainy Low Yes Play Rainy Low No ? Sunny Low No
  • 42. decision trees •how should the computer split? • information gain (with entropy) • entropy measures how disorganized your answer is. • information gain says: • if I separate the answer by the values in a particular column, does the answer become *more* organized?
  • 43. decision trees •calculating information gain: • 𝐻 𝑦 – how messy is the answer • 𝐻 𝑦 𝑎) – how messy is the answer if we know a? 𝐼𝐺 𝑦, 𝑎 = 𝐻 𝑦 − 𝐻 𝑦 𝑎) 𝑎 ∈ 𝐴𝑡𝑡𝑟(𝑥)
  • 47. how well is it doing? Train Test Use 80% Use 20%
  • 48. AzureML putting it all together 48
  • 49. process reminder (same on Azure) data clean transform maths model predict
  • 51. Truth true false Guess positive 𝑡𝑟𝑢𝑒 𝑝𝑜𝑠𝑖𝑡𝑖𝑣𝑒 𝑓𝑎𝑙𝑠𝑒 𝑝𝑜𝑠𝑖𝑡𝑖𝑣𝑒 𝑝𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 = 𝑡𝑝 𝑡𝑝 + 𝑓𝑝 negative 𝑓𝑎𝑙𝑠𝑒 𝑛𝑒𝑔𝑎𝑡𝑖𝑣𝑒 𝑡𝑟𝑢𝑒 𝑛𝑒𝑔𝑎𝑡𝑖𝑣𝑒 𝑟𝑒𝑐𝑎𝑙𝑙 = 𝑡𝑝 𝑡𝑝 + 𝑓𝑛 𝑎𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = 𝑡𝑝 + 𝑡𝑛 𝑡𝑝 + 𝑡𝑛 + 𝑓𝑝 + 𝑓𝑛 confusion matrix