SlideShare ist ein Scribd-Unternehmen logo
1 von 54
Introduction to Machine
Learning
Dr. Koundinya Desiraju,
CSIR – IGIB
1
Why Machine Learning ?
2
• Group similar news articles
• Group similar patients
• Predict stock price
• Predict Life expectancy
• Recommendation systems
• Face recognition
• Spam email
• Predict Defaulters
• Lie detection
• Diagnose cancer
3
Data -----> Decisions
4
• Group similar news articles
• Group similar patients
• Predict stock price
• Predict Life expectancy
• Recommendation systems
• Face recognition
• Spam email
• Predict Defaulters
• Lie detection
• Diagnose cancer
3 Questions
• How many of you heard of Machine learning ?
• How many of you know Machine learning ?
• How many of you practice Machine learning ?
5
Overview
• Definition
• Types of Machine Learning
• Classification problem
• Practical Considerations
6
What is Machine Learning?
7
Machine learning is a type of artificial
intelligence (AI) that provides computers
with the ability to learn without being
explicitly programmed
Types of Machine Learning
8
Supervised vs Unsupervised
9
• Supervised Learning:
• Data and Label are provided.
• Machine learns to predict label from data.
• Unsupervised Learning:
• Only data is provided.
• Machine learns to group similar data points.
Classification vs Regression
• Predicts a class  Classification
• Predicts a real number  Regression
10
Example problems
11
• Group similar news articles
• Group similar patients
• Predict stock price
• Predict Life expectancy
• Recommendation systems
• Face recognition
• Spam email
• Predict Defaulters
• Lie detection
• Diagnose cancer
Unsupervised
Regression
Classification
12
Classification Models
13
Machine Learning Framework
14
Let’s build a Model : Data
15
library(mlbench)
data(PimaIndiansDiabetes)
head(PimaIndiansDiabetes)
## pregnant glucose pressure triceps insulin mass pedigree age diabetes
## 1 6 148 72 35 0 33.6 0.627 50 pos
## 2 1 85 66 29 0 26.6 0.351 31 neg
## 3 8 183 64 0 0 23.3 0.672 32 pos
## 4 1 89 66 23 94 28.1 0.167 21 neg
## 5 0 137 40 35 168 43.1 2.288 33 pos
## 6 5 116 74 0 0 25.6 0.201 30 neg
Let’s build a Model : Model
16
Model <- randomForest(diabetes ~., data = PimaIndiansDiabetes)
Model
##
## Call:
## randomForest(formula = diabetes ~ ., data = PimaIndiansDiabetes)
## Type of random forest: classification
## Number of trees: 500
## No. of variables tried at each split: 2
##
## OOB estimate of error rate: 24.09%
## Confusion matrix:
## neg pos class.error
## neg 423 77 0.1540000
## pos 108 160 0.4029851
Code
17
1.library(mlbench)
2.data(PimaIndiansDiabetes)
3.head(PimaIndiansDiabetes)
4.Model <- randomForest(diabetes ~., data = PimaIndiansDiabetes)
Linear Classifier: Logistic regression
18
Cost Function
• Function which reflects some kind of model error.
• Denoted by J(𝚹)
• Example:
• Minimize the cost function.
19
Gradient Descent: The general idea
• We have k parameters 𝜃1, 𝜃2, … , 𝜃 𝑘we’d like to train for
a model – with respect to some error/loss function 𝐽(𝜃1,
… , 𝜃 𝑘) to be minimized
• Gradient descent is one way to iteratively determine the
optimal set of parameter values:
1. Initialize parameters
2. Keep changing values to reduce 𝐽(𝜃1, … , 𝜃 𝑘)
• 𝛻𝐽 tells us which direction increases 𝐽 the most
• We go in the opposite direction of 𝛻𝐽
To actually descend…
Set initial parameter values 𝜃1
0
, … , 𝜃 𝑘
0
while(not converged) {
calculate 𝛻𝐽 (i.e. evaluate
𝜕𝐽
𝜕𝜃1
, … ,
𝜕𝐽
𝜕𝜃 𝑘
)
do {
𝜃1 ≔ 𝜃1 − α
𝜕𝐽
𝜕𝜃1
𝜃2 ≔ 𝜃2 − α
𝜕𝐽
𝜕𝜃2
⋮
𝜃 𝑘 ≔ 𝜃 𝑘 − α
𝜕𝐽
𝜕𝜃 𝑘
}
}
Where α is the ‘learning rate’ or ‘step size’
- Small enough α ensures 𝐽 𝜃1
𝑖
, … , 𝜃 𝑘
𝑖
≤ 𝐽(𝜃1
𝑖−1
, … , 𝜃 𝑘
𝑖−1
)
Global/Local Max/Mins
After each iteration:
Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
After each iteration:
Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
After each iteration:
Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
After each iteration:
Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
After each iteration:
Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
After each iteration:
Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
After each iteration:
Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
After each iteration:
Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
Issues
• Convex objective function guarantees convergence to global
minimum
• Non-convexity brings the possibility of getting stuck in a local
minimum
• Different, randomized starting values can fight this
Initial Values and Convergence
Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
Initial Values and Convergence
Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
Issues cont.
• Convergence can be slow
• Larger learning rate α can speed things up, but with too large of α, optimums
can be ‘jumped’ or skipped over - requiring more iterations
• Too small of a step size will keep convergence slow
• Can be combined with a line search to find the optimal α on every iteration
Model Evaluation
35
Linear Models
36
Quadratic Model
37
Artificial Neural Networks
38
Which model is the best?
39
How can we evaluate a model?
40
Test Set Method
41
Variance - Bias
42
• The bias is error from erroneous assumptions in the
learning alorithm. High bias can cause an algorithm to miss the
relevant relations between features and target outputs (underfitting).
• The variance is error from sensitivity to small fluctuations in the
training set. High variance can cause overfitting modeling the
random noise in the training data, rather than the intended outputs.
43
Variance - Bias
Test Set Method
44
Leave-one-out Cross Validation
45
Leave-one-out Cross Validation
46
K – fold Cross Validation
47
What to USE ?
48
Model selection
49
Beyond training and test
• Training set
• Validation/ dev set
• Test set
50
Is the accuracy Enough to evaluate usefulness
of a model?
51
More measures
52
Further reading
• Andrew Ng Machine Learning course: Coursera.org
• Elements of statistical learning: Trevor and Tibshirani
53
Thank you
54

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-LearnIntroduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-LearnBenjamin Bengfort
 
