SlideShare a Scribd company logo
LECTURE 6
Machine Learning
Instructor : Yousef Aburawi
Cs411 -Artificial Intelligence
Misurata University
Faculty of Information Technology
Spring 2022/2023
AI&ML&DL
1-2
What is Machine Learning
 “Learning is any process by which a system improves
performance from experience.”
- Herbert Simon
 “Machine Learning is the study of algorithms that improve their
performance P at some task T with experience E.”
- Tom Mitchell
Types of Machine Learning
 Supervised (inductive) learning
 Given: training data + specified target variable or attribute
 Predict: the values of the target variable on unseen/test data
 Examples: classification (predicting a categorical target variable);
regression (predicting a numeric/continuous target variable)
 Unsupervised learning
 Given: training data (without any target variable)
 Identify previously unknown patterns in the data
 Examples: clustering; association analysis
 Reinforcement learning
 Given: Rewards/feedback from sequence of actions
 Incrementally learn/optimize a model to maximize utility
examples of tasks best solved by ML
 Recognizing patterns / Classifying objects
 Facial identities or facial expressions
 Handwritten or spoken words
 Medical / satellite images analysis
 Text/document categorization
 Generating patterns
 Generating images or motion sequences
 Generating spoken / written narratives
 Recognizing anomalies
 Unusual credit card transactions
 Unusual patterns of sensor readings in a nuclear power plant
 Prediction
 Future stock prices or currency exchange rates
 Predicting customer preferences on items
Many application areas
 Web search
 Text / Web mining
 Recommender systems / Personalization
 Computational biology
 Computational Finance
 E-commerce / Target marketing
 Market segmentation and focalization
 Space exploration
 Robotics
 Autonomous vehicles
 Information extraction
 Social network analysis
 Natural language understanding
 Fraud detection
 ….
Machine Learning Terms that are commonly used:
 Labelled data: It consists of a set of data, an example would
include all the labelled cats or dogs images in a folder or all the
prices of the house based on size, etc.
 Classification: Separating into groups having definite values
Eg. 0 or 1, cat or dog or orange etc.
 Regression: Estimating the most probable values or
relationship among variables. Eg. estimation of the price of the
house based on size.
 Association: Discovering interesting relations between
variables in large databases where the connections that found
are crucial.
1-7
Machine Learning Terms that are commonly used:
 Clustering: Grouping related examples, particularly during
unsupervised learning. Once all the examples are grouped, a
human can optionally supply meaning to each cluster.
 Agent: In reinforcement learning, the entity that uses a policy
to maximize expected return gained from transitioning between
states of the environment.
 Model: The representation of what a machine learning system
has learned from the training data.
 Baseline: A model used as a reference point for comparing
how well another model (typically, a more complex one) is
performing.
1-8
Machine Learning Terms that are commonly used:
 Generalization: Refers to your model’s ability to make correct
predictions on new, previously unseen data as opposed to the
data used to train the model.
 Inference: Often refers to the process of making predictions by
applying the trained model to unlabeled examples.
 Convergence: Often refers to a state reached during training
in which training loss and validation loss change very little or
not at all with each iteration after a certain number of iterations.
1-9
Machine Learning Terms that are commonly used:
 Overfitting: Creating a model that matches the training data so
closely that the model fails to make correct predictions on new
data.
 Fine tuning: Perform a secondary optimization to adjust the
parameters of an already trained model to fit a new problem.
Fine tuning often refers to refitting the weights of a trained
unsupervised model to a supervised model.
 Feedback loop: In machine learning, a situation in which a
model’s predictions influence the training data for the same
model or another model.
1-10
Supervised Learning
1-11
Supervised Learning
 Supervised learning is task driven. You need to guide the
machine to perform a certain task. Dataset act as a teacher here
and its role is to train the machine. Once the machine gets
properly trained, it can start making predictions or decisions
whenever new data comes. Supervised Machine Learning
searches for patterns within the value labels which are assigned
to a dataset.
 For example, multiple images of a cat, dog, orange, apple, etc.
