SUPPLEMENT TO EXPERT SYSTEMS TUTORIAL: RULE BASING

by Julie Herzner and Miriam Kubiska, Dec. 1992

The purpose of this tutorial is to give more specific information related to developing rules for expert systems. It tries to use several real-life examples to show the application of expert systems in industry. The most critical features in developing an expert system are:
  1. gathering knowledge from experts
  2. organizing knowledge
  3. storing knowledge in a database
  4. rule-basing, ie. choosing a method for decision making

Obviously, the quality of the data or knowledge base will help determine the validity of the results. For instance, sampling errors occur when the sample does not adequately represent its domain. Assuming that the sampling is efficient, the next most important aspect in developing a good expert system is rule basing. In order to create rules, a mechanism to invoke rules must be formed. The first question one must ask is
"What is the quality or attribute that I am studying ?"
Is there any threshold value for an independent variable ?
For the dependent variable ?
The threshold value is the value at which the rule should be initiated. There is a degree of confidence associated with any threshold value chosen. Given an initial input all rules are ranked on their degree of confidence as related to their threshold values. Another issue to address when forming rules is the optimal condition of the quality which is being studied. Upon deciding these factors, rules in the form of IF-THEN can be initialized to interpret data. This brings into light yet another question; what is the chance that the rule is true or that induction of the rule will give you a valid result? There are several factors which can give invalid results. Sampling errors that are independent of rules can skew results. Random errors occur when some unusual variation is seen in the data that could not have been foreseen and which is not properly accounted for in the rules. Other errors related to rules occur when the wrong threshold value is chosen. For example, if rule basing is related to calendar activities and this is the rule:

If it is December 25 Then send Joseph a Christmas card

The rule should say:

If it is December 20 Then send Joseph a Christmas card

Obviously the date of December 20 is subjective. If Joseph lives very far away, the card may need to be sent even earlier. If the original threshold were chosen, Joseph would receive his card late because the threshold value December 25 is inconsistent.

Additionally, the basis for determining rules and their threshold values may change depending upon whether the expert system is embedded or melted. A melted expert system transfers data from algorithms by normal means. An embedded expert system is part of automation. Can you think of any reason why the threshold values for the rules in embedded and melted systems might be different? One reason the rules may change is that in embedded control, the changes take place automatically. This can be bad if proper monitoring does not exist. The threshold for melted may be different than that for embedded because in melted systems, the operator can override the suggestion given by the expert system if he knows something unusual is expected to occur, or if he knows that there is a problem with one of the sensors in the system which is causing the system to give invalid output.

The threshold in embedded control may be at a different level than for melted because it tries to exclude minor fluctuations and random deviations in input which might cause the system to overcompensate and give poor output. However, changing the threshold too much for embedded systems may be bad; it will increase the need for monitors and will cause the expert system to become superfluous. Maintaining the threshold value at a point where only large variations in data are translated into a corresponding change in control causes output to fluctuate when perhaps a steady state output is desired. If the threshold were lowered, then more control could be placed on the input to achieve a steady-state output. Keeping the threshold artificially high may also prevent the system from learning and improving itself.

Most expert systems exhibit adaptive control in which there is a slow improvement in process control which is associated with the system's learning. Waste water treatment typically undergoes embedded control. The control that is needed uses proportional, integral, and derivative functions, and thus is called a PID controller. Proportional control avoids delay in the system. Integral control eliminates offset which can be invoked by using proportional control. Derivative control is necessary because large derivatives cause noise and thereby distort signals. Often a mixture of PID control is necessary and the weighing for each type of control may vary during different parts of the process. In waste water treatment, all three types of control may need to be invoked because feed rates and concentrations of feed vary; yet a constant output concentrations is desired. Thus, using an absolute control would not adequately address this type of process because it would not give the desired steady-state output concentration. While invoking PID control, the system has the opportunity to correct itself and adjust it weighing factors with time. There are several other factors to consider when making rule based decisions. First, expert systems work locally because rules and data are applied locally. Attempting to use a weather forecasting expert system in Hawaii if it were developed for New York will fail. Rules about low temperatures and snow will be of no use to Hawaiians and will not be fired. The few rules remaining may be too general to give a valid weather forecast. Additional rules about tropical storms may need to be added for the Hawaiians. Second, proper consultation with field experts is critical. These experts need to analyze and weigh the most important variables so that the expert systems will assign the proper weighing coefficients. Third, a good system structure is critical. The rules must be nested in a logical order. Often there are rules about using rules called meta-rules to ensure proper structure.

A good system will most often contain an inference engine. The inference engine interprets rules and ranks them in a logical order. An inference engine in a fuzzy system is made up of a working memory, an input and fuzzy database, a set of rules, and an output which is usually a consequence of the input. The working memory holds a collection of objects Oi of the set of all realizable objects S(O). These objects are described by fuzzy numbers which are assigned as vectors, Vi, related to Oi. Fuzzy numbers represent unspecific or subjective information, for example "pretty" or "nice". The input of the system is made up of these fuzzy numbers and of a fuzzy database. The fuzzy database is composed of historical information and logical information constructed by experts. A set of rules S(R) is then made up of this fuzzy database and of a subset of S(R). The subset of S(R) includes the rank of confidence of each rule R. Each rule has the form IF [ ]*[ ]*...*[ ] THEN P

The IF statement recognizes what to watch for and the THEN statement describes the action taken in response or the consequence. The bracket [ ] defines a pattern which is a clause made up of a associative triple. For a clause to be considered an associative triple it must contain an attribute, an object, and a variable. An example of an associative triple clause is as follows:

The ability of the Doctor is excellent.
attribute object variable
Each pattern, or clause, is connected with a logical connector AND, OR, or NOT represented by the asterisk *.

  • Medical Example
  • Quiz
  • References