Introduction to AI and Machine Learning

Document Sample
Introduction to AI and Machine Learning Powered By Docstoc
					Jawaad Sheikh, P.Eng, M.Eng, ACS, ALB
        jsheikh27@yahoo.com
                   416-768-5656
Outline
 What is AI?
 Common Algorithms
 Pulling It All Together
   AI Development Lifecycle
 Applications
What is AI?
 “The process or science of creating intelligent
  machines”
 “The ability of a computer or other machine to
  perform those activities normally thought to
  require intelligence”
What is Intelligence?
 A machine requires a consciousness in
  order to be considered intelligent.
 It must be capable of learning and
  adapting.
Why Not Look Up The Answers?
 Consider the chess game example:
   A giant table of every single possible scenario
    would take 35100 entries.
   No autonomy to make its own decisions since
    every decision has already been made for it.
AI Types
 Deterministic AI
 Non-Deterministic AI
Deterministic AI
 Behaviour and Performance are:
   Predictable.
   Pre-specified.
   Fast.
   Easy to implement, understand, test and debug.
 However does not facilitate learning.
Non-Deterministic AI
 Behaviour and Performance are:
   Unpredictable.
   Developers don’t explicitly code scenarios.
   Emergent behaviour – “grows up”.
   Your system learns or adapts to the situation.
 However difficult to test and debug.
Agents
 Program that thinks and makes decisions.
 Perceives its environment through
  sensors.
 Acts upon its environment through
  effectors.
Learning Paradigms
 Supervised Learning
 Unsupervised Learning
 Hybrid Learning
Learning Paradigms
 Supervised Learning
   Learning with a teacher.
   AI is provided with the “correct” answer after
    each training exercise.
   AI tries to get as close to the correct answer as
    possible.
   AI adjusts itself to get closer to the correct
    answer next time around.
Learning Paradigms
 Unsupervised Learning
   Learning without a teacher.
   Runs through training samples
   Learns by finding similarities or patterns
    between samples.
Learning Paradigms
 Example: King-
  Rook-King Chess
  Scenario
 Sample data lines
  are as follows:
    a1,b3,c2,draw
    a1,c1,c2,five
    a1,c1,d1,eleven
Common Algorithms
 Artificial Neural Networks
 Self Organizing Maps
 Support Vector Machines
Artificial Neural Networks (ANN)
 Stemmed from the biological neural network
   Human brain consists of about 100 billion
    neurons.
   Electrical signals pass from neuron to neuron to
    create a thought process.
Artificial Neural Networks (ANN)
 Artificial neuron
   Since the 1950’s scientists have been trying to
   recreate the neuron in software and, more
   recently, in hardware.
Artificial Neural Networks (ANN)
 Artificial Neural Network
   Collectively make an Artificial Neural Network.
Artificial Neural Networks (ANN)
 Artificial Neural Network
   Inputs fed into input neurons within input layer.
   Output neuron(s) hold the decision made.
   Hidden layer(s) perform decision making.
   Training is supervised.
      Output error fed back to weights for learning.
Self Organizing Maps
 SOM’s work on a map based system.
  Potential decisions are placed on a grid.
  New input is applied decision is made based on
   distance to nearest decision.
  Unsupervised
  Has supervised variant – Learning Vector
   Quantization (LVQ)
Learning Vector Quantization
 Supervised variant.
 Inputs are applied
  to a map.
 Compare distances
  to existing features
  to make a decision.
Support Vector Machines (SVM)
 The “youngest” of the bunch.
 Only about 15 years old.
 Very computationally expensive.
 Customizable.
 Works primarily on a yes/no type decision.
Support Vector Machines (SVM)
 Contains a “kernel” function.
   Could be a line, polynomial, sphere, etc.
 Consider a cube with “kernel” function passing
 through it.
   Data points on 1 side of the “kernel” could be
   considered a “yes” and on the other side a “no”
Pulling It All Together
 Performance Measure
 AI Development Lifecycle
 Applications
Performance Measure
 Every agent must have a way to measure
  how well its learning.
 Each application is unique.
   Ex. Highest score.
   Ex. Highest change in score.
