|
For a general introduction to inexact rules see What are inexact rules? General issues of using inexact rules are explained in Using Inexact Rules.
|
||||||||
There are four main types of fuzzy set rules, which combine one or more fuzzy sets into a resulting set. In addition to that, both data and support rules can be used to represent fuzzy set membership functions. See e.g. the fuzzy set fuel efficient bikes (query rules under).
|
||||||||
|
||||||||
The fuzzy set operations are defined in more details in the
Fuzzy Set Concepts page. The window (under) is used for all fuzzy set rules except ordered weighted averaging rules (which does not have the nine radio buttons in the middle of the window). The upper three fields show the rule's NL-name, KB-name and realm (only the latter can be changed). |
||||||||
|
||||||||
The window above shows the fuzzy set bad roads type bike (with parameter model name) which is an algebraic product intersection of the fuzzy sets not big bikes and not good roads only type bikes (which unsurprisingly has the same parameter). The input parameters are entered or changed in the same way as in the general rule definitions window. The radio buttons are used to specify the desired type of fuzzy operation. The listbox lists the fuzzy sets combined in the operation. The list is modified by the five buttons on top. All but the Add Set-button requires that one of the sets in the list is selected (a set is selected by clicking it). The Add Set and Edit Set-button invokes the general rule-call dialog. The ordered weighted averaging type fuzzy set uses a window similar to the window above, however without the radio buttons. Each call is associated with a weighting factor - either an explicit value (> 0.0) or a call to a rule returning the appropriate weighting value. Refer to the general rule-call dialog. |
||||||||
|
||||||||
|
||||||||
AND-rules are entered in the window under. The Add Call- and Edit Call-buttons open the general rule call dialog where the rule to be called (and its actual parameters if any) is selected. | ||||||||
|
||||||||
The AND-rule in window above specifies that the certainty of peter will
catch tanigue is equal to the lowest certainty of the three
propositions there will be fresh bait available, there will be good
sea conditions and there will be no dynamite fishing. Note
that same rule is displayed as bayesian type rule under (for the
illustration purpose). The OR- and NOT-rule uses the same window as being used by AND-rules (with the exception of the field headers). Only one rule can be called by a NOT-rule. A context can be specified for AND-, OR- and NOT-rules. |
||||||||
|
||||||||
The bayesian type rule in window above specifies that the certainty of
peter will catch tanigue is determined via a bayesian logic
type combination of the three propositions there will be fresh bait
available, there will be good sea conditions and there will be no
dynamite fishing.
The only superficial difference between the bayesian rules and the simpler AND-rules,
is the increment and decrement factors (the computational
logic is of course quite different). Note that same rule is displayed as
an AND-rule above (for the illustration purpose). Increment and decrement factors One increment factor (greater or equal to 1) and one decrement factor (in the range <0.0,1.0> are specified for each called rule. These factors define the significance of the dependency between the propositions represented by the called and the calling rule. The application of the factors depend on the prior probability (pp) and evaluated probability (p) of the called rule:
See Dependent Probabilities for more details and examples. Increment and decrement factors as rule calls Increment and decrement factors are either explicitly specified in the bayesian rule, or they are specified indirectly by a call to another rule (which then returns the increment or decrement factor). This can be useful in certain contexts e.g. where "correct" value of the factors depend on the rule's input parameters or depend on evaluation-time consultation with the user through a question-rule. Note that a contributing rule can only occur once in the same bayesian combination. |
||||||||
|
||||||||
|
||||||||
The combination rules use the same window as the AND-rules (with the exception of the field headers). | ||||||||
The only class of rules which do not necessarily call other rules are the data rules (they can optionally call other rules to specify a context). A question rule gets its return value from the KE/user, while a query rule gets its answer from the knowledge base. | ||||||||
|
||||||||
|
||||||||
The question is simply a text (used in the
prompt presented to the KE during run-time rule interpretation e.g.
How important is the bike size preference?). The
answer value must be from the specified answer domain, and Pro/3
insists on getting a value from this domain. Answer alternatives are optionally listed in square brackets after the question text which in this case must be end with a question-mark. The answer alternatives are separated by semi-colons. The answers must be from the selected answer domain. The user has no option, but selecting one of the answer alternatives if these are specified. Rule input parameters can optionally be embedded in the question text in curly brackets (e.g. Are you considering stocks from the [sector] industry?. These parameters are substituted with their actual values when the question is presented to the user. The default value must be from the answer domain. It will be used if the user cancels the question prompt window. The annotation for the rule (if any) will be displayed together with the question prompt (in the lower part of the question window): |
||||||||
|
||||||||
Two "input facilities" can be specified to improve the user-interface of inexact rule networks with question rules, i.e. question series and question clusters.
|
||||||||
MAPS Maps are used to map from one set of values to another set, possibly of different domains. Maps are used iwith queries, questions and in map rules (described under). There are two types of maps: numeric maps and discrete maps. |
||||||||
|
||||||||
CONTEXT A rule can optionally have a context A context is simply one or more calls to other inexact rules . Each call is associated with a condition which must be satisfied for the calling rule to be considered in context. If at least one of the context calls do not satisfy its condition, then the calling rule is considered out of context and the rule's out of context value is returned. The following types of conditions can be specified:
Context calls are added by pressing the Add Context Call-button (which opens the general rule call window). You can change the sequence of the calls by the Move Up and Move Down buttons (the sequence of the calls has no significance). Pro/3 will not validate the conditions i.e. whether they make logical sense or not! |
||||||||
Query rules contain a single-value query and optionally a map as in question rules. Input parameters to the rule can be embedded in the query. |
||||||||
Query
The query included in the rule should be a single-value query type. The syntax is the same as for entering queries in general in Pro/3, however the common start of the query e.g. what equals (or what =) is dropped. The question-mark at the end of the query text can optionally be left out.
Pro/3 cannot handle data rule queries which directly or indirectly involves the evaluation of an inexact rule network. Query parameters The rule's input parameter (if any) can be embedded in the query as follows: ... bike with model=is fuel efficient's model name has ... The rule input parameter is prefixed with the rule's name followed by 's. An alternative shorter alternative syntax is better i.e. the genitive form of the rule name is replaced by this: ... bike with model=this model name has ... The syntax can be validated by the Validate-button (not shown in the picture over), and you can test run the query with the Run query-button. You should then usually replace rule input parameters (used as actual parameters) with literal values. Always check your query with the Validate-button, which also is required to determine the value domain returned by the query. Default value The default value is mandatory, and it is used in place of a value returned by the query if the query fails. This means that the default value must be of the same domain as the value returned by the query. The default value must be map-able (if a map is used). The query value domain must be the same as the rule's return domain if no mapping is specified. |
||||||||
|
||||||||
|
||||||||
This map rule calls (refers to) the fuzzy set undervalued stocks, and maps the membership grade value returned into a certainty factor (which represents the certainty of stock will give good return. The map is a trivial numeric map. | ||||||||
|
||||||||
The parameter-type rule above calls (in the context
that the user has specified an ABSOLUTE PRICE RANGE) the rule bike is
within the price range with two parameters namely lowest price
and highest price. These two parameters are given by the user
during run-time i.e. via the two question
rules lower price limit and higher price limit. The
values returned by these two rules are assigned to the two variables
Low and High (within the parameter rule) and subsequently
used as actual parameters to the bikes is within price range-rule.
Rules with long names and/or long parameter tails are sometimes not fully visible in the listbox displaying calls. The "call details field" at the bottom of inexact rule windows displays highlighted (selected) calls such as the call to the rule bike is within the price range in the window above. The details field is horizontally scrollable, thus making it possible to see the entire call by scrolling to the right. The field cannot be used for altering the call. |
||||||||
|
||||||||
Switch-rules are used to dynamically select a rule to be called, either on the basis of one of the rule's input parameters or on the result returned from another rule. Switch rules can have a context. | ||||||||
The call-type switch rule calls a criterion rule (the Add/Change
Criterion Rule-button invokes the
general rule call dialog), and the value returned by this rule is
used as basis for selecting the (main) rule to be called. Each of the
main rule alternatives (three in the example above) is associated with a
condition, and the first condition satisfied determines the main rule.
If e.g. the value returned by the road type requirement-rule is
SURFACED LOW-QUALITY ROADS, then the second not good roads only type
bikes-rule is called. The value returned by this rule is the
value returned by the switch-rule itself (bikes that match road type
requirement). The conditions have the same structure as the context rule conditions, however switch-rules additionally have a default-condition. The rule specified for the default-condition is called if none of the other conditions are satisfied. Note that "branches" of the switch-rule are tested from top to bottom until eventually a condition is satisfied. Thus the sequence is significant unless the conditions are mutually exclusive (which is the recommended structure). The default criterion-rule value is used in cases where the value returned by the criterion rule fails to meet any of the switch conditions. Pro/3 will not validate if the conditions are incomplete, over-lapping or illogical! |
||||||||
The window used for parameter-type switch rules is similar to the window used for call-type switch rules. The criterion rule-call fields, however, are not included since the switching is determined by the value of a designated input parameter (rather than the value returned by the criterion rule). This parameter is simply selected in the parameter listbox on the left side of the window. A default parameter value is used in place of the default criterion-rule value. |