An introduction to Machine Learning
An introduction to Machine LearningAn introduction to Machine Learning
An introduction to Machine Learningbutest
 
Supervised vs Unsupervised vs Reinforcement Learning | Edureka
Supervised vs Unsupervised vs Reinforcement Learning | EdurekaSupervised vs Unsupervised vs Reinforcement Learning | Edureka
Supervised vs Unsupervised vs Reinforcement Learning | EdurekaEdureka!
 
Applications in Machine Learning
Applications in Machine LearningApplications in Machine Learning
Applications in Machine LearningJoel Graff
 
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...Simplilearn
 
Basics of Machine Learning
Basics of Machine LearningBasics of Machine Learning
Basics of Machine Learningbutest
 
Machine learning ppt.
Machine learning ppt.Machine learning ppt.
Machine learning ppt.ASHOK KUMAR
 
Machine Learning - Accuracy and Confusion Matrix
Machine Learning - Accuracy and Confusion MatrixMachine Learning - Accuracy and Confusion Matrix
Machine Learning - Accuracy and Confusion MatrixAndrew Ferlitsch
 
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Simplilearn
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine LearningShao-Chuan Wang
 
AI Vs ML Vs DL PowerPoint Presentation Slide Templates Complete Deck
AI Vs ML Vs DL PowerPoint Presentation Slide Templates Complete DeckAI Vs ML Vs DL PowerPoint Presentation Slide Templates Complete Deck
AI Vs ML Vs DL PowerPoint Presentation Slide Templates Complete DeckSlideTeam
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine LearningRahul Jain
 
Data Science Training | Data Science For Beginners | Data Science With Python...
Data Science Training | Data Science For Beginners | Data Science With Python...Data Science Training | Data Science For Beginners | Data Science With Python...
Data Science Training | Data Science For Beginners | Data Science With Python...Simplilearn
 
