Kuliah Sistem Pakar Pertemuan V “Representasi Pengetahuan”

37
Kuliah Sistem Pakar Kuliah Sistem Pakar Pertemuan V Pertemuan V “Representasi Pengetahuan” “Representasi Pengetahuan”

description

Kuliah Sistem Pakar Pertemuan V “Representasi Pengetahuan”. Proses Rekayasa Pengetahuan ( Knowledge Engineering Process). Sumber Pengetahuan. Validasi Pengetahuan. Akuisisi Pengetahuan. Basis Pengetahuan. Representasi Pengetahuan. Pengkodean. Justifikasi Penjelasan. Inferensi. - PowerPoint PPT Presentation

Transcript of Kuliah Sistem Pakar Pertemuan V “Representasi Pengetahuan”

Page 1: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Kuliah Sistem Pakar Kuliah Sistem Pakar Pertemuan VPertemuan V

“Representasi “Representasi Pengetahuan”Pengetahuan”

Page 2: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Proses Rekayasa PengetahuanProses Rekayasa Pengetahuan ((Knowledge Engineering Process)Knowledge Engineering Process)

Validasi Pengetahuan

SumberPengetahuan

RepresentasiPengetahuan

Basis Pengetahuan

JustifikasiPenjelasan

Inferensi

Akuisisi Pengetahuan

Pengkodean

Page 3: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Knowledge Knowledge RepresentationRepresentation

Knowledge RepresentationKnowledge Representation is concerned with is concerned with storing large bodies of useful information in a storing large bodies of useful information in a symbolic format.symbolic format. Most commercial ES are Most commercial ES are rule-based systemsrule-based systems

where the information is stored as rules.where the information is stored as rules. Frames may also be used to complement rule-based Frames may also be used to complement rule-based

systems.systems.

Page 4: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Tipe-tipe Pengetahuan Tipe-tipe Pengetahuan

berdasar Sumberberdasar Sumber

Deep KnowledgeDeep Knowledge(formal knowledge)(formal knowledge)

Shallow /Surface KnowledgeShallow /Surface Knowledge(non formal knowledge)(non formal knowledge)

Page 5: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Penjelasan ………Penjelasan ………

Deep knowledge Deep knowledge atauatau pengetahuan formal, pengetahuan formal, pengetahuan bersifat umum yangpengetahuan bersifat umum yang terdapat dalam sumber terdapat dalam sumber pengetahuan tertentu (buku, jurnal, buletin ilmiah dsb) pengetahuan tertentu (buku, jurnal, buletin ilmiah dsb) dan dapat diterapkan dalam tugas maupun kondisi dan dapat diterapkan dalam tugas maupun kondisi berbeda. berbeda.

Shallow knowledge Shallow knowledge atauatau pengetahuan non formal, pengetahuan non formal, pengetahuan-pengetahuan praktis dalam bidang tertentupengetahuan-pengetahuan praktis dalam bidang tertentu yang diperoleh seorang pakar pengalamannya pada yang diperoleh seorang pakar pengalamannya pada bidang dalam jangka waktu cukup lama.bidang dalam jangka waktu cukup lama.

Page 6: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Pengetahuan HeuristikPengetahuan Heuristik

Pengetahuan ProseduralPengetahuan Prosedural

Pengetahuan DeklaratifPengetahuan Deklaratif

Tipe-tipe Pengetahuan berdasar Tipe-tipe Pengetahuan berdasar Cara MerepresentasikanCara Merepresentasikan

Page 7: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Representasi PengetahuanRepresentasi Pengetahuan

Propotional LogicPropotional Logic (logika proposional)(logika proposional) Semantic NetworkSemantic Network (jaringan semantik)(jaringan semantik) Script, List, Table, dan TreeScript, List, Table, dan Tree Object, Attribute, dan ValuesObject, Attribute, dan Values Production Rule Production Rule (kaidah produksi)(kaidah produksi) FrameFrame

Page 8: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Representation in Logic andRepresentation in Logic andOther SchemasOther Schemas

General form of any logical processGeneral form of any logical process Inputs (Premises)Inputs (Premises) Premises used by the logical process Premises used by the logical process

to create the output, consisting of to create the output, consisting of conclusions (inferences)conclusions (inferences)

Facts known true can be used to derive Facts known true can be used to derive new facts that also must be truenew facts that also must be true

Page 9: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Two Basic Forms of Computational Logic Two Basic Forms of Computational Logic Propositional logic (or propositional calculus) Propositional logic (or propositional calculus) Predicate logic (or predicate calculus)Predicate logic (or predicate calculus)

Page 10: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Symbols represent propositions, premises or Symbols represent propositions, premises or conclusionsconclusionsStatement: A = The mail carrier comes Monday Statement: A = The mail carrier comes Monday

through Friday. through Friday.

Statement: B = Today is Sunday.Statement: B = Today is Sunday.

Conclusion: C = The mail carrier will not come Conclusion: C = The mail carrier will not come today.today.

Propositional logic: limited in representing Propositional logic: limited in representing real-world knowledgereal-world knowledge

Page 11: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Propositional LogicPropositional Logic

A proposition is a statement that is either A proposition is a statement that is either truetrue or or falsefalse

Once known, it becomes a premise that can be used Once known, it becomes a premise that can be used to derive new propositions or inferencesto derive new propositions or inferences

Rules are used to determine the truth (T) or falsity Rules are used to determine the truth (T) or falsity (F) of the new proposition(F) of the new proposition

Page 12: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Propotional LogicPropotional Logic

Logic dapat digunakan untuk melakukan penalaran :Logic dapat digunakan untuk melakukan penalaran :

  Contoh :Contoh :Pernyataan A = Pernyataan A = Pak Pos datang hari Senin Pak Pos datang hari Senin

sampai Sabtusampai SabtuPernyataan B = Hari ini hari MingguPernyataan B = Hari ini hari MingguKesimpulan C = Pak Pos tidak akan datang hari Kesimpulan C = Pak Pos tidak akan datang hari

iniini

Proses Logik

InputPremise

atauFakta-Fakta

Output Inferensi

atauKonklusi

Page 13: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Predicate CalculusPredicate Calculus Predicate logic breaks a statement down Predicate logic breaks a statement down

into component parts, an object, object into component parts, an object, object characteristic or some object assertioncharacteristic or some object assertion

Predicate calculus uses variables and Predicate calculus uses variables and functions of variables in a symbolic logic functions of variables in a symbolic logic statementstatement

Predicate calculus is the basis for Prolog Predicate calculus is the basis for Prolog (PROgramming in LOGic)(PROgramming in LOGic)

Prolog Statement ExamplesProlog Statement Examples comes_on(mail_carrier, monday).comes_on(mail_carrier, monday). likes(jay, chocolate).likes(jay, chocolate).

(Note - the period “.” is part of the statement)(Note - the period “.” is part of the statement)

Page 14: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Merupakan gambaran pengetahuan Merupakan gambaran pengetahuan berbentuk grafis dan menunjukkan berbentuk grafis dan menunjukkan hubungan antar berbagai obyek.hubungan antar berbagai obyek.

Obyek, berupa benda Obyek, berupa benda atauatau peristiwa peristiwa Nodes ObyekNodes Obyek Arc (Link) Keterhubungan Arc (Link) Keterhubungan

(Relationships) (Relationships)

* * is ais a

* has a* has a

Jaringan SemantikJaringan Semantik

Page 15: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

1515

Contoh : Contoh : 1)1)

Joe

Boy

Kay

Woman

Food

HumanBeing

School

Hasa child

NeedsGoes to

Is a

Is a

Is a

Is a

Page 16: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

2)2)

MERCEDESBENZ

JERMANPERAK

MOBIL SAM

GOLF

OLAH-RAGA

WAKILPRESDIR

ACME

AJAX

KAYLAKI-LAKI

MANUSIA

MAKANAN

PEREM-PUAN

ANAKLAKI-LAKI

JOESEKOLAHpergi ke

adalah

adalah adala

h

perlu

adalah

mempunyaianak

kawindengan

punya jabatanbekerja di

anakperusahaan

bermain

adalah

merk

buatan

berwarna

adalah

Page 17: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Script, List, Table, dan TreeScript, List, Table, dan Tree

Page 18: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Scripts Scripts

