Chapter 3-4 - Matlab NN Toolbox NN Applications
Chapter 3-4 - Matlab NN Toolbox NN Applications
Chapter 3:
Artificial Neural Network
Part 4 – Matlab Toolbox and ANN Applications
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 2
3.13
Matlab NN Toolbox
www.utm.my
3
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
3.13.1
www.utm.my
Using Fitting Tool
www.utm.my
Recognition Tool
MEEM 1713 – ARTIFICIAL INTELLIGENCE 24
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
3.14
Examples of NN
www.utm.my
Applications
MEEM 1713 – ARTIFICIAL INTELLIGENCE 39
NN Applications
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
AI Applications in Industry
Expert Expert
systems systems
Fuzzy logic Fuzzy logic
Neural Neural
networks networks
…………. ………….
Intelligent Cognition
Man- Algorithms, Execution Tasks
Machine computations
www.utm.my
Interface
Consumer
Products
AI
www.utm.my
Industrial Medical
Products Applications
www.utm.my
Recognition Machines
MEEM 1713 – ARTIFICIAL INTELLIGENCE 43
CURRENCY RECOGNITION
• Several companies: NCR,
Glory, ..
• Example by Glory Ltd., Japan
• Currency recognition has a
wide variety of applications
such as:
Banks (Counting, savings, etc.)
ATMs (Depositing, etc)
www.utm.my
Parking
Currency Exchange
Fraud detection
44
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 45
• Currently used techniques: Humans, Expert
system, Rule-based system, etc.
• Neural networks can provide a simpler way in
designing the system
Image Feature
Processing Extraction
www.utm.my
Recognition Neural
Results Networks
www.utm.my
• Machine design
47
MEEM 1713 – ARTIFICIAL INTELLIGENCE
Prototype design
www.utm.my
48
MEEM 1713 – ARTIFICIAL INTELLIGENCE
Technique to find best threshold
value (part of image processing)
www.utm.my
49
MEEM 1713 – ARTIFICIAL INTELLIGENCE
Feature Extraction
www.utm.my
50
MEEM 1713 – ARTIFICIAL INTELLIGENCE
Design considerations
• How many types of inputs
should be considered for
each denomination?
• 4 Types
face up - head
face up - tail
face down - head
face down – tail
www.utm.my
of the neural network are
the value of the banknote.
• Even with a small training set, it was observed that the machine was
capable of recognizing the different banknotes.
www.utm.my
52
MEEM 1713 – ARTIFICIAL INTELLIGENCE
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
Australian $20
USA $50
UK Pound 20
Canada $10
www.utm.my
After training NN will
identify the correct currency
MEEM 1713 – ARTIFICIAL INTELLIGENCE 54
Prototype Currency
Recognition Machine by
Neural Networks
www.utm.my
55
MEEM 1713 – ARTIFICIAL INTELLIGENCE
3.14.2
Postcode Recognition
www.utm.my
(CAIRO)
MEEM 1713 – ARTIFICIAL INTELLIGENCE 56
6.3 Postcode Recognition by Fuzzy ARTMAP NN
www.utm.my
enveloped, the trained Fuzzy ARTMAP recognises and interprets the
images into corresponding ASCII codes, then sort the letter into the
appropriate bin.
57
UTM
MEEM 1713 – ARTIFICIAL INTELLIGENCE
• Components of the Automated Letter Sorting System
Windows NT 4.0
PRM
DDE Main Module
WiT
Parallel Port
www.utm.my
ICD MSM
Main Module
• Provides a graphical user interface (GUI) to interact with the
user.
• Allows the user to choose the range of postcode that
www.utm.my
belongs to a certain bin.
• Monitor and control of the operation.
• Developed using Borland C++Builder.
www.utm.my
• Solenoids act as pushers to push the letters
into the desired bins.
• connected to the PC via the parallel port.
SORTING
MECHANISM
5 4 1 0 0
Fuzzy ARTMap
Handwritten Codes Algorithm
SORT
www.utm.my
Bin#1 Bin#2 Bin#3 Bin#n
MEEM 1713 – ARTIFICIAL INTELLIGENCE 61
Hand-written Character Recognition using
Fuzzy ARTMAP Neural Networks
Objective: To develop a system using Fuzzy ARTMAP neural networks which
can recognise hand-written characters.
Pre-processing
Feature Extraction
www.utm.my
Trained Fuzzy ARTMAP Neural Networks
Input
• An unsupervised neural networks architecture.
www.utm.my
• Attempt to address the stability-plasticity
dilemma.
• Faster convergence rate compare to conventional
neural networks like back-propagation MLP.
MEEM 1713 – ARTIFICIAL INTELLIGENCE 63 63
Fuzzy ARTMAP Algorithm
Inter-ART module
ARTa ARTb
Fab module
module
F2a ρ F2b
reset reset
F1a F1b
I0 O0
www.utm.my
• A supervised neural networks applying two
Fuzzy ART neural networks and an inter-ART module.
• Synergize ART neural networks with fuzzy logic.
MEEM 1713 – ARTIFICIAL INTELLIGENCE 64 64
Configuration of the Image Processing Software
for the Intelligent Post-Code Recognition
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 65
www.utm.my
Samples of Envelopes with Handwritten Postcodes
www.utm.my
MINDEX’97-Silver
Prize
• Position
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 69
Conclusion of Research
• The Fuzzy ARTMAP neural network, has been successfully
applied to solve the hand-written character recognition
problem.
www.utm.my
• CAIRO are in the midst of getting a contract from Pos
Malaysia as a consultant for their post office automation
system.
www.utm.my
(CAIRO)
MEEM 1713 – ARTIFICIAL INTELLIGENCE 71
4.5 Intelligent Database Engine
UTM
• However, most of these database systems are rather static such that
they only store information and the user will use the information to
make their own decisions.
www.utm.my
• Based on the available data and past experience on the decision
making process, the neural network is trained to learn the experience.
72
MEEM 1713 – ARTIFICIAL INTELLIGENCE
• Once trained, the neural network can be used to look at new data and
make the necessary decisions.
www.utm.my
neural network decisions
2. LAP
(Assist by Info Management System)
www.utm.my
3. Intelligent Database System
Manager
Applicants
Bank
Evaluation
www.utm.my
Form Standard
Yes/No
I.D.E.
Applicants
Bank
Evaluation
www.utm.my
Form Standard
Yes/No
Manager
MEEM 1713 – ARTIFICIAL INTELLIGENCE 76 76
Current Database Management Systems
Current System Weaknesses:
• Human Intensive
• Time Consuming
• Bias
www.utm.my
• Unable to discover knowledge/rules or anomalies
77
MEEM 1713 – ARTIFICIAL INTELLIGENCE
Design of an Intelligent Database System
2. LAP
(Info Management System)
www.utm.my
Neural Network + Algorithm Apriori
3. Intelligent Database System
www.utm.my
79
MEEM 1713 – ARTIFICIAL INTELLIGENCE
Phase 3:
How does Neural Network make decision?
Training Reasoning
θ
Age
w11
X1 f(S)
Y/R/N
Ocp
S
w1n
X2 Σ y
w21
w2n
Gender
www.utm.my
w31
Xn Σ
w3n e
Adaptive 80
MEEM 1713 – ARTIFICIAL INTELLIGENCE Algorithm
Some Inputs (Evaluation Criteria)
• Age
• Salary
• Occupation
• Loan Amount
• Loan Purpose
• Mortgage
• Guarantor’s information
• House (Rent/Own)
• Other properties (shares)
www.utm.my
• Yearly taxes and insurance expenses
• Asset Balance (checking, savings, personal property)
81
MEEM 1713 – ARTIFICIAL INTELLIGENCE
Phase 3:
How does Neural Network make
decision?
Pre-processing
Numeric
35
Y= 1 Y
37
Age
45
Y= 0 R
Binary
Y= -1 N
www.utm.my
M= 1
Gender
F= 0
82
MEEM 1713 – ARTIFICIAL INTELLIGENCE
Phase 3:
How does Neural Network make
decision?
Professional
Professor
Sf Engineer 100 Y= 1
Doctor Y
Symbolic
Y= 0
Skilled Labor 010
Ocp Mechanic
R
Electrician
Plumber Y= -1
N
www.utm.my
Unskilled Labor
Laborer 001
Farmhand
Trucker
83
MEEM 1713 – ARTIFICIAL INTELLIGENCE
Phase 4:
How does Apriori extract
Rule/Anomaly?
AID Age Ocp Salary Loan Loan Result
Amount Purpose if x then y
1 30 SA 2500 20000 Car Y
2 30 Teacher 2000 5000 Computer Y If age=30 then
3 45 House
wife
0 40000 Car N Result=Y
4 30 Manager 4500 45000 Car Y
5 42 Driver 2000 70000 House N x: Age=30
y: Result=Y
3
Freq(x)
Minimum Support 50% X 100
Total records
www.utm.my
5
Freq(xy) 3
Minimum Confidence 60% X 100
Freq(x) 3
www.utm.my
x: age=30 and loan amount=20000
and loan purpose=car
85
MEEM 1713 – ARTIFICIAL INTELLIGENCE
Phase 4:
How does Apriori Extract
Rule/Anomaly?
For loan approval:
y: result=Y
or
y: result=N
if (age=30 and ocp=SA and …) then (result=Y)
www.utm.my
if (salary=2500 and age=35) then (result=Y)
if (salary=0) then (result=N)
86
MEEM 1713 – ARTIFICIAL INTELLIGENCE
Phase 5:
Output Presentation:
Neural Algorithm
Network Apriori
www.utm.my
If… then…
Approve/ If… then…
Not Approve If… then…
www.utm.my
88
MEEM 1713 – ARTIFICIAL INTELLIGENCE
Outcome Expected of this
Project
• The accuracy or the applicability of the
result can be checked using a set of rules.
(Algorithm Apriori)
www.utm.my
…
...
89
MEEM 1713 – ARTIFICIAL INTELLIGENCE
Benefits
• Improve efficiency
– Save management cost (time & manpower)
– Speed up the evaluation process and
increase productivity
• Improve effectiveness
– Avoiding bias
– Avoiding mistake due to human emotional
factor
www.utm.my
– Strong adaptation, system can be modify
easily to adapt to changes
90
MEEM 1713 – ARTIFICIAL INTELLIGENCE
13.4.4
www.utm.my
Electricity Load Forecasting
MEEM 1713 – ARTIFICIAL INTELLIGENCE 91
4.8 Electricity Load Forecasting
www.utm.my
• The ANN can be trained to predict the MW generated at next hour or
a few hours in advance.
92
UTM
MEEM 1713 – ARTIFICIAL INTELLIGENCE
• ANN input candidates would be:
– MW - current hour + previous hour load demands
– time, date and year
– outside temperature
– type of day - Sunday, Monday, etc.
– type of day - National/Public holiday
– weather conditons - windy, cloudy ??
• The more information that is given to the ANN will make it more
intelligent or more precise in the MW prediction.
www.utm.my
93
MEEM 1713 – ARTIFICIAL INTELLIGENCE
Example of the
ANN model for
load forecasting
Prediction
of MW
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 94 94
CAIRO’s Neural Network
Software for Load Forecasting
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 95 95