0% found this document useful (0 votes)
30 views

Lab4 Exercise Rules: Facts

The document describes rules for determining a patient's diagnosis based on their symptoms and other factors. It outlines 10 rules related to diagnosing conditions like fever, cough, rash, and establishes entities for patients, diseases, and other people. It provides guidance on refining the rules by normalizing entities and attributes.

Uploaded by

olivukovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Lab4 Exercise Rules: Facts

The document describes rules for determining a patient's diagnosis based on their symptoms and other factors. It outlines 10 rules related to diagnosing conditions like fever, cough, rash, and establishes entities for patients, diseases, and other people. It provides guidance on refining the rules by normalizing entities and attributes.

Uploaded by

olivukovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Lab4 Exercise

Rules:

Facts:
Ed has a very high fever.
Ed has a cough.
Alice doesn't have poison ivy.
Max says Alice has poison ivy.
Grace says Don is healthy.
Grace is a doctor.
Whooping cough is contagious.
Ed contacts Alice.

Step 1. Start by analysing at rules, identify the pieces of information that drive
the rules. Look at the effects that firing the rule has.

Rule 1: If a patient has a very high fever, the patient has a high fever.

LHS: patient->fever value very high


RHS: patient->fever value high

Rule 2: If a patient has whooping cough, the patient has a cough.

LHS: patient->whooping cough value true


RHS: patient->cough value true

Rule 3: If a patient has poison ivy, the patient has a rash.

LHS: patient->poison ivy value true


RHS: patient->rash value true

Rule 4: If a patient has a high fever and congestion, the patient has the flu.

LHS: (patient->fever value high) AND (patient-> congestion value true)


RHS: (patient->flu value true)

Rule 5: If a patient has a rash and no high fever, the patient has poison ivy.

LHS: (patient->cough value true) AND (patient-> fever value not very high)
RHS: (patient->whooping cough value true)

Rule 6: If a patient has no fever, no cough, and no rash, the patient is healthy.

LHS: (patient->fever value false) AND (patient->cough value false) AND (patient->
rash value false)
RHS: (patient->healthy value true)

Rule 7: If a patient has a cough and a very high fever, the patient has whooping cough.

LHS: (patient->cough value false) AND (patient-> fever value very high)
RHS: (patient->whooping cough value true)

Rule 8: If one patient has a particular disease which is contagious and that patient contacts
another patient, then the other patient has the disease.

LHS: (patient->contagious disease value true) AND (patient->contact with


otherpatient true)
RHS: (otherpatient->disease value patient->disease)
Rule 9: If a doctor says that a patient has a particular disease or is healthy, then what the
doctor says is true.

LHS: (otherperson indicates patient->disease value x) AND (otherperson->doctor


value true)
RHS: (patient->disease value x)

Rule 10: If a person says that a patient has a particular disease or is healthy and that is not
true of the patient, then that otherperson is not a doctor.

LHS: (otherperson indicates patient->disease x AND patient->disease value not= x)


OR (otherperson indicates patient->healthy value true and patient->healthy
value false)
RHS: (otherperson->doctor value false)

Step 2. Refine Rules. Pick out alternate values for same fields. Group together
fields describing entities to pick out entities.

Entities: e.g. patient, otherperson

Patient (fever, whooping cough, cough, poison ivy, rash, disease, otherperson
contact, otherperson comment)

Otherperson(doctor, disease) (doctor values true or false)

Alternate values for fields: e.g. fever – very high, high, none
Whooping cough – true, false

Step 3: Refine Again. Look at fields – find commonality, find identity.

E.g. Whooping cough, poison ivy, flu are all diseases. Have field disease.
Amend possible values for disease to be whooping cough, poison ivy, flu

Patient(name, fever, cough, disease, rash, otherperson contact, otherperson


comment)
Otherperson(name, doctor, disease) doctor values (true or false)
Disease(name, contagious) contagious values (true or false)

Step 4: Identify Rules that require user interaction.

Rule 9 and Rule 10 possibly.

Step 5: Build rules and test against data given. Then refine, test, refine test ….

You might also like