are labelled and fed into the machine for training and the machine
must identify the same. Just like a human child is shown a cat
and told so, when it sees a completely different cat among others
1-12
Supervised Learning Key Points:
• Regression and classification problems are mainly solved in
supervised learning.
• Labelled data is used for training here.
• Popular Algorithms: Linear Regression, Logistic
Regression, Support Vector Machines (SVM), Neural
Networks, Decision Tree, Random Forest, KNN, Naive Bayes,
Nearest Neighbor, etc.
• It is mainly used in Predicting Modelling.
1-13
Supervised Learning: Regression
Supervised Learning: Classification
Supervised Learning: Classification
Classification Example: Spam Filter
 Input: an email
 Output: spam/ham
 Setup:
 Get a large collection of example emails, each
labeled “spam” or “ham”
 Note: someone has to hand label all this data!
 Want to learn to predict labels of new, future
emails
 Features: The attributes used to make the
ham / spam decision
 Words: FREE!
 Text Patterns: $dd, CAPS
 Non-text: SenderInContacts
 …
Dear Sir.
First, I must solicit your confidence in
this transaction, this is by virture of its
nature as being utterly confidencial and
top secret. …
TO BE REMOVED FROM FUTURE
MAILINGS, SIMPLY REPLY TO THIS
MESSAGE AND PUT "REMOVE" IN THE
SUBJECT.
99 MILLION EMAIL ADDRESSES
FOR ONLY $99
Ok, Iknow this is blatantly OT but I'm
beginning to go insane. Had an old Dell
Dimension XPS sitting in the corner and
decided to put it to use, I know it was
working pre being stuck in the corner,
but when I plugged it in, hit the power
nothing happened.
Classification Example: Digit Recognition
 Input: images / pixel grids
 Output: a digit 0-9
 Setup:
 Get a large collection of example images, each labeled with a
digit
 Note: someone has to hand label all this data!
 Want to learn to predict labels of new, future digit images
 Features: The attributes used to make the digit decision
 Pixels: (6,8)=ON
 Shape Patterns: NumComponents, AspectRatio, NumLoops
 …
0
1
2
1
??
Designing a Supervised Learning System
 Choose the training data
 Choose exactly what is to be learned
 i.e. the target function
 Choose how to represent the target function
 Choose a learning algorithm to infer the target function
from the experience
Supervised Learning Summary: 3 Step Process
 1. Model construction (Learning):
 Each record (instance, example) is assumed to belong to a predefined class, as determined by one of the
attributes
 This attribute is call the target attribute
 The values of the target attribute are the class labels (classification) or numeric values (regression)
 The set of all instances used for learning the model is called training set
 The model may be represented in many forms: decision trees, probabilities, neural networks, ….
 Tune hyperparameters (typically through cross-validation)
 2. Model Evaluation (Accuracy):
 Estimate accuracy rate or error rate of the model based on a test set
 The known labels of test instances are compared with the predicted labels/values from model
 Test set is independent of training set otherwise over-fitting will occur
 3. Model Use (Classification):
 The model is used to classify unseen instances (e.g., to predict the class labels for new unclassified
instances)
Un-Supervised Learning
1-21
Un-Supervised Learning
 Unsupervised learning is data driven. This model learns
through observations and identifies structures in the data. Once
the model is equipped with the dataset, it automatically
identifies patterns and relationships in the dataset by creating
clusters in it and it requires to describe its structure and make
complex data look simple and highly organized for analysis.
 For example, the images or the inputs given are grouped
together in unsupervised learning and insights on the inputs
can be found here (which is the most of the real world data
available).
1-22
Un-Supervised Learning Key Points:
• Unsupervised learning is used for Clustering
problems(grouping), Anomaly Detection (in banks for
unusual transactions) where there is a need for finding
relationships among the data given.
• Unlabeled data is used for training here..
• Popular Algorithms: Apriori algorithm, k-means
clustering, Association rule.
• It is mainly used in Descriptive Modelling.
1-23
Un-Supervised Learning
Un-Supervised Learning
Un-Supervised Learning
Reinforcement Learning
1-27
Reinforcement Learning
 Reinforcement Learning learns to react to an environment.
