

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


















Uncertain knowledge and Learning Uncertainty: Acting under Uncertainty, Basic Probability Notation, Inference Using Full Joint Distributions, Independence, Bayes’ Rule and Its Use, Probabilistic Reasoning: Representing Knowledge in an Uncertain Domain, The Semantics of Bayesian Networks, Efficient Representation of Conditional Distributions, Approximate Inference in Bayesian Networks, Relational and First-Order Probability, Other Approaches to Uncertain Reasoning; Dempster- Shafer theory. Learning: Forms of Learning, Supervised Learning, Learning Decision Trees. Knowledge in Learning: Logical Formulation of Learning, Knowledge in Learning, Explanation-Based Learning, Learning Using Relevance Information, Inductive Logic Programming. Uncertain knowledge: When the available knowledge has multiple causes leading to multiple effects or incomplete knowledge of causality in the domain. Uncertain knowledge representation: The representation which provides a restricted model of the real system, or has limited expressiveness. ACTING UNDER UNCERTAINTY Agents may need to handle uncertainty, whether due to partial observability, nondeterminism, or a combination of the two. An agent may never know for certain what state it’s in or where it will end up after a sequence of actions. We have seen problem-solving agents (Chapter 4) and logical agents (Chapters 7 and 11) designed to handle uncertainty by keeping track of a belief state—a representation of the set of all possible world states that it might be in—and generating a contingency plan that handles every possible eventuality that its sensors may report during execution. Despite its many virtues, however, this approach has significant drawbacks when taken literally as a recipe for creating agent programs:
long wait. The right thing to do—the rational decision—therefore depends on both the relative importance of various goals and the likelihood that, and degree to which, they will be achieved. The remainder of this section hone these ideas, in preparation for the development of the general theories of uncertain reasoning and rational decisions that we present in this and subsequent chapters. Probability provides a way of summarizing the uncertainty that comes from our laziness and ignorance, thereby solving the qualification problem. Utility theory says that every state has a degree of usefulness, or utility, to an agent and that the agent will prefer states with higher utility. Preferences, as expressed by utilities, are combined with probabilities in the general theory of rational decisions called decision theory: Decision theory = probability theory + utility theory. The fundamental idea of decision theory is that an agent is rational if and only if it chooses the action that yields the highest expected utility, averaged over all the possible outcomes of the action. This is called the principle of maximum expected utility (MEU). Note that “expected” might seem like a vague, hypothetical term, but as it is used here it has a precise meaning: it means the “average,” or “statistical mean” of the outcomes, weighted by the probability of the outcome. We saw this principle in action in Chapter 5 when we touched briefly on optimal decisions in backgammon; it is in fact a completely general principle. Core vs. Probabilistic AI ● Knowledge Reasoning : work with facts/assertions; develop rules of logical inference Planning: work with applicability/effects of actions; develop searches for actions which achieve goals/avert disasters. ● Expert Systems: develop by hand a set of rules for examining inputs, updating internal states and generating outputs ● Learning approach: use probabilistic models to tune performance based on many data examples. ● Probabilistic AI: emphasis on noisy measurements, approximation in hard cases, learning, algorithmic issues. o logical assertions ⇒ probability distributions o logical inference ⇒ conditional probability distributions o logical operators ⇒ probabilistic generative models BASIC PROBABILITY NOTATION Probability notation is an efficient way of writing the probability of events happening or not happening. To do this we use set notation, which is used when working with Venn diagrams. Events are usually notated using capital letters, as well as the use of some greek letters. Any notation for describing degrees of belief must be able to deal with two main issues:
Now if we talk about the probabilities of all the possible values of a random variable. In that case, we will use an expression such as P (Weather), which denotes a vector of values for the probabilities of each individual state of the weather. So, Instead of writing the four equations P (Weather = sunny) = 0.7 P (Weather = rain) = 0. P (Weather = cloudy) = 0.08 P (Weather = snow) = 0.02. We may simply write P (Weather) = (0.7, 0.2, 0.08, 0.02). This statement defines a prior probability distribution for the random variable Weather, We will also use expressions such as P( Weather, Cavity) to denote the probabilities of all combinations of the values of a set of random variable^ In that case, P( Weather, Cavity) can be represented by a 4 x 2 table of probabilities. This is called the joint probability distribution of Weather and Cavity. ➢ A joint probability distribution that covers this complete set is called the full joint probability distribution. For example, if the world consists of just the variables Cavity, Toothache, and Weather, then the full joint distribution is given by P (Cavity, Toothache, Weather) This joint distribution can be represented as a 2 x 2 x 4 table with 16 entries. So, any probabilistic query can be answered from the full joint distribution. But, for continuous variables, it is not possible to write out the entire distribution as a table, because there are infinitely many values. Instead, one usually defines the probability that a random variable takes on some value x as a parameterized function of x. For example, let the random variable X denote tomorrow's maximum temperature in Berkeley. Then the sentence P(X = x) = U [18, 26] (x) X is distributed uniformly between 18 and 26 degrees Celsius. Probability distributions for continuous variables are called probability density functions. Density functions differ in meaning from discrete distributions. Example, using the temperature distribution given earlier, we find that P (X = 20.5) = U [18, 26] (2 0.5) ==0 .125/C. The technical meaning is that the probability that the temperature is in a small region around 20.5 degrees is equal, in the limit, to 0.125 divided by the width of the region in degrees Celsius: Conditional probability: Once the agent has obtained some evidence concerning the previously unknown random variables making up the domain, prior probabilities are no longer applicable. Instead, we use conditional or posterior probabilities. The notation used is P (a / b), where a and b are any proposition. This is read as "the probability of a, given that all we know is b. For example, P (cavity / toothache) = 0. Indicates that if a patient is observed to have a toothache and no other information is yet available, then the probability of the patient having a cavity will be 0.8. A prior probability, such as P (cavity), can be thought of as a special case of the conditional probability P (cavity / ), where the probability is conditioned on no evidence. Conditional probabilities can be defined in terms of unconditional probabilities. The defining equation is which holds whenever P (b) > 0. This equation can also be written as
Which holds whenever P (b) > 0. This equation can also be written as P (a ^ b) = P (a / b) P (b) Which is called the product rule. It comes from the fact that, for a and b to be true, we need b to be true, and we also need a to be true given b. We can also have it the other way; P (a ^ b) = P (b / a) P (a) We can also use the P notation for conditional distributions. P(X / Y) gives the values of P(X = xi / Y = yj) for each possible i, j. As an example consider applying the product rule to each case where the propositions a and b assert particular values of X and Y respectively. We obtain the following equations: We can combine all these into the single equation P(X, Y) = P(X / Y) P(Y) It is wrong, because to view conditional probabilities as if they were logical implications with uncertainty added. For example, the sentence P (a / b) = 0.8 cannot be interpreted to mean "whenever b holds, conclude that P (a) is 0.8." Such an interpretation would be wrong on two counts: ➢ First, P(a) always denotes the prior probability of a, not the posterior probability given some evidence; ➢ Second, the statement P (a / b) = 0.8 is immediately relevant just when b is the only available evidence. When additional information c is available, the degree of belief in a is P (a / b ^ c), which might have little relation to P (a /b). ➢ For example, c might tell us directly whether a is true or false. If we examine a patient who complains of toothache, and discover a cavity, then we have additional evidence of cavities, and we conclude (trivially) that P (cavity / toothache ^ cavity) =1.0. The Axioms Of Probability : So far, we have defined a syntax for propositions and for prior and conditional probability statements about those propositions. Now we must provide some sort of semantics for probability statements. We begin with the basic axioms that serve to define the probability scale and its endpoints:
Now identify those atomic events in which the proposition is true and add up their probabilities. For example, there are six atomic events in which cavity V toothacheholds: One common task is to extract the distribution over some subset of variables or a single variable. For example, adding the entries in the first row gives the unconditional or marginal probability of cavity: This process is called marginalization, or summing out-because the variables other than Cavity are summed out. We can write the following general marginalization rule for any sets of variables Y and Z: That is, a distribution over Y can be obtained by summing out all the other variables from any joint distribution containing Y. A variant of this rule involves conditional probabilities instead of joint probabilities, using product rule: This rule is called conditioning. Marginalization and conditioning will turn out to be useful rules for all kinds of derivations involving probability expressions. For example, we can compute the probability of a cavity, given evidence of a toothache, as follows: Just to check, we can also compute the probability that there is no cavity, given a toothache: In these two calculations the term 1/P (toothache) remains constant, no matter which value of Cavity we calculate. In fact, it can be viewed as a normalization constant for the distribution P( Cavity/ toothache), ensuring that it adds up to1. We will use a to denote such constants. With this notation, we can write the two preceding equations in one: Algorithm for probabilistic inference:
Given the full joint distribution to work with, ENUMERATE-JOINT-ASK is a complete algorithm for answering probabilistic queries for discrete variables. It does not scale well, however: For a domain described by n Boolean variables, it requires an input table of size 0(2 pow n) and takes 0(2 pow n) time to process the table. So, the full joint distribution in tabular form is not a practical tool for building reasoning systems. INDEPENDENCE Let us expand the full joint distribution in Figure 13.3 by adding a fourth variable, Weather .The full joint distribution then becomes P(Toothache, Catch, Cavity, Weather), which has 32 entries (because Weather has four values). It contains four "editions" of the table shown in Figure 4.1, one for each kind of weather. Here we may ask what relationship these editions have to each other and to the original three-variable table. For example, how are P(toothache, catch, cavity, Weather = cloudy) and P(toothache, catch, cavity) related? To answer this question is to use the product rule: P(toothache, catch, cavity, Weather = cloudy) = P (Weather = cloudy / toothache, catch, cavity) P (toothache, catch, cavity). One should not imagine that one's dental problems influence the weather. Therefore, the following assertion seems reasonable: P( Weather= cloudy / toothache, catch, cavity) = P ( Weather= cloudy) ----------- (1) From this, we can deduce; P(toothache, catch, cavity, weather = cloudy) = P( Weather = cloudy)P(toothache, catch, cavity). Similar equation exists for every entry in P(Toothache, Catch, Cavity, Weather). In fact, we can write the general equation; P(Toothache, Catch, Cavity, Weather) = P(Toothache, Catch, Cavity)P( Weather). Thus, the 32-element table for four variables can be constructed from one 8-element table and one four-element table. This decomposition is illustrated schematically in Figure 5.1(a). The property we used in writing Equation is called “independence”. Independence between propositions a and b can be written as P ( a / b )= P ( a ) or P( b / a )= P ( b ) or P ( a Ab) = P ( a ) P ( b ). Independence between variables X and Y can be written as follows (again, these are all equivalent): P ( X / Y )= P ( X ) or P ( Y / X)=P(Y) or P ( X ,Y )= P ( X ) P ( Y).
That is, we expect only 1 in 5000 patients with a stiff neck to have meningitis. Notice that, even though a stiff neck is quite strongly indicated by meningitis (with probability 0.5), the probability of meningitis in the patient remains small. This is because the prior probability on stiff necks is much higher than that on meningitis. The same process can be applied when using Bayes' rule. We have Thus, in order to use this approach we need to estimate P(s /~ m) instead of P(s) The general form of Bayes' rule with normalization is P(Y / X) = a P(X /Y) P(Y), where a is the normalization constant needed to make the entries in P(Y / X) sum to 1. Using Bayes' rule: Combining evidence: We have seen that Bayes' rule can be useful for answering probabilistic queries conditioned on one piece of evidence-for example, the stiff neck. In particular, we have argued that probabilistic information is often available in the form P(effect / cause). What happens when we have two or more pieces of evidence? For example, what can a dentist conclude if her nasty steel probe catches in the aching tooth of a patient? If we know the full joint distribution, one can read off the answer: We know, however, that such an approach will not scale up to larger numbers of variables. We can try using Bayes' rule to reformulate the problem: For this reformulation to work, we need to know the conditional probabilities of the conjunction toothache A catch for each value of Cavity. That might be feasible for just two evidence variables, but again it will not scale up. If there are n possible evidence variables (X rays, diet, oral hygiene, etc.), then there are 2n possible combinations, so f observed values for which we would need to know conditional probabilities. We might as well go back to using the full joint distribution. Rather than taking this route, we need to find some additional assertions about the domain that will enable us to simplify the expressions. The notion of independence provides a clue, but needs refining. It would be nice if Toothache and Catch were independent, but they are not: if the probe catches in the tooth, it probably has a cavity and that probably causes a toothache. These variables are independent. Mathematically, this property is written as; This equation expresses the conditional independence of toothache and catch given Cavity. We can plug it into above equation to obtain the probability of a cavity: The general definition of conditional independence of two variables X and Y, given a third variable Z is In the dentist domain, for example, it seems reasonable to assert conditional independence of the variables Toothache and Catch, given Cavity: Which asserts independence only for specific values of Toothache and Catch? As with absolute independence in Equation
It turns out that the same is true for conditional independence assertions. For example, given the assertion in Equation, We can derive decomposition as follows: In this way, the original large table is decomposed into three smaller tables. PROBABILISTIC REASONING: Probabilistic reasoning Causes of uncertainty: Following are some leading causes of uncertainty to occur in the real world. ● Information occurred from unreliable sources. ● Experimental Errors ● Equipment fault ● Temperature variation ● Climate change. Probabilistic reasoning is a way of knowledge representation where we apply the concept of probability to indicate the uncertainty in knowledge. In probabilistic reasoning, we combine probability theory with logic to handle the uncertainty. We use probability in probabilistic reasoning because it provides a way to handle the uncertainty that is the result of someone's laziness and ignorance. In the real world, there are lots of scenarios, where the certainty of something is not confirmed, such as "It will rain today," "behavior of someone for some situations," "A match between two teams or two players." These are probable sentences for which we can assume that it will happen but are not sure about it, so here we use probabilistic reasoning. Probability: Probability can be defined as a chance that an uncertain event will occur. It is the numerical measure of the likelihood that an event will occur. The value of probability always remains between 0 and 1 that represent ideal uncertainties. 0 ≤ P(A) ≤ 1, where P(A) is the probability of an event A. P(A) = 0, indicates total uncertainty in an event A. P(A) =1, indicates total certainty in an event A. We can find the probability of an uncertain event by using the below formula. P(¬A) = probability of a not happening event. P(¬A) + P(A) = 1. Event: Each possible outcome of a variable is called an event. Sample space: The collection of all possible events is called sample space. Random variables: Random variables are used to represent the events and objects in the real world. Prior probability: The prior probability of an event is probability computed before observing new information. Posterior Probability: The probability that is calculated after all evidence or information has taken into account. It is a combination of prior probability and new information. Conditional probability: Conditional probability is a probability of occurring an event when another event has already happened.
Complex Example of Bayesian Networks The variables Burglary, Earthquake, Alarm, MaryCalls and JohnCalls ● New burglar alarm installed at home ● Fairly reliable at detecting a burglary ● Responds on occasion to minor earthquakes ● Two neighbors, John and Mary ● They call you at work when they hear the alarm ● John nearly always calls when he hears the alarm ● But sometimes confuses the telephone ringing ● Mary likes rather loud music and misses the alarm
The two ways to understand the meaning of Bayesian Networks oTo see the network as a representation of the joint probability distribution To be helpful in understanding how to construct networks, oTo view it as an encoding of a collection of conditional independence statements To be helpful in designing inference procedures. Representing the full joint distribution
A probabilistic relational model (PRM) or a relational probability model is a model in which the probabilities are specified on the relations, independently of the actual individuals. Different individuals share the probability parameters. A parametrized random variable is either a logical atom or a term.First-order probabilistic models allow us to model situations in which a random variable in the first-order model may have a large and varying number of parent variables in the ground (“unrolled”) model. ● Bayesian networks are essentially propositional logic. ● The set of random variables is fixed and finite. ● However, if the number becomes large, intractable. ● Need another method to represent the model The set of first-order models is infinite. ● Use database semantics instead called “Relational Probability models”. ● Make unique name assumptions and assume domain closure. ● Like first-order logic oConstantoFunctionoPredicatesymbols OTHER APPROACHES TO UNCERTAIN REASONING: ● Rule-based methods for uncertain reasoning ● Emerged from logical inference ● Require 3 desirable properties ● Locality : If A B, we can conclude B given evidence A without worrying about any other rules. But in probabilistic systems, we need to consider all evidence. ● Detachment : If we can derive B, we can use it without caring how it was derived. ● Truth-functionality : truth value of complex sentences can be computed from the truth of the components ● Probability combination does not work this way DEMPSTER SHAFER THEORY The Dempster-Shafer Theory was given by Arthur P. Dempster in 1967 and his student Glenn Shafer in 1976. This theory was released because of the following reason:-
DST is an evidence theory, it combines all possible outcomes of the problem. Hence it is used to solve problems where there may be a chance that a piece of different evidence will lead to some different result. The uncertainty in this model is given by:-
mean?)
Example: Let us consider a room where four people are present, A, B, C, and D. Suddenly the lights go out and when the lights come back, B has been stabbed in the back by a knife, leading to his death. No one came into the room and no one left the room. We know that B has not committed suicide. Now we have to find out who the murderer is. To solve these there are the following possibilities:
There will be possible evidence by which we can find the murderer by the measure of plausibility. Using the above example we can say: Set of possible conclusion (P): {p1, p2….pn} where P is a set of possible conclusions and cannot be exhaustive, i.e. at least one (p) I must be true. (p)I must be mutually exclusive. The Power Set will contain 2n elements where n is the number of elements in the possible set. For eg:- If P = { a, b, c}, then Power set is given as {o, {a}, {b}, {c}, {a, d}, {d ,c}, {a, c}, {a, c ,d }}= 23 elements. Mass function m(K): It is an interpretation of m({K or B}) i.e; it means there is evidence for {K or B} which cannot be divided among more specific beliefs for K and B. Belief in K: The belief in element K of Power Set is the sum of masses of the element which are subsets of K. This can be explained through an example Let's say K = {a, d, c} Bel(K) = m(a) + m(d) + m(c) + m(a, d) + m(a, c) + m(d, c) + m(a, d, c) Plausibility in K: It is the sum of masses of the set that intersects with K. i.e; Pl(K) = m(a) + m(d) + m(c) + m(a, d) + m(d, c) + m(a, c) + m(a, d, c) Characteristics of Dempster Shafer Theory:
mean?)
Advantages:
Disadvantages:
LEARNING: An agent is learning if it improves its performance on future tasks after making observations about the world. Learning can range from the trivial, as exhibited by jotting down a phone number, to the profound, as exhibited by Albert Einstein, who inferred a new theory of the universe. Here we will concentrate on one class of learning problem, which seems restricted but actually has vast applicability: from a collection of input–output pairs, learn a function that predicts the output for new inputs. Why would we want an agent to learn? If the design of the agent can be improved, why wouldn’t the designers just program in that improvement to begin with? There are three main reasons. ● First, the designers cannot anticipate all possible situations that the agent might find itself in. For example, a robot designed to navigate mazes must learn the layout of each new maze it encounters. ● Second, the designers cannot anticipate all changes over time; a program designed to predict tomorrow’s stock market prices must learn to adapt when conditions change from boom to bust. ● Third, sometimes human programmers have no idea how to program a solution themselves. For example, most people are good at recognizing the faces of family members, but even the best programmers are unable to program a computer to accomplish that task, except by using learning algorithms.
In supervised learning the agent observes some example input–output pairs and learns a function that maps from input to output. ● In component 1 above, the inputs are percepts and the output are provided by a teacher who says “Brake!” or “Turn left.” ● In component 2, the inputs are camera images and the outputs again come from a teacher who says “that’s a bus.” ● In 3, the theory of braking is a function from states and braking actions to stopping distance in feet. In this case the output value is available directly from the agent’s percepts (after the fact); the environment is the teacher. In practice, these distinctions are not always so crisp. In semi-supervised learning we are given a few labeled examples and must make what we can of a large collection of unlabeled examples. Even the labels themselves may not be the oracular truths that we hope for. Imagine that you are trying to build a system to guess a person’s age from a photo. You gather some labeled examples by snapping pictures of people and asking their age. That’s supervised learning. But in reality some of the people lied about their age. It’s not just that there is random noise in the data; rather the inaccuracies are systematic, and to uncover them is an unsupervised learning problem involving images, self-reported ages, and true (unknown) ages. Thus, both noise and lack of labels create a continuum between supervised and unsupervised learning. SUPERVISED LEARNING Supervised learning is the machine learning task of inferring a function from labeled training Data. Moreover, The training data consist of a set of training examples. In supervised learning, each example is a pair consisting of an input object (typically a vector) and the desired output value (also called the supervisory signal). Training set A training set of data used in various areas of information science to discover potentially predictive relationships. Training sets used in artificial intelligence, machine learning, genetic programming, intelligent systems, and statistics. In all these fields, a training set has much the same role and is often used in conjunction with a test set. Testing set: A test set is a set of data used in various areas of information science to assess the strength and utility of a predictive relationship. Moreover, Test sets are used in artificial intelligence, machine learning, genetic programming, and statistics. In all these fields, a test set has much the same role. Accuracy of classifier: Supervised learning In the fields of science, engineering, industry, and statistics. The accuracy of a measurement system is the degree of closeness of measurements of a quantity to that quantity’s actual (true) value. Sensitivity analysis: Supervised learning Similarly, Local Sensitivity as correlation coefficients and partial derivatives can only be used, if the correlation between input and output is linear. Regression: Supervised learning In statistics, regression analysis is a statistical process for estimating the relationships among variables. Moreover, It includes many techniques for modeling and analyzing several variables. When they focus on the relationship between a dependent variable and one or more independent variables. More specifically, regression analysis helps one understand how the typical value of the dependent variable (or ‘criterion variable’) changes when any one of the independent variables varies. Moreover, While the other independent variables were fixed. LEARNING DECISION TREES Decision tree induction is one of the simplest and yet most successful forms of machine learning. We first describe the representation of the hypothesis space and then show how to learn a good hypothesis. A decision tree represents a function that takes as input a vector of attribute values and returns a “decision”—a single output value. The input and output values can be discrete or continuous. For now we will concentrate on
problems where the inputs have discrete values and the output has exactly two possible values; this is Boolean classification, where each example input will be classified as true (a positive example) or false (a negative example). A decision tree reaches its decision by performing a sequence of tests. Each internal node in the tree corresponds to a test of the value of one of the input attributes, Ai, and the branches from the node are labeled with the possible values of the attribute, Ai =vik. Each leaf node in the tree specifies a value to be returned by the function. The decision tree representation is natural for humans; indeed, many “How To” manuals (e.g., for car repair) are written entirely as a single decision tree stretching over hundreds of pages. As an example, we will build a decision tree to decide whether to wait for a table at a restaurant. The aim here is to learn a definition for the goal predicate WillWait. First we list the attributes that we will consider as part of the input: