CSI3026 MACHINE LEARNING
Assessment Methods
Assessment          Max.          Weightage
   type             Marks
  Quiz 1             10              10
  Quiz 2             10              10
Assignment           10              10
  CAT – I            30              15
  CAT – II                           15
                     30
   FAT                               40
                     100
           Module 1
           Module:
Introduction to Machine Learning
Introduction
Google Search Engine
Amazon E-
mail
Human can learn from past experience
   and make decision of its own
                                       5
What is this object?
                       6
       What is this object?
CAR
CAR
BIKE
                              It is a CAR
BIKE
                                            7
Let us ask the same question to him
           What is this object?
                                      8
Let us ask the same question to him
           What is this object?
   ?
                                      9
[ But, he is a human being. He can observe and
learn ]
et us make him learn
              show him
                         1
                         1
et us make him learn
                          CAR
              show him
                          CAR
                         BIKE
                         BIKE
                                1
                                2
Let us ask the same question now
                   What is this object?
         CAR
          CAR
         BIKE
         BIKE
 Past experience                          10
Let us ask the same question now
  CAR      What is this object?
                                   CAR
                                   CAR
                                   BIKE
                                   BIKE
                                          14
What about a Machine ?
                                      Machines follow instructions
                         [ It can not take decision of its own
                                                               15
What about a Machine ?
We can ask a machine
• To perform an arithmetic operations such as
    • Addition
    • Multiplication
    • Division
                                                Machines follow instructions
                                                                         16
What about a Machine ?
• Comparison
• Print
• Plotting a chart
                         Machines follow instructions
                                                  17
What is Machine Learning?
[ We want a machine to act like a human]
                                           18
What is Machine Learning?
[ to identify this object.]
                              19
What is Machine Learning?
                                 Price in 2025?
[ predict the price in future]
                                                  20
 What is Machine Learning?
                              I made met him yesterday
[ Natural Language understand, and correct grammar ]
                                                         21
 What is Machine Learning?
                      recognize face
[ Recognize Faces ]
                                       22
What is Machine Learning?
                        [ What do we do?
                        Just like, what we did to human,
                        we need to provide experience
                        to the machine.
                                                           23
What is Machine Learning?
                        [
                        This what we called as Data
                        or Training dataset
      +                 So, we first need to provide
                        training dataset to the
                        machine
                        ]
             Dataset
                                                       24
What is Machine Learning?
      +                +
                       [ Then, devise algorithms and execute programs on the
                       data
                       With respect to the underlying target tasks ]
             Dataset
                                                                         25
What is Machine Learning?
      +                +                  +
             Dataset        [ Then, using the programs, Identify
                            required rules ]
                                                                   26
What is Machine Learning?
      +                +    +
             Dataset        [extract required patterns ]
                                                      27
What is Machine Learning?
      +                +    +
             Dataset            [ Identify relations ]
                                                         28
What is Machine Learning?
      +                +                +                   =
             Dataset        [ So that machine can derive inferences
                            from the data ]
                                                                 29
In summary, what is machine learning?
Given a machine learning problem
• Identify and create the appropriate dataset
• Perform computation to learn
   • Required rules, pattern and relations
• Output the decision
                                                30
In summary, what is machine learning?
Machine learning is a subset of artificial intelligence that gives
systems the ability to learn and optimize processes without
having to be consistently programmed.
                            programmed Simply put, machine
learning uses data, statistics and trial and error to “learn” a
specific task without ever having to be specifically coded for
the task.
What is Machine Learning?
Machine Learning
   Learn from past experiences
   Improve the performances of intelligent programs
Definition (Mitchell 1997)
     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
     the tasks improves with the experiences
The concept of learning in a ML system
• Learning = Improving performance with experience
  at some task
  – Improve over task T,
  – With respect to performance measure, P
  – Based on experience, E.
                             7
        Motivating Example Learning to Filter Spam
ample:
ample Spam Filtering
am - is all email the user does not want
 receive and has not asked to receive
T: Identify Spam Emails
P:
   % of spam emails that were filtered
   % of ham/ (non-spam) emails that were
   incorrectly filtered-out
E: a database of emails that were
labelled by users
What is Machine Learning?
 Traditional Programming
    Data
                               Output
 Program            Computer
 Machine Learning
     Data
                    Computer   Program
   Output
           Real Time Applications
ogle’s GNMT(Google
       GNMT        Neural Machine Translation)
                                                 35%
                                                 35% of Amazon’s revenue is generated by P
   Face Book                                     Recommendations.
   Gmail
   Paypal Google
   Maps Uber                                           eCommerce Losses to Online Payment
                                                       Fraud to Exceed $48 Billion Globall
                                                       in every year
  Machine Learning Paradigms
  •Supervised
  •Unsupervised Learning
  •Reinforcement learning
 We as human being solve various types of problem in our day-to-day life, <pause> Various decisions
need to be taken.
Depending on the nature of the problem, machine learning tasks can be broadly divided in ]
                                                                                                  40
What is Supervised Learning?
 • A category of machine learning that
   uses labeled datasets to train
   algorithms to predict outcomes and
   recognize patterns.
               patterns
 • These algorithms are given labeled training
   data to learn the relationship between the
   input and the outputs.
                 outputs
                                                 41
What is Supervised Learning?
                   CAR
                   CAR
           +       BIKE
                          = Training Dataset
                  BIKE
 Samples         Labels
 [In supervised learning, we need some thing called a Labelled Training Dataset ]
                                                                                    42
What is Supervised Learning?
                   CAR
                   CAR
            +      BIKE
                          = Training Dataset                                             =
                  BIKE
 Samples         Labels
 [ Given a labelled dataset, the task is to devise a function which takes the dataset, and a new sample, and
 produces an output value.]
                                                                                                           43
What is Supervised Learning?
                   CAR
                   CAR
            +      BIKE
                          = Training Dataset                                             =
                  BIKE
 Samples         Labels
 [ Given a labelled dataset, the task is to devise a function which takes the dataset, and a new sample, and
 produces an output value.]
                                                                                                           44
What is Supervised Learning?
                   CAR
                   CAR
            +      BIKE
                          = Training Dataset                                             = CAR
                  BIKE
 Samples         Labels
 [ Given a labelled dataset, the task is to devise a function which takes the dataset, and a new sample, and
 produces an output value.]
                                                                                                           45
What is Supervised Learning?
                   CAR
                                                                           Classification
                    CAR
            +      BIKE
                           = Training Dataset                                               = CAR
                   BIKE
 Samples          Labels
 [ If the possible output values of the function are predefined and discrete/categorical, it is called
 Classification
                                                                                                         33
What is Supervised Learning?
                   CAR
                                                                        Classification
                   CAR
            +      BIKE
                          = Training Dataset                                             = CAR
                  BIKE
 Samples         Labels
 [ Predefined classes means, it will produce output only from the labels defined in the dataset. For example,
 even if we input a bus, it will produce either CAR or BIKE ]
                                                                                                           47
Classifier
                            Elephant
                 Elephant
                            Classifier
                  Tiger                  Identify the Animal ?
       Dataset
                                                                 48
      Classification Applications
  Pattern recognition
  Face recognition: Pose, lighting, occlusion (glasses, beard), make-
                                                                 make
     up, hair style
  Character recognition: Different handwriting styles. Speech
  recognition: Temporal dependency.
      Use of a dictionary or the syntax of the language.
      Sensor fusion: Combine multiple modalities; eg, visual (lip image)
      and acoustic for speech
  Medical diagnosis: From symptoms to illnesses
  Web Advertizing: Predict if a user clicks on an ad on
the Internet.
Supervised Learning : Applications
 Prediction of future cases: Use the rule to predict the output for future inputs
 Knowledge extraction: Learning a rule from data Compression: The rule is simpler
 than the data it explains
 Outlier detection: Exceptions that are not covered by the rule, e.g., fraud Novelty Detection :
 Previously unseen but valid case
Regression
                                                                   Regression
                                                                                      = 20500.50
            Dataset
[ If the possible output values of the function are continuous real values, then it is called Regression
                                                                                                           51
[
The classification and Regression problems are supervised, because the decision depends on the
characteristics of the ground truth labels or values present in the dataset, which we define as experience
]
                                                                                                             52
What is Unsupervised Learning?
                     Learning
• A type of machine learning that
  learns from data without human
  supervision.
• Unsupervised machine learning models are
  given unlabeled data and allowed to
  discover patterns and insights without any
  explicit guidance or instruction.
                       instruction
                                               53
What is Unsupervised Learning?
                     Learning
             CAR
             CAR
             BIKE
            BIKE
Dataset
[ In the unsupervised learning, we do not need to know the labels or Ground truth values ]
                                                                                             54
What is Unsupervised Learning?
                     Learning
                                                                      Clustering
Dataset
[ The task is to identify the patterns like group the similar objects together ]
                                                                                   39
What is Unsupervised Learning?
                     Learning
                             Association Rules Mining
Dataset
[ Association rules like ]
                                                        56
More Example Unsupervised Learning
      Dataset
                                     57
More Example Unsupervised Learning
                                     58
Unsupervised Learning : Applications
  Document grouping Custering gene of
  Individual
  Organizing Computing Clusters Social
  Network
  Market Segment
What is Reinforcement Learning?
• It is a machine learning model that is similar
  to supervised learning, but the algorithm isn’t
  trained using sample data.
                       data
• This model learns as it goes by using trial and
  error.
• A sequence of successful outcomes will be
  reinforced to develop the best recommendation
  or policy for a given problem.
                        problem
[ It is also known as learning from trials and errors ]
                                                          60
What is Reinforcement Learning?
                                  61
What is Reinforcement Learning?
                                  62
What is Reinforcement Learning?
                                  63
Another Example
  Agent      Task   Environment
                                  64
Reinforcement Learning
                         Punishment
                                      65
Reinforcement Learning
                         Reward
                                  66
Reinforcement Learning
                                                    Reward
            Baby Learn from the Trials and Errors
           Reinforcement Learning                            67
Another example: Computer playing chess
ML basic concepts
There are many different types of machine learning algorithms, with hundreds
published each day, and they’re typically grouped by either learning style (i.e.
supervised learning, unsupervised learning, semi-supervised learning) or by similarity
in form or function (i.e. classification, regression, decision tree, clustering, deep
learning, etc.).
Regardless of learning style or function, all combinations of machine learning
algorithms consist of the following:
• Representation
• Evaluation
• Optimization
ML basic concepts
• Representation:
   • It is basically the space of allowed models (the hypothesis space)
   • A set of classifiers or the language that a computer understands.
   • This implies how to represent knowledge.
• Evaluation:
   • objective/scoring function.
   • This is the way to evaluate candidate programs (hypotheses).
   • How do we differentiate good models from bad ones.
• Optimization:
   • search method; often the highest-scoring classifier, for example; there are both off-the-shelf and
     custom optimization methods used
   • what is our process for finding the good models among all the possible models
ML basic concepts
The fundamental goal of machine learning
algorithms is to generalize beyond the training
samples i.e. successfully interpret data that it has
never ‘seen’ before.
Important Terminologies and Definitions
• Examples: Items or instances of data used for learning or evaluation. In our spam
  problem, these examples correspond to the collection of email messages we will
  use for learning and testing.
• Features: The set of attributes, often represented as a vector, associated to an
  example. In the case of email messages, some relevant features may include the
  length of the message, the name of the sender, various characteristics of the
  header, the presence of certain keywords in the body of the message, and so on.
• Labels: Values or categories assigned to examples. In classification problems,
  examples are assigned specific categories, for instance, the spam and non-spam
  categories in our binary classification problem.
                                          problem In regression, items are assigned
  real-valued labels.
Important Terminologies and Definitions
• Training sample: Examples used to train a learning algorithm.
• Validation sample: Examples used to tune the parameters of a learning algorithm
  when working with labeled data.
• Test sample: Examples used to evaluate the performance of a learning algorithm.
• Loss function: A function that measures the difference, or loss, between a
  predicted label and a true label.
• Hypothesis set: A set of functions mapping features (feature vectors) to the set of
• labels Y.
Summary
what is machine learning
what are the machine learning paradigms
 [ In this lesion, we have learnt ]