|
|
||||||||||||||||||||||||||||||||||||||||||
First of all - where do facts and
rules come from? Facts and rules come from a knowledge engineer (KE for
short), who either is an expert in the area of interest, or someone who has access to
such an expert. The KE formulates the knowledge so that Pro/3
can make use of it in a way that makes the system produce something
useful. Pro/3 supports two very different types of rules -
sentence
rules and rules for inexact reasoning. These two types differ in most respects:
structure, usage and purpose; and they are handled by two different
inference engines. Sentence rules are processed by a PROLOG-type inference
engine (Pro/3's main inference engine), while rules for inexact reasoning are
processed by a simpler inference engine called up by, but also making use
of the
main engine.
Rules for inexact reasoning include certainty rules, fuzzy sets, support rules and data rules. All rule types return a simple value, i.e. a certainty factor or a probability in case of certainty rules, a membership grade in case of fuzzy sets, and these or any type of simple value in the case of support rules and data rules. Certainty rules and fuzzy sets correspond to quite different sources of uncertainty. Certainty rules are typically used where the knowledge of the subject area is imprecise, while fuzzy sets are used where the knowledge classifications (knowledge concepts) are imprecise. |
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
A certainty factor a is number in the range [-1,1] - a measurement of the certainty of a given proposition - the higher the certainty factor, the more true is the proposition, the lower the certainty factor, the more untrue is the proposition.
|
||||||||||||||||||||||||||||||||||||||||||
A certainty factor is generally considered as a relative, rather than an absolute, measure of certainty (this contrasts with probabilities which are absolute measurements - see also Probabilities - Conditional Probabilities and Certainty Factors). Certainty factors are thus suited for ranking propositions according to their certainty factors. |
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
An essential assumption in traditional "crisp" logic is that something (an element belonging to a certain universe) either is a member of a given set or it is not a member, in which case it is a member of the complement set (in the universe). In fuzzy set theory this is not so. Fuzzy set membership is qualified by a degree of membership (called membership grade in Pro/3), given by the set's membership function, which is a mapping from an element (represented by a parameter or parameters) to a real number in the range [0,1]. This number is the membership degree, where 0 means that the element is definitely not a member of the set, 1 means that element definitely is a member of the set, while values in the range <0,1> mean that the element is a member to a degree. The higher the value, the higher the degree of membership. An element can both be a member of a fuzzy set and its complement. | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
A rule for inexact reasoning (in Pro/3) is a special type of function which returns a simple value (typically a certainty factor or membership grade). The function usually has one or more input parameters. The semantic interpretation of a reference (call) to the function is
The ultimate purpose of inexact rules in Pro/3 is to return a value to a data element in the conclusion of a sentence rule: |
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
In the example above the certainty rule bike is suitable returns a certainty factor to the data element certainty in the manufacturer has suitable bike sentence type. For each manufacturer makes bike sentence, a manufacturer has suitable bike sentence is derived. These sentences state the certainty of the given manufacturer's bike model for being "suitable". | ||||||||||||||||||||||||||||||||||||||||||
An inexact rule is invariably only a part of a (complex) network of rules calling each other. Inexact rules are mostly about calling other rules in various contexts, and combining or otherwise using the values returned from these called rules in different ways. The structure of rule calls forms a directed acyclic graph (rule network), with rules as graph nodes and calls as directed connectors (from the called rule to the calling rule i.e. the arrow is direction of returning values). With the sole exception of a group of rules called data rules, all inexact rules call at least one other rule. While data rules can do one type of rule calls known as context calls, they generally do not call other rules, and thus are terminal nodes in the graph. The purpose of a data rule is to return a value on the basis of either a query to the knowledge base (single value query), or by questioning the KE (user). Thus inexact rules derive the value they return in three ways:
A inexact rule network always has one root node, that is, the certainty rule or fuzzy set called by a sentence rule (such as the bike is suitable rule in the example above). The evaluation of the rule network starts with this rule.
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
The diagram under shows a part of the rule network with has the fuzzy set bikes with high cost factors as root (not shown). The diagram is drawn via the MS Visio import format generated by Pro/3:
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
In most applications inexact rule networks tend to be complex and difficult to review in graph format, as is illustrated by a small part of the MC KB (under). The built-in tree drawing capability of Pro/3 is usually easier to use (see the complete inexact rule network for the MC KB).
|
||||||||||||||||||||||||||||||||||||||||||
An inexact rule has, usually, one or more (formal) input parameters. Formal parameters must be defined as data element types prior to being specified as parameters. The values of the actual parameter(s) in a call to a rule, impact the value returned by the rule in four different ways:
Note! Actual parameters of certainty rules can only be simple values, i.e. literal values or variables (parameters). Expressions can not be used as actual parameters for certainty rules. |
||||||||||||||||||||||||||||||||||||||||||
Inexact rules can be dividend into four groups: certainty rules, fuzzy sets, support rules and data rules. The support rules manipulate the flow in the inexact rule network, while the data rules retrieve relevant information from the user or from the knowledge base. | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
A certainty rule's prior probability is a probability stating that prior to the evaluation of the rule, the probability that the statement is true is such and such. The prior probability is accordingly a number in the range [0.0 ... 1.0], in reality <0.0 ...1.0> as certainty rules with a prior probability of 0 or 1 would not have any practical use in a problem-solving model. Prior probability is only meaningful for rules that return a certainty factor or a probability. (Prior probability is not entered for other rules, however since all stored rules (rule records) have a prior probability element, the value of 0.5 is used as a dummy. This value has no significance when evaluating the rule or the rule network). For more in-depth explanation of the relationship between certainty factors, probabilities and bayesian-type rules, refer to Probabilities - Dependent Probabilities - Certainty Factors ).
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
All inexact rules except fuzzy sets, can optionally have a context. A context is simply one or more calls to other rules (of any type). Each call is associated with a condition (such as a value range), which applies to the value returned by the called rule. If at least one of the returned values violate the specified condition, then the calling rule is considered out of context and the rule's out of context value is returned. |
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
For definitions and illustrations of fuzzy set concepts, refer to Fuzzy Set Concepts. | ||||||||||||||||||||||||||||||||||||||||||
RETURN VALUES IN EXCEPTION SITUATIONS Inexact rules never fail to return a value, and exception-situations are handled as follows: |
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
While numeric maps (used in
map-rules and optionally in query- and question-rules), can map any value (as long as the domain
is numeric), discrete maps can only map a limited set of values. This
means that discrete maps could fail if the value attempted mapped is
outside the set. Pro/3 will in such cases
attempt to map the predefined default value. Consequently, mapping
will always succeed (under the assumption that the default value is
map-able). Cases with unmappable default values are considered rule
definition errors. They can give rise to run-time errors during rule
interpretation).
See Using Inexact Rules in Pro/3 for a more detailed explanation of inexact rules and their usage in Pro/3. |
||||||||||||||||||||||||||||||||||||||||||
Evaluating Inexact Rules Three questions crop up when working with inexact rule-based reasoning models:
These and related issues are discussed in the topic Validating the Model. |