Introduction To AI and ML

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 68

Introduction to

Artificial Intelligence
What is Intelligence?

Intelligence:

•The ability to acquire, understand and apply knowledge

•“ability to learn, understand and think” (Oxford dictionary)

•“Intelligence is the computational part of the program to achieve


goals in the world. Varying kinds and degrees of intelligence
occur in people, many animals and some machines.”
Many AI definitions…

• John McCarthy, who coined the term in 1956, defines it as "the


science and engineering of making intelligent machines."

• Rich & Knight (1991): Study of how to make computers do things


at which, at the moment, people are better

• Luger & Stubblefield (1993): The branch of computer science that


is concerned with the automation of intelligent behavior

• Major AI textbooks define the field as "the study and design of


intelligent agents," where an intelligent agent is a system that
perceives its environment and takes actions which maximize its
chances of success.

• Wikipedia: Artificial Intelligence (AI) is the intelligence of machines


and the branch of computer science which aims to create it.
What is AI?
an attempt of

 AI is the reproduction of human reasoning and intelligent


behavior by computational methods

Intelligent
behavior
Computer

Humans

 Role model of AI is human mind. (to mimic human behavior)


Human vs Machine Intelligence

Many tasks which we might Complex


reasonably think require Arithmetic
intelligence are performed by
computers without even thinking

Recognizing
Other tasks that people do without
a Face,
thinking are extremely difficult to
voice,
automate
language
The Origins of AI
• Birth of AI occurred when Marvin Minsky & John McCarthy
organized the Dartmouth Conference in 1956
 Minsky (MIT), McCarthy (MIT/Stanford), Newell & Simon (Carnegie),…

John McCarthy Marvin Minsky

6
Origins of AI: Turing Test

• Human beings are intelligent.

• To be called intelligent, a machine must


produce responses that are
indistinguishable from those of a human.

• Turing Test: Given by British logician


and computer pioneer – Allan Mathison
Turing in 1956 to test computer
intelligence Alan Turing
Can machine think? - Turing Test

• Participants of Turing test (Imitation game):


– a human interrogator, a man, and a woman
– a human interrogator, a man/woman, computer
– A human interrogator, a computer

• If a machine acts as intelligently as human being,


then it is intelligent as a human being.
The Chinese Room

She does not


know Chinese

Output
Input
Correct Responses
Chinese Writing
is given to the
person

Set of rules, in English,


for transforming phrases

9
What would a computer need to pass Turing Test?

• Natural language processing


– To communicate with interrogator
• Knowledge representation
– To store and retrieve information before or during interrogation
• Automated reasoning
– To use the stored information to answer questions and to draw new
conclusion
• Machine learning:
– To adapt to new circumstances and to detect and extrapolate patterns
• Vision:
– To recognize examiner’s actions and various objects presented by the
examiner
• Motor control
– To act upon objects as requested
• Other senses
– Such as audition, smell, touch, etc.
Areas of AI and their Interdependencies

Knowledge
Search Logic Representation

Machine
Learning Planning

Expert
NLP Vision Robotics Systems
AI – State of the Art

In 1997, Deep Blue beat Gary Kasparov.

12
Computer as Artist

Two paintings done by Harold Cohen’s Aaron program:

13
AI in different domains

Search engines

Science

Medicine/
Diagnosis

Labor
What else?
Appliances
Autonomous robots
Military robots
Personalization, recommendation
AI Applications

Gaming
AI Applications

• Autonomous Planning & Scheduling:


– Analysis of data:
AI Applications

• Transportation:
– Autonomous vehicle detection
– Pedetrian detection
Artificial Intelligence in the Movies
Introduction to
Machine Learning
What is machine learning?

• A branch of artificial intelligence, concerned with the design


and development of algorithms that allow computers to evolve
behaviors based on empirical data.

• Core of ML: Making predictions or decisions from Data.


(Similar to Data Mining!)

• Machine learning is about predicting


the future based on the past.
-- Hal Daume III
What is Machine Learning?

Traditional Programming

Data
Computer Output
Program

Machine Learning

Data
Computer Program
Output
Types of Learning

• Supervised learning
– Teacher present
– Training data includes desired outputs

• Unsupervised learning
– No Teacher Present
– Training data does not include desired outputs

• Reinforcement learning
– Teacher present but do not teach ! – only reward or punishment
– Trial and Error. – with - Rewards from sequence of actions
– (e.g. Robot playing TT)
Supervised Learning
Unsupervised Learning
ML in a Nutshell

• Many machine learning algorithms available in


literature
• Many new are developed every year

• Every machine learning algorithm has three


components:
– Representation
– Evaluation
– Optimization
Representation

• Which algorithms to use?


• How do they represent/model data?

– Decision trees
– Graphical models (Bayes/Markov nets)
– Neural networks
– Support vector machines
– Model ensembles
– Etc.
Evaluation

• How to evaluate the algorithms?


• How to measure their Performances?

• Many performance measures


– Accuracy
– Precision and recall
– Squared error
– Likelihood
– Posterior probability
– Cost / Utility
– Margin
– Entropy
– K-L divergence
– Etc.
Optimization

• Tuning Parameters
– Combinatorial optimization
• E.g.: Greedy search
– Convex optimization
• E.g.: Gradient descent
– Constrained optimization
• E.g.: Linear programming

– Machine learning !
• E.g.: Genetic algorithms, Particle swarm opimizations
7 Steps of Machine Learning

• Gathering data
• Preparing that data
• Choosing Model
• Training
• Evaluation
• Hyperparameter Tuning
• Prediction
Few Engineering Problems
and Applications
Categories of Engineering Problems

• Classification (Pattern Recognition)


• Regression (Function Approximation)
• Search and Optimization
• Clustering
• Control problems
• Associations
• …
Examples of Classification Problems

• Classification is widely known as pattern recognition in the literature.

• Character Recognition
• Biometric (Fingerprint/Face/Expression) Recognition
– Person Identification
• Fault detection in electric circuits
• Speech Recognition
• Medical diagnosis
• Image classification
• …
Few Popular Classification Techniques

 Decision Tree
 Bayesian Classification
 Rule-Based Classification
 Associative Classification
 Artificial Neural Networks
 Support Vector Machine
 K-Nearest Neighborhood
 Case-based Reasoning
Examples of Optimization Problems
• Optimization is a search procedure for finding best solution

• All design problems


– Design of microstrip antennas (Electronics and Communication Engineering)
– Design of structural elements of tower/bridge/building (Civil Engineering)
– Design of mechanical parts (Mechanical Engineering)
– Determine optimum chemical proportions in preparing chemical material (Chemical Engg)
– …

• Traveling salesman problem (Computer Engineering/IT)


• Knapsack problems (Computer Engineering/IT)
• Scheduling problems / Time tabling problems
• Searching for optimum moves (games)
• Searching for optimum path/nodes (Networking)
• …
ML(SC) Optimization Techniques

• Local Optimization Methods • Advantages:


– Hill Climbing – Provides solution near global optimum
– Tabu Search – Do not fix into local minima
– Simulated Annealing – Population based methods
• Evolutionary algorithms – Generalized methods and can be
– Genetic Algorithms applied to optimization problem of any
discipline
– Differential Evolution
• Swarm Intelligence based Algorithms
– Particle Swarm Optimization
– Ant Colony Optimization
• Foraging Theory based Algorithms
– Bacterial Foraging Optimization
Examples of Regression Problems

• Regression is function approximation / prediction / Estimation

• Prediction of stock market (economics)


• Prediction of Rain (environmental)
• Weather forecasting (environmental)
• Prediction of Bank loan defaulters (Commercial)
• Prediction of sales (marketing)
• Financial prediction (Commercial)
• Estimation of cost for …
• …
Examples of Clustering Problems

• Clustering is grouping objects according to their similarity:


Unsupervised

• Grouping students having similar interest


• Grouping employees having similar/diverse skills
• Surveying: for establishing new branches, ATM centers, etc.
• Document Clustering
• …
Techniques for Clustering Analysis

• Distance based clustering


– K-Means, K-Medoids
• Hierarchical Clustering
– Agglomerative Clustering
– Divisive Clustering

• Density based Clustering


– DBSCAN
• Grid based Clustering

• Model based Custering

• …
Examples of Control Problems

• Automatic control of water level in water tanks (Civil)


• Automatic control operations in electronic appliances like washing machine/
fridge / etc. (EC)
• Speed control in cars (Automobile)
• Control tasks for Robot (ME, EC, ..)
• Air conditioner controller (ME, Ec)
• Automatic controlling of planes/vehicles/satellites
• …

• A popular ML technique:
– Fuzzy logic and its hybridizations
Applications
Handwritten Character Recognition

Important Components

Feature
Preprocessing Classification
Extraction
Binarization - Correlation - ANN
Segmentation - SVM
- Chain Code
Scaling -PCA

 Development of Handwritten Character Recognition(HCR) system


Method1:HCR using Correlation Coefficient
Method2:HCR using Chain Code based Method
A) Classification using Neural Network
B) Classification using Support Vector Machine
Method3:HCR using PCA based method
A) PCA with Euclidean distance
B) PCA with Neural Network
C) PCA with Support Vector Machine
Overall Accuracy

Sr.no Method Optimum Accuracy


Structure
1 Correlation Coefficient (ED) - 80%
2 Chain code (ANN) [8 30 6 15] 80%
3 Chain code (SVM) -s 0 –t 2 –g 1 –c1 92%
4 PCA (ANN) [25 30 6 15] 85%
5 PCA (SVM) -s 0 –t 2 –g 1 –c1 92%
Image Categorization

Training Training
Labels
Training
Images
Image Classifier Trained
Features Training Classifier

Testing

Image Trained Prediction


Features Classifier Outdoor
Test Image
Automatic Human Activity Recognition in Video

 Human activity recognition


 Automated detection of ongoing events from video data.
 Computer analysis of inputs from cameras.
 Human actions, human-human interactions, human-object interactions,
group activities.
System Components

Input Video

Output
Actions
Methods Available

 Blob Extraction:
 Frame differencing
 Mixture of Gaussians [1]
 Statistical Method [2]
 Optical Flow
 Fuzzy Approach for Background Subtraction
…
 Feature Extraction :
 Shape Context
 Watershed transformation
 Histogram of gradients
 Action Bank
…
Frames 50, 84: Original Frame, Result of MOG[1], Result of
Statistical Method[2]
Feature Extraction (Shape Context)

• Shape Context is a descriptor that provides information about the way


boundary points are spread out with respect to one another.
• It can be represented as histogram:

in which bins are uniformly divided log-polar spaces.

– A shape is represented as
a sequence of boundary
points:
Feature Extraction (Shape Context)

• A count is maintained of all the


points that fall in the various
segments of the circles drawn out
around the central point.
• 12 angular bins and 5 radial bins
are used
• Minimum radius is 0.2 units away
from the center and maximum is
3.5 units away.
Feature Extraction (Shape Context)

• The entire histogram is a 60-element row vector.


• This 60-element descriptor was developed for each of the 50 boundary
points extracted.
• A 50-by-60 element matrix is maintained. This constitutes the shape
context for the image.

• Shape context is invariant to translation and scaling


• Shape context is not invariant to rotation

• PCA is applied on the 50 X 60 shape context that transforms it into 50 X 1


vector
50 X 1 shape context after application of PCA
Jumping Walking
Dataset Used

• Dataset used is UIUC1 Activity Database


• Contains image sequences for 15 different actions in three
sections.
• Contains approximately 40 videos for each action
• Used five different actions:
– hand waving
– Jumping
– Walking
– pushing –up
– stretching out
Action Recognition

• No.of Training and Testing Data:


No of actions Total Training Testing
Videos/frames Videos/frames Videos/frames
5 40 /1000 frames 20 (4 per action) 20 (4 per
/ 500 frames action) / 500
frames
• Five actions are classified using Neural Network and SVM.
• 4 videos of each action (total 5 actions X 4 videos per action =20 videos)
are used for training and 4 videos of each action are used for testing.
• 25 frames describing the whole action correctly were selected from each
of the videos.
• Total of 500 frames (20 videos X 25 frames per video) for training and
500 frames for testing are employed
Implementation Results