They interact with the environment and find out what could be
the best outcome. The machine learns from past experience
and tries to capture the best possible knowledge to make
accurate decisions based on the feedback received. This type
of machine learning typically follows a hit & trial method. With
time, the algorithm changes its strategy to learn automatically.
The agent will either get rewarded or penalized for their
prediction. The model trains itself with the positive rewards it
gains.
1-28
Reinforcement Learning Key Points:
• Basic reinforcement is modeled as Markov Decision Process
• The most popular algorithms used here are Q-Learning, Deep
Adversarial Networks.
• Computer playing board games such as Chess and GO, Self-
driving cars are using this type of machine learning.
1-29
Basic Comparison
1-30
Readings
 Chapters 19 of Textbox.
1-31
The End

More Related Content

Similar to AI_06_Machine Learning.pptx

ML_Module_1.pdf
ML_Module_1.pdfML_Module_1.pdf
ML_Module_1.pdf
JafarHussain48
 
Mis End Term Exam Theory Concepts
Mis End Term Exam Theory ConceptsMis End Term Exam Theory Concepts
Mis End Term Exam Theory Concepts
Vidya sagar Sharma
 
Machine Learning - Deep Learning
Machine Learning - Deep LearningMachine Learning - Deep Learning
Machine Learning - Deep Learning
Oluwasegun Matthew
 
introduction to machine learning
introduction to machine learningintroduction to machine learning
introduction to machine learning
Johnson Ubah
 
An Introduction to Machine Learning
An Introduction to Machine LearningAn Introduction to Machine Learning
An Introduction to Machine Learning
Vedaj Padman
 
Machine Learning with Python- Methods for Machine Learning.pptx
Machine Learning with Python- Methods for Machine Learning.pptxMachine Learning with Python- Methods for Machine Learning.pptx
Machine Learning with Python- Methods for Machine Learning.pptx
iaeronlineexm
 
Machine learning with ADA Boost
Machine learning with ADA BoostMachine learning with ADA Boost
Machine learning with ADA Boost
Aman Patel
 
Artificial intyelligence and machine learning introduction.pptx
Artificial intyelligence and machine learning introduction.pptxArtificial intyelligence and machine learning introduction.pptx
Artificial intyelligence and machine learning introduction.pptx
ChandrakalaV15
 
Chapter 05 Machine Learning.pptx
Chapter 05 Machine Learning.pptxChapter 05 Machine Learning.pptx
Chapter 05 Machine Learning.pptx
ssuser957b41
 
It's Machine Learning Basics -- For You!
It's Machine Learning Basics -- For You!It's Machine Learning Basics -- For You!
It's Machine Learning Basics -- For You!
To Sum It Up
 
Machine Learning Chapter one introduction
Machine Learning Chapter one introductionMachine Learning Chapter one introduction
Machine Learning Chapter one introduction
ARVIND SARDAR
 
Supervised learning techniques and applications
Supervised learning techniques and applicationsSupervised learning techniques and applications
Supervised learning techniques and applications
Benjaminlapid1
 
Machine Learning Interview Questions and Answers
Machine Learning Interview Questions and AnswersMachine Learning Interview Questions and Answers
Machine Learning Interview Questions and Answers
Satyam Jaiswal
 
Introduction to Machine Learning.
Introduction to Machine Learning.Introduction to Machine Learning.
Introduction to Machine Learning.
butest
 
Machine Learning.pptx
Machine Learning.pptxMachine Learning.pptx
Machine Learning.pptx
NitinSharma134320
 
Introduction to machine learning
Introduction to machine learningIntroduction to machine learning
Introduction to machine learning
Oluwasegun Matthew
 
Machine Learning and its types with application
Machine Learning and its types with applicationMachine Learning and its types with application
Machine Learning and its types with application
ShivangSingh81
 
Introduction
IntroductionIntroduction
Introduction
butest
 
Introduction
IntroductionIntroduction
Introduction
butest
 
Introduction
IntroductionIntroduction
Introduction
butest
 

Similar to AI_06_Machine Learning.pptx (20)

ML_Module_1.pdf
ML_Module_1.pdfML_Module_1.pdf
ML_Module_1.pdf
 
Mis End Term Exam Theory Concepts
Mis End Term Exam Theory ConceptsMis End Term Exam Theory Concepts
Mis End Term Exam Theory Concepts
 
Machine Learning - Deep Learning
Machine Learning - Deep LearningMachine Learning - Deep Learning
Machine Learning - Deep Learning
 
introduction to machine learning
introduction to machine learningintroduction to machine learning
introduction to machine learning
 