Machine Learning Deep Learning AI and Data Science
Machine Learning Deep Learning AI and Data Science Machine Learning Deep Learning AI and Data Science
Machine Learning Deep Learning AI and Data Science Venkata Reddy Konasani
 
Machine Learning and Real-World Applications
Machine Learning and Real-World ApplicationsMachine Learning and Real-World Applications
Machine Learning and Real-World ApplicationsMachinePulse
 
Scikit Learn Tutorial | Machine Learning with Python | Python for Data Scienc...
Scikit Learn Tutorial | Machine Learning with Python | Python for Data Scienc...Scikit Learn Tutorial | Machine Learning with Python | Python for Data Scienc...
Scikit Learn Tutorial | Machine Learning with Python | Python for Data Scienc...Edureka!
 

Was ist angesagt? (20)

Introduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-LearnIntroduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-Learn
 
An introduction to Machine Learning
An introduction to Machine LearningAn introduction to Machine Learning
An introduction to Machine Learning
 
Machine learning
Machine learning Machine learning
Machine learning
 
Supervised vs Unsupervised vs Reinforcement Learning | Edureka
Supervised vs Unsupervised vs Reinforcement Learning | EdurekaSupervised vs Unsupervised vs Reinforcement Learning | Edureka
Supervised vs Unsupervised vs Reinforcement Learning | Edureka
 
Applications in Machine Learning
Applications in Machine LearningApplications in Machine Learning
Applications in Machine Learning
 
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
 
Basics of Machine Learning
Basics of Machine LearningBasics of Machine Learning
Basics of Machine Learning
 
Machine learning ppt.
Machine learning ppt.Machine learning ppt.
Machine learning ppt.
 
Machine Learning - Accuracy and Confusion Matrix
Machine Learning - Accuracy and Confusion MatrixMachine Learning - Accuracy and Confusion Matrix
Machine Learning - Accuracy and Confusion Matrix
 
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
AI Vs ML Vs DL PowerPoint Presentation Slide Templates Complete Deck
AI Vs ML Vs DL PowerPoint Presentation Slide Templates Complete DeckAI Vs ML Vs DL PowerPoint Presentation Slide Templates Complete Deck
AI Vs ML Vs DL PowerPoint Presentation Slide Templates Complete Deck
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Data Science Training | Data Science For Beginners | Data Science With Python...
Data Science Training | Data Science For Beginners | Data Science With Python...Data Science Training | Data Science For Beginners | Data Science With Python...
Data Science Training | Data Science For Beginners | Data Science With Python...
 
Machine learning
Machine learningMachine learning
Machine learning
 
Machine Learning Deep Learning AI and Data Science
Machine Learning Deep Learning AI and Data Science Machine Learning Deep Learning AI and Data Science
Machine Learning Deep Learning AI and Data Science
 
Machine learning
Machine learningMachine learning
Machine learning
 
Machine Learning and Real-World Applications
Machine Learning and Real-World ApplicationsMachine Learning and Real-World Applications
Machine Learning and Real-World Applications
 
Scikit Learn Tutorial | Machine Learning with Python | Python for Data Scienc...
Scikit Learn Tutorial | Machine Learning with Python | Python for Data Scienc...Scikit Learn Tutorial | Machine Learning with Python | Python for Data Scienc...
Scikit Learn Tutorial | Machine Learning with Python | Python for Data Scienc...
 
1.Introduction to deep learning
1.Introduction to deep learning1.Introduction to deep learning
1.Introduction to deep learning
 

Ähnlich wie Introduction to machine learning

Tips and tricks to win kaggle data science competitions
Tips and tricks to win kaggle data science competitionsTips and tricks to win kaggle data science competitions
Tips and tricks to win kaggle data science competitionsDarius Barušauskas
 
DutchMLSchool 2022 - History and Developments in ML
DutchMLSchool 2022 - History and Developments in MLDutchMLSchool 2022 - History and Developments in ML
DutchMLSchool 2022 - History and Developments in MLBigML, Inc
 
A deep learning approach for twitter spam detection lijie zhou
A deep learning approach for twitter spam detection lijie zhouA deep learning approach for twitter spam detection lijie zhou
A deep learning approach for twitter spam detection lijie zhouAnne(Lijie) Zhou
 
