7 Appendix

7.1 Samples

7.1.1 Tender (tender.dkb)

This knowledge base evaluates applicants for a tender. Four competitors are assesed, using 25+16+25=66 elementary rules given for 1 decision, two dependent and 4 input attributes.

7.1.2 Tender with Clustering (tender_cluster.dkb)

The same as Tender (R-7.1.1), but ‘Done works’, ‘Running works’ and ‘Price’ are clustered. Try to import this Excel Workbook.

7.1.3 Ability (ability.dkb)

How can the skills of colleagues be induced from their other attributes? The answer of Doctus is concluded from the 14 given cases: it is sufficient to examine their ‘Dominant knowledge’, ‘Mind’, ‘Motivation’ and ‘EQ’.

7.2 Export Templates

Some export templates (R-6.3.4) are delivered with Doctus to support knowledge export (R-4.1).

Important note! One do not need the details from this chapter to use the built-in templates of Doctus. These definitions and descriptions are needed to those developing their own templates based on the built-in ones, thus even the understanding of this chapter requires significant programming knowledge.

The export template files are stored in a structured folder system. The basic folder is the ExportTemplates subfolder of the installation folder of Doctus; within it the subfolders are hierachically structured according to the export types, containing the template files and the build-in elements.

7.2.1 Parameter Types

The Export Wizard (R-4.1.4) queries just the parameters that are needed by the generation. Following types are supported:

CodeTypeGUIResult
bbooleancheckbox0 or 1
sselectionlistboxzero based index of selected item
mmultiple selectionmultiple selection list boxstring of 0’s and 1’s
rdisplay message onlystatic textnone
ttext inputedit boxinput text
ffile name selectionedit box with «Browse» buttonfull path file name

Table R-3: Parameter Types of Export Templates

Advanced: Other syntax elements of the export template language (R-6.3.4) are listed in ExportTemplates/ReadMe.txt in the installation folder of Doctus. 

7.2.2 Desktop Applications

The Rule-Based Reasoning functionality can be exported into standalone computer softwares with these templates. The starting point can be a Rule-Based Knowledge Base or a Case-Based Graph.

Template Location: ExportTemplates\application

NameParametersDescription
reason.c.dkts: conclusion only / all dependentThe generated c program inputs case features from stdin and writes conclusion to stdout.
reason.ksh.dkts: conclusion only / all dependentThe generated ksh program inputs case features from stdin and writes conclusion to stdout.
Excel.bas.dkts: horizontal/vertical axis
b: copy cases too
The generated Visual Basic macros create sheets as e.g. the «Cases» sheet with real-time reasoned dependent attributes.

Table R-4: Export Templates – Desktop Applications

7.2.3 Reports

These templates generate no software but data.

Template Location: ExportTemplates\report

NameParametersDescription
CBRclassify.txt.dktdynamicClassifies a case during the generation process based only on its informative features.
Tables.rtf.dktm: types of tablesWrites tables in printable rtf form.

Table R-5: Export Templates – Reports

7.2.4 Web Clients

Case features for the input attributes can be given on the web page generated from these templates. Inputs can be sent and/or used for reasoning by this page or a webserver application (R-7.2.5).

Template Location: ExportTemplates\web\client

Build-in Elements Location: ExportTemplates\web\include

NameParametersDescription
<common>s: language
t: title of page
s: style sheet integration mode
f: style sheet file
Parameters used by all web clients.
<deductive>s: input control (combo box / radio button)
m: on-page reasoning / webserver / e-mail
s: conclusion only / all dependent
Parameters used by deductive web clients.
<deductive – on page reasoning>s: output of on-page reasoning (combo box / radio button / plain text)Parameters used by deductive web clients with on-page reasoning.
<deductive – on server>t: webserver URL to send toParameters used by deductive web clients if server is attached.
<deductive – send mail>t: e-mail address to send to
t: mail subject
t: acknowledgement page URL
Parameters used by deductive web clients if data is sent by mail.
single_deductive. html.dktSee above.Inputs case features on a single page.
single_inductive. html.dktSee <common> above.Walks through the nodes of the Case-Based Graph in hypertext manner.
multi_deductive. html.dktSee above.Inputs case features; on separate page each.
multi_inductive. html.dktSee <common> above.Walks through the nodes of the Case-Based Graph page by page; the last page shows the classification.

Table R-6: Export Templates – Web Clients

7.2.5 Web Server Applications

