All_CLIPS_Examples
所属分类:教育系统应用
开发工具:LISP
文件大小:56KB
下载次数:24
上传日期:2008-06-09 13:02:38
上 传 者:
realei
说明: 基于专家系统课程设计的CLISP实现实例
(Courses based on expert system design examples realize CLISP)
文件列表:
All CLIPS Examples\Examples\.DS_Store (12292, 2003-09-23)
All CLIPS Examples\Examples\animal.clp (14504, 2005-10-31)
All CLIPS Examples\Examples\auto.clp (5859, 2003-09-23)
All CLIPS Examples\Examples\cam.clp (7889, 2003-09-23)
All CLIPS Examples\Examples\Cholesterol\.DS_Store (6148, 2003-09-23)
All CLIPS Examples\Examples\Cholesterol\date.clp (756, 2003-09-23)
All CLIPS Examples\Examples\Cholesterol\loadall (129, 2003-09-23)
All CLIPS Examples\Examples\Cholesterol\patdata1 (1349, 2003-09-23)
All CLIPS Examples\Examples\Cholesterol\patdata2 (2328, 2003-09-23)
All CLIPS Examples\Examples\Cholesterol\project.clp (34985, 2003-09-23)
All CLIPS Examples\Examples\circuit1.clp (1473, 2003-09-23)
All CLIPS Examples\Examples\circuit2.clp (1776, 2003-09-23)
All CLIPS Examples\Examples\circuit3.clp (2486, 2003-09-23)
All CLIPS Examples\Examples\dilemma1.clp (6218, 2003-09-23)
All CLIPS Examples\Examples\dilemma2.clp (5872, 2003-09-23)
All CLIPS Examples\Examples\dilemma3.clp (7002, 2003-09-23)
All CLIPS Examples\Examples\electrnc.clp (13712, 2003-09-23)
All CLIPS Examples\Examples\mab.clp (12730, 2003-09-23)
All CLIPS Examples\Examples\nematode.clp (26436, 2003-09-23)
All CLIPS Examples\Examples\rpc.clp (5043, 2003-09-23)
All CLIPS Examples\Examples\rx7.clp (51257, 2003-09-23)
All CLIPS Examples\Examples\stove.clp (27294, 2003-09-23)
All CLIPS Examples\Examples\usedcar.clp (50232, 2003-09-23)
All CLIPS Examples\Examples\wine.clp (13278, 2003-09-23)
All CLIPS Examples\Examples\wordgame.clp (2999, 2003-09-23)
All CLIPS Examples\Examples\zebra.clp (7765, 2003-09-23)
All CLIPS Examples\Examples\Cholesterol (0, 2008-05-30)
All CLIPS Examples\Examples (0, 2008-06-09)
All CLIPS Examples (0, 2008-05-30)
*****************************************************************************
* *
* WARNING and DISCLAIMER *
* *
* This implementation the National Cholesterol Education Program guidelines *
* in CLIPS is intended purely for educational purposes. It was not *
* intended for actual use in a clinical setting. Rigorous evaluation and *
* validation has NOT been done. It is released to the public with *
* absolutely no warranty whatsoever regarding either the correctness of *
* the program, or its suitability for any purpose, whatsoever. The user *
* assumes all risks and liabilities from the use of this program. *
* *
* This program is neither supported nor maintained at this time. Work on *
* the program ended in May 1994. The program has not been updated since *
* that time. *
* *
*****************************************************************************
RUNNING THE KB
The program requires three files to run:
1) clips (executable)
2) date.clp (date conversion functions, must be loaded before project4)
3) project.clp (the rules and definitions)
Other files include
4) patdata1 (sample patient data)
5) patdata2 (sample patients from the NCEP workbook)
6) loadall (automatically loads and runs rules on all patients)
To run the program:
1) Put above file in a directory
2) start clips by typing "clips" at the prompt
3) then, at the CLIPS> (batch loadall)
to load all rules and run the test patients.
You will get prompts for missing data elements. Please input positive integers
or -1 for "no value".
BASIC STRUCTURE
Individual patients are stored as patterns of the type.
(patient1 (atribute1 VALUE1) (atribute2 VALUE2) ...)
This is used for both history attributes such as "smoking" as well as numeric
attributes such as "chol". Because CLIPS has a well developed default value
system, we elected to use defaults, rather than prompting for the handling of
missing history elements. The lab value handlers demonstrate prompting for
missing values.
Date information is stored as an integer which represents days since 1990.
Unlike CLASSIC and PROLOG, CLIPS has not intrinsic time or date functions.
This made computation of the current date tricky. CLIPS does support system
calls, but does not allow capture of the returned information. In order to
support date, a system call was executed which stored the date in a file.
CLIPS then open and reads the file and converts the value into a single
integer. In a production implementation of this system, a c program would be
written to provide date functions within CLIPS.
For processing of the individual patients, the (patient1 (...)) data structure
isconverted to a (patient2 (...)) template which includes a
numerically computed risk from the history atributes.
If lab values are missing, the physcian is prompted to enter a value. If -1
is entered the physician is prompted to order the appropriate
lab. The structure includes only latest lab value, although the multislot
capability of CLIPS allows for multiple lab values. This would make averaging
much more straight forward than in the PROLOG or CLASSIC implementation.
Reexamination of the NCEP decision logic revealed that pre-treatment lab values
were not required for correct evaluation of treatment response. Therefore,
pre-treatment condition, rather than pre-treatment lab value is used to
evaluate the adequacy of response.
Some parts of the guidelines call for multiple values to be reported and
averaged and for additional labs ordered if the results of the first
two labs disagree. The current logic does not caputre this.
Treatments are stored as treatment attrubutes which include the therapy,
and the date. Only diet and drug therapy are recorded. Fine distinctions
between levels of diet and types of medication were not included.
The logic currently only evaluates whether the latest lab is after the
start of therapy and the patient has had at least 6 months of therapy.
It does not handle the situation where the patient
has been on therapy for over 6 months, but the lab is 3 months old.
CONTROL OF LOGIC
As with the earlier implementations, the most difficult task was
controlling the flow of the logic. Because the careplan considers multiple
unrelated variables, it was difficult to limit the messages to appropriate
patients. For the CLIPS implementation, we utilized a state-transition model.
An attribute (state SSS) was created. It is initialized at aa. Then as rules
(which correspond to arrows between the boxes in the NCEP article) fire, they
explicitly change the state attribute. Rules only fire for patients in
certain states.
In addition, a (done XXX) attribute was added so that execution could be
stopped at the correct point if critical data were missing.
FURTHER INFORMATION
As I noted above, this project is not currently active. As such, there is
probably no question we could answer that is not apparent from the code
itself. Nonetheless, if you have questions, you can direct them to:
starren@cucis.columbia.edu
Hope you fine this interesting,
-- Justin Starren and Guochun Xie
近期下载者:
相关文件:
收藏者: