fuzzy expert system a simple tutorial by paco, wong pak kan
TRANSCRIPT
Fuzzy Expert System
A Simple TutorialBy Paco, WONG Pak Kan
2
Outline
• Overview of the fuzzy expert system shell• Installation guide
3
FUZZY EXPERT SYSTEM SHELL
4
Installati on ( Re a d t h e Re a d m e fi l e )
1. Install JRE x86 http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
2. Download and unzip the zip file3. Run xampp/setup_xampp.bat4. Run xampp/xampp_start.exe5. Access http://localhost/system6. Login as Tester:Tester7. To stop the system, run xampp/xampp_stop.exe
5
System Overview
PHP
Apache 2
MySQL
Modern Web Browser
(mainly Chrome and Firefox)
Java
Knowledge Base (XML files in folders)
For multiple user management
Provide UI page + Interaction with Java
Main Fuzzy Inference Engine
Storing the Fuzzy sets, Objects and
Rules
User Interface
6
Main Screen
7
Create a New Project
Project Name
CMSC5707
8
Open Project
Then select your new project.Click on the name, NOT the cross X
CMSC5707
9
Overview of Knowledge Base
ObjectsName
Type
Ask-first Flag
Prompt
Expected limits
...
Rules
name
antecedent part
weight
threshold
consequent part
certainty factorFuzzy Types
Definition
Fuzzy Classes
...
The implementation
10
Fuzzy Type
Item Definition Example
Fuzzy Type Fuzzy concept definition windy
Fuzzy Class(3 classes)
Three basic terms to describe the fuzzy type which is defined in the fuzzy type definition strong, normal, weak
Fuzzy Term(in rules)
Term composing of fuzzy class and hedge to describe the fuzzy set
If the wind is very strong, rather slim
• A variable type• Define a fuzzy concept (e.g. windy)
11
Fuzzy Type
12
Fuzzy Type
Name of fuzzy type
Name of the 3 levels
Membership functions of the 3 levels
Use the default if you are lazy
Fuzzy Type
Visualization of the membership functions
Edit or Delete
14
Objects
• Work like variable names• Various built-in types (e.g. numeric, single-valued), and also
the fuzzy type• Used in formulating rules
15
Type of Objects
• Fuzzy Type: Object which can be described in fuzzy term• Logical Type: Object which is either TRUE (YES) or FALSE (NO)
– Availability of Wi-Fi service• Single Type: Object which can have one value chosen from a
list of choices – Gender: either male or female
• Multiple Type: Object which can have several values chosen from a list of choices – Hostel: YC Sunshine, B&B London…,
• Numeric Type: Numeric data – BMI: body mass index
16
Feature of Objects
Item DescriptionObject Name The name of the object
Ask First YES/NO. If yes, the value of this object is inputted by the user. Otherwise, it is inferenced.
Prompt Prompt question
Type Variable type
Fuzzy Term Corresponding fuzzy term (if the type if fuzzy)
17
Goal Object
Rules
( RULE rule_name
IF ( antecedent_part )THEN consequent_part
) CERTAINTY IS certainty_factor
( RULE R_wind_temp1 IF ((temperature >25) AND (wind is strong))THEN weather is bad
) CERTAINTY is about 0.85
strongnormalslim
deepshallowzero
Any unique name easy to remember for you– but no space or system keyword
19
Rule
20
Edit in XML It does not check your syntax.
21
5 Rules
22
Inference Structure
Temperature
Wind
Feel Feel
Try this:1. Temperature = hot, Wind = slim2. Temperature = cold, Wind = strong3. Temperature = regular, Wind = regular
Anything wrong?If yes, how to fix?
Consultati on
24
Backup
Download for backup
25
Warnings and Suggesti ons
• Some features may not work in some browsers.• If you find bugs or have feature request
– Please report to me, and I will forward to the developers.– Your bug reports are greatly appreciated.
• Backup by downloading the XML files from time to time• If you mistakenly deleted your project (pressed the little red cross)
– The corresponding folder in knowledge_base is in fact NOT deleted so just copy it back
– Add back an entry to the database
• I will re-upload the system whenever a new and stable version is available (see the version number in the zip file).
26
Restore an Old Project
27
Restore an Old Project (cont.)
28
Summary
• Expert system shell– System architecture– Installation