SCRIPTSCRIPT,, skema representasi pengetahuan yang skema representasi pengetahuan yang menggambarkan urutan dari kejadian. Elemen-elemen menggambarkan urutan dari kejadian. Elemen-elemen script terdiri dari :script terdiri dari :

Elements include Elements include Entry ConditionsEntry Conditions PropsProps RolesRoles Tracks Tracks ScenesScenes

Contoh : Script “Ujian Akhir Semester”Contoh : Script “Ujian Akhir Semester”

Page 19: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

LIST,LIST, daftar tertulis dari item-item yang saling daftar tertulis dari item-item yang saling berhubungan.berhubungan.

Umumnya digunakan untuk merepresentasikan Umumnya digunakan untuk merepresentasikan hirarki pengetahuan dimana suatu obyek hirarki pengetahuan dimana suatu obyek dikelompokan, dikategorikan sesuai dengandikelompokan, dikategorikan sesuai dengan Rank or Rank or RelationshipRelationship

Contoh : Contoh : berupa daftar orang yang anda kenal, berupa daftar orang yang anda kenal, benda-benda yang harus dibeli di pasar swalayan, benda-benda yang harus dibeli di pasar swalayan, hal-hal yang harus dilakukan minggu ini, atau hal-hal yang harus dilakukan minggu ini, atau produk-produk dalam suatu katalog.produk-produk dalam suatu katalog.

ListList

Page 20: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

DECISION TABLE,DECISION TABLE, pengetahuan yang diatur dalam pengetahuan yang diatur dalam format lembar kerja atau format lembar kerja atau spreadsheetspreadsheet, menggunakan , menggunakan kolom dan baris.kolom dan baris.

Attribute List Attribute List

Conclusion List Conclusion List

Different attribute configurations are matched against Different attribute configurations are matched against the conclusionthe conclusion

Contoh :… ?Contoh :… ?

Decision TabelDecision Tabel

Page 21: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Decision TreesDecision Trees

DECISION TREEDECISION TREE,, treetree yang berhubungan dengan yang berhubungan dengan decision decision tabletable namun sering digunakan dalam analisis sistem komputer namun sering digunakan dalam analisis sistem komputer (bukan sistem AI). (bukan sistem AI).

Contoh :… ?Contoh :… ? Related to tables Related to tables Similar to decision trees in decision theorySimilar to decision trees in decision theory Can simplify the knowledge acquisition Can simplify the knowledge acquisition

processprocess Knowledge diagramming is frequently more Knowledge diagramming is frequently more

natural to experts than formal natural to experts than formal representation methodsrepresentation methods

Page 22: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Object, Attribute, ValuesObject, Attribute, Values

OBJECTOBJECT : : OBJECTOBJECT dapat berupa fisik atau konsepsi. dapat berupa fisik atau konsepsi.

ATTRIBUTEATTRIBUTE : : ATTRIBUTEATTRIBUTE adalah karakteristik dari object. adalah karakteristik dari object.

VALUESVALUES : : VALUESVALUES adalah ukuran spesifik dari attribute dalam adalah ukuran spesifik dari attribute dalam

situasi tertentu situasi tertentu

Page 23: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Object Attribute ValuesObject Attribute Values

RumahRumah Kamar tidurKamar tidur 2,3,4, dsb.2,3,4, dsb.

RumahRumah WarnaWarna Hijau, Putih, Hijau, Putih, Coklat dsb.Coklat dsb.

Diterima di Diterima di UniversitasUniversitas

Nilai Ujian masukNilai Ujian masuk A, B, C atau DA, B, C atau D

Pengendalian Pengendalian persedian persedian

Level persediaanLevel persediaan 15, 20, 25, 35, 15, 20, 25, 35, dsb.dsb.

Kamar tidurKamar tidur UkuranUkuran 3x4, 5x6, 4x5, 3x4, 5x6, 4x5, dsb.dsb.

Page 24: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Production RulesProduction Rules

PRODUCTION RULES:PRODUCTION RULES: Production system dikembangkan oleh Production system dikembangkan oleh