An Introduction to Machine Learning
An Introduction to Machine LearningAn Introduction to Machine Learning
An Introduction to Machine Learning
 
Machine Learning with Python- Methods for Machine Learning.pptx
Machine Learning with Python- Methods for Machine Learning.pptxMachine Learning with Python- Methods for Machine Learning.pptx
Machine Learning with Python- Methods for Machine Learning.pptx
 
Machine learning with ADA Boost
Machine learning with ADA BoostMachine learning with ADA Boost
Machine learning with ADA Boost
 
Artificial intyelligence and machine learning introduction.pptx
Artificial intyelligence and machine learning introduction.pptxArtificial intyelligence and machine learning introduction.pptx
Artificial intyelligence and machine learning introduction.pptx
 
Chapter 05 Machine Learning.pptx
Chapter 05 Machine Learning.pptxChapter 05 Machine Learning.pptx
Chapter 05 Machine Learning.pptx
 
It's Machine Learning Basics -- For You!
It's Machine Learning Basics -- For You!It's Machine Learning Basics -- For You!
It's Machine Learning Basics -- For You!
 
Machine Learning Chapter one introduction
Machine Learning Chapter one introductionMachine Learning Chapter one introduction
Machine Learning Chapter one introduction
 
Supervised learning techniques and applications
Supervised learning techniques and applicationsSupervised learning techniques and applications
Supervised learning techniques and applications
 
Machine Learning Interview Questions and Answers
Machine Learning Interview Questions and AnswersMachine Learning Interview Questions and Answers
Machine Learning Interview Questions and Answers
 
Introduction to Machine Learning.
Introduction to Machine Learning.Introduction to Machine Learning.
Introduction to Machine Learning.
 
Machine Learning.pptx
Machine Learning.pptxMachine Learning.pptx
Machine Learning.pptx
 
Introduction to machine learning
Introduction to machine learningIntroduction to machine learning
Introduction to machine learning
 
Machine Learning and its types with application
Machine Learning and its types with applicationMachine Learning and its types with application
Machine Learning and its types with application
 
Introduction
IntroductionIntroduction
Introduction
 
Introduction
IntroductionIntroduction
Introduction
 
Introduction
IntroductionIntroduction
Introduction
 

More from Yousef Aburawi

AI_07_Deep Learning.pptx
AI_07_Deep Learning.pptxAI_07_Deep Learning.pptx
AI_07_Deep Learning.pptx
Yousef Aburawi
 
AI_05_First Order Logic.pptx
AI_05_First Order Logic.pptxAI_05_First Order Logic.pptx
AI_05_First Order Logic.pptx
Yousef Aburawi
 
AI_04_Logical Agents.pptx
AI_04_Logical Agents.pptxAI_04_Logical Agents.pptx
AI_04_Logical Agents.pptx
Yousef Aburawi
 
AI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptxAI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptx
Yousef Aburawi
 
AI_02_Intelligent Agents.pptx
AI_02_Intelligent Agents.pptxAI_02_Intelligent Agents.pptx
AI_02_Intelligent Agents.pptx
Yousef Aburawi
 
AI_01_introduction.pptx
AI_01_introduction.pptxAI_01_introduction.pptx
AI_01_introduction.pptx
Yousef Aburawi
 
AI_08_NLP.pptx
AI_08_NLP.pptxAI_08_NLP.pptx
AI_08_NLP.pptx
Yousef Aburawi
 

More from Yousef Aburawi (7)

AI_07_Deep Learning.pptx
AI_07_Deep Learning.pptxAI_07_Deep Learning.pptx
AI_07_Deep Learning.pptx
 
AI_05_First Order Logic.pptx
AI_05_First Order Logic.pptxAI_05_First Order Logic.pptx
AI_05_First Order Logic.pptx
 
AI_04_Logical Agents.pptx
AI_04_Logical Agents.pptxAI_04_Logical Agents.pptx
AI_04_Logical Agents.pptx
 
AI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptxAI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptx
 
AI_02_Intelligent Agents.pptx
AI_02_Intelligent Agents.pptxAI_02_Intelligent Agents.pptx
AI_02_Intelligent Agents.pptx
 
AI_01_introduction.pptx
AI_01_introduction.pptxAI_01_introduction.pptx
AI_01_introduction.pptx
 