Barga Data Science lecture 9
Barga Data Science lecture 9Barga Data Science lecture 9
Barga Data Science lecture 9Roger Barga
 
Barga Data Science lecture 4
Barga Data Science lecture 4Barga Data Science lecture 4
Barga Data Science lecture 4Roger Barga
 
Nss power point_machine_learning
Nss power point_machine_learningNss power point_machine_learning
Nss power point_machine_learningGauravsd2014
 
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptx
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptxMACHINE LEARNING - ENTROPY & INFORMATION GAINpptx
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptxVijayalakshmi171563
 
Machine Learning - Lecture2.pptx
Machine Learning - Lecture2.pptxMachine Learning - Lecture2.pptx
Machine Learning - Lecture2.pptxNsitTech
 
Identifying and classifying unknown Network Disruption
Identifying and classifying unknown Network DisruptionIdentifying and classifying unknown Network Disruption
Identifying and classifying unknown Network Disruptionjagan477830
 
Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018HJ van Veen
 
Experimental Design for Distributed Machine Learning with Myles Baker
Experimental Design for Distributed Machine Learning with Myles BakerExperimental Design for Distributed Machine Learning with Myles Baker
Experimental Design for Distributed Machine Learning with Myles BakerDatabricks
 
Machinr Learning and artificial_Lect1.pdf
Machinr Learning and artificial_Lect1.pdfMachinr Learning and artificial_Lect1.pdf
Machinr Learning and artificial_Lect1.pdfSaketBansal9
 
A new CPXR Based Logistic Regression Method and Clinical Prognostic Modeling ...
A new CPXR Based Logistic Regression Method and Clinical Prognostic Modeling ...A new CPXR Based Logistic Regression Method and Clinical Prognostic Modeling ...
A new CPXR Based Logistic Regression Method and Clinical Prognostic Modeling ...Vahid Taslimitehrani
 
From ensembles to computer networks
From ensembles to computer networksFrom ensembles to computer networks
From ensembles to computer networksCSIRO
 
Demystifying Machine Learning
Demystifying Machine LearningDemystifying Machine Learning
Demystifying Machine LearningAyodele Odubela
 
Kaggle Gold Medal Case Study
Kaggle Gold Medal Case StudyKaggle Gold Medal Case Study
Kaggle Gold Medal Case StudyAlon Bochman, CFA
 
Database Research Principles Revealed
Database Research Principles RevealedDatabase Research Principles Revealed
Database Research Principles Revealedinfoblog
 

Ähnlich wie Introduction to machine learning (20)

Tips and tricks to win kaggle data science competitions
Tips and tricks to win kaggle data science competitionsTips and tricks to win kaggle data science competitions
Tips and tricks to win kaggle data science competitions
 
DutchMLSchool 2022 - History and Developments in ML
DutchMLSchool 2022 - History and Developments in MLDutchMLSchool 2022 - History and Developments in ML
DutchMLSchool 2022 - History and Developments in ML
 
A deep learning approach for twitter spam detection lijie zhou
A deep learning approach for twitter spam detection lijie zhouA deep learning approach for twitter spam detection lijie zhou
A deep learning approach for twitter spam detection lijie zhou
 
Barga Data Science lecture 9
Barga Data Science lecture 9Barga Data Science lecture 9
Barga Data Science lecture 9
 
Barga Data Science lecture 4
Barga Data Science lecture 4Barga Data Science lecture 4
Barga Data Science lecture 4
 
Nss power point_machine_learning
Nss power point_machine_learningNss power point_machine_learning
Nss power point_machine_learning
 
Unit 2-ML.pptx
Unit 2-ML.pptxUnit 2-ML.pptx
Unit 2-ML.pptx
 
L15. Machine Learning - Black Art
L15. Machine Learning - Black ArtL15. Machine Learning - Black Art
L15. Machine Learning - Black Art
 
07 learning
07 learning07 learning
07 learning
 
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptx
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptxMACHINE LEARNING - ENTROPY & INFORMATION GAINpptx
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptx
 
Machine Learning - Lecture2.pptx
Machine Learning - Lecture2.pptxMachine Learning - Lecture2.pptx
Machine Learning - Lecture2.pptx
 
