ARTIFICIAL INTELLIGENCE
Dr. P V Siva Teja
Associate Professor
UNIT-3: Representation of Knowledge
Knowledge representation issues, predicate logic- logic programming, semantic nets- frames and inheritance, constraint propagation, representing knowledge using rules, rules based deduction systems.
Reasoning under uncertainty, review of probability, Bayes' probabilistic interferences and Dempster Shafer theory.
A machine sounds like an empty box unless it is encoded with some features or information. Therefore, to make it a valuable machine, it is required to put the necessary knowledge in it. So that it could understand it and is able to take the right decisions.
There are three factors which are put into the machine, which makes it valuable:
KNOWLEDGE REPRESENTATION
Knowledge Representation (KR) in AI focuses on how machines store and organize real-world information so they can reason, learn, and make intelligent decisions like humans.
Types of Knowledge
TECHNIQUES OF KNOWLEDGE REPRESENTATION
Key Issues in Knowledge Representation
In artificial intelligence (AI), main focus is to store knowledge so that programs can process it and achieve human intelligence.
There are different ways of representing knowledge
PREDICATE LOGIC- LOGIC PROGRAMMING
Predicate logic, also known as First-Order Logic (FOL) , is a formal system used in artificial intelligence, mathematics and logic to represent relationships between objects and make inferences. It extends Propositional Logic by incorporating quantifiers, predicates and variables , making it more expressive.
Basic Elements
SEMANTIC NETS
Semantic networks are a fundamental component in artificial intelligence (AI) used to represent and organize knowledge in a way that machines can understand. These networks connect different concepts (nodes) through relationships (edges) such as "is a", "part of" or "related to" allowing AI systems to make sense of how ideas are linked.
They are applied in areas like natural language processing (NLP), knowledge representation and AI reasoning, it help machines process and reason about information more effectively. For example, in a simple semantic network the concept "Dog" might be connected to "Animal" with an "is a" relationship showing that a dog is a type of animal.
Frames And Inheritance
Rule 1: IF patient has fever AND cough THEN patient may have flu
Rule 2: IF patient has chest pain AND breathing difficulty THEN patient may have pneumonia
Rule 3: IF patient may have flu THEN recommend rest and fluids
🔹 Example: Medical Expert System Rule
Unit -3 (Part –B)
KNOWLEDGE REPRESENTATION
Reasoning under uncertainty in Artificial Intelligence involves using mathematical frameworks, particularly probability theory, to make decisions and predictions when information is incomplete, noisy, or ambiguous. This approach is essential for creating intelligent systems capable of operating effectively in real-world environments where perfect knowledge is rarely available.
Uncertainty reasoning allows AI systems to process and analyze data that may be noisy, missing, or contradictory, and to make informed decisions based on probabilistic assessments. This is essential for various applications, such as natural language processing, autonomous driving, and medical diagnosis, where decisions must often be made with less-than-complete information.
Methods for Managing Uncertainity Information
1)Probability
2)Bayesian Belief Network
3)Temporal Models
4)Hidden Markov Model
TYPES OF UNCERTAINTY
1)Uncertainty in prior knowledge
E.g., some causes of a disease are unknown and are not represented in the background knowledge of a medical-assistant agent.
2)Uncertainty in actions
E.g., to deliver this lecture:
I must be able to come to college my computer must be working
the LCD projector must be working.
3)Uncertainty in perception
E.g., sensors do not return exact or complete information about the world; a robot never knows exactly its position.
SOURCES OF UNCERTAINTY
Solution : Probabilistic reasoning is a way of knowledge representation we apply the concept of probability to indicate the uncertainty in knowledge
Review of Probability
AI is all about creating machines or systems that can mimic human intelligence. But unlike traditional computer programs that follow exact rules, AI often needs to make decisions in situations where information is incomplete, uncertain, or changing. This is where probability comes in.
Why Probability in AI?
Real-world environments are uncertain (data may be incomplete, noisy, or ambiguous).
Probability theory provides a mathematical framework for representing and reasoning about uncertainty.
AI systems use probability to make informed predictions and decisions.
Probability measures the likelihood of an event happening.
Range: 0≤P(E)≤1
P(E)=0 → Event impossible.
P(E)=1 → Event certain.
Formula:
P(E)= Number of favorable outcomes
____________________________
Total possible outcomes
Building Blocks of Review of Probability:
Probability: To measure and quantify uncertainty.
Random Variables: To represent uncertain outcomes as variables.
Probability Distributions: To describe how probabilities spread over possible outcomes.
Joint Probability: To model the likelihood of multiple events occurring together.
Conditional Probability: To update probabilities based on new evidence.
Independence: To simplify models by identifying unrelated variables.
Bayes’ Theorem: To revise beliefs and make decisions with new data.
These tools are used for AI to handle uncertainty, make predictions, and learn effectively in real-world situations.
Bayes Probabilistic interference
Bayesian inference is a method of statistical inference in which Bayes' theorem is used to update the probability for a hypothesis more evidence or information becomes available.
Bayesian inference is an important technique in statistic: especially in mathematical statistics.
It is the foundation of Bayesian reasoning and is widely used in machine learning, expert systems, medical diagnosis, spam filtering
Bayes Probablistic Interference Formula :
P(A∣B)= P(B∣A)⋅P(A)
______________
P(B)
Where:
H= Hypothesis
E = Evidence (new data, e.g., "email contains the word 'win'")
P(A)= Prior probability
P(B∣A) = Likelihood
P(B)= Total probability of evidence
P(A∣B) = Posterior probability
These are four major elements in Bayes' Theorem
Derivation:
1. Start with the Definition of Conditional Probability
The probability of event A given event B is:
P(A∣B)=P(A∩B)/P(B) 🡪(1)
Similarly, the probability of event B given event A is:
P(B∣A)=P(A∩B)/P(A) 🡪(2)
From equations (1) and (2), we can equate the joint probability:
P(A∩B)=P(A∣B)⋅P(B)=P(B∣A)⋅P(A) 🡪(3)
2. Rearranging to Derive Bayes' Theorem
From equation (3):
P(A∣B)=P(B∣A)⋅P(A)/P(B) 🡪(4)
This is the standard form of Bayes' Theorem.��
P(A∣B)=P(B∣A)⋅P(A)/P(B)
Example:
Email Spam Detection
Suppose: 20% of emails are spam → P(Spam)=0.2
80% are not spam→P(NotSpam)=0.8
Now, we observe that an email contains the word “Win”.
From past data:
70% of spam emails contain “Win” → P(Win∣Spam)=0.7
10% of non-spam emails contain “Win” → P(Win∣NotSpam)=0.1