UNIT 5- AI
UNIT 5- AI
14-03-2022 2
• Expert System Architecture • Advance topics in Artificial Intelligence- Cloud
Pros and cons of Expert system Computing and Intelligent agent
• Business Intelligence and Analytics
• Rule based systems
• Sentiment Analysis
Frame based expert system
• Deep Learning Algorithms
• Case study
• Planning and Logic in intelligent Agents
• NLP – levels of NLP
• Syntactic and Semantic Analysis
Information Retrieval
• Information Extraction
Machine Translation
• NLP Applications
14-03-2022 3
Expert Systems
14-03-2022 4
Expert Systems - Objectives
• Learn the meaning of an expert system
• Understand the problem domain and knowledge domain
• Learn the advantages of an expert system
• Understand the stages in the development of an expert
system
• Examine the general characteristics of an expert system
14-03-2022 5
Objectives
• Examine earlier expert systems which have given rise to
today’s knowledge-based systems
• Explore the applications of expert systems in use today
• Examine the structure of a rule-based expert system
• Learn the difference between procedural and
nonprocedural paradigms
• What are the characteristics of artificial neural systems
14-03-2022 6
What is an expert system?
“An expert system is a computer system that emulates, or acts in all
respects, with the decision-making capabilities of a human expert.”
14-03-2022 7
Architecture of Expert Systems
14-03-2022 8
Architecture of Expert Systems
Knowledge Base
Stores all relevant information, data, rules, cases, and
relationships used by the expert system.
Uses
•Rules
•If-then Statements
•Fuzzy Logic
Inference Engine
Seeks information and relationships from the knowledge
base and provides answers, predictions, and suggestions
the way a human expert would.
Uses
•Backward Chaining
•Forward Chaining
14-03-2022 9
Architecture of Expert Systems
Explanation Facility
Allows a user to understand how the expert system arrived at certain conclusions or results.
For example: it allows a doctor to find out the logic or rationale of the diagnosis made by a medical expert
system
User Interface
Specialized user interface software employed for designing, creating, updating, and using expert
systems.
The main purpose of the user interface is to make the development and use of an expert system easier
for users and decision makers
14-03-2022 10
General Methods of Inferencing
• Forward chaining (data-driven)– reasoning from facts to the conclusions
resulting from those facts – best for prognosis, monitoring, and control.
– Examples: CLIPS, OPS5
14-03-2022 12
Expert system technology may include:
• Programs
14-03-2022 13
Problem Domain vs. Knowledge Domain
14-03-2022 14
Problem and Knowledge Domain Relationship
14-03-2022 15
Advantages of Expert Systems
14-03-2022 16
Disadvantages of Expert Systems
14-03-2022 17
Representing the Knowledge
14-03-2022 18
Knowledge Engineering
The process of building an expert system:
14-03-2022 19
Development of an Expert System
14-03-2022 20
The Role of AI
14-03-2022 21
Uncertainty
• Both human experts and expert systems must be able to deal with
uncertainty.
• It is easier to program expert systems with shallow knowledge
than with deep knowledge.
• Shallow knowledge – based on empirical and heuristic
knowledge.
• Deep knowledge – based on basic structure, function, and
behavior of objects.
14-03-2022 22
Early Expert Systems
14-03-2022 24
Languages, Shells, and Tools
14-03-2022 25
Production Rules
14-03-2022 26
Rule-Based Expert System
• A rule based expert system is the simplest form of artificial intelligence and uses prescribed knowledge
based rules to solve a problem
• The aim of the expert system is to take knowledge from a human expert and convert this into a number of
hardcoded rules to apply to the input data
• In their most basic form, the rules are commonly conditional statements (if a, then do x, else if b, then do
y)
• These systems should be applied to smaller problems, as the more complex a system is, the more rules
that are required to describe it, and thus increased difficulty to model for all possible outcomes
14-03-2022 27
Structure of a Rule-Based Expert System
14-03-2022 28
Rule-Based ES
14-03-2022 29
Example Rules
14-03-2022 30
Inference Engine Cycle
14-03-2022 31
Foundation of Expert Systems
14-03-2022 32
Markov Algorithm
• An ordered group of productions applied in order or priority to an input
string.
• If the highest priority rule is not applicable, we apply the next, and so on.
Rules[edit]
1. "A" -> "apple"
2. "B" -> "bag"
3. "S" -> "shop"
4. "T" -> "the"
5. "the shop" -> "my brother"
6. "a never used" -> ."terminating rule"
Symbol string[edit]
"I bought a B of As from T S."
Execution[edit]
If the algorithm is applied to the above example, the Symbol string will change in the following manner.
7. "I bought a B of As from T S."
8. "I bought a B of apples from T S."
9. "I bought a bag of apples from T S."
10. "I bought a bag of apples from T shop."
11. "I bought a bag of apples from the shop."
12. "I bought a bag of apples from my brother."
The algorithm will then terminate.
34
Markov Algorithm
14-03-2022 35
Rete Algorithm
• The Rete algorithm can be explained as a pattern matching algorithm for
implementing rule-based systems. The algorithm was developed to efficiently apply
many rules or patterns to many objects, or facts, in a knowledge base.
• Drawback is high memory space requirements.
14-03-2022 36
Frame-Based Expert System
• The expert systems which make use of frames for the knowledge are called
frame-based expert systems.
• What is a frame? – A frame is a data structure with typical knowledge
about the object or concept.
• Frame has its name and set of attributes
• Example : A car frame can have make, type, color and so on as
slots/attributes in the frame
• Each slot/ attribute has unique value associated to it
14-03-2022 37
Frame-Based Expert System
We can have the following included in the slot
1. Frame Name
2. Relationship with other frames
3. Values or Ranges
4. Procedural information
14-03-2022 39
Working of Frame-Based Expert System
• Method – A method is a procedure that is executed
when requested
14-03-2022 40
Guidelines to build a Frame-Based Expert System
14-03-2022 41
MYCIN
14-03-2022 42
MYCIN
14-03-2022 43
MYCIN
•MYCIN was a stand alone system that required a user to enter all relevant
information about a patient by typing in responses to questions MYCIN posed.
•MYCIN operated using a fairly simple inference engine, and a knowledge base of
~600 rules.
•It would query the physician running the program via along series of simple yes/no
or textual questions.
14-03-2022 44
Tasks and Domain
•Disease DIAGNOSIS and Therapy SELECTION
14-03-2022 45
Consultation System
14-03-2022 46
Consultation “Control Structure”
•Goal-directed Backward-chaining Depth-first Tree Search
•High-level Algorithm:
1.Determine if Patient has significant infection
2.Determine likely identity of significant organisms
3.Decide which drugs are potentially useful
4.Select best drug or coverage of drugs
14-03-2022 47
Static Database
14-03-2022 48
Dynamic Database
14-03-2022 49
Explanation System
14-03-2022 50
Xcon
•The R1 (internally called XCON, for eXpertCONfigurer) program was a production rule based system written
in OPS5 by John P. McDermott of CMU in 1978.
–configuration of DEC VAX computer systems
•ordering of DEC's VAX computer systems by automatically selecting the computer system components based
on the customer's requirements.
•XCON first went into use in 1980 in DEC's plant in Salem, New Hampshire. It eventually had about 2500 rules.
•By 1986, it had processed 80,000 orders, and achieved 9598% accuracy.
•It was estimated to be saving DEC $25M a year by reducing the need to give customers free components
when technicians made errors, by speeding the assembly process, and by increasing customer satisfaction.
•XCON interacted with the sales person, asking critical questions before printing out a coherent and workable
system specification/order slip.
•XCON's success led DEC to rewrite XCON as XSEL a version of XCON intended for use by DEC's salesforce to
aid a customer in properly configuring their VAX.
14-03-2022 51
XCON: Expert Configurer
14-03-2022 52
Natural Language
Processing (NLP)
14-03-2022 53
Natural language
communication,
14-03-2022 54
Why Natural language processing?
• Huge amount of data?
– Internet=at least 2.5 billion pages
• Applications for processing large amounts of texts.
– Classify text into categories
– Index and search large texts
– Automatic translation
– Speech understanding: Understanding phone conversation
– Information extraction: Extract useful information from
resumes
– Automatic summarization
– Question answering
– Knowledge acquisition: knowledge from expert
– Text generations/dialogs
• All these requires natural language expertise.
14-03-2022 55
NLP Tasks
14-03-2022 56
Levels of NLP
14-03-2022 57
Syntactic Analysis
• Checks that the sentence is correct according with the grammar and if so
returns a parse tree representing the structure of the sentence
14-03-2022 58
Syntactic Analysis - Grammar
• sentence -> noun_phrase, verb_phrase
• noun_phrase -> proper_noun
• noun_phrase -> determiner, noun
• verb_phrase -> verb, noun_phrase
• proper_noun -> [mary]
• noun -> [apple]
• verb -> [ate]
• determiner -> [the]
14-03-2022 59
Syntactic Analysis - Parsing
14-03-2022 60
Syntactic Analysis – Complications (1)
14-03-2022 61
Syntactic Analysis – Complications (2)
• Handling ambiguity
• Syntactic ambiguity: “fruit flies like a banana”
14-03-2022 62
Semantic Analysis
• Syntax analysis is doing the parsing activity
• But we need to understand the meaning of the words and it is done
by semantic analysis
• For example,
• ‘Keep the book on the table’ – Here table refers physical object
• ‘Learn the table of number 23’ – here table refers mathematics concept of
table
14-03-2022 63
Lexical Processing
• In lexical processing, the meaning of the tokens is found out
• Word sense disambiguation: Understanding the meaning of a
particular word in the context
• It is concerned with the sense where it would be operational
• It would be done with the help of semantic marker
• Semantic marker: ‘Keep’ in sentence 1
• Semantic marker: ‘Learn’ in sentence 2
14-03-2022 64
Semantic grammars
• Example,
• ‘The pen is on the ceiling’
• Solution is,
• S -> Action the Food
• Action -> eat|drink|shallow|chew – Set of words
• Food -> burger|sandwich|coke|pizza – Set of words
14-03-2022 65
Case Grammar
14-03-2022 66
Conceptual Dependency
14-03-2022 67
Information retrieval
14-03-2022 68
Information retrieval - Models
14-03-2022 69
Information retrieval - Models
14-03-2022 70
Information retrieval - Models
14-03-2022 71
Information retrieval - Models
14-03-2022 72
Information Extraction
14-03-2022 73
Information Extraction
14-03-2022 74
• Advance topics in Artificial Intelligence- Cloud Computing and
Intelligent agent
• Business Intelligence and Analytics
• Sentiment Analysis
• Deep Learning Algorithms
• Planning and Logic in intelligent Agents
14-03-2022 75
Advance topics in Artificial Intelligence- Cloud
Computing and Intelligent agent
Cloud computing
The practice of using a network of remote servers hosted on the
Internet
to:
⮚ store,
⮚ manage,
⮚ and process data,
rather than a local server or a personal computer.
14-03-2022 76
Cloud computing and
AI(contd.)
Cloud computing and AI
14-03-2022 77
Cloud computing and
AI(contd.)
In three areas of cloud computing, A.I. is taking long
strides.
Those areas are
Parallel processing
Big Data
14-03-2022 78
What’s parallel processing and how it work in
cloud
•Parallel processing means more than one microprocessor handling
parts of the same overall task. Parallel processing essentially means that
multiple processors shoulder the load. To have multiple processors
working on the same problem at the same time, there are two big
things you need:
⮚ Latency
⮚ Bandwidth
14-03-2022 79
What’s parallel processing and
how it work in cloud(contd.)
Latency
Bandwidth
14-03-2022 80
ML algorithms for cloud
applications
14-03-2022 83
AI has not come to take over our world, but to
improve the way we harness technology to make
everything better. Consider the surface of AI finally
scratched. ??
14-03-2022 84
Business Intelligence and Analytics
14-03-2022 85
So, how does AI actually work in
the business world? let’s try to
understand what artificial
intelligence is and why it is so
important for today’s business
corporations.
14-03-2022 86
What is Business Intelligence (BI)?
Business intelligence systems are used to maintain, optimize and streamline current operations. BI
improves and maintains operational efficiency and helps businesses increase organizational
productivity. Business intelligence software confers many benefits, notably powerful reporting and
data analysis capabilities. Using BI’s rich visualization mechanisms, managers are able to generate
intuitive, readable reports that contain relevant, actionable data.
Popular business intelligence solutions include; SAP BusinessObjects, QlikView, IBM Cognos, Microstrategy, etc.
https://selecthub.com/business-intelligence/business-intelligence-vs-business-analytics/
14-03-2022 87
What is Business Analytics (BA)?
Like business intelligence, BA collects and analyzes data, employs predictive analytics and
generates richly visualized reports, helping identify and address an organization’s weak points.
That’s where similarities end. Business analytics software is used to explore and analyze
historical and current data. It utilizes statistical analysis, data mining and quantitative analysis
to identify past business trends.
Popular business analytics solutions include; SAP Business Analytics Suite, Pentaho BA, Birst BI and Tableau BIg Data Analytics.
https://selecthub.com/business-intelligence/business-intelligence-vs-business-analytics/
14-03-2022 88
Business Analytics vs. Business Intelligence
• What will happen?
• What if and Why did it happen?
Vision, • Predictive Modeling
Business Mission
Statements
•
•
Simulation/Optimization
Advanced Statistic Models
“Sustainability” • Data Mining (Text, Multimedia)
“Efficiency” • Data Science
“Innovation”
Services
Digital Organization • Who did that task?
CEO • What happened?
CMO COO CFO • Dashboards, Alerts
• Scorecards Monitoring
BI
• Slice & Dice, Drilling
Business Process as a • Reports
More FlexibleService
More Control
Digital Initiatives Enterprise
New Customers, Channels Business Process Metamorphosis
Optimization/Outsourcing
Danairat, 2016
14-03-2022 89
Choosing between Business Intelligence (BI)
and Business Analytics (BA)
While superficially similar, the difference between business intelligence vs business analytics
is clear:
- BI uses past and current data to optimize the present for current success.
- BA uses the past and analyzes the present to prepare businesses for the future.
https://selecthub.com/business-intelligence/business-intelligence-vs-business-analytics/
14-03-2022 90
Choosing between Business Intelligence (BI)
and Business Analytics (BA)
Most businesses want a combination of current success and future preparation. Alone or together, business analytics and
business intelligence can help you take your business where you want it to go.
https://selecthub.com/business-intelligence/business-intelligence-vs-business-analytics/
14-03-2022 91
1. (Re)Identifying your
vision and missions
Strategic and Top Decision
Making:- Vision,
- EconomicPolitical
Reportsand Policy Mission
-Reports
Customer Analytic Statements
Trends “Sustainability”
- Technology Trends “Efficiency”
“Innovation”
- Economic Value Business Services &
Business
New Optimized Retired
Objectives
Services Services
Services
Digital Platform
Big Data Cloud Digital
Security
14-03-2022 92
2. Identifying Business
Services and Objectives
Vision,
Business Mission
Services/Objectives:- Statements
- CustomerSocial Listening /
Experiences “Sustainability”
Analytics
UX “Innovation”
“Efficiency”
Digital Platform
Big Data Cloud Digital
Security
14-03-2022 93
3. Identifying BI for Management Level
Vision,
Mission
Management BI:- Statements
• Promotion Impact “Sustainability”
“Efficiency”
Report “Innovation”
• Channel Productivity Business Services &
• Operational Efficiency Business
• Profit and Loss Report New Optimized
Objectives
Services Services
Retired
Digital Platform
Big Data Cloud Digital
Security
14-03-2022 94
Digital Organization
CEO
14-03-2022 95
Top Business Questions from CMO
CMO
14-03-2022 96
Top Business Questions from COO
COO
14-03-2022 97
Top Business Questions from CFO
CFO
14-03-2022 98
4. Identifying Operational BI
Vision,
Mission
Statements
“Sustainability”
“Innovation”
“Efficiency”
Operational
Business Services & BI:-
- Alerts on
Business - Task
Progression
New Optimized Retired Tracking Status
Objectives
Services Services - Error correction
Services
Digital Organization and
CEO recommendation
CMO COO CFO
Digital Platform
Big Data Cloud Digital
Security
14-03-2022 99
Key Questions Type in each level of enterprise
Vision,
Mission Why
Statements
“Sustainability”
“Efficiency”
“Innovation”
Business Process as a
More FlexibleService
More Control
Digital Initiatives How
Enterprise
New Customers, Channels Business Process Metamorphosis
Optimization/Outsourcing
Danairat, 2016
14-03-2022 100
5. Identifying BI and BA Platform
Vision,
Mission
Statements
“Sustainability”
“Efficiency”
“Innovation”
Digital Platform
Big Data Cloud Digital
Security
14-03-2022 101
Summary
• What will happen?
• What if and Why did it happen?
Vision, • Predictive Modeling
Business Mission
Statements
•
•
Simulation/Optimization
Advanced Statistic Models
“Sustainability” • Data Mining (Text, Multimedia)
“Efficiency” • Data Science
“Innovation”
Services
Digital Organization • Who did that task?
CEO • What happened?
CMO COO CFO • Dashboards, Alerts
• Scorecards Monitoring
BI
• Slice & Dice, Drilling
Business Process as a • Reports
More FlexibleService
More Control
Digital Initiatives Enterprise
New Customers, Channels Business Process Metamorphosis
Optimization/Outsourcing
Danairat, 2016
14-03-2022 102
Big Data for Business Analytics Platform
Big Data
Next Best Applications
BI/Report
Cyber Talent
Action Analysis
Fraud Security
Search
Monitoring,
Resource Parallel Data Processing, Refinery Security and
Management Control
and Metadata Distributed Data Store, Data Lake Framework
Framework
Ingestion and Acquisition
Big Data
Big Data Infrastructure
Compute Storage, Network
Infrastructure
14-03-2022 103
Internet of Things and Real-time Data Feeds
Application
Areas
37
Monika, 2015
14-03-2022 104
Smart Home
38
Monika, 2015
14-03-2022 105
Chatbots, virtual assistants, and business
Based on intelligence bots
these
capabilities,
Targeted online advertising
we have seen
multiple
applications of Predictive analytics
artificial
intelligence in Voice recognition
business in
the form of:
Pattern recognition
14-03-2022 106
Sentiment Analysis
14-03-2022 107
Sentiment Sentiment Analysis
14-03-2022 108
14-03-2022 109
14-03-2022 110
14-03-2022 111
Sentiment analysis has many other
names
• Opinion extraction
• Opinion mining
• Sentiment mining
• Subjectivity analysis
11
2
14-03-2022
What is SA & OM?
• Identify the orientation of opinion in a piece of text
14-03-2022 113
Positive or negative movie review?
• unbelievably disappointing
• Full of zany characters and richly applied satire, and some
great plot twists
• this is the greatest screwball comedy ever filmed
• It was pathetic. The worst part about it was the
11
4
boxing scenes.
14-03-2022
Why sentiment analysis?
• Movie: is this review positive or negative?
• Products: what do people think about the new iPhone?
• Public sentiment: how is consumer confidence? Is despair
increasing?
• Politics: what do people think about this candidate or issue?
11
5
11
8
14-03-2022
TwiGer sentiment:
Johan Bollen, Huina Mao, Xiaojun Zeng. 2011.
Twitter mood predicts the stock market,
Journal of Computational Science 2:1, 1-‐
8. 10.1016/j.jocs.2010.12.007.
11
9
14-03-2022
Bollen et al. (2011)
• CALM predicts
14-03-2022
14-03-2022 121
14-03-2022 122
14-03-2022 123
DEEP LEARNING
14-03-2022 124
14-03-2022 125
14-03-2022 126
MACHINE LEARNING
14-03-2022 127
ML VS DL
14-03-2022 128
DEEP LEARNING
• It’s a type of ML inspired by
human brain.
• In DL, the structure is called
artificial neural
network.
• In DL, machine learns itself
using artificial neural
network that mimics
14-03-2022 biological neural network. 129
14-03-2022 130
CONVOLUTIONAL
NEURAL NETWORK
14-03-2022 131
CONVOLUTIONAL
NEURAL NETWORK (CNN)
• Image
recognition
• Image
classification
• Object detection
14-03-2022 132
CNN LAYER
14-03-2022 133
CONVOLUTION LAYER
• An image matrix (volume) of dimension (h x w x d)
• A filter (fh x fw x fd)
• Out put a volume dimension
14-03-2022 134
Image Filter Convolved
Matrix Matrix Feature
14-03-2022 135
STRID
E
14-03-2022 136
PADDING
14-03-2022 137
SEPARABLE
CONVOLUTION LAYER
• The spatial separable convolution
is so named because it deals
primarily with the spatial
dimensions of an image and
kernel: the width and the height.
(The other dimension, the “depth”
dimension, is the number of
channels of each image).
I also use
this layer
in my
project too
14-03-2022 138