AI_08_NLP.pptx
AI_08_NLP.pptxAI_08_NLP.pptx
AI_08_NLP.pptx
 

Recently uploaded

Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
marufrahmanstratejm
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 

Recently uploaded (20)

Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 

AI_06_Machine Learning.pptx

  • 1. LECTURE 6 Machine Learning Instructor : Yousef Aburawi Cs411 -Artificial Intelligence Misurata University Faculty of Information Technology Spring 2022/2023
  • 3. What is Machine Learning  “Learning is any process by which a system improves performance from experience.” - Herbert Simon  “Machine Learning is the study of algorithms that improve their performance P at some task T with experience E.” - Tom Mitchell
  • 4. Types of Machine Learning  Supervised (inductive) learning  Given: training data + specified target variable or attribute  Predict: the values of the target variable on unseen/test data  Examples: classification (predicting a categorical target variable); regression (predicting a numeric/continuous target variable)  Unsupervised learning  Given: training data (without any target variable)  Identify previously unknown patterns in the data  Examples: clustering; association analysis  Reinforcement learning  Given: Rewards/feedback from sequence of actions  Incrementally learn/optimize a model to maximize utility
  • 5. examples of tasks best solved by ML  Recognizing patterns / Classifying objects  Facial identities or facial expressions  Handwritten or spoken words  Medical / satellite images analysis  Text/document categorization  Generating patterns  Generating images or motion sequences  Generating spoken / written narratives  Recognizing anomalies  Unusual credit card transactions  Unusual patterns of sensor readings in a nuclear power plant  Prediction  Future stock prices or currency exchange rates  Predicting customer preferences on items
  • 6. Many application areas  Web search  Text / Web mining  Recommender systems / Personalization  Computational biology  Computational Finance  E-commerce / Target marketing  Market segmentation and focalization  Space exploration  Robotics  Autonomous vehicles  Information extraction  Social network analysis  Natural language understanding  Fraud detection  ….
  • 7. Machine Learning Terms that are commonly used:  Labelled data: It consists of a set of data, an example would include all the labelled cats or dogs images in a folder or all the prices of the house based on size, etc.  Classification: Separating into groups having definite values Eg. 0 or 1, cat or dog or orange etc.  Regression: Estimating the most probable values or relationship among variables. Eg. estimation of the price of the house based on size.  Association: Discovering interesting relations between variables in large databases where the connections that found are crucial. 1-7
  • 8. Machine Learning Terms that are commonly used:  Clustering: Grouping related examples, particularly during unsupervised learning. Once all the examples are grouped, a human can optionally supply meaning to each cluster.  Agent: In reinforcement learning, the entity that uses a policy to maximize expected return gained from transitioning between states of the environment.  Model: The representation of what a machine learning system has learned from the training data.  Baseline: A model used as a reference point for comparing how well another model (typically, a more complex one) is performing. 1-8
  • 9. Machine Learning Terms that are commonly used:  Generalization: Refers to your model’s ability to make correct predictions on new, previously unseen data as opposed to the data used to train the model.  Inference: Often refers to the process of making predictions by applying the trained model to unlabeled examples.  Convergence: Often refers to a state reached during training in which training loss and validation loss change very little or not at all with each iteration after a certain number of iterations. 1-9
  • 10. Machine Learning Terms that are commonly used:  Overfitting: Creating a model that matches the training data so closely that the model fails to make correct predictions on new data.  Fine tuning: Perform a secondary optimization to adjust the parameters of an already trained model to fit a new problem. Fine tuning often refers to refitting the weights of a trained unsupervised model to a supervised model.  Feedback loop: In machine learning, a situation in which a model’s predictions influence the training data for the same model or another model. 1-10
  • 12. Supervised Learning  Supervised learning is task driven. You need to guide the machine to perform a certain task. Dataset act as a teacher here and its role is to train the machine. Once the machine gets properly trained, it can start making predictions or decisions whenever new data comes. Supervised Machine Learning searches for patterns within the value labels which are assigned to a dataset.  For example, multiple images of a cat, dog, orange, apple, etc. are labelled and fed into the machine for training and the machine must identify the same. Just like a human child is shown a cat and told so, when it sees a completely different cat among others 1-12
  • 13. Supervised Learning Key Points: • Regression and classification problems are mainly solved in supervised learning. • Labelled data is used for training here. • Popular Algorithms: Linear Regression, Logistic Regression, Support Vector Machines (SVM), Neural Networks, Decision Tree, Random Forest, KNN, Naive Bayes, Nearest Neighbor, etc. • It is mainly used in Predicting Modelling. 1-13
  • 17. Classification Example: Spam Filter  Input: an email  Output: spam/ham  Setup:  Get a large collection of example emails, each labeled “spam” or “ham”  Note: someone has to hand label all this data!  Want to learn to predict labels of new, future emails  Features: The attributes used to make the ham / spam decision  Words: FREE!  Text Patterns: $dd, CAPS  Non-text: SenderInContacts  … Dear Sir. First, I must solicit your confidence in this transaction, this is by virture of its nature as being utterly confidencial and top secret. … TO BE REMOVED FROM FUTURE MAILINGS, SIMPLY REPLY TO THIS MESSAGE AND PUT "REMOVE" IN THE SUBJECT. 99 MILLION EMAIL ADDRESSES FOR ONLY $99 Ok, Iknow this is blatantly OT but I'm beginning to go insane. Had an old Dell Dimension XPS sitting in the corner and decided to put it to use, I know it was working pre being stuck in the corner, but when I plugged it in, hit the power nothing happened.
  • 18. Classification Example: Digit Recognition  Input: images / pixel grids  Output: a digit 0-9  Setup:  Get a large collection of example images, each labeled with a digit  Note: someone has to hand label all this data!  Want to learn to predict labels of new, future digit images  Features: The attributes used to make the digit decision  Pixels: (6,8)=ON  Shape Patterns: NumComponents, AspectRatio, NumLoops  … 0 1 2 1 ??
  • 19. Designing a Supervised Learning System  Choose the training data  Choose exactly what is to be learned  i.e. the target function  Choose how to represent the target function  Choose a learning algorithm to infer the target function from the experience
  • 20. Supervised Learning Summary: 3 Step Process  1. Model construction (Learning):  Each record (instance, example) is assumed to belong to a predefined class, as determined by one of the attributes  This attribute is call the target attribute  The values of the target attribute are the class labels (classification) or numeric values (regression)  The set of all instances used for learning the model is called training set  The model may be represented in many forms: decision trees, probabilities, neural networks, ….  Tune hyperparameters (typically through cross-validation)  2. Model Evaluation (Accuracy):  Estimate accuracy rate or error rate of the model based on a test set  The known labels of test instances are compared with the predicted labels/values from model  Test set is independent of training set otherwise over-fitting will occur  3. Model Use (Classification):  The model is used to classify unseen instances (e.g., to predict the class labels for new unclassified instances)
  • 22. Un-Supervised Learning  Unsupervised learning is data driven. This model learns through observations and identifies structures in the data. Once the model is equipped with the dataset, it automatically identifies patterns and relationships in the dataset by creating clusters in it and it requires to describe its structure and make complex data look simple and highly organized for analysis.  For example, the images or the inputs given are grouped together in unsupervised learning and insights on the inputs can be found here (which is the most of the real world data available). 1-22
  • 23. Un-Supervised Learning Key Points: • Unsupervised learning is used for Clustering problems(grouping), Anomaly Detection (in banks for unusual transactions) where there is a need for finding relationships among the data given. • Unlabeled data is used for training here.. • Popular Algorithms: Apriori algorithm, k-means clustering, Association rule. • It is mainly used in Descriptive Modelling. 1-23
  • 28. Reinforcement Learning  Reinforcement Learning learns to react to an environment. They interact with the environment and find out what could be the best outcome. The machine learns from past experience and tries to capture the best possible knowledge to make accurate decisions based on the feedback received. This type of machine learning typically follows a hit & trial method. With time, the algorithm changes its strategy to learn automatically. The agent will either get rewarded or penalized for their prediction. The model trains itself with the positive rewards it gains. 1-28
  • 29. Reinforcement Learning Key Points: • Basic reinforcement is modeled as Markov Decision Process • The most popular algorithms used here are Q-Learning, Deep Adversarial Networks. • Computer playing board games such as Chess and GO, Self- driving cars are using this type of machine learning. 1-29
  • 31. Readings  Chapters 19 of Textbox. 1-31