270 likes | 417 Views
4.3 Xpert - an inductive expert system shell ( full course ). 1 . Introduction 1.1 Inductive knowledge syntheses 1.2 General description of Xpert subsystem 1.3 Xpert menu and corresponding actions 2. Working with system in expert mode 2.1 Specification of the attributes
E N D
4.3 Xpert - an inductive expert system shell (full course) 1. Introduction 1.1 Inductive knowledge syntheses 1.2 General description of Xpert subsystem 1.3 Xpert menu andcorresponding actions 2. Working with system in expert mode 2.1 Specification of the attributes 2.2 Adding examples 2.3 Changes in expert knowledge base 2.4 Decision tree 3. Derivation mechanism 3.1 Expertsystem and computat. model connections 3.2 The types of of attributes and actions 3.3 Joining expert knowledge bases 4. Expertsystem and computat. model cooperation 4.1 Modes of cooperations 4.2 The conceptexpert 5. Additional information 5.1 The structure of expert knowledge file 5.2 Restrictions 5.3 Error messages Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Expert systems Knowledge base Inference engine User Architecture of expert system Structured information Unstructured information Expert- systems Conventional calculations Human thinking process Expertsystem as abridge Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Deductive ja inductive learning Deductive learning:Rules are given, which are correct in general case. Derivation of the situation or behavior,what is right for the individual case. If … Then … Kui … Siis ... If the shop is located in the old down Then you have problems with transport Inductive learning: A set ofexamples are given about typical situations or decisions. The general rule is found using these examples. Rules depends *from the algorithm of of the inference engine *from the amount of examples If the algorithm is “effective” and the number of examples is “informative”, then the result is a “good” rule. Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Expert System Shell Xpert To build an expert system means to create an expert knowledge base i.e. to specify a number of examples about how the expert system will behave in solving problems of the given domain.If a problem can be described by means of the attributes A,B,C,…, RESULT, then the examples have the following meaning: IF A=a1 AND B=b1 AND C=c1 AND … THEN RESULT=r1 IF A=a2 AND B=b2 AND C=c2 AND … THEN TULEMUS=r2 etc. Example: If the road is dry and the visibility is more than 100 m, the advisable speed is not more than 90 km/h; If the road is dry and the visibility is less than 100 m, then-not more than 80 km/h; If the road is wet and the visibility is more than 100 m, then-not more than 90 km/h; If the road is wet and the visibility is less than 100 m, then-not more than 70 km/h; If the road is sleety,then-notmore than 50 km/h. Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Basic concepts Attribute - a factor or feature of the problem under consideration.It has a name, values andit can also have a related text.An attribute can also express a solution of a problem, e.g. "Accept the candidate for the job". In this case the attribute is called a result attribute. Example – a condition with a certain conclusion. The conclusion can be a decision, a diagnosis, a piece of advice, etc. Each example describes a particular situation. If in a certain situation there are some factors with no influence to the conclusion, then the appropriate example has special don't care values (“-") corresponding to these attributes. Expert knowledge base – For describing a problem, usually a set of examples is needed. This set of examples is called expert knowledge base. Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Cooperation between Expertsystem and Solver roadvisibility ? < RESULT 1 dryover 100 m speed=[km/h] speed<=90 correct speed 2 dryover 100 m speed=[km/h] speed>90 wrong speed 3 dry lessthan 100m speed=[km/h] speed<=80 correct speed 4 drylessthan 100m speed=[km/h] speed>80 wrong speed ... There exists 4 types of attributes: - choice attribute - RESULT attribute - message attribute - comparison attribute Chaining expert knowledge bases. RESULT attribute can have a value #<name_of_expert_KB> #road2.exp Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Optimization of expert knowledge Example: HEIGTH HAIREYES Result 1 shortblond blue + 2 tallblond brown - 3 tallred blue+ 4 shortdark blue - 5 talldark blue - 6 tallblond blue + 7 talldark brown - 8 shortblond brown - Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
HEIGTH short tall HAIR HAIR blond dark blond red dark - EYES EYES + - blue brownbrown blue - + - + HAIR blond red dark - EYES + blue brown - + Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Algoritm ID3 (Iterative Dichotomizer 3) Ross Quinlan 1979 Let we have a set of examples and a set of attributes. The informative value of the set of the examples (about result attribute) is: Io=-Σ pilog2pi , where pi is proportion of the result of Iclass. We can find the informative value of the attribute I1= Σqnin , where qn is proportion of the examples with value n. Algorithm selects an attribute whose value is the maximum of the following subtraction: Io-I1 Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Example: knowledge base with 8 examples I0=-3/8log23/8-5/8log25/8=0.954 I(heigth=tall)= -2/5log22/5-3/5log23/5=0.971 I(heigth=short)= -1/3log21/3-2/3log22/3=0.918 Iheigth=5/8*0.971+3/8*0.918=0.951 I0-Iheigth=0.954-0.951= 0.003 Ihair=3/8*0+1/8*0+4/8*1=0.5 I0-Ihair=0.954-0.5= 0.454 I0-Ieyes=0.954-0.607= 0.347 Max! – derivational stem is hair hair blond red dark eyes + - blue brown + - Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Fail XTREE.$$$ Expert knowledge base name: HAIR: blond -> EYES: blue -> RESULT: + brown -> RESULT: - red -> RESULT: + dark -> RESULT: - End of tree Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Optimization of expert knowledge HEIGTHAIR EYES Result 1 shortblond blue + 2 tallblond brown - 3 tallred blue + 4 - dark blue - 5tallblond blue + 6talldark brown - 7shortblond brown - HEIGTHHAIR EYES HEALTH Result 1 - - - sick - 2 shortblond blue okey + 3tallblond brownokey - 4tallred blue - + 5- dark blue okey - 6tallblond blue okey + 7talldark brownokey - 8shortblond brownokey - Clashing examples: 1 4 Save with clashes? (Y/N) Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
Xpert and Solver interface Solver Xpert … I calculations ? results … … II calculations … … … results Concept expert: ex_base text result undefined ex_base -> result {modexp} Masinprojekteerimine * A.Kalja * Arvutitehnika instituut
ROAD.EXP ROAD RESULT glazed frost 0.1 trampled snow 0.2 slushy snow 0.3 frozen snow 0.4 splash 0.3 wet and dusty 0.4 wet asphalt 0.5 dry gravel 0.6 dry asphalt 0.7 !mi speed !mi react_time acceleration=-9.81*fr_factor ROAD expert ex_base=‘ROAD’ result=fr_factor R move [km/h]=speed t=react_time A movea v1=0 v0=R.v a=acceleration Br_distance=R.s+A.s ?Br_distance Masinprojekteerimine * A.Kalja * Arvutitehnika instituut