Newell dan Simon sebagai model dari Newell dan Simon sebagai model dari kognisi manusia. Ide dasar dari sistem ini kognisi manusia. Ide dasar dari sistem ini adalah pengetahuan digambarkan sebagai adalah pengetahuan digambarkan sebagai production rules dalam bentuk production rules dalam bentuk pasangan pasangan kondisi-aksikondisi-aksi..

Page 25: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Production RulesProduction Rules Condition-Action PairsCondition-Action Pairs

IF this condition (or premise or antecedent) IF this condition (or premise or antecedent) occurs,occurs,

THEN some action (or result, or conclusion, or THEN some action (or result, or conclusion, or consequence) will (or should) occurconsequence) will (or should) occur

IF the stop light is red AND you have stopped, IF the stop light is red AND you have stopped, THEN a right turn is OKTHEN a right turn is OK

Page 26: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Each production rule in a knowledge base represents Each production rule in a knowledge base represents an an autonomous chunkautonomous chunk of expertise of expertise

When combined and fed to the inference engine, the When combined and fed to the inference engine, the set of rules behaves synergisticallyset of rules behaves synergistically

Rules can be viewed as a simulation of the cognitive Rules can be viewed as a simulation of the cognitive behavior of human expertsbehavior of human experts

Rules represent a Rules represent a modelmodel of actual human behavior of actual human behavior

Page 27: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Contoh : Production RulesContoh : Production Rules RULE 1 : RULE 1 : JIKA konflik internasional mulaiJIKA konflik internasional mulai

MAKA harga emas naikMAKA harga emas naik

   RULE 2 : RULE 2 : JIKA laju inflasi berkurangJIKA laju inflasi berkurang

MAKA harga emas turunMAKA harga emas turun

RULE 3RULE 3 : : JIKA konflik internasional JIKA konflik internasional berlangsung lebih dari tujuh berlangsung lebih dari tujuh

hari hari dandan JIKA konflik terjadi JIKA konflik terjadi

di Timur di Timur TengahTengahMAKA beli emasMAKA beli emas

Page 28: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Production RulesProduction Rules

Condition-Action PairsCondition-Action Pairs IF this condition (or premise or IF this condition (or premise or

antecedent) occurs,antecedent) occurs, THEN some action (or result, or THEN some action (or result, or

conclusion, or consequence) will (or conclusion, or consequence) will (or should) occurshould) occur

IF the stop light is red AND you have IF the stop light is red AND you have stopped, THEN a right turn is OKstopped, THEN a right turn is OK

Page 29: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Each production rule in a Each production rule in a knowledge base represents an knowledge base represents an autonomous chunkautonomous chunk of of expertise expertise

When combined and fed to the When combined and fed to the inference engine, the set of inference engine, the set of rules behaves synergisticallyrules behaves synergistically

Rules can be viewed as a Rules can be viewed as a simulation of the cognitive simulation of the cognitive behavior of human expertsbehavior of human experts

Rules represent a Rules represent a modelmodel of of actual human behavioractual human behavior

Page 30: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Forms of RulesForms of Rules

IF premise, THEN conclusionIF premise, THEN conclusion IF your income is high, IF your income is high, THEN your chance of being audited by the THEN your chance of being audited by the

IRS is highIRS is high

Conclusion, IF premiseConclusion, IF premise Your chance of being audited is high, IF Your chance of being audited is high, IF

your income is highyour income is high

Page 31: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Inclusion of ELSEInclusion of ELSE IF your income is high, OR your deductions are IF your income is high, OR your deductions are

unusual, THEN your chance of being audited by unusual, THEN your chance of being audited by the IRS is high, OR ELSE your chance of being the IRS is high, OR ELSE your chance of being audited is lowaudited is low

More Complex RulesMore Complex Rules IF credit rating is high AND salary is more than IF credit rating is high AND salary is more than

$30,000, OR assets are more than $75,000, AND $30,000, OR assets are more than $75,000, AND pay history is not "poor," THEN approve a loan up pay history is not "poor," THEN approve a loan up to $10,000, and list the loan in category "B.”to $10,000, and list the loan in category "B.”

Action part may have more information: THEN Action part may have more information: THEN

"approve the loan" and "refer to an agent""approve the loan" and "refer to an agent"

Page 32: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

FrameFrame