Identifying and classifying unknown Network Disruption
Identifying and classifying unknown Network DisruptionIdentifying and classifying unknown Network Disruption
Identifying and classifying unknown Network Disruption
 
Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018
 
Experimental Design for Distributed Machine Learning with Myles Baker
Experimental Design for Distributed Machine Learning with Myles BakerExperimental Design for Distributed Machine Learning with Myles Baker
Experimental Design for Distributed Machine Learning with Myles Baker
 
Machinr Learning and artificial_Lect1.pdf
Machinr Learning and artificial_Lect1.pdfMachinr Learning and artificial_Lect1.pdf
Machinr Learning and artificial_Lect1.pdf
 
A new CPXR Based Logistic Regression Method and Clinical Prognostic Modeling ...
A new CPXR Based Logistic Regression Method and Clinical Prognostic Modeling ...A new CPXR Based Logistic Regression Method and Clinical Prognostic Modeling ...
A new CPXR Based Logistic Regression Method and Clinical Prognostic Modeling ...
 
From ensembles to computer networks
From ensembles to computer networksFrom ensembles to computer networks
From ensembles to computer networks
 
Demystifying Machine Learning
Demystifying Machine LearningDemystifying Machine Learning
Demystifying Machine Learning
 
Kaggle Gold Medal Case Study
Kaggle Gold Medal Case StudyKaggle Gold Medal Case Study
Kaggle Gold Medal Case Study
 
Database Research Principles Revealed
Database Research Principles RevealedDatabase Research Principles Revealed
Database Research Principles Revealed
 

Kürzlich hochgeladen

FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...amitlee9823
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
ELKO dropshipping via API with DroFx.pptx
ELKO dropshipping via API with DroFx.pptxELKO dropshipping via API with DroFx.pptx
ELKO dropshipping via API with DroFx.pptxolyaivanovalion
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...amitlee9823
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxolyaivanovalion
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...amitlee9823
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfadriantubila
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
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
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...SUHANI PANDEY
 

Kürzlich hochgeladen (20)