Webserver application that uses the CGI standard to respond http requests of Web Clients (R-7.2.4). Case features are encoded into http request parameters in the form of “a<attribute_index>=<case_feature>”, Where <attribute_index> is the zero-based index of the attribute on the «Attributes» pane, and <case_feature> is 0 for “Unknown”, else the value index from 1. URL encoded cases (R-6.3.5) are built separated by ‘&’ from these parameters; each line stores features of one case.

Template Location: ExportTemplates\web\server

Build-in Elements Location: ExportTemplates\web\include

NameParametersDescription
<common>s: language
t: title of page
s: style sheet integration mode
f: style sheet file
t: file name to store URL encoded cases (R-6.3.5)
Parameters used by all webserver applications.
save.jsp.dktSee <common>.Java Server Page to store http requests.
save.php3.dktSee <common>.PHP3 script to store http requests.
save.pl.dktSee <common>.Perl script to store http requests.
<reason><common>
s: conclusion only / all dependent
Parameters used by reasoner applications.
reason.jsp.dktSee <reason>.Java Server Page to store and respond http requests by a page with reasoning results.
reason.php3.dktSee <reason>.PHP3 script to store and respond http requests by a page with reasoning results.
reason.pl.dktSee <reason>.Perl script to store and respond http requests by a page with reasoning results.

Table R-7: Export Templates – Web Servers

7.3 Batch Commands

CmdArgumentsLegal valuesAction
fofile name\path\*.dkbMain Menu – File – Open... (R-5.1.1.2)
fs--Main Menu – File – Save (R-5.1.1.4)
fafile name\path\*.dkbMain Menu – File – Save As... (R-5.1.1.5)
fetemplate name\path\*.dktMain Menu – File – Export (R-5.1.1.8)
output file\path\*.*
[parameters...]See Result column.
fisourcee: Excel workbook
q: Microsoft query
o: ODBC
m: mailbox
u: URL encoded cases
Main Menu – File – Import (R-5.1.1.9)
clusterr: restart
c: continue
n: no change
file name*.xls for e
*.qry for q
*.dns for o
*.dku for u
fx--Main Menu – File – Exit (R-5.1.1.10)
saattribute name-Select the attribute.
kr--Main Menu – Knowledge Management – Deductive Reasoning (R-5.1.5.1)
kmbranching methodp: polar
h: heuristic
e: efficient
Main Menu – Knowledge Management – Inductive Reasoning (R-5.1.5.3)
ordered-: not ordered
o: ordered
exclude dependent-: include
x: exclude
benchmark attributeattribute name or *
ke--Main Menu – Knowledge Management – Extract Rules (R-5.1.5.6)

Table R-8: Batch Commands

7.4 Determining Informativity

Determining informativity (Ib) of attribute b:

  1. Let C be the set of cases in a node, a the benchmark, a1Όan its values, and wa1Όwan () their rates in set C. The entropy of benchmark in set C is: .
  2. Let b1Όbm be the values of attribute b, b is a set of them. Disjoint b into not empty subsets b1Όbp, where .
  3. Disjoint C into subsets C1ΌCp being attribute b of all elements of Cj in bj for each j. Let wj be the weight of Cj in C, where .
  4. Then informativity is the entropy gain of disjoining b into b1Όbp: .
  5. The output of the computing is informativity of the optimal selection: , where k indicates the possible disjoints of b.

Density of it is: , where wC is the number of elements in set C.

7.5 Glossary

2D (2 dimensional) view – The rule set is projected into 2 dimensions, where each cell of the table contains a rule output for the domain defined by the position of the cell. See Rules – 2 Dimensional (R-2.4.1.3).

– 2 dimensional

Active domain – A rule domain in a node of the Rule-Based Graph, which is covered by the rule set and is not hidden.

Attribute – An aspect of evaluation of the cases. See Attributes (R-2.1).

Attribute type – Indicates the dependency relations. See Rule-Based Graph (R-2.3). The following types are distinguished:


1. Single is not a factor and it has no factors.


2. Input is a factor, but it has no further factors.


3. Decision has factors, but it is not a factor.


4. Intermediate or dependent has factors and it is a factor too.

Benchmark attribute – The criterion of case classification in the Case-Based Reasoning. See Case-Based Graph – Benchmark (R-2.5.4.1.2).

Case – Item evaluated in the knowledge base; e.g. if the knowledge base is used for decision support, the cases are decision alternatives. See Cases (R-2.2).

Case-Based Graph – Graphically displays the result of Case-Based Reasoning. See Case-Based Graph (R-2.5).

Case-Based Knowledge Base – Knowledge base, which uses Case-Based Reasoning; therefore it contains a Case-Based Graph. See Ability (R-7.1.3).

Case-Based Reasoning (CBR) – The process of inducing rules that classify the cases according to the values of the benchmark attribute; using informative attributes. See Case-Based Graph – Generate a Case-Based Graph (R-2.5.4.1).

Case-Based Rule Graph – When extracting rules form a Case-Based Graph, a new knowledge base is created with a single-level Rule-Based Graph. For distinction, this graph is called the Case-Based Rule Graph. See Case-Based Graph – Extract Case-Based Rule Graph (R-2.5.4.3).

Case features – Values of attributes assigned to a case. See Cases – Enter case features (R-2.2.2.2).

Cluster – The numeric domain is broken down into parts called clusters. The cases are classified into these clusters, which will be the case features. See Attributes – Cluster Configuration (R-2.1.2.8.4).

Complete rule set – A rule set that totally covers the rule domain. See Rules (R-2.4).

Complex rule – A rule that covers more than one combination of factor values. See Rules (R-2.4).

Decision attribute – IAn attribute that has factors, but it is not a factor of another attribute. Although, according to this definition, there may be multiple decision attributes only one of them is the logical conclusion of Rule-Based Reasoning.

Deduction – The logic of Rule-Based Reasoning. See Rule-Based Graph – Deductive Reasoning (R-2.3.4.1).

Distributed value – A case feature or rule output that is not an exact value of an attribute but can have different values with different probabilities. See Cases – Enter distributed case feature (R-2.2.2.3).

Don’t care – A case feature or rule output that can have any value of the attribute.

Elementary rule – A rule that covers exactly one combination of factor values. See Rules (R-2.4).

Empty range – A value range that covers no values. See Rules (R-2.4).

Export Wizard – Queries generating parameters required by the chosen export template. See Knowledge Export – Advanced (R-4.1.4).

External source – A data source that can be read and interpreted by Doctus. See Knowledge Import (R-4.2).

Factor – An attribute on which another attribute depends. See Rule-Based Graph – Connect (R-2.3.2.1).

Full range – A range that covers all values of a factor. Shown as ‘*’ in the rule list.

Informative attribute – Attribute that appears in the Case-Based Graph. See Case-Based Graph – Informativity (R-2.5.1.2.1).

Informativity – The measurement of the dependence of an attribute on the benchmark attribute accoding to the cases in a node. See Determining Informativity (R-7.4).

Knowledge Acquisitor – An exported agent capable of acquiring new cases for the knowledge base. See chapter Knowledge Export – Knowledge Export & Import (R-4).

Knowledge base – The representation of the knowledge in Doctus. See The Five Panes of Doctus (R-2).

Knowledge-Based System (KBS) – Computerized system for representing and engineering knowledge. Consists of a computer program called shell and the knowledge base. See A Knowledge-Based System (R-1).

Link Wizard – A tool for attaching external data sources to attributes and configuring external input. See Knowledge Import – Link Wizard (R-4.2.6).

Reasoning – The main knowledge processing function; there are two different types of it: the Rule-Based Reasoning and the Case-Based Reasoning. See Cases – Deductive Reasoning (R-2.2.4.1) and Case-Based Graph – Generate a Case-Based Graph (R-2.5.4.1).

Reduction – Extracting informative attributes and rules from the accepted Case-Based Graph. See Case-Based Graph – Extract Case-Based Rule Graph (R-2.5.4.3).

Rule – It defines a rule output for one or more factor value combinations. See Rules (R-2.4).

Rule-Based Graph – Graphical display of the hierarchy of attribute dependencies. See Rule-Based Graph (R-2.3).

Rule-Based Knowledge Base – Knowledge base, which uses Rule-Based Reasoning; therefore it contains a Rule-Based Graph and rules. See Tender (R-7.1.1).

Rule-Based Reasoning (RBR) – The process of determining case features of dependent and decision attributes on basis of case features of input attributes using the rules. See Cases – Deductive Reasoning (R-2.2.4.1).

Rule domain – The factor value combinations on which the rule is valid (it is active if it is not hidden).

Rule output – A value that the rule assigns to the rule domain. See Rules (R-2.4).

Value range – A range of values of one factor for which the rule is valid. See Rules – Rule List & Rule Processing (R-2.4.1.2).

Rule set – Set of rules, usually considered for one node of the Rule-Based Graph. See Rules – Rule List & Rule Processing (R-2.4.1.2).

Unknown – A case feature or rule output that has none of the values of the attribute.

Value – A grade of satisfying an attribute. See Attributes (R-2.1).