SlideShare a Scribd company logo
1 of 59
Course Name: Introduction to
Machine Learning (Elective)
Credits: 3
Academic Year: 2022-23 (Even Semester)
1
2
Module 1
IML-Module1
Overview
1. About this course
1. What is machine learning
1. Categories of machine learning
1. Notation
1. Approaching a machine learning application
1. Different machine learning approaches
and motivations
3
4
Image source: https://www.javatpoint.com/machine-learning
IML-Module1
Overview
1. About this course
1. What is machine learning
1. Categories of machine learning
1. Notation
1. Approaching a machine learning application
1. Different machine learning approaches
and motivations
5
History of Machine Learning
• ML is making our day to day life easy from self-driving
cars to Amazon virtual assistant "Alexa".
• Below some milestones are given which have occurred in
the history of machine learning:
6
Image source: https://www.javatpoint.com/machine-learning
IML-Module1
What is Machine Learning?
7
Image Source: https://www.innovateli.com/hennessy-grad-keeps-
gifting/
IML-Module1
"Machine learning is the hot new
thing."
-- John L. Hennessy, President of Stanford (2000-2016)
8
Image source:
https://www.gatesnotes.com/Books
IML-Module1
"A breakthrough in machine learning would be
worth ten Microsofts"
-- Bill Gates, Microsoft Co-founder
9
[...] machine learning is a subcategory within the field of computer
science, which allows you to implement artificial intelligence. So it’s
kind of a mechanism to get you to artificial intelligence.
-- Rana el Kaliouby, CEO at
Affectiva
Image Source: https://fortune.com/2019/03/08/rana-el-kaliouby-ceo-
affectiva/
IML-Module1
10
1
(This is likely not an original quote but a paraphrased version of Samuel’s
sentence ”Pro- gramming computers to learn from experience should
eventually eliminate the need for much of this detailed programming
e↵ort.”)
Arthur L Samuel. “Some studies in machine learning using the game of checkers”. In: IBM
Journal of research and development 3.3 (1959), pp. 210–229.
“Machine learning is the field of study that gives computers the ability to learn
without being explicitly programmed”
— Arthur L. Samuel, AI pioneer, 1959
Image Source: https://history-computer.com/ModernComputer/thinkers/images/Arthur-
Samuel1.jpg
IML-Module1
11
Inputs
(observations)
Program
Programmer Computer Outputs
The Traditional Programming Paradigm
IML-Module1
12
Machine learning is the field of study that gives computers the
ability to learn without being explicitly programmed
— Arthur Samuel (1959)
Inputs
Inputs (observations)
Program
Programmer Computer Outputs
Outputs
Computer Program
IML-Module1
13
• We will not only use the machines for their
intelligence, we will also collaborate with them in
ways that we cannot even imagine.
-- Fei Fei Li, Director of Stanford's artificial intelligence lab
Image Source: https://en.wikipedia.org/wiki/Fei-
Fei_Li#/ media/File:Fei-
Fei_Li_at_AI_for_Good_2017.jpg
IML-Module1
14
“A computer program is said to learn from experience E with
respect to some class of tasks T and performance measure P
, if its performance at tasks in T , as measured by P , improves
with experience E.”
— Tom Mitchell, Professor at Carnegie Mellon
University
2
Tom M Mitchell et al. “Machine learning. pp. 870–
877.
1997”.
In: Burr Ridge, IL: McGraw Hill 45.37 (1997),
IML-Module1
15
“A computer program is said to learn from experience E
with respect to some class of tasks T and performance
measure P , if its performance at tasks in T , as measured
by P , improves with experience E.”
— Tom Mitchell, Professor at Carnegie Mellon University
16
• Machine Learning is said as a subset of artificial
intelligence that is mainly concerned with the
development of algorithms which allow a computer to
learn from the data and past experiences on their own.
• The term machine learning was first introduced by Arthur
Samuel in 1959. We can define it in a summarized way as:
Machine learning enables a machine to automatically learn from
data, improve performance from experiences, and predict things
without being explicitly programmed.
17
a
• Task T: classifying handwritten digits from images
• Performance measure P : percentage of digits
classified correctly
• Training experience E: dataset of digits given
classifications, e.g., MNIST
IML-Module1
Handwriting Recognition Example:
18
IML-Module1
Some Applications of Machine Learning:
• Email spam detection
• Face detection and matching (e.g., iPhone X, Windows laptops, etc.)
• Web search (e.g., DuckDuckGo, Bing, Baidu, Google)
• Sports predictions
• Post office (e.g., sorting letters by zip codes)
• ATMs (e.g., reading checks)
• Credit card fraud
19
• Stock predictions
• Smart assistants (Apple Siri, Amazon Alexa, . . . )
• Product recommendations (e.g., Walmart, Netflix, Amazon)
• Self-driving cars (e.g., Uber, Tesla)
• Language translation (Google translate)
• Sentiment analysis
• Drug design
• Medical diagnoses
20
IML-Module1
Overview
1. About this course
1. What is machine learning
1. Categories of machine learning
1. Notation
1. Approaching a machine learning application
1. Different machine learning approaches
and motivations
21
Categories of Machine Learning
Labeled data
Direct
feedback
Predict outcome/future
Supervised Learning
IML-Module1
22
Supervised Learning: Classification
x1
IML-Module1
x2
23
Types of classification
• The algorithm which implements the classification on a dataset
is known as a classifier. There are two types of Classifications:
• Binary Classifier: If the classification problem has only two
possible outcomes, then it is called as Binary Classifier.
Examples: YES or NO, MALE or FEMALE, SPAM or NOT SPAM,
CAT or DOG, etc.
• Multi-class Classifier: If a classification problem has more than
two outcomes, then it is called as Multi-class Classifier.
Example: Classifications of types of crops, Classification of
types of music.
24
Supervised Learning: Regression
X: Feature variable
IML-Module1
25
Y: Target variable
Categories of Machine Learning
Labeled data
Direct
feedback
Predict outcome/future
No
labels/targets
No feedback
Find hidden structure in data
Unsupervised Learning
IML-Module1
Supervised Learning
26
Unsupervised Learning -- Clustering
x
1
x
2
IML-Module1
27
Unsupervised Learning
-- Dimensionality Reduction
IML-Module1
28
Categories of Machine Learning
Labeled data
Direct
feedback
Predict outcome/future
No
labels/targets
No feedback
Find hidden structure in data
Decision
process
Reward system
Learn series of actions
Reinforcement Learning
IML-Module1
Unsupervised Learning
Supervised Learning
29
Reinforcement Learning
Agent
Environment
Reward
State
IML-Module1
Action
30
Ex: Emergence of Locomotion Behaviours in
Rich Environments
• A new paper from Google’s AI subsidiary DeepMind titled
“Emergence of Locomotion Behaviours in Rich Environments.”
• The research explores how reinforcement learning (or RL) can
be used to teach a computer to navigate unfamiliar and complex
environments.
• It’s the sort of fundamental AI research that we’re now testing in
virtual worlds, but that will one day help program robots that can
navigate the stairs in your house.
31
https://www.theverge.com/tldr/2017/7/10/15946542/deepmind-parkour-agent-reinforcement-learning
IML-Module1
32
https://video.twimg.com/ext_tw_video/1111683489890332672/pu/vid/1200x674/WqUJEhUETw0M0gCl.mp4?tag=8
IML-Module1
33
IML-Module1
Lecture 1 Overview
1. About this course
1. What is machine learning
1. Categories of machine learning
1. Notation
1. Approaching a machine learning application
1. Different machine learning approaches
and motivations
34
Supervised Learning Workflow
-- Overview
Machine
Learning
Algorithm
IML-Module1
New Data Predictive
Model
Labels
35
Prediction
Training Data
Supervised Learning Notation
Unknown function:
Hypothesis:
h : ℝm → h : ℝm →
f(x) = y
h(x) = y
Regressio
n
IML-Module1
Classification
Training set: 𝒟 = {⟨x[i], y[i]⟩, i = 1,… , n},
36
Data Representation
x =
x
₁
x
⋮
xm
Feature vector
IML-Module1
37
Data Representation
Feature vector
X =
xT
1
xT
2
⋮
xT
n
x =
x
1
x
2
⋮
xm
D n m
IML-Module1
38
Data Representation
Feature vector
X =
xT
1
xT
2
⋮
xT
n
x =
x
1
x
2
⋮
xm
X =
x[1]
1 x[1]
2 x[1]
m
x[2]
1 x[2]
x[2]
m
x[n]
1 x[n]
2
⋯
2 ⋯
⋮ ⋮ ⋱ ⋮
⋯ x[n]
m
IML-Module1
39
Notation & Conventions used in this book
• Iris Dataset: 150 Iris flowers
• Different Species: Setosa, Versicolor & Virginica
• Each row represents each flower species
• Each col represents flower measurements in Cm (Features in ML)
40
Notation & Conventions used in this book
Features(attributes,
measurements, dimensions)
Class Labels(targets)
m =
n =
IML-Module1
41
Data Representation
Input features
x =
x
1
x
2
⋮
xm
y =
y[1]
y[2]
⋮
y[n]
IML-Module1
42
IML-Module1
ML Terminology (Part 1)
Training example: A row in the table representing the dataset.
Synonymous to an observation, training record, training instance,
training sample (in some contexts, sample refers to a collection of
training examples)
▪
▪ Feature: a column in the table representing the dataset.
Synonymous to predictor, variable, input, attribute,
covariate.
▪ Targets: What we want to predict. Synonymous to
outcome, output, ground truth, response variable,
dependent variable, (class) label (in classification).
▪ Output / prediction: use this to distinguish from targets;
here, means output from the model.
43
Hypothesis Space
Entire hypothesis space
IML-Module1
Hypothesis space
a particular learning
algorithm category
has access to
Hypothesis space
a particular learning
algorithm can sample
Particular hypothesis
(i.e., a model/classifier)
44
IML-Module1
Lecture Overview
1. About this course
1. What is machine learning
1. Categories of machine learning
1. Notation
1. Approaching a machine learning
application
1. Different machine learning approaches
and motivations 45
Supervised Learning Workflow
-- Overview
Machine
Learning
Algorithm
IML-Module1
New
Data
Predictive
Model
Predictio
n
Labels
Training Data
46
Labels
Raw
Data
Training
Dataset
Test
Dataset
Labels
New
Data
Labels
Learning
Algorithm
Preprocessing Learning Evaluation Prediction
Final
Model
Feature Extraction and
Scaling Feature Selection
Dimensionality Reduction
Sampling
IML-Module1
Model Selection
Cross-Validation
Performance
Metrics
Hyperparameter
Optimization
A roadmap to build ML
models
47
IML-Module1
5 Steps for Approaching a Machine
Learning Application
1. Define the problem to be solved.
2. Collect (labeled) data.
3. Choose an algorithm class.
4. Choose an optimization metric or measure for learning the model.
5. Choose a metric or measure for evaluating the model.
48
IML-Module1
Objective Functions
• Maximize the posterior probabilities (e.g., naive Bayes)
• Maximize a fitness function (genetic programming)
• Maximize the total reward/value function (reinforcement
learning)
• Maximize information gain/minimize child node impurities (CART
decision tree classification)
• Minimize a mean squared error cost (or loss) function (CART,
decision tree regression, linear regression, adaptive linear neurons,
...)
• Maximize log-likelihood or minimize cross-entropy loss (or cost) function
• Minimize hinge loss (support vector machine)
49
IML-Module1
Optimization Methods for
Different Learning Algorithms
•
•
•
•
Combinatorial search, greedy search (e.g., decision trees)
Unconstrained convex optimization (e.g.,
Constrained convex optimization (e.g.,
Nonconvex optimization, here: using backpropagation, chain rule,
reverse autodiff. (e.g.,
• Constrained nonconvex optimization (e.g.,
50
IML-Module1
ML Terminology (Part 2)
• Loss function: Often used synonymously with cost
function; sometimes also called error function.
• In some contexts the loss for a single data point, whereas
the cost function refers to the overall (average or summed)
loss over the entire dataset.
• Sometimes also called empirical risk.
51
IML-Module1
Other Metrics in Future Lectures
• Accuracy (1-Error)
• ROC AUC
• Precision
• Recall
• (Cross) Entropy
• Likelihood
• Squared Error/MSE
• L-norms
• Utility
• Fitness
...
.
52
IML-Module1
Different Motivations for Studying
Machine Learning
• Engineers: Real world problem solving
• Mathematicians, computer scientists, and statisticians:
• Neuroscientists:
53
Machine Learning, AI, and Deep Learning
Machine Learning
Deep Learning
AI
A non-biological
system that is
intelligent through
rules
Algorithms that parameterize multilayer
neural networks that then learn
representations of data with multiple layers
of abstraction
Algorithms that learn
models/representations/
rules automatically
from data/examples
IML-Module1
54
Image by Jake VanderPlas; Source:
https://speakerdeck.com/jakevdp/the-state-of-the-stack-scipy-2015-keynote?slide=8)
IML-Module1
55
IML-Module1
▪ Hypothesis: A hypothesis is a certain function that we believe (or hope)
is similar to the true function, the target function that we want to model.
▪ Model: In the machine learning field, the terms hypothesis and model are
often used interchangeably. In other sciences, they can have different
meanings.
▪ Learning algorithm: Again, our goal is to find or approximate the target
function, and the learning algorithm is a set of instructions that tries to
model the target function using our training dataset. A learning algorithm
comes with a hypothesis space, the set of possible hypotheses it
explores to model the unknown target function by formulating the final
hypothesis.
▪ Classifier: A classifier is a special case of a hypothesis (nowadays, often
learned by a machine learning algorithm). A classifier is a hypothesis or
discrete-valued function that is used to assign (categorical) class labels to
particular data points
ML Terminology (Part 3)
56
SLE: Installing Python and packages from the
python package Index
57
Installation Of Python
1. Go to https://www.python.org/
2. Install latest version for your OS. Now latest is 3.11.2
3. Go to Command prompt : type Python-will get Python
information(Version)
4. For installation of packages use command:
pip install PackageName
5. For upgrading packages use:
pip install PackageName –upgrade
6. A highly recommended alternative python distribution for scientific
computing is Anaconda by Continuum Analytics.
7. Anaconda is free: https://docs.anaconda.com/anaconda/install/windows/
8. Python packages can be installed by Anaconda as:
conda install PackageName
9. Package can be updated : conda update PackageName
58
Packages for scientific computing, data
science and machine learning
• Make sure that version numbers of installed packages are equal
to greater than these below mentioned version numbers to
ensure that the code examples run correctly.
• NumPy 1.17.4
• SciPy 1.3.1
• Pandas 0.25.3
• Matplotlib 3.1.0
• SciKit-Learn 0.22.0
59

More Related Content

Similar to Module1 of Introduction to Machine Learning

ppt on introduction to Machine learning tools
ppt on introduction to Machine learning toolsppt on introduction to Machine learning tools
ppt on introduction to Machine learning toolsRaviKiranVarma4
 
01_introduction.pdfbnmelllleitrthnjjjkkk
01_introduction.pdfbnmelllleitrthnjjjkkk01_introduction.pdfbnmelllleitrthnjjjkkk
01_introduction.pdfbnmelllleitrthnjjjkkkJesusTekonbo
 
Machine Learning Ch 1.ppt
Machine Learning Ch 1.pptMachine Learning Ch 1.ppt
Machine Learning Ch 1.pptARVIND SARDAR
 
Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?Marina Santini
 
Machine Learning Basics - By Animesh Sinha
Machine Learning Basics - By Animesh Sinha Machine Learning Basics - By Animesh Sinha
Machine Learning Basics - By Animesh Sinha Animesh Sinha
 
MACHINE LEARNING(R17A0534).pdf
MACHINE LEARNING(R17A0534).pdfMACHINE LEARNING(R17A0534).pdf
MACHINE LEARNING(R17A0534).pdfFayyoOlani
 
Interactive Machine Learning
Interactive  Machine LearningInteractive  Machine Learning
Interactive Machine LearningZitao Liu
 
Artificial intelligence: Simulation of Intelligence
Artificial intelligence: Simulation of IntelligenceArtificial intelligence: Simulation of Intelligence
Artificial intelligence: Simulation of IntelligenceAbhishek Upadhyay
 
Essential concepts for machine learning
Essential concepts for machine learning Essential concepts for machine learning
Essential concepts for machine learning pyingkodi maran
 
Machine Learning in Finance
Machine Learning in FinanceMachine Learning in Finance
Machine Learning in FinanceHamed Vaheb
 
Introduction to machine learning
Introduction to machine learningIntroduction to machine learning
Introduction to machine learningSalman Khan
 
Introduction to machine learning
Introduction to machine learningIntroduction to machine learning
Introduction to machine learningSalman Khan
 
Traditional Machine Learning and No Code Machine Learning with its Features a...
Traditional Machine Learning and No Code Machine Learning with its Features a...Traditional Machine Learning and No Code Machine Learning with its Features a...
Traditional Machine Learning and No Code Machine Learning with its Features a...ijtsrd
 
Machine Learning Chapter one introduction
Machine Learning Chapter one introductionMachine Learning Chapter one introduction
Machine Learning Chapter one introductionARVIND SARDAR
 
Machine Learning: Need of Machine Learning, Its Challenges and its Applications
Machine Learning: Need of Machine Learning, Its Challenges and its ApplicationsMachine Learning: Need of Machine Learning, Its Challenges and its Applications
Machine Learning: Need of Machine Learning, Its Challenges and its ApplicationsArpana Awasthi
 
Machine Learning Contents.pptx
Machine Learning Contents.pptxMachine Learning Contents.pptx
Machine Learning Contents.pptxNaveenkushwaha18
 

Similar to Module1 of Introduction to Machine Learning (20)

ppt on introduction to Machine learning tools
ppt on introduction to Machine learning toolsppt on introduction to Machine learning tools
ppt on introduction to Machine learning tools
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
01_introduction.pdfbnmelllleitrthnjjjkkk
01_introduction.pdfbnmelllleitrthnjjjkkk01_introduction.pdfbnmelllleitrthnjjjkkk
01_introduction.pdfbnmelllleitrthnjjjkkk
 
Machine Learning Ch 1.ppt
Machine Learning Ch 1.pptMachine Learning Ch 1.ppt
Machine Learning Ch 1.ppt
 
Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?
 
Machine Learning Basics - By Animesh Sinha
Machine Learning Basics - By Animesh Sinha Machine Learning Basics - By Animesh Sinha
Machine Learning Basics - By Animesh Sinha
 
MACHINE LEARNING(R17A0534).pdf
MACHINE LEARNING(R17A0534).pdfMACHINE LEARNING(R17A0534).pdf
MACHINE LEARNING(R17A0534).pdf
 
01_introduction_ML.pdf
01_introduction_ML.pdf01_introduction_ML.pdf
01_introduction_ML.pdf
 
Interactive Machine Learning
Interactive  Machine LearningInteractive  Machine Learning
Interactive Machine Learning
 
Artificial intelligence: Simulation of Intelligence
Artificial intelligence: Simulation of IntelligenceArtificial intelligence: Simulation of Intelligence
Artificial intelligence: Simulation of Intelligence
 
ML PPT-1.pptx
ML PPT-1.pptxML PPT-1.pptx
ML PPT-1.pptx
 
Essential concepts for machine learning
Essential concepts for machine learning Essential concepts for machine learning
Essential concepts for machine learning
 
Machine Learning in Finance
Machine Learning in FinanceMachine Learning in Finance
Machine Learning in Finance
 
Machine learning
Machine learningMachine learning
Machine learning
 
Introduction to machine learning
Introduction to machine learningIntroduction to machine learning
Introduction to machine learning
 
Introduction to machine learning
Introduction to machine learningIntroduction to machine learning
Introduction to machine learning
 
Traditional Machine Learning and No Code Machine Learning with its Features a...
Traditional Machine Learning and No Code Machine Learning with its Features a...Traditional Machine Learning and No Code Machine Learning with its Features a...
Traditional Machine Learning and No Code Machine Learning with its Features a...
 
Machine Learning Chapter one introduction
Machine Learning Chapter one introductionMachine Learning Chapter one introduction
Machine Learning Chapter one introduction
 
Machine Learning: Need of Machine Learning, Its Challenges and its Applications
Machine Learning: Need of Machine Learning, Its Challenges and its ApplicationsMachine Learning: Need of Machine Learning, Its Challenges and its Applications
Machine Learning: Need of Machine Learning, Its Challenges and its Applications
 
Machine Learning Contents.pptx
Machine Learning Contents.pptxMachine Learning Contents.pptx
Machine Learning Contents.pptx
 

More from MayuraD1

SDP_May2023:student developement program
SDP_May2023:student developement programSDP_May2023:student developement program
SDP_May2023:student developement programMayuraD1
 
cyber_security_brochure details of workshop
cyber_security_brochure details of workshopcyber_security_brochure details of workshop
cyber_security_brochure details of workshopMayuraD1
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 
Machine learning Module-2, 6th Semester Elective
Machine learning Module-2, 6th Semester ElectiveMachine learning Module-2, 6th Semester Elective
Machine learning Module-2, 6th Semester ElectiveMayuraD1
 
Introduction to Machine Learning Elective Course
Introduction to Machine Learning Elective CourseIntroduction to Machine Learning Elective Course
Introduction to Machine Learning Elective CourseMayuraD1
 
Research Methodology Module 1 useful for any course work
Research Methodology Module 1 useful for any course workResearch Methodology Module 1 useful for any course work
Research Methodology Module 1 useful for any course workMayuraD1
 
Cloud computing_Applications and paradigams.pptx
Cloud computing_Applications and paradigams.pptxCloud computing_Applications and paradigams.pptx
Cloud computing_Applications and paradigams.pptxMayuraD1
 
Introduction to Computer Forensics for all streams.
Introduction to Computer Forensics for all streams.Introduction to Computer Forensics for all streams.
Introduction to Computer Forensics for all streams.MayuraD1
 
Cloud computing_Applications and paradigams.pptx
Cloud computing_Applications and paradigams.pptxCloud computing_Applications and paradigams.pptx
Cloud computing_Applications and paradigams.pptxMayuraD1
 
Introduction about research methodology explained in simple language.
Introduction about research methodology explained in simple language.Introduction about research methodology explained in simple language.
Introduction about research methodology explained in simple language.MayuraD1
 
Cloud Computing Introduction. Engineering seventh Semester
Cloud Computing Introduction. Engineering seventh SemesterCloud Computing Introduction. Engineering seventh Semester
Cloud Computing Introduction. Engineering seventh SemesterMayuraD1
 

More from MayuraD1 (13)

SDP_May2023:student developement program
SDP_May2023:student developement programSDP_May2023:student developement program
SDP_May2023:student developement program
 
cyber_security_brochure details of workshop
cyber_security_brochure details of workshopcyber_security_brochure details of workshop
cyber_security_brochure details of workshop
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Machine learning Module-2, 6th Semester Elective
Machine learning Module-2, 6th Semester ElectiveMachine learning Module-2, 6th Semester Elective
Machine learning Module-2, 6th Semester Elective
 
Introduction to Machine Learning Elective Course
Introduction to Machine Learning Elective CourseIntroduction to Machine Learning Elective Course
Introduction to Machine Learning Elective Course
 
Research Methodology Module 1 useful for any course work
Research Methodology Module 1 useful for any course workResearch Methodology Module 1 useful for any course work
Research Methodology Module 1 useful for any course work
 
Cloud computing_Applications and paradigams.pptx
Cloud computing_Applications and paradigams.pptxCloud computing_Applications and paradigams.pptx
Cloud computing_Applications and paradigams.pptx
 
Introduction to Computer Forensics for all streams.
Introduction to Computer Forensics for all streams.Introduction to Computer Forensics for all streams.
Introduction to Computer Forensics for all streams.
 
Cloud computing_Applications and paradigams.pptx
Cloud computing_Applications and paradigams.pptxCloud computing_Applications and paradigams.pptx
Cloud computing_Applications and paradigams.pptx
 
Introduction about research methodology explained in simple language.
Introduction about research methodology explained in simple language.Introduction about research methodology explained in simple language.
Introduction about research methodology explained in simple language.
 
Cloud Computing Introduction. Engineering seventh Semester
Cloud Computing Introduction. Engineering seventh SemesterCloud Computing Introduction. Engineering seventh Semester
Cloud Computing Introduction. Engineering seventh Semester
 
M2.pptx
M2.pptxM2.pptx
M2.pptx
 
M5.pptx
M5.pptxM5.pptx
M5.pptx
 

Recently uploaded

NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...Amil baba
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxCHAIRMAN M
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...IJECEIAES
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualBalamuruganV28
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024EMMANUELLEFRANCEHELI
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUankushspencer015
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisDr.Costas Sachpazis
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..MaherOthman7
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashidFaiyazSheikh
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxkalpana413121
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdfAlexander Litvinenko
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptamrabdallah9
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Studentskannan348865
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.benjamincojr
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...josephjonse
 
15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon15-Minute City: A Completely New Horizon
15-Minute City: A Completely New HorizonMorshed Ahmed Rahath
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfJNTUA
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Studentskannan348865
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfragupathi90
 

Recently uploaded (20)

NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.ppt
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Students
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
 

Module1 of Introduction to Machine Learning

  • 1. Course Name: Introduction to Machine Learning (Elective) Credits: 3 Academic Year: 2022-23 (Even Semester) 1
  • 3. IML-Module1 Overview 1. About this course 1. What is machine learning 1. Categories of machine learning 1. Notation 1. Approaching a machine learning application 1. Different machine learning approaches and motivations 3
  • 5. IML-Module1 Overview 1. About this course 1. What is machine learning 1. Categories of machine learning 1. Notation 1. Approaching a machine learning application 1. Different machine learning approaches and motivations 5
  • 6. History of Machine Learning • ML is making our day to day life easy from self-driving cars to Amazon virtual assistant "Alexa". • Below some milestones are given which have occurred in the history of machine learning: 6 Image source: https://www.javatpoint.com/machine-learning
  • 8. Image Source: https://www.innovateli.com/hennessy-grad-keeps- gifting/ IML-Module1 "Machine learning is the hot new thing." -- John L. Hennessy, President of Stanford (2000-2016) 8
  • 9. Image source: https://www.gatesnotes.com/Books IML-Module1 "A breakthrough in machine learning would be worth ten Microsofts" -- Bill Gates, Microsoft Co-founder 9
  • 10. [...] machine learning is a subcategory within the field of computer science, which allows you to implement artificial intelligence. So it’s kind of a mechanism to get you to artificial intelligence. -- Rana el Kaliouby, CEO at Affectiva Image Source: https://fortune.com/2019/03/08/rana-el-kaliouby-ceo- affectiva/ IML-Module1 10
  • 11. 1 (This is likely not an original quote but a paraphrased version of Samuel’s sentence ”Pro- gramming computers to learn from experience should eventually eliminate the need for much of this detailed programming e↵ort.”) Arthur L Samuel. “Some studies in machine learning using the game of checkers”. In: IBM Journal of research and development 3.3 (1959), pp. 210–229. “Machine learning is the field of study that gives computers the ability to learn without being explicitly programmed” — Arthur L. Samuel, AI pioneer, 1959 Image Source: https://history-computer.com/ModernComputer/thinkers/images/Arthur- Samuel1.jpg IML-Module1 11
  • 12. Inputs (observations) Program Programmer Computer Outputs The Traditional Programming Paradigm IML-Module1 12
  • 13. Machine learning is the field of study that gives computers the ability to learn without being explicitly programmed — Arthur Samuel (1959) Inputs Inputs (observations) Program Programmer Computer Outputs Outputs Computer Program IML-Module1 13
  • 14. • We will not only use the machines for their intelligence, we will also collaborate with them in ways that we cannot even imagine. -- Fei Fei Li, Director of Stanford's artificial intelligence lab Image Source: https://en.wikipedia.org/wiki/Fei- Fei_Li#/ media/File:Fei- Fei_Li_at_AI_for_Good_2017.jpg IML-Module1 14
  • 15. “A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P , if its performance at tasks in T , as measured by P , improves with experience E.” — Tom Mitchell, Professor at Carnegie Mellon University 2 Tom M Mitchell et al. “Machine learning. pp. 870– 877. 1997”. In: Burr Ridge, IL: McGraw Hill 45.37 (1997), IML-Module1 15
  • 16. “A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P , if its performance at tasks in T , as measured by P , improves with experience E.” — Tom Mitchell, Professor at Carnegie Mellon University 16
  • 17. • Machine Learning is said as a subset of artificial intelligence that is mainly concerned with the development of algorithms which allow a computer to learn from the data and past experiences on their own. • The term machine learning was first introduced by Arthur Samuel in 1959. We can define it in a summarized way as: Machine learning enables a machine to automatically learn from data, improve performance from experiences, and predict things without being explicitly programmed. 17
  • 18. a • Task T: classifying handwritten digits from images • Performance measure P : percentage of digits classified correctly • Training experience E: dataset of digits given classifications, e.g., MNIST IML-Module1 Handwriting Recognition Example: 18
  • 19. IML-Module1 Some Applications of Machine Learning: • Email spam detection • Face detection and matching (e.g., iPhone X, Windows laptops, etc.) • Web search (e.g., DuckDuckGo, Bing, Baidu, Google) • Sports predictions • Post office (e.g., sorting letters by zip codes) • ATMs (e.g., reading checks) • Credit card fraud 19
  • 20. • Stock predictions • Smart assistants (Apple Siri, Amazon Alexa, . . . ) • Product recommendations (e.g., Walmart, Netflix, Amazon) • Self-driving cars (e.g., Uber, Tesla) • Language translation (Google translate) • Sentiment analysis • Drug design • Medical diagnoses 20
  • 21. IML-Module1 Overview 1. About this course 1. What is machine learning 1. Categories of machine learning 1. Notation 1. Approaching a machine learning application 1. Different machine learning approaches and motivations 21
  • 22. Categories of Machine Learning Labeled data Direct feedback Predict outcome/future Supervised Learning IML-Module1 22
  • 24. Types of classification • The algorithm which implements the classification on a dataset is known as a classifier. There are two types of Classifications: • Binary Classifier: If the classification problem has only two possible outcomes, then it is called as Binary Classifier. Examples: YES or NO, MALE or FEMALE, SPAM or NOT SPAM, CAT or DOG, etc. • Multi-class Classifier: If a classification problem has more than two outcomes, then it is called as Multi-class Classifier. Example: Classifications of types of crops, Classification of types of music. 24
  • 25. Supervised Learning: Regression X: Feature variable IML-Module1 25 Y: Target variable
  • 26. Categories of Machine Learning Labeled data Direct feedback Predict outcome/future No labels/targets No feedback Find hidden structure in data Unsupervised Learning IML-Module1 Supervised Learning 26
  • 27. Unsupervised Learning -- Clustering x 1 x 2 IML-Module1 27
  • 28. Unsupervised Learning -- Dimensionality Reduction IML-Module1 28
  • 29. Categories of Machine Learning Labeled data Direct feedback Predict outcome/future No labels/targets No feedback Find hidden structure in data Decision process Reward system Learn series of actions Reinforcement Learning IML-Module1 Unsupervised Learning Supervised Learning 29
  • 31. Ex: Emergence of Locomotion Behaviours in Rich Environments • A new paper from Google’s AI subsidiary DeepMind titled “Emergence of Locomotion Behaviours in Rich Environments.” • The research explores how reinforcement learning (or RL) can be used to teach a computer to navigate unfamiliar and complex environments. • It’s the sort of fundamental AI research that we’re now testing in virtual worlds, but that will one day help program robots that can navigate the stairs in your house. 31
  • 34. IML-Module1 Lecture 1 Overview 1. About this course 1. What is machine learning 1. Categories of machine learning 1. Notation 1. Approaching a machine learning application 1. Different machine learning approaches and motivations 34
  • 35. Supervised Learning Workflow -- Overview Machine Learning Algorithm IML-Module1 New Data Predictive Model Labels 35 Prediction Training Data
  • 36. Supervised Learning Notation Unknown function: Hypothesis: h : ℝm → h : ℝm → f(x) = y h(x) = y Regressio n IML-Module1 Classification Training set: 𝒟 = {⟨x[i], y[i]⟩, i = 1,… , n}, 36
  • 38. Data Representation Feature vector X = xT 1 xT 2 ⋮ xT n x = x 1 x 2 ⋮ xm D n m IML-Module1 38
  • 39. Data Representation Feature vector X = xT 1 xT 2 ⋮ xT n x = x 1 x 2 ⋮ xm X = x[1] 1 x[1] 2 x[1] m x[2] 1 x[2] x[2] m x[n] 1 x[n] 2 ⋯ 2 ⋯ ⋮ ⋮ ⋱ ⋮ ⋯ x[n] m IML-Module1 39
  • 40. Notation & Conventions used in this book • Iris Dataset: 150 Iris flowers • Different Species: Setosa, Versicolor & Virginica • Each row represents each flower species • Each col represents flower measurements in Cm (Features in ML) 40
  • 41. Notation & Conventions used in this book Features(attributes, measurements, dimensions) Class Labels(targets) m = n = IML-Module1 41
  • 42. Data Representation Input features x = x 1 x 2 ⋮ xm y = y[1] y[2] ⋮ y[n] IML-Module1 42
  • 43. IML-Module1 ML Terminology (Part 1) Training example: A row in the table representing the dataset. Synonymous to an observation, training record, training instance, training sample (in some contexts, sample refers to a collection of training examples) ▪ ▪ Feature: a column in the table representing the dataset. Synonymous to predictor, variable, input, attribute, covariate. ▪ Targets: What we want to predict. Synonymous to outcome, output, ground truth, response variable, dependent variable, (class) label (in classification). ▪ Output / prediction: use this to distinguish from targets; here, means output from the model. 43
  • 44. Hypothesis Space Entire hypothesis space IML-Module1 Hypothesis space a particular learning algorithm category has access to Hypothesis space a particular learning algorithm can sample Particular hypothesis (i.e., a model/classifier) 44
  • 45. IML-Module1 Lecture Overview 1. About this course 1. What is machine learning 1. Categories of machine learning 1. Notation 1. Approaching a machine learning application 1. Different machine learning approaches and motivations 45
  • 46. Supervised Learning Workflow -- Overview Machine Learning Algorithm IML-Module1 New Data Predictive Model Predictio n Labels Training Data 46
  • 47. Labels Raw Data Training Dataset Test Dataset Labels New Data Labels Learning Algorithm Preprocessing Learning Evaluation Prediction Final Model Feature Extraction and Scaling Feature Selection Dimensionality Reduction Sampling IML-Module1 Model Selection Cross-Validation Performance Metrics Hyperparameter Optimization A roadmap to build ML models 47
  • 48. IML-Module1 5 Steps for Approaching a Machine Learning Application 1. Define the problem to be solved. 2. Collect (labeled) data. 3. Choose an algorithm class. 4. Choose an optimization metric or measure for learning the model. 5. Choose a metric or measure for evaluating the model. 48
  • 49. IML-Module1 Objective Functions • Maximize the posterior probabilities (e.g., naive Bayes) • Maximize a fitness function (genetic programming) • Maximize the total reward/value function (reinforcement learning) • Maximize information gain/minimize child node impurities (CART decision tree classification) • Minimize a mean squared error cost (or loss) function (CART, decision tree regression, linear regression, adaptive linear neurons, ...) • Maximize log-likelihood or minimize cross-entropy loss (or cost) function • Minimize hinge loss (support vector machine) 49
  • 50. IML-Module1 Optimization Methods for Different Learning Algorithms • • • • Combinatorial search, greedy search (e.g., decision trees) Unconstrained convex optimization (e.g., Constrained convex optimization (e.g., Nonconvex optimization, here: using backpropagation, chain rule, reverse autodiff. (e.g., • Constrained nonconvex optimization (e.g., 50
  • 51. IML-Module1 ML Terminology (Part 2) • Loss function: Often used synonymously with cost function; sometimes also called error function. • In some contexts the loss for a single data point, whereas the cost function refers to the overall (average or summed) loss over the entire dataset. • Sometimes also called empirical risk. 51
  • 52. IML-Module1 Other Metrics in Future Lectures • Accuracy (1-Error) • ROC AUC • Precision • Recall • (Cross) Entropy • Likelihood • Squared Error/MSE • L-norms • Utility • Fitness ... . 52
  • 53. IML-Module1 Different Motivations for Studying Machine Learning • Engineers: Real world problem solving • Mathematicians, computer scientists, and statisticians: • Neuroscientists: 53
  • 54. Machine Learning, AI, and Deep Learning Machine Learning Deep Learning AI A non-biological system that is intelligent through rules Algorithms that parameterize multilayer neural networks that then learn representations of data with multiple layers of abstraction Algorithms that learn models/representations/ rules automatically from data/examples IML-Module1 54
  • 55. Image by Jake VanderPlas; Source: https://speakerdeck.com/jakevdp/the-state-of-the-stack-scipy-2015-keynote?slide=8) IML-Module1 55
  • 56. IML-Module1 ▪ Hypothesis: A hypothesis is a certain function that we believe (or hope) is similar to the true function, the target function that we want to model. ▪ Model: In the machine learning field, the terms hypothesis and model are often used interchangeably. In other sciences, they can have different meanings. ▪ Learning algorithm: Again, our goal is to find or approximate the target function, and the learning algorithm is a set of instructions that tries to model the target function using our training dataset. A learning algorithm comes with a hypothesis space, the set of possible hypotheses it explores to model the unknown target function by formulating the final hypothesis. ▪ Classifier: A classifier is a special case of a hypothesis (nowadays, often learned by a machine learning algorithm). A classifier is a hypothesis or discrete-valued function that is used to assign (categorical) class labels to particular data points ML Terminology (Part 3) 56
  • 57. SLE: Installing Python and packages from the python package Index 57
  • 58. Installation Of Python 1. Go to https://www.python.org/ 2. Install latest version for your OS. Now latest is 3.11.2 3. Go to Command prompt : type Python-will get Python information(Version) 4. For installation of packages use command: pip install PackageName 5. For upgrading packages use: pip install PackageName –upgrade 6. A highly recommended alternative python distribution for scientific computing is Anaconda by Continuum Analytics. 7. Anaconda is free: https://docs.anaconda.com/anaconda/install/windows/ 8. Python packages can be installed by Anaconda as: conda install PackageName 9. Package can be updated : conda update PackageName 58
  • 59. Packages for scientific computing, data science and machine learning • Make sure that version numbers of installed packages are equal to greater than these below mentioned version numbers to ensure that the code examples run correctly. • NumPy 1.17.4 • SciPy 1.3.1 • Pandas 0.25.3 • Matplotlib 3.1.0 • SciKit-Learn 0.22.0 59