Ai Unit 5
Ai Unit 5
Unit- V
22-04-2021 1
• Expert System Architecture • Advance topics in Artificial Intelligence- Cloud
Pros and cons of Expert system Computing and Intelligent agent
• Rule based systems • Business Intelligence and Analytics
Frame based expert system • Sentiment Analysis
• Case study • Deep Learning Algorithms
• NLP – levels of NLP • Planning and Logic in intelligent Agents
• Syntactic and Semantic Analysis
Information Retrieval
• Information Extraction
Machine Translation
• NLP Applications
22-04-2021 2
Expert Systems
22-04-2021 3
Expert Systems - Objectives
22-04-2021 4
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
22-04-2021 5
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.”
22-04-2021 6
Architecture of Expert Systems
22-04-2021 7
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
22-04-2021 8
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
22-04-2021 9
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
22-04-2021 10
Expert Systems Development
22-04-2021 11
Expert system technology may include:
• Programs
22-04-2021 12
Problem Domain vs. Knowledge Domain
22-04-2021 13
Problem and Knowledge Domain Relationship
22-04-2021 14
Advantages of Expert Systems
22-04-2021 15
Disadvantages of Expert Systems
22-04-2021 16
Representing the Knowledge
22-04-2021 17
Knowledge Engineering
The process of building an expert system:
22-04-2021 18
Development of an Expert System
22-04-2021 19
The Role of AI
22-04-2021 20
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.
22-04-2021 21
Early Expert Systems
• DENDRAL – used in chemical mass spectroscopy to identify
chemical constituents
22-04-2021 22
Broad Classes of Expert Systems
22-04-2021 23
Problems with Algorithmic Solutions
22-04-2021 24
Considerations for Building Expert Systems
• Can the problem be solved effectively by conventional
programming?
• Is there a need and a desire for an expert system?
• Is there at least one human expert who is willing to cooperate?
• Can the expert explain the knowledge to the knowledge
engineer can understand it.
• Is the problem-solving knowledge mainly heuristic and
uncertain?
22-04-2021 25
Languages, Shells, and Tools
22-04-2021 26
Production Rules
• Knowledge base is also called production memory.
• Production rules can be expressed in IF-THEN pseudocode format.
• In rule-based systems, the inference engine determines which rule
antecedents are satisfied by the facts.
22-04-2021 27
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
Example:
A very basic example of rule based expert system would be a program to direct the management of
abdominal aneurysms The system would input the diameter of an aneurysm Using conditional arguments,
the input diameter would be stratified to recommend whether immediate intervention was required, and if
not what appropriate follow up is recommended
Note: with problems related to radiological images, often preprocessing of the images is required prior to the expert
system being applied.
22-04-2021 28
Structure of a Rule-Based Expert System
22-04-2021 29
Rule-Based ES
22-04-2021 30
Example Rules
22-04-2021 31
Inference Engine Cycle
22-04-2021 32
Foundation of Expert Systems
22-04-2021 33
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.
22-04-2021 35
Rete Algorithm
• Markov: too inefficient to be used with many rules
• Functions like a net – holding a lot of information.
• Much faster response times and rule firings can occur compared to a large
group of IF-THEN rules which would have to be checked one-by-one in
conventional program.
• Takes advantage of temporal redundancy and structural similarity.
• Looks only for changes in matches (ignores static data)
• Drawback is high memory space requirements.
22-04-2021 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
22-04-2021 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
22-04-2021 39
Working of Frame-Based Expert System
• Method – A method is a procedure that is executed
when requested
22-04-2021 40
Guidelines to build a Frame-Based Expert System
22-04-2021 41
MYCIN
22-04-2021 42
MYCIN
•MYCIN was an early expert system that used artificial intelligence to
identify bacteria causing severe infections.
•recommend antibiotics, with the dosage adjusted for patient's body weight
•The MYCIN system was also used for the diagnosis of blood clotting
diseases.
•MYCIN was developed over five or six years in the early 1970s at Stanford
University.
•It was written in Lisp
22-04-2021 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.
22-04-2021 44
Tasks and Domain
•Disease DIAGNOSIS and Therapy SELECTION
22-04-2021 45
Consultation System
22-04-2021 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
22-04-2021 47
Static Database
22-04-2021 48
Dynamic Database
22-04-2021 49
Explanation System
22-04-2021 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.
22-04-2021 51
XCON: Expert Configurer
22-04-2021 52
Natural Language
Processing (NLP)
22-04-2021 53
Natural language
• Natural languages are languages that living creatures use for
communication,
22-04-2021 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.
22-04-2021 55
NLP Tasks
22-04-2021 56
Levels of NLP
22-04-2021 57
Syntactic Analysis
• Rules of syntax (grammar) specify the possible organization of words in
sentences and allows us to determine sentence’s structure(s)
• Checks that the sentence is correct according with the grammar and if so
returns a parse tree representing the structure of the sentence
22-04-2021 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]
22-04-2021 59
Syntactic Analysis - Parsing
22-04-2021 60
Syntactic Analysis – Complications (1)
22-04-2021 61
Syntactic Analysis – Complications (2)
• Handling ambiguity
• Syntactic ambiguity: “fruit flies like a banana”
22-04-2021 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
22-04-2021 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
22-04-2021 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
22-04-2021 65
Case Grammar
22-04-2021 66
Conceptual Dependency
22-04-2021 67
Information retrieval
22-04-2021 68
Information retrieval - Models
22-04-2021 69
Information retrieval - Models
22-04-2021 70
Information retrieval - Models
22-04-2021 71
Information retrieval - Models
22-04-2021 72
Information Extraction
22-04-2021 73
Information Extraction
22-04-2021 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
22-04-2021 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.
22-04-2021 76
Cloud computing and
AI(contd.)
Cloud computing and AI
While artificial intelligence (A.I.) has struggled to gain
footholds in other niches, it is finding its place in the
world of cloud computing, a sort of revolution within the
revolution that could rapidly change the face of businesses
using cloud computing solutions over the next few years.
22-04-2021 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
22-04-2021 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
22-04-2021 79
What’s parallel processing and
how it work in cloud(contd.)
Latency
it refers to the amount of time it takes for a processor to send results back
to the system. The longer the wait, the longer it will take the entire system
to process the problem.
Bandwidth
Bandwidth is a more common term, referring to how much data a processor
can send in a given length of time.
22-04-2021 80
ML algorithms for cloud
applications
Machine learning (ML) is a type of artificial
intelligence (AI) that allows software applications to
become more accurate in predicting outcomes
without being explicitly programmed
22-04-2021 81
ML algorithms for cloud applications(contd.)
ML algorithms for cloud applications involve:
Cognitive computing(to combine different patterns together; i.e. voice,
imagery or other such data; for mimicking human behavior)
Chatbots and virtual assistants (they are getting smarter every time they
have a conversation)
Internet of things-IoT (It connects every potentially “smart” machine in the
world to the cloud and add that massive amount of data to the conversation)
22-04-2021 82
How AI uses big data
As business enterprises increasingly need a massive data-
crunching champion, cloud computing companies have begun
to deploy Artificial Intelligence as a service (AIaaS). Once
AIaaS is deployed, it can begin crunching data at a faster
rate than any single microprocessor or human mind could
ever hope to compete with.
22-04-2021 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. ??
22-04-2021 84
Business Intelligence and Analytics
22-04-2021 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.
22-04-2021 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-an
alytics/
22-04-2021 87
What is Business Analytics (BA)?
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-an
alytics/
22-04-2021 88
Business Analytics vs. Business Intelligence
• What will happen?
• What if and Why did it
Vision, happen?
Busine Mission
Statemen
•
•
Predictive Modeling
Simulation/Optimization
ts • Advanced Statistic Models
ss Business
“Sustainability
” “Efficiency”
“Innovation”
• Data Mining (Text,
Multimedia)
• Data Science
Analyti Ne
Services &
Servic
Optimized
w Business
Retired
cs
es Services
Objectives
Digital
Services • Who did that task?
Organization • What happened?
CM CEO
CO CF • Dashboards, Alerts
O O O • Scorecards
Monitoring
B More Flexible
Business Process as a
More Control
Service
• Slice & Dice,
Drilling
Digital
I New Customers,
Channels Initiatives
Business Process
Enterprise
Metamorphos
is
• Reports
Digital • DWH
Digital
Big Platform Securit
• Data
Data Lake
Cloud y
Danairat,
22-04-2021 2016 89
Choosing between Business Intelligence (BI)
and Business Analytics (BA)
https://selecthub.com/business-intelligence/business-intelligence-vs-business-an
alytics/
22-04-2021 90
Choosing between Business Intelligence (BI)
and Business Analytics (BA)
https://selecthub.com/business-intelligence/business-intelligence-vs-business-an
alytics/
22-04-2021 91
1. (Re)Identifying your
-
vision and missions
Strategic and Top Decision Making:-
Political and Policy Reports Vision,
- Economic Reports Mission
- Customer Analytic Statemen
Trends ts
- Technology Trends “Sustainability
” “Efficiency”
- Economic Value Business
“Innovation”
Services &
Ne Optimized
w Business
Servic Retired
es Services
Objectives
Services
Digital
Digital
Big Platform Securit
Data
Cloud y
22-04-2021 92
2. Identifying Business
Services and Objectives
Vision,
Business Services/Objectives:- Mission
- Social Listening Analytics Statemen
- Customer Experiences / UX ts
- Discover Unman Customers “Sustainability
” “Efficiency”
- Demographic Analytics Business
“Innovation”
- Voice of Customers Services &
- Objectives/Measurement Ne Optimized
w Business
Servic Retired
s Results es Services
Objectives
Services
Digital
Digital
Big Platform Securit
Data
Cloud y
22-04-2021 93
3. Identifying BI for Management Level
Vision,
Mission
Management BI:- Statemen
• Promotion Impact Report ts
“Sustainability
• Channel Productivity ” “Efficiency”
• Operational Efficiency Business
“Innovation”
Digital
Digital
Big Platform Securit
Data
Cloud y
22-04-2021 94
Digital Organization
CE
O
CM CO CF
O O O
CM
O
22-04-2021 96
Top Business Questions from COO
CO
O
22-04-2021 97
Top Business Questions from CFO
CF
O
Digital
Digital
Big Platform Securit
Data
Cloud y
22-04-2021 99
Key Questions Type in each level of enterprise
Vision,
Mission Wh
Statemen y
ts
“Sustainability
” “Efficiency”
Business
“Innovation”
Digital Wha
Digital
Big Platform Securit t
Data
Cloud y
Danairat,
22-04-2021 2016 100
5. Identifying BI and BA Platform
Vision,
Mission
Statemen
ts
“Sustainability
” “Efficiency”
Business
“Innovation”
Services &
Ne Optimized
w Business
Servic Retired
BI &
es Services
Objectives
Digital
Services
Business
Organization Analytics
CM
O
CEO
CO
O
CF
O
Platforms :-
• Traditional BI
Business Process as a • Big Data
More Flexible More Control
Service • Cloud
Digital • Digital Security
Enterprise
New Customers,
Channels Initiatives Metamorphos
is
Business Process
Data IoT, Smart Smart
Optimization/Outsourcing
Monetization Devices Workforce
Digital
Digital
Big Platform Securit
Data
Cloud y
22-04-2021 101
Summary
• What will happen?
• What if and Why did it
Vision, happen?
Busine Mission
Statemen
•
•
Predictive Modeling
Simulation/Optimization
ts • Advanced Statistic Models
ss Business
“Sustainability
” “Efficiency”
“Innovation”
• Data Mining (Text,
Multimedia)
• Data Science
Analyti Ne
Services &
Servic
Optimized
w Business
Retired
cs
es Services
Objectives
Digital
Services • Who did that task?
Organization • What happened?
CM CEO
CO CF • Dashboards, Alerts
O O O • Scorecards
Monitoring
B More Flexible
Business Process as a
More Control
Service
• Slice & Dice,
Drilling
Digital
I New Customers,
Channels Initiatives
Business Process
Enterprise
Metamorphos
is
• Reports
Digital • DWH
Digital
Big Platform Securit
• Data
Data Lake
Cloud y
Danairat,
22-04-2021 2016 102
Big Data for Business Analytics Platform
22-04-2021 103
Internet of Things and Real-time Data Feeds
Applicatio
n
Areas
Smart Smart Smar Smart E-Health Retail Logistics Industria
Cities Environme t Agricultur l
nt Energ e Control
y
Monika, 37
2015
22-04-2021 104
Smart Home
Monika, 38
2015
22-04-2021 105
Chatbots, virtual assistants, and
Based on these business intelligence bots
capabilities, we
have seen
Targeted online
multiple advertising
applications of
artificial Predictive
analytics
intelligence in
business in the Voice
form of: recognition
Pattern
22-04-2021
recognition 106
Sentiment Analysis
22-04-2021 107
Sentiment Sentiment Analysis
22-04-2021 108
22-04-2021 109
22-04-2021 110
22-04-2021 111
Sentiment analysis has many other
names
• Opinion extraction
• Opinion mining
• Sentiment mining
• Subjectivity
11
2
analysis
22-04-2021
What is SA & OM?
• Identify the orientation of opinion in a piece of text
22-04-2021 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.
22-04-2021
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
11
5
issue?
• Prediction: predict election outcomes or market
trends from sentiment
22-04-2021
Why compute affective
meaning?
• Detecting:
• sentiment towards politicians, products, countries, ideas
• frustration of callers to a help line
• stress in drivers or pilots
• depression and other medical conditions
• confusion in students talking to e-‐tutors
• emotions in novels (e.g., for studying groups that are feared over
time)
• Could we generate:
• emotions or moods for literacy tutors in the children’s storybook
domain
22-04-2021 116
Scherer’s typology of affective
states
Emotion: relatively brief episode of synchronized response of all or most
organismic subsystems in response to the evaluation of an event as being of
major significance
angry, sad, joyful, fearful, ashamed, proud, desperate
Mood: diffuse affect state …change in subjective feeling, of low intensity but
relatively long duration, ojen without apparent cause
cheerful, gloomy, irritable, listless, depressed, buoyant
Interpersonal stance: affective stance taken toward another person in a specific
interaction, coloring the interpersonal exchange
distant, cold, warm, supportive, contemptuous
A]tudes: relatively enduring, affectively colored beliefs, preferences
predispositions towards objects or persons
liking, loving, hating, valuing, desiring
Personality
22-04-2021 traits: emotionally laden, stable personality dispositions and 117
Google Product
Search
• a
11
8
22-04-2021
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
22-04-2021
Bollen et al.
(2011)
• CALM
predicts
Jones
DJIA 3 days Dow
later
• At least one
12
0
current
CAL
hedge fund
M
uses this
algorithm
22-04-2021
22-04-2021 121
22-04-2021 122
22-04-2021 123
DEEP LEARNING
22-04-2021 124
22-04-2021
125
22-04-2021 126
MACHINE LEARNING
22-04-2021 127
ML VS DL
22-04-2021 128
DEEP LEARNING
•It’s a type of ML inspired by
human brain.
22-04-2021 131
CONVOLUTIONAL
NEURAL NETWORK (CNN)
• Image
recognition
• Image
classification
• Object detection
22-04-2021 132
CNN LAYER
22-04-2021 133
CONVOLUTION LAYER
22-04-2021 134
Image Filter Convolved
Matrix Matrix Feature
22-04-2021 135
STRID
E
22-04-2021 136
PADDING
22-04-2021 137
SEPARABLE
CONVOLUTION LAYER
22-04-2021 138