The AI-Development Lifecycle
 A list of suggested steps to follow when
  developing an AI application.
 Similar idea to the Software Development
  Lifecycle.
The AI-Development Lifecycle
 ss
    Define The Problem                      Build your AI




 Define Your Training Data                  Train Your AI


                             Results Not              Results
                             Satisfactory           Satisfactory


  Select your ML Algorithm         Refine Your AI        Deploy Your AI
The AI-Development Lifecycle
 Define The Problem
   Experiences (E) – Your training data.
   Tasks (T) – what is your program supposed to
    do?
   Performance (P) – how do you know how well
    you’re doing?
The AI-Development Lifecycle
 Define The Training Data
   Your AI will learn from experience – just like
    you do.
   The quality of your AI will depend on how well
    you teach it!
The AI-Development Lifecycle
 Issues during development
   Memorization
     Occurs when the AI starts getting things perfectly.

     Your AI will no longer evolve and will have trouble
      adapting to new scenarios.
   Stagnation
     Or, it may always default to the same decision.
Applications
 Example – Car Autopilot
 Face Detection
 Speaker Recognition
Car Autopilot
 Assume we want to develop a car that can
 drive itself to the grocery store.
   Experiences – list of different routes to the store.
   Tasks – start car, drive forward, back, left, right and
    keep track of location
   Performance – time needed to get there, % times
    actually gets there without help.
The AI-Development Lifecycle
 ss
    Define The Problem                      Build your AI




 Define Your Training Data                  Train Your AI


                             Results Not              Results
                             Satisfactory           Satisfactory


  Select your ML Algorithm         Refine Your AI        Deploy Your AI
Face Detection
 Used For:
   Law Enforcement.
   Video Surveillance.
   Picture Taking.
 http://www.facedetection.com is a great resource.
Face Detection
 Research has geared towards using ANN’s
  and, more recently, SVM’s.
 Idea is to find the face(s) in a photo based on
  searching picture for certain features.
   Could be nose, cheeks, eyes, mouth, etc.
Face Detection
 Experiences – tens of thousands of pictures of
  faces.
 Tasks – figure out skin colour, eye colour, nose
  size, cheek structure, etc.
 Performance - % times face is correctly
  detected.
The AI-Development Lifecycle
 ss
    Define The Problem                      Build your AI




 Define Your Training Data                  Train Your AI


                             Results Not              Results
                             Satisfactory           Satisfactory


  Select your ML Algorithm         Refine Your AI        Deploy Your AI
Face Detection
 System will search for
  a face based on a
  database of facial
  features.
 Place dots around
  recognizable features
  (nose, mouth, eyes,
  curvature of face)
Face Detection
 System will contain
 locations of features
 and use ANN or SVM
 to compare how close
 locations of these
 features are.
Face Detection
 Now moving to video game systems
 Microsoft Natal Project
Speaker Recognition
 This work is useful for applications where a
 user needs to gain access to:
   A room or building.
   Information.
   Funds.
 It can also be useful in crime
 investigations.
Speaker Recognition
 Experiences – speech samples of different
  people.
 Tasks – attain speech signal, break down
  characteristics, identify person speaking or
  impostor.
 Performance - % times a person is
  correctly identified
The AI-Development Lifecycle
 ss
    Define The Problem                      Build your AI




 Define Your Training Data                  Train Your AI


                             Results Not              Results
                             Satisfactory           Satisfactory


  Select your ML Algorithm         Refine Your AI        Deploy Your AI
Speaker Recognition
 Speaker recognition is an extension of
 speech recognition where the latter focuses
 on what was said while the former focuses on
 who said it.
Speaker Recognition
 Speaker recognition systems can be
 categorized as either:
   Speaker verification – where a speaker is
    identified as either legitimate or an impostor.
   Speaker identification – where a speaker is
    identified against a pool of speakers.
Speaker Recognition
 A typical speaker recognition system:
Speaker Recognition
Speaker Identification ANN
Speaker Identification LVQ
Jawaad Sheikh
 jsheikh27@yahoo.com
 416-768-5656