New Expert SysTem
Index | Mail | Česky
  
  
  
  
  
  
  
  

Knowledge Representation


Introduction

Knowledges into the NEST are represented by the way of:

  • attributes and propositions derived from attributes;
  • rules;
  • contexts;
  • integrity restrictions.
Each of this „knowledge class“ are described in one of following section. All this classes are storaged in the knowledge base, which is described in the last section of this chapter.


Attributes and Propositions

Attribute is some thesis with which the system can operate. There are 4 types of attributes:

  • binary;
  • single;
  • multiple;
  • numeric.

Binary attributes are the basic type of attributes. Just one proposition is derived from this attribute and this proposition has the same name. This proposition (and the relevant attribute) takes a weight, which represented its „verity“ (if the weight is maximal, the proposition`ll be certainly valid, if the weight is minimal, the proposition`ll be certainly invalid). The weight is represented by an interval. With this interval, it is possible to express partial knowledge about the proposition`s verity.

For example, if we worked into the weight range [-1;1] (this weight range will be used in all following example) the following weight have these sense:

  • [-1;-1] - proposition is certainly invalid (FALSE);
  • [ 1; 1] - proposition is certainly valid (TRUE);
  • [-1; 1] - we know nothing about proposition (UNKNOWN);
  • [ 0; 0] - proposition is irrelevant (IRRELEVANT).

Single attributes are attributes, which take one value from the list of values. The typical example is „type of account“ in a bank. From this attribute, there are derived as much propositions as the count of values in the list (propositions are the same as the binary propositions). When the attribute takes some value (with the weight), one relevant proposition takes this weight and all others propositions take the weight „FALSE“.

For example, if it`s set that user opened a current account with the weight [0,6;0,6], all others types of accounts`ll take the weight „FALSE“.

Multiple attributes are like „single attributes“ but they can take more values from the list of values. The example can be the attribute „speaking languages of person“. From this attribute, there are derived as much propositions as the count of values in the list. When the attribute takes some value (with the weight), relevant propositions take relevant weight and others propositions take the weight, witch was preconfigured (UNKNOWN or IRRELEVNT).

Numeric attributes are attributes, which take numeric value from preconfigured range. The example can be „salary size“. An unlimited number of propositions can be derived from this attribute. Each proposition has set the weight function, which convert the number value to the weight.

The weight function is set by a fuzzy interval. This interval is identified by 4 numbers (fuzzy lower, crisp lower, crisp upper, fuzzy upper). If the number value is outside „fuzzy“ limits, the resulting weight`ll be „FALSE“, if the number value is inside „crisp“ limits, the resulting weight`ll be „TRUE“. If the numeric value is between „fuzzy“ and „crisp“ limits, the resulting weight`ll be counted with the linear function (the upper and lower number of weight interval are same). This calculation is illustrated into the following picture (the fuzzy interval: [10, 20, 40, 40]):

Propositions are divided to questions (proposition isn`t in conclusion of any rule), intermediate propositions (proposition is in a conclusion and in a condition of some rule), and goals (proposition isn`t in a condition of any rule) accordint to the positions of the propositions. If the proposition is a question, all others propositions derived from the same attribute`ll have to be the questions too. The proposition that is neither in condition nor in conclusion of any rule, is so-called solitary proposition. It`s ignored by NEST.

Attributes are divided to „environment“ and „case“ attributes according to the scope. Environment attributes have some relation to environment, to business, to affair, to thing, which change rare and it`s not needful to recognise them over again. The system transfers their values from one consultation to the others (if the user doesn`t stop it). Average rate of interest is the typical example. Case attributes are all the others attributes, i. e. attributes asked by system during each consultation.

The value of an attribute can be obtained from different sources. If the attribute is a goal or an intermediate attribute, the implicit source is the „inference“ (by the medium of rules). If the attribute is question, the implicit source is „question to user“. Another source is a „file“ - the system try to interpret the first line of a given file. Last source is an „external function“, which create the file with value. This sources can be set up so that if one source fail, the other will take it`s place. Last two expliced source can be used only with binary and numeric attributes.

Action is external programme, that is assigned to some proposition. If this proposition obtains at least the weight, that is set in the action, the external programme will be executed. If the action is assigned to the attribute, the result will be same as if this action was assigned to all propositions derived from this attribute.


Rules

The basic form of rule in NEST is following:
context: IF condition THEN conclusion 1[weight 1],..., conclusion n[weight n]

Context decides if the rule will be used or not. More information about contexts are in the next section

Condition is represented by a disjunction of any „term“, where „term“ can be either a proposition or a conjunction of propositions. If the condition cames true, the conclusion`ll obtain relevant contributory value. The condition cames true when it`s value overpass the threshold of the condition (0 for the compositional rules, for logical rules a weight set by a knowledge engineer). More information about this mechanism is in section „work with indeterminateness“.

Conclusion is represented by the proposition and the weight, which serves for count the weight of proposition. The rule can have more conclusion, but this situation is the same as there are more rules with identical condition.

Every rule may have set a priority (number from an interval [0;1]), by which rules are selected during the inference. (More information is in the section „Inference mechanism“.)

Action can be assigned to the rules, too. This action is executed when the system use this rule, e. g. when the condition of rules comes true.

Rules are divided to 3 basic types:

  • apriori rules;
  • logical rules;
  • compositional rules.

Apriori rules are that rules, that are always active, e.g. they haven`t condition (nor context), let us say the condition is the value „TRUE“. These rules represent „general trues“.

Logical rules have the conclusion, that don`t take values from all interval [-1;1], but only the „logical values“. If the condition comes true (e.g. lower limit of weight interval overpass the threshold for this rule), the conclusion will take „TRUE“ or „FALSE“, if the condition doesn`t come true, the condition will take „IRRELEVANT“.

Compositional rules work to whole interval [-1;1] how it`s explained in the section „work with indeterminateness“.


Contexts

Context decide if the rule, to which is context assigned, will be used or not. Context has it`s threshold for each rules (if the threshold isn`t defined, system`ll take the global threshold) and the rule is used, when the weight of context (the upper limit of the weight interval) overpass this threshold.

Context is represented (as the condition of rule) by disjunction of any „term“, where „term“ can be either a proposition or a conjunction of propositions.


Integrity constraints

Integrity constraints have the same form as compositional rules. The different between them is, that integrity constraints doesn`t participate to the inference of goals, but they are evaluated separately after the inference. They have the function of verification, whether the goals fulfil the other requirements. If the integrity constraint comes true, the system makes nothing. But if the integrity constraint come false, user`ll receive notice that this constraint was broken.