chp02_KR (2)

download chp02_KR (2)

of 54

Transcript of chp02_KR (2)

  • 8/7/2019 chp02_KR (2)

    1/54

    KNOWLEDGE

    REPRESENTATION

    1

  • 8/7/2019 chp02_KR (2)

    2/54

    Knowledge,

    like love,is one of those words that

    everyone knows the meaning

    of, yet finds hard to define.

    Like love, knowledge has

    many meanings.

    Giarratano and Riley (1998)

  • 8/7/2019 chp02_KR (2)

    3/54

    Intelligence requires knowledgeIntelligence refers to the capacity to

    acquire and apply knowledge.

  • 8/7/2019 chp02_KR (2)

    4/54

    Knowledge is an understanding which is gained

    through

    experience; familiarity with the way to do something to

    perform a task;

    an accumulation of facts, procedural rules or

    heuristics.

  • 8/7/2019 chp02_KR (2)

    5/54

    Knowledge can have many meanings. It is not justthe body of facts and principles accumulated by

    human-kind or the act, or state of knowing, but alsothe familiarity with languages, concepts,procedures, rules, ideas, abstractions, places,customs, facts and associations as well as

    information(Patterson, 1990)

  • 8/7/2019 chp02_KR (2)

    6/54

    Facts

    Procedural

    Rules

    HeuristicKNOWLEDGE

  • 8/7/2019 chp02_KR (2)

    7/54

    Facts

    A statement that relates a certain element of

    truth about a subject matter or a domain Example:

    milk is white

    the sun rises in the East

    and sets in the West

  • 8/7/2019 chp02_KR (2)

    8/54

    Procedural rules

    A rule that describes a sequence of relations

    relative to the domain Example:

    If the gas gauge shows

    quarter-full or less,

    then look for a gasoline

    station

  • 8/7/2019 chp02_KR (2)

    9/54

    Heuristic

    Is a rule of thumb based on years of experience.

    Example: If a person drives no more

    than 5 miles above the

    speed limit, then that

    person is not likely to be

    stopped for speeding.

  • 8/7/2019 chp02_KR (2)

    10/54

    Priori

    Knowledge which cannot be denied

    Considered to be universally true

    Logic statements, mathematical laws

    e.g. everybody will die, ice is cold

    Posteriori

    Knowledge derived from the senses, which can be true or false.

    The truth can be denied by sensory experience or on the basis of newknowledge

  • 8/7/2019 chp02_KR (2)

    11/54

    Tacit

    Unconscious knowledge that cannot be expressed by language spontaneous actions without any significant amount of effort

    Eyes blinking, breathing

    Explicit

    Documented knowledge

  • 8/7/2019 chp02_KR (2)

    12/54

    Basic Types of

    Knowledge

    Procedural(how to do)

    Structural

    (mental model)

    Meta

    Knowledge(about other)

    Heuristic

    (shortcut)

    Declarative

    (what it is)

  • 8/7/2019 chp02_KR (2)

    13/54

    Procedural

    Knowledge on the process of doing something

    It provides direction on how to do something via rules, strategies,

    agendas as well as procedures

    Declarative

    A passive knowledge expressed as statements of facts about theworld

  • 8/7/2019 chp02_KR (2)

    14/54

    Meta-knowledge

    Knowledge about knowledge

    Knowledge on knowing which knowledge to use to solve a problem Always used by experts to enhance the efficiency of problem solving

    Heuristic

    Knowledge which is gained through experience and translated into

    instinct or intuition

    Often displayed individual expertise

  • 8/7/2019 chp02_KR (2)

    15/54

    Procedural knowledge to boil an egg we must do then

    Declarative knowledge

    my room no. is 2103

    Meta-knowledge if you want to know about heart attack, please read this book

    Heuristic knowledge the clouds looks dark and heavy, heavy rain might fall

    Structural Knowledge a cat has four legs

  • 8/7/2019 chp02_KR (2)

    16/54

    Data

    Information

    + CT

    Knowledge

    This is

    CTsphone

    no.!

  • 8/7/2019 chp02_KR (2)

    17/54

    Meta

    Knowledge

    Knowledge

    Information

    Data

    Noise

  • 8/7/2019 chp02_KR (2)

    18/54

    DocumentedExp:printed &

    electronic media

    Not documented

    Exp: experience

  • 8/7/2019 chp02_KR (2)

    19/54

    Knowledge representation is

    a science of translating

    actual knowledge intoa format that can be

    used by the computer.

  • 8/7/2019 chp02_KR (2)

    20/54

    Knowledge Source

    Knowledge

    Representation

    Knowledge Usage

  • 8/7/2019 chp02_KR (2)

    21/54

    Why needs to represent knowledge?...

    You are given a projectto develop a systemthat can diagnoseheart attack?

    How can you get information about heart attack?

    How do you understand the knowledge?

    Which knowledge to get into computer?

  • 8/7/2019 chp02_KR (2)

    22/54

    KnowledgeRepresentation

    Methods Logic

    ject

    Rule

  • 8/7/2019 chp02_KR (2)

    23/54

    OAV ObjectAttributeValue

    Color Gold

    Object Attribute Value

  • 8/7/2019 chp02_KR (2)

    24/54

    Using fact : form of declarative knowledge

  • 8/7/2019 chp02_KR (2)

    25/54

    Refer to particular properties value of object Eg: The balls color is red (assign red to the balls

    color) The object can be physical (eg: car, books) or

    abstract (eg: love, hobby).

    The value can be numerical, string or Boolean!.

    It could be either single or multi valued fromdifferent attributes and objects.

  • 8/7/2019 chp02_KR (2)

    26/54

    Colour Gold

    Object Attribute Value

    Car Colour

    Gol

    d

  • 8/7/2019 chp02_KR (2)

    27/54

    Fact :=: The chairs color is red and priced at RM35.00

    CHAIR

    RED

    RM 35.00

    Color

    Price

    Object Attribute Value

  • 8/7/2019 chp02_KR (2)

    28/54

    Fact :=: I have a brother named Johnny. The 8years-old brother likes to play tennis and football.

    johnny

    male

    8 years old

    gender

    age

    tennis

    hobby

    football

  • 8/7/2019 chp02_KR (2)

    29/54

    Discussion Describe aboutDoraemon

  • 8/7/2019 chp02_KR (2)

    30/54

    Semantic Network

    Animals

  • 8/7/2019 chp02_KR (2)

    31/54

    Definition method of knowledge representation using a graph made up

    of nodes and arcs

    Graphical view of problems important objects,properties and relationships.

    Nodes represent objects & arcs represent therelationship.

    Arcs are commonly labeled with terms IS-A orHAS

  • 8/7/2019 chp02_KR (2)

    32/54

    FACT : Parrot is a bird. Typically bird has wings and travel by

    flying. Bird category falls under animal kingdom. All animalrequires air to breathe. Ostrich is a bird but travels by walking.

    AirAnimalBird

    Wings

    Parrot

    Ostrich

    Walk

    Fly

    is-a

    trave

    l

    trave

    l

    has

    is-a

    breathe

  • 8/7/2019 chp02_KR (2)

    33/54

    Mammals

    Human

    Female

    Male

    Two legs

    Mariam

    AhmadSystem

    Analyst

    Wheel

    chair

    Degree

    BIT(Hons)

    Walkis-a

    has

    mother-of

    has

    is-a

    is-ais-a

    is-a

    travel-by

    travel-by

  • 8/7/2019 chp02_KR (2)

    34/54

    Frame

    Definition :: a datastructure for representingstereotypical knowledge ofsome concept or object

  • 8/7/2019 chp02_KR (2)

    35/54

    An extension version of semantic network calledschema (proposed by Barlett, 1932).

    Basic concept of object oriented programming

    (proposed byMinsky, 1975). Class frame general characteristics of some

    common objects (Eg: class frame bird refer tocommon properties of bird).

    Instance frame to describe unique characteristicfrom class frame (Eg: class ostrich from classframe bird)

  • 8/7/2019 chp02_KR (2)

    36/54

    Example

    Frame Name:

    B

    IRDProperties:

    Color =

    Wings = 2

    Flies = True

    Frame Name: OSTRICH

    Properties:

    Color =

    brown/dark

    Wings = 2

    Flies = False

    Class Name: BIRD

  • 8/7/2019 chp02_KR (2)

    37/54

    Two l t

    of fr

    Slot

    Is the characteristic

    that describe an

    object

    Exp: color, food, no.of wings,

    Facet

    Value for slot

    Exp: yellow, 1,

    worm,

  • 8/7/2019 chp02_KR (2)

    38/54

  • 8/7/2019 chp02_KR (2)

    39/54

    Rule

    Definition :: Rules a knowledge structure thatrelates some known information to other

    information and that can be concluded or inferredto be known

  • 8/7/2019 chp02_KR (2)

    40/54

    Is a form of procedural knowledge associates given information to some action.

    Structure connects antecedents (premises)and consequents (conclusions).

  • 8/7/2019 chp02_KR (2)

    41/54

    Statement IF antecedent and THEN consequent

    IF THEN

    IFthirsty THEN drink_a_water

  • 8/7/2019 chp02_KR (2)

    42/54

    Example: Diagnosing strep throat (knowledge base)

    Rule 1:

    IF x has a sore throatAND suspect bacterial infectionTHEN patient has strep throat

    Rule 2:IF x temperature is > 37 cTHEN x has a fever

    Rule 3:IF x has been sick > a monthAND x has a feverTHEN suspect bacterial infection

  • 8/7/2019 chp02_KR (2)

    43/54

    Logic

  • 8/7/2019 chp02_KR (2)

    44/54

    Oldest form of KR in computer Concerned with the truthfulness of a chain of

    statements 2 kinds of logic:

    Propositional Logic

    Predicate Calculus

    Implemented in PR

    OLOG

    (Programming inLogic) language

  • 8/7/2019 chp02_KR (2)

    45/54

    E.g.it_is_raining

    kitty_is_outside

    kitty_gets_wet

    Elementary propositions or atomic sentences cannot bebroken down into smaller meaningful units.

    Often represented using symbols, e.g. P, Q,A etc.

  • 8/7/2019 chp02_KR (2)

    46/54

    Manipulate basic Boolean logic operations (AND,OR, NOT, IMPLIES, EQUIVALENCE.)

    E.g.:

    Normal :Today is raining, therefore I will miss theclass

    Logic : today_raining i_will_miss_class

    Combining two or more PL forms compound propositions(CP) or formulae.

    CP consists of propositions and logical operators.

  • 8/7/2019 chp02_KR (2)

    47/54

    Logical operators:

    General Name Formal Name Symbols

    Not Negation

    And Conjunction

    Or DisjunctionIf Then/Implies Conditional

    If and only if Biconditional

    m

    p

  • 8/7/2019 chp02_KR (2)

    48/54

    Propositional Logic Example Example 1:

    Normal:The sky is blue and windy. It is really great for picnic

    Logic: sky_blue windy great_for_picnic

    Example 2: Normal: If the weather is cloudy, then it will be raining. If it is

    raining, people will stay at home.

    Logic: (weather_cloudy raining) (raining people_stay_home).

    Example 3: Normal: I will rather stay if and only if it is raining.

    Logic: i_will_staym raining

  • 8/7/2019 chp02_KR (2)

    49/54

    Propositional Logic Discussion

    Question: Transform each of the following statements

    into propositional logic:

    a) Today is Tuesday and it is a very lovely day.

    b) It rained yesterday, therefore I've missed my lecture.

    c) All men are mortals.

    d) Sintok is a district within Kedah

  • 8/7/2019 chp02_KR (2)

    50/54

    Nested formulae important to express the actual meaning

    of a wff. E.g:

    it_is_raining pussy_is_outsideppussy_gets_wet

    (1) (it_is_rainingpussy_is_outside) ppussy_gets_wet

    (2) it_is_raining (pussy_is_outsideppussy_gets_wet)

  • 8/7/2019 chp02_KR (2)

    51/54

    Order of precedence

    m

    p

    The above determines the principal operator to split aformulae into smaller units.

    Purpose: to indicate the actual meaning of a formulae.

  • 8/7/2019 chp02_KR (2)

    52/54

    Truth table

    P Q P PQ PQ PpQ PmQ

    T T F T T T T

    T F F F T F F

    F T T F T T F

    F F T F F T T

  • 8/7/2019 chp02_KR (2)

    53/54

    Truth table Tautology formula is always T regardless of the truth

    values of its propositions.

    E.g. (P(PpQ))pQ Contingent formula is sometimes T and sometimes F,

    depending on the truth values of its propositions E.g. (AB)pC

    Inconsistent formula is always F regardless of the truth

    values of its propositions E.g. P(P)

  • 8/7/2019 chp02_KR (2)

    54/54

    Limitations:

    Cannot express universality

    Cannot express existential