FRAMEFRAME adalah struktur data yang berisi semua adalah struktur data yang berisi semua pengetahuan tentang obyek tertentu. Pengetahuan pengetahuan tentang obyek tertentu. Pengetahuan ini diatur dalam suatu struktur hirarkis khusus yang ini diatur dalam suatu struktur hirarkis khusus yang memperbolehkan diagnosis terhadap independensi memperbolehkan diagnosis terhadap independensi pengetahuan. Frame pada dasarnya adalah aplikasi pengetahuan. Frame pada dasarnya adalah aplikasi dari pemrograman berorientasi objek untuk AI dan dari pemrograman berorientasi objek untuk AI dan ES.ES.

Setiap frame mendefinisikan satu objek, dan terdiri Setiap frame mendefinisikan satu objek, dan terdiri dari dua elemen : dari dua elemen : slotslot (menggambarkan rincian dan (menggambarkan rincian dan karakteristik obyek) dankarakteristik obyek) dan facet.facet.

Page 33: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

FramesFrames

FrameFrame: Data structure that includes all the : Data structure that includes all the

knowledge about a particular objectknowledge about a particular object Knowledge organized in a hierarchy for diagnosis of Knowledge organized in a hierarchy for diagnosis of

knowledge independenceknowledge independence Form of Form of object-oriented programmingobject-oriented programming for AI and ES. for AI and ES. Each Frame Describes One ObjectEach Frame Describes One Object Special TerminologySpecial Terminology

Page 34: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Contoh Frame

Automobile FrameAutomobile Frame

Class of : TransportationClass of : TransportationName of Manufacturer : AudiName of Manufacturer : AudiOrigin of Manufacturer : GermanyOrigin of Manufacturer : GermanyModel : 5000 turboModel : 5000 turboType of Car : SedanType of Car : SedanWeight : 3000 lbs.Weight : 3000 lbs.Wheelbase : 105.8 inchesWheelbase : 105.8 inchesNumber of doors : 4 (default)Number of doors : 4 (default)Transmission : 3-speed (automatic)Transmission : 3-speed (automatic)Number of wheels : 4 (default)Number of wheels : 4 (default)Gas mileage : 22 mpg average (procedural attachment)Gas mileage : 22 mpg average (procedural attachment)

Engine FrameEngine Frame

Cylinder bore : 3.19 inchesCylinder bore : 3.19 inchesCylinder stroke : 3.4 inchesCylinder stroke : 3.4 inchesCompression ratio : 7.8 to 1Compression ratio : 7.8 to 1Fuel system : Injection with turbochargerFuel system : Injection with turbochargerHorsepower : 140 hpHorsepower : 140 hpTorque : 160 ft/LbsTorque : 160 ft/Lbs

Page 35: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Hirarki Frame (exp : Vehicle)Hirarki Frame (exp : Vehicle)VehicleFrame

CarFrame

BoatFrame

TrainFrame

AirplaneFrame

SubmarineFrame

PassengerCar Frame

TruckFrame

BusFrame

Compact Car Frame

MidsizeCar Frame

ToyotaCorolla Frame

Jan’s CarFrame

Mary’s CarFrame

                        

 

Mitsubishi Lancer Frame

Page 36: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Advantages and Disadvantages of Different Knowledge Representations

Scheme Advantages Disadvantages Production rules

Simple syntax, easy to understand, simple interpreter, highly modular, flexible (easy to add to or modify)

Hard to follow hierarchies, inefficient for large systems, not all knowledge can be expressed as rules, poor at representing structured descriptive knowledge

Semantic networks

Easy to follow hierarchy, easy to trace associations, flexible

Meaning attached to nodes might be ambiguous, exception handling is difficult, difficult to program

Frames

Expressive power, easy to set up slots for new properties and relations, easy to create specialized procedures, easy to include default information and detect missing values

Difficult to program, difficult for inference, lack of inexpensive software

Formal logic Facts asserted independently of use, assurance that all and only valid consequences are asserted (precision), completeness

Separation of representation and processing, inefficient with large data sets, very slow with large knowledge bases

Page 37: Kuliah Sistem Pakar  Pertemuan V “Representasi Pengetahuan”

Sampai Jumpa Sampai Jumpa di di

Pertemuan VIPertemuan VI

Selamat BelajarSelamat Belajar