Frame wise classification using Neural Network


–Neural Network Specification: 50 neurons at input layer, 20 neurons at
hidden layer and 5 neurons at output layer

Hand Pushing- Stretching


Jumping Walking
Waving up out
Hand
94 5 0 0 1
Waving
Jumping 5 80 11 0 4

Walking 0 18 82 0 0
Pushing-
5 0 1 93 1
up
Stretching
5 11 0 0 84
out
Implementation Results (Continued)

Video wise classification using Neural Network


– Neural Network Specification: 1250 neurons at input layer, 40 neurons at hidden
layer and 5 neurons at output layer

Hand Pushing- Stretching


Jumping Walking
Waving up out
Hand
4 0 0 0 0
Waving
Jumping 0 4 0 0 0

Walking 0 0 4 0 0
Pushing-
0 0 0 4 0
up
Stretching
0 0 0 0 4
out
Implementation Results (Continued)

Frame wise classification using SVM


– SVM specification: Using polynomial kernel function with order=3

Hand Pushing- Stretching


Jumping Walking
Waving up out
Hand
89 0 0 0 11
Waving
Jumping 0 55 28 0 17

Walking 0 6 86 0 8
Pushing-
0 24 2 57 17
up
Stretching
2 13 3 0 82
out
Implementation Results (Continued)

Video wise classification using SVM


– SVM specification: Using linear kernel function

Hand Pushing- Stretching


Jumping Walking
Waving up out
Hand
4 0 0 0 0
Waving
Jumping 0 2 1 0 1

Walking 0 0 2 0 2
Pushing-
0 0 0 3 1
up
Stretching
0 0 1 0 3
out
Comparison of Results

• Using Neural Networks

Case Accuracy

Frame wise classification 86.60 %

video wise classification 100 %

• Using SVM

Case Accuracy

Frame wise classification 73.80 %

video wise classification 70 %


Student’s Employability Prediction Model
Attributes / Features
Student’s Employability Prediction Model

Method Name True True False False Accuracy


Positives Negative Positives Negative
1) Decision Tree 26 1 5 71 94%

2) Neural Network 62 12 11 18 77.67%

3) Naïve Bayes 0 0 31 72 69.90%

4) SVM 16 14 15 58 71.84%
Application: Approximate Modeling of One port Microstrip Via

GaAs Microstrip via geometry

Range of input parameters for modeling microstrip via


Input Parameters Range
Frequency [5-55] GHz
Wl /Wp [0.3-1.0]
Wp/Dvia [0.2-0.8]
Wl /Hsub [0.1-2.0]
Modeling Prediction for Microstrip Via
0.5 0.5

0.0 0.0

-0.5 -0.5
S-Parameter Magnitude

Accuracy of modeling
-1.0 -1.0
Models MSE ARE

-1.5 -1.5
Feed Forward
Neural 0.0345 0.290
Network
-2.0 -2.0
SVR 5.836e-3 0.05164
IE3D Experiment
-2.5 SVR Prediction -2.5
ANN Prediction

-3.0 -3.0
0 20 40 60 80
Experiments
Plot of Actual values vs. predicted values
ML in Different Fields of Engineering
• Mechanical:
– Artificial Neural Networks (ANNs): A New Paradigm for Thermal Science and Engineering, J. Heat Transfer 130(9),
093001 (Jul 09, 2008) – ASME
• Food Processing:
– Classification of Fruits Using Computer Vision and a Multiclass Support Vector Machine, Sensors 2012, 12, 12489-12505
– Food quality identifications, fruit classification
• Electrical:
– Neural networks in electrical power industries (Fault Diagnosis, Load forecasting)
• Civil:
– ANN: Tidal level forecasting
– GA/PSO: Design of structural elements (towers, bridges, etc)
• Textile engineering:
– Fabric Defect identification
• Automobile:
– Fuzzy cruise controller
Questions and Answers …

Thank You …

You might also like