(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
ELKO dropshipping via API with DroFx.pptx
ELKO dropshipping via API with DroFx.pptxELKO dropshipping via API with DroFx.pptx
ELKO dropshipping via API with DroFx.pptx
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
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
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
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...
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 

Introduction to machine learning

  • 1. Introduction to Machine Learning Dr. Koundinya Desiraju, CSIR – IGIB 1
  • 3. • Group similar news articles • Group similar patients • Predict stock price • Predict Life expectancy • Recommendation systems • Face recognition • Spam email • Predict Defaulters • Lie detection • Diagnose cancer 3
  • 4. Data -----> Decisions 4 • Group similar news articles • Group similar patients • Predict stock price • Predict Life expectancy • Recommendation systems • Face recognition • Spam email • Predict Defaulters • Lie detection • Diagnose cancer
  • 5. 3 Questions • How many of you heard of Machine learning ? • How many of you know Machine learning ? • How many of you practice Machine learning ? 5
  • 6. Overview • Definition • Types of Machine Learning • Classification problem • Practical Considerations 6
  • 7. What is Machine Learning? 7 Machine learning is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed
  • 8. Types of Machine Learning 8
  • 9. Supervised vs Unsupervised 9 • Supervised Learning: • Data and Label are provided. • Machine learns to predict label from data. • Unsupervised Learning: • Only data is provided. • Machine learns to group similar data points.
  • 10. Classification vs Regression • Predicts a class  Classification • Predicts a real number  Regression 10
  • 11. Example problems 11 • Group similar news articles • Group similar patients • Predict stock price • Predict Life expectancy • Recommendation systems • Face recognition • Spam email • Predict Defaulters • Lie detection • Diagnose cancer Unsupervised Regression Classification
  • 12. 12
  • 15. Let’s build a Model : Data 15 library(mlbench) data(PimaIndiansDiabetes) head(PimaIndiansDiabetes) ## pregnant glucose pressure triceps insulin mass pedigree age diabetes ## 1 6 148 72 35 0 33.6 0.627 50 pos ## 2 1 85 66 29 0 26.6 0.351 31 neg ## 3 8 183 64 0 0 23.3 0.672 32 pos ## 4 1 89 66 23 94 28.1 0.167 21 neg ## 5 0 137 40 35 168 43.1 2.288 33 pos ## 6 5 116 74 0 0 25.6 0.201 30 neg
  • 16. Let’s build a Model : Model 16 Model <- randomForest(diabetes ~., data = PimaIndiansDiabetes) Model ## ## Call: ## randomForest(formula = diabetes ~ ., data = PimaIndiansDiabetes) ## Type of random forest: classification ## Number of trees: 500 ## No. of variables tried at each split: 2 ## ## OOB estimate of error rate: 24.09% ## Confusion matrix: ## neg pos class.error ## neg 423 77 0.1540000 ## pos 108 160 0.4029851
  • 19. Cost Function • Function which reflects some kind of model error. • Denoted by J(𝚹) • Example: • Minimize the cost function. 19
  • 20. Gradient Descent: The general idea • We have k parameters 𝜃1, 𝜃2, … , 𝜃 𝑘we’d like to train for a model – with respect to some error/loss function 𝐽(𝜃1, … , 𝜃 𝑘) to be minimized • Gradient descent is one way to iteratively determine the optimal set of parameter values: 1. Initialize parameters 2. Keep changing values to reduce 𝐽(𝜃1, … , 𝜃 𝑘) • 𝛻𝐽 tells us which direction increases 𝐽 the most • We go in the opposite direction of 𝛻𝐽
  • 21. To actually descend… Set initial parameter values 𝜃1 0 , … , 𝜃 𝑘 0 while(not converged) { calculate 𝛻𝐽 (i.e. evaluate 𝜕𝐽 𝜕𝜃1 , … , 𝜕𝐽 𝜕𝜃 𝑘 ) do { 𝜃1 ≔ 𝜃1 − α 𝜕𝐽 𝜕𝜃1 𝜃2 ≔ 𝜃2 − α 𝜕𝐽 𝜕𝜃2 ⋮ 𝜃 𝑘 ≔ 𝜃 𝑘 − α 𝜕𝐽 𝜕𝜃 𝑘 } } Where α is the ‘learning rate’ or ‘step size’ - Small enough α ensures 𝐽 𝜃1 𝑖 , … , 𝜃 𝑘 𝑖 ≤ 𝐽(𝜃1 𝑖−1 , … , 𝜃 𝑘 𝑖−1 )
  • 23. After each iteration: Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
  • 24. After each iteration: Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
  • 25. After each iteration: Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
  • 26. After each iteration: Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
  • 27. After each iteration: Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
  • 28. After each iteration: Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
  • 29. After each iteration: Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
  • 30. After each iteration: Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
  • 31. Issues • Convex objective function guarantees convergence to global minimum • Non-convexity brings the possibility of getting stuck in a local minimum • Different, randomized starting values can fight this
  • 32. Initial Values and Convergence Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
  • 33. Initial Values and Convergence Picture credit: Andrew Ng, Stanford University, Coursera Machine Learning, Lecture 2 Slides
  • 34. Issues cont. • Convergence can be slow • Larger learning rate α can speed things up, but with too large of α, optimums can be ‘jumped’ or skipped over - requiring more iterations • Too small of a step size will keep convergence slow • Can be combined with a line search to find the optimal α on every iteration
  • 39. Which model is the best? 39
  • 40. How can we evaluate a model? 40
  • 42. Variance - Bias 42 • The bias is error from erroneous assumptions in the learning alorithm. High bias can cause an algorithm to miss the relevant relations between features and target outputs (underfitting). • The variance is error from sensitivity to small fluctuations in the training set. High variance can cause overfitting modeling the random noise in the training data, rather than the intended outputs.
  • 47. K – fold Cross Validation 47
  • 48. What to USE ? 48
  • 50. Beyond training and test • Training set • Validation/ dev set • Test set 50
  • 51. Is the accuracy Enough to evaluate usefulness of a model? 51
  • 53. Further reading • Andrew Ng Machine Learning course: Coursera.org • Elements of statistical learning: Trevor and Tibshirani 53

Hinweis der Redaktion

  1. Note: Draw simple 1 variable graph on board to illustrate