26
March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge bases and build an inference machine ECO-GEOWATER Euro Lab Course “GIS and Water Domain”

March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

Page 1: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

March 2004 Reiner Borchert

Knowledge Modelling and Decision Support in the Water Domain

A short introduction into theory and practice of creating knowledge bases and build an inference machine

ECO-GEOWATER Euro Lab Course “GIS and Water Domain”

Page 2: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Content

1. Introduction

2. Ontologies and Knowledge Bases

3. The Inference Machine

4. A simple example, taken from the FLUMAGIS project

(on the Protégé platform)

Page 3: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Background

The FLUMAGIS project has been

proposed to create a software tool

for implementing new issues of the

European Union Water Frame

Guideline.

1. Introduction I:

Page 4: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Some issues of the Water Frame Guideline

• The catchment of a river has to be considered as a whole,

regardless of political and administrative frontiers.

• The ecological situation of the whole watershed has to be

assessed and compared to regional reference states.

• Socio-economic aspects must be taken into account.

• A broad public participation in decision and planning has to be

aimed at (minimizing conflicts etc.).

These examples show how the guideline leads to a more complex

proceeding in decision finding and planning.

1. Introduction II:

Page 5: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Questions to a River System

• Which ecological deficits can be detected in the watershed, and

what are they caused by?

• What kind of measures (actions) must be executed in order to

remove or mitigate the detected deficits?

• Which of the proposed actions will cause the desired effects in the

best way?

• Which participant interests are touched by a certain decision?

1. Introduction III:

Page 6: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Questions to a Decision Support System

• What types of ecological deficits can be expected in the

watershed, and what issue types are they caused by?

• What types of actions can be executed in order to remove or

mitigate a certain deficit type?

• What are the effects of a proposed action type and how can they

be compared to the effects of other action types?

• How can participant interests be detected?

1. Introduction IV:

Page 7: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Building a Knowledge Base – Conceptualization and Generalization

Steps towards a domain specific ontology:

• Find all relevant topics of your domain (e.g. river bank, deficit,

width, cause/effect).

• Find out which topics are objects, which are attributes of objects,

and which are relations between objects.

• Create classes of objects (= concepts).

• Define their attributes and relations (= properties).

• Try to find more general topics that classify concepts with

common properties (e.g. tree is more general than oak or pine).

1. Introduction V:

Page 8: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

What is a Knowledge Base (KB)?

• A description of all relevant topics and concepts of a domain

• A collection of facts, rules, and constraints concerning the

concepts, stored in a machine-readable way

• A tool for inferring new facts (forward and backward chaining)

• Contrast to databases:• DB: structured by tables, columns (fields), data types, but: no

information about the meaning of structure items without metadata

• KB: provides information about the meaning of data and logical rules to deal with them.

2. Ontologies and Knowledge Bases I:

Page 9: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Components of a Knowledge Base (KB)

• Object Ontology: all relevant real world object types, attributes,

and relations.

• Domain Ontologies: topics, methods, and proceedings.

• Inference Machine: a causal net (containing all relevant

cause/effect relations), modules to execute inferences,

evaluations, and analyses.

• Geodata Access: To run inferences, analyzes, evaluations,

prognoses, the KB needs to access the available facts (real world

data). In the water domain you normally have to deal with huge

geodatabases.

2. Ontologies and Knowledge Bases II:

Page 10: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Ontologies I

What is an Ontology ?

„An ontology is a specification of a conceptualization: A body of formally

represented knowledge is based on a conceptualization: the objects, concepts,

and other entities that are assumed to exist in some area of interest and the

relationships that hold among them.“ (Genesereth & Nilsson, 1987)

In other words: an ontology is not an image of the real world,

but a specification of imaginations and concepts of them we

are carrying in our heads.

2. Ontologies and Knowledge Bases III:

Page 11: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Ontologies II

Thus classifications don’t focus on objective reality, but on the

requirements of our specific view of the world. They deal

much more with language, logic, and semantics rather than

physics.

According to this there are (probably unlimited) numerous ways

to create ontologies of the real world in a proper way.

Anyway, ontologies can be faulty: classifications and relations

can be logically contradictory, they can violate formal rules, or

they can be inadequate and misinterpreting the imaginations in

our heads.

2. Ontologies and Knowledge Bases IV:

Page 12: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Ontologies III

Concepts and Individuals - Classes and Instances

• Class = classification of objects sharing common properties

• Instance = individual, classified or not, has properties with

concrete values

Each human language constitutes a basic ontology of the

things we have to deal with. Substantives serve as classes,

adjectives as attributes, and verbs as interactions and relations

between any objects.

2. Ontologies and Knowledge Bases V:

Page 13: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Ontologies IV

The Practical Use of

Ontologies:

a well known example…

2. Ontologies and Knowledge Bases VI:

Page 14: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Ontologies V

Talking about any facts we use this fundamental ontology when

we create phrases. Grammatical subjects and objects refer to

instances of the classes termed by the substantives.

Example:

“This tree is an oak”

…means: This instance of the class “tree”, which may have a

property called “has botanical species”, has the property value

“oak”.

2. Ontologies and Knowledge Bases VII:

Page 15: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Ontologies VI

The decision what is class and what is instance basically

depends on context and intention.

Is “oak” a concept or an individual?

• “oak” may be an individual of the concept “species”. In this

case “oak” appears as an individual species of the class

“species”.

• But: “oak” can also be a class of individual trees.

2. Ontologies and Knowledge Bases VIII:

Page 16: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Ontologies VII

Hierarchy of Generalization and Inheritance of Properties

If some concepts share common properties, they may be

generalized by creating a superclass, which holds the

common properties.

• Each class inherits the properties from its superclass, and it

can define own properties additionally.

• All subclasses must hold the “is a” relation with regard to the

superclass.

• Superclasses normally are abstract, what means that there

exist no direct instances of them.

2. Ontologies and Knowledge Bases IX:

Page 17: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Ontologies VIII: 2 different “oak” ontologies (phenomenology vs. taxonomy)

class creature class plant class tree class broad-leafed tree class oak

instances: individual oaks

class conifer class pine

instances: individual pines

class animal class vertebrate class fish class eel

instances: individual eels

class taxon class order class family instances: individual families

(tree, fish, mammal) class genus class species instances: individual species

(oak, pine, eel)

2. Ontologies and Knowledge Bases X:

Page 18: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

A Causal Network

Ontologies provide the “statics” of a knowledge base, whereas the employment of facts (data) and rules has to be done by active tools.A central challenge of a KB is to analyze available facts, to gain new facts from known ones, to run prognoses and maybe even simulations.A core role is played by the Inference Machine, an active module to employ logical rules on known facts.Inference can be applied in two directions:

3. The Inference Machine I

Page 19: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Rules: Forward Chaining

Known facts of a KB often imply further derived facts, which can be inferred by using logical rules:

Forward chaining checks whether the “if” part of the rules is true (1). In this case a new fact can be assumed by “firing” the rule. In sequence other rules may come true (2).

1. “If the river has flooding for at least 4 weeks a year, then a alluvial forest will appear in the flooding zone.”

2. “If an alluvial forest exists in the

flooding zone, a rich Amphibian

fauna can be expected.”

3. The Inference Machine II

Forward chaining is a method to check which new facts can be inferred from given ones.

Page 20: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Rules: Backward Chaining

If you take a look at a given river basin, then you may ask the KB for example (1):

Backward chaining proves whether a certain goal can be reached. A goal appears as a “then” term of a rule (2).

Backward chaining is useful in diagnostics and analysis.

1. “Can an alluvial forest arise at a certain location?”

2. “If the river has flooding for at

least 4 weeks a year, then a

alluvial forest will appear in the

flooding zone.”

3. The Inference Machine III

Backward chaining is a proving method to check whether a certain goal is reachable, and which conditions must be satisfied in order to reach it.

Page 21: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Bayesian Belief Network

Since knowledge and data concerning natural processes includes many gaps or imprecise and faulty data we need methods to deal with them.The Bayesian Belief Network is a well known model to handle uncertainty and probability and to enable reasoning anyway.

3. The Inference Machine IV

Page 22: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Coloured Petri Nets

Modelling activities and processes is a very ambitious job in knowledge engineering. Several approaches have been tried to find proper way to describe procedures.In FLUMAGIS we will use one of the most famous models to implement activity simulations in the knowledge base: Coloured Petri Nets.

3. The Inference Machine V

Page 23: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

The FLUMAGIS Causal Network I

In the FLUMAGIS Causal Network all mentioned issues come together to provide reasoning about causes and effects in the water domain.

Based on an ontology we establish a network of causal nodes, which are chained by certain relationships.

The basic node class owns two properties to cover the relations “is caused by” and “has effects”. Using these reverse relations a net can be build up.

3. The Inference Machine VI

Class CausalNode of Node

Properties causingNodes: CausalNode (multiple)effectedNodes: CausalNode (multiple)

Page 24: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

The FLUMAGIS Causal Network II

Nodes can perform different tasks like representing deficits, potentials, actions, and aims.

Working with ontologies allows to define special node types (classes) according to each task. Each node type inherits basic relations of the CausalNode class.

3. The Inference Machine VII

Page 25: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

The FLUMAGIS Causal Network III

Examples of Node Types:

• StatusNodes represent certain states of objects, identified by specified attribute values.

• ActionNodes aim at a desired state

of objects. Furthermore they have a link to a certain Petri Net to execute the described action.

3. The Inference Machine VIII

Class ActionNode of CausalNode

Properties aimedNodes: AimNode (multiple)petriNet: ColouredPetriNet

Class StatusNode of CausalNode

Properties objectClasses: ObjectClass (multiple)attribute: ObjectAttributeallowedValues: AnyType (multiple)certainty: (unknown, likelihood, certain)

Page 26: March 2004 Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain A short introduction into theory and practice of creating knowledge

Reiner Borchert Knowledge Modelling and Decision Support in the Water Domain

Protégé - An AI Tool for the Real World

Thank you for listening patiently so far!

Now let’s move to the platform we have chosen to build up the FLUMAGIS knowledge base:

Protégé 2.0

an Open Source project of Stanford University, California. This software is totally free and extendable. We have created a lot of plug-ins to expand the program’s functionality.

3. The Inference Machine IX