CSG3G3 Kercerdasan Mesin dan Artifisial Pertemuan 10: Learning (Naive Bayes) Author-Tim Dosen KK ICM 21/11/2018.

Slides:



Advertisements
Presentasi serupa
Game Theory Purdianta, ST., MT..
Advertisements

Clustering. Definition Clustering is “the process of organizing objects into groups whose members are similar in some way”. A cluster is therefore a collection.
BLACK BOX TESTING.
Bina Nusantara Model Simulasi Peretemuan 23 (Off Clas) Mata kuliah: K0194-Pemodelan Matematika Terapan Tahun: 2008.
Testing Implementasi Sistem Oleh :Rifiana Arief, SKom, MMSI
Data Mining: Klasifikasi dan Prediksi Naive Bayesian & Bayesian Network . April 13, 2017.
Pertemuan 05 Sebaran Peubah Acak Diskrit
1 Pertemuan 12 Pengkodean & Implementasi Matakuliah: T0234 / Sistem Informasi Geografis Tahun: 2005 Versi: 01/revisi 1.
Ruang Contoh dan Peluang Pertemuan 05
Pendugaan Parameter Proporsi dan Varians (Ragam) Pertemuan 14 Matakuliah: L0104 / Statistika Psikologi Tahun : 2008.
1 Pertemuan 10 Statistical Reasoning Matakuliah: T0264/Inteligensia Semu Tahun: Juli 2006 Versi: 2/1.
1 Pertemuan 10 Fungsi Kepekatan Khusus Matakuliah: I0134 – Metode Statistika Tahun: 2007.
Pertemuan XIV FUNGSI MAYOR Assosiation. What Is Association Mining? Association rule mining: –Finding frequent patterns, associations, correlations, or.
Pertemuan 07 Peluang Beberapa Sebaran Khusus Peubah Acak Kontinu
Bina Nusantara Mata Kuliah: K0194-Pemodelan Matematika Terapan Tahun : 2008 Aplikasi Model Markov Pertemuan 22:
Statistika Mulaab,S,si M.kom Lab CAI Teknik Informatika xxxx Website Kuliah : mulaab.wordpress.com.
1 Pertemuan 8 JARINGAN COMPETITIVE Matakuliah: H0434/Jaringan Syaraf Tiruan Tahun: 2005 Versi: 1.
1 Pertemuan 5 Komunikasi antar Proses / Interprocess Communication (IPC) Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5 OFFCLASS01.
1 Minggu 10, Pertemuan 20 Normalization (cont.) Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
1 Pertemuan 11 Function dari System Matakuliah: M0446/Analisa dan Perancangan Sistem Informasi Tahun: 2005 Versi: 0/0.
4- Classification: Logistic Regression 9 September 2015 Intro to Logistic Regression.
9.3 Geometric Sequences and Series. Objective To find specified terms and the common ratio in a geometric sequence. To find the partial sum of a geometric.
Smoothing. Basic Smoothing Models Moving average, weighted moving average, exponential smoothing Single and Double Smoothing First order exponential smoothing.
Samples: Smart Goals ©2014 Colin G Smith
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 9 Relational Database Design by ER- to-Relational Mapping.
Naive Bayesian & Bayesian Network
Jartel, Sukiswo Sukiswo
DISTRIBUSI BINOMIAL.
Induksi Matematika.
Bayes’ Theorem: Basics
Statistika Chapter 4 Probability.
Kode Hamming.
Pengujian Hipotesis (I) Pertemuan 11
Matakuliah : I0014 / Biostatistika Tahun : 2005 Versi : V1 / R1
DISTRIBUSI BINOMIAL.
Pertemuan 25 Uji Kesamaan Proporsi
CA113 Pengantar Manajemen Bisnis
BY EKA ANDRIANI NOVALIA RIZKANISA VELA DESTINA
Pohon Keputusan (Decision Trees)
BILANGAN REAL BILANGAN BERPANGKAT.
Pendugaan Parameter (II) Pertemuan 10
REAL NUMBERS EKSPONENT NUMBERS.
Uji Kesamaan Proporsi dan Uji Kebebasan Pertemuan 24
CA113 Pengantar Manajemen Bisnis
Open and Closed Social Stratification
Kk ilo Associative entity.
Pertemuan 09 Pengujian Hipotesis 2
Fungsi Kepekatan Peluang Khusus Pertemuan 10
Oleh : Rahmat Robi Waliyansyah, M.Kom.
Teknik Pengujian Software
Manajemen Proyek Perangkat Lunak (MPPL)
Pertemuan #1 The Sentence
Master data Management
Self-Organizing Network Model (SOM) Pertemuan 10
An assessment of Pedestrian Ways in Unsyiah
Pertemuan 21 dan 22 Analisis Regresi dan Korelasi Sederhana
How Can I Be A Driver of The Month as I Am Working for Uber?
Suhandi Wiratama. Before I begin this presentation, I want to thank Mr. Abe first. He taught me many things about CorelDRAW. He also guided me when I.
CA113 Pengantar Manajemen Bisnis
Simultaneous Linear Equations
Data Mining: Klasifikasi dan Prediksi Naive Bayesian & Bayesian Network . November 8, 2018.
THE INFORMATION ABOUT HEALTH INSURANCE IN AUSTRALIA.
Group 3 About causal Conjunction Member : 1. Ahmad Fandia R. S.(01) 2. Hesti Rahayu(13) 3. Intan Nuraini(16) 4. Putri Nur J. (27) Class: XI Science 5.
By Yulius Suprianto Macroeconomics | 02 Maret 2019 Chapter-5: The Standard of Living Over Time and A Cross Countries Source: http//
Right, indonesia is a wonderful country who rich in power energy not only in term of number but also diversity. Energy needs in indonesia are increasingly.
Al Muizzuddin F Matematika Ekonomi Lanjutan 2013
Vector. A VECTOR can describe anything that has both MAGNITUDE and DIRECTION The MAGNITUDE describes the size of the vector. The DIRECTION tells you where.
Probability IIntroduction to Probability ASatisfactory outcomes vs. total outcomes BBasic Properties CTerminology IICombinatory Probability AThe Addition.
Draw a picture that shows where the knife, fork, spoon, and napkin are placed in a table setting.
2. Discussion TASK 1. WORK IN PAIRS Ask your partner. Then, in turn your friend asks you A. what kinds of product are there? B. why do people want to.
Transcript presentasi:

CSG3G3 Kercerdasan Mesin dan Artifisial Pertemuan 10: Learning (Naive Bayes) Author-Tim Dosen KK ICM 21/11/2018

Outline Materi Learning yang disampaikan dalam perkualiahan meliputi: Naive Bayes Decision tree learning Jaringan Syaraf Tiruan Materi Pengayaan (opsional)

Perhatikan Tabel Berikut, Bagaimana menemukan aturan bahwa seorang pelamar diterima atau tidak? IPK Psikologi Wawancara Diterima P1 Bagus Tinggi Baik Ya P2 Sedang P3 Buruk Tidak P4 Rendah P5 Cukup P6 P7 P8 P9 Kurang P10 P11 P12

Wawancara Baik Buruk Ya Tidak Kenapa kesimpulan diatas dapat kita ambil??

Pelamar IPK Psikologi Wawancara Diterima Perhatikan Tabel Berikut (terdapat modifikasi P4, P8 dan P10), Bagaimana menemukan aturan bahwa seorang pelamar diterima atau tidak? Pelamar IPK Psikologi Wawancara Diterima P1 Bagus Tinggi Baik Ya P2 Sedang P3 Buruk P4 Rendah Tidak P5 Cukup P6 P7 P8 P9 Kurang P10 P11

Wawancara Sekali lagi, Kenapa kesimpulan diatas dapat kita ambil?? Baik Buruk Psikologi Ya Tinggi Sedang Rendah Tidak IPK Tidak Bagus Cukup Kurang Ya Ya Tidak

Apa itu Learning KBBI: belajar Dalam pengertian Informatika, Learning berusaha memperoleh kepandaian atau ilmu: Berlatih untuk memperoleh suatu keahlian berubah tingkah laku atau tanggapan yg disebabkan oleh pengalaman Dalam pengertian Informatika, Learning Memberikan komputer kemampuan untuk melakukan analisa secara automatis untuk mengambil suatu kesimpulan/keputusan Suatu proses untuk menemukan suatu pattern / pola dalam sekumpulan data Unsupervised Learning, Supervised Learning (classification, regresiion, etc) 21/11/2018

Tahapan dalam Learning Training (induction): proses membangun basis pengetahuan , menemukan pola/pattern, menemukan fungsi pemetaan input-ke-output, menemukan rule dalam suatu permasalahan Testing (deduction): proses menguji hasil training untuk melihat performansi sistem yang dikembangkan 21/11/2018

21/11/2018

Tantangan dalam learning Bagaimana menemukan aturan? Bagaimana untuk data yang sangat banyak? Bagaimana jika datanya tidak lengkap? Aturan yang general untuk data yang akan datang? Menemukan perbedaan dari dua hal yang mirip? Menemukan kesamaan dari dua hal yang berbeda? 21/11/2018

Bayesian Classification The Bayesian Classification represents a supervised learning method as well as a statistical method for classification. Assumes an underlying probabilistic model and it allows us to capture uncertainty about the model in a principled way by determining probabilities of the outcomes. Itcan solve diagnostic and predictive problems. This Classification is named after Thomas Bayes ( 1702-1761), who proposed the Bayes Theorem. 21/11/2018

21/11/2018

21/11/2018

Problem We want to classify an insect we have found. Its antennae are 3 units long. How can we classify it? We can just ask ourselves, give the distributions of antennae lengths we have seen, is it more probable that our insect is a Grasshopper or a Katydid. Formal Definition: 21/11/2018

Dummy Way Periksa data yang ada: Hitung berapa peluang Kelas Grasshopper dengan panjang antena x -> A Hitung berapa peluang Kelas Katydid dengan panjang antena x -> B Keputusan adalah mencari peluang terbesar Jika A > B, maka data masuk ke kelas Grasshopper Jika A < B, maka data masuk ke kelas Katydid Jika A=B , ? 21/11/2018

21/11/2018

Bayes theorem P(h): independent probability of h: prior probability P(D): independent probability of D P(D|h): conditional probability of D given h: likelihood P(h|D): conditional probability of h given D: posterior probability 21/11/2018

h= {Grasshopper, Katydid} P(h) = peluang kelas h Based on data provide: can we calculate Grasshopper or a Katydid problem using ? h= {Grasshopper, Katydid} P(h) = peluang kelas h D= attribute data (panjang antena) P(D)= peluang dari data dengan panjang antena d P(D|h)=peluang data D berada dalam kelas h 21/11/2018

There is no way we can calculate the Grasshopper or a Katydid problem using Bayes Theorem with provide data 21/11/2018

How about this problem: cancer or not? A patient takes a lab test and the result comes back positive. It is known that the test returns a correct positive result in only 99% of the cases and a correct negative result in only 95% of the cases. Furthermore, only 0.03 of the entire population has this disease. 1. What is the probability that this patient has cancer? 2. What is the probability that he does not have cancer? 3. What is the diagnosis?

Cancer or not cancer P(Cancer)=0.03 P(¬Cancer)=0.97 Hipotesis P(cancer|+)=P(+|cancer)xP(cancer)/P(+) P(¬cancer|+)=P(+|¬cancer)xP(¬cancer)/P(+) Sometime in real condition we can’t calculate P(+), do we have to calculate this? 21/11/2018 Cancer

Maximum A Posterior Based on Bayes Theorem, we can compute the Maximum A Posterior (MAP) hypothesis for the data We are interested in the best hypothesis for some space H given observed training data D. H: set of all hypothesis. Note that we can drop P(D) as the probability of the data is constant (and independent of the hypothesis).

Maximum Likelihood Now assume that all hypotheses are equally probable a priori, i.e., P(hi ) = P(hj ) for all hi, hj belong to H. This is called assuming a uniform prior. It simplifies computing the posterior: This hypothesis is called the maximum likelihood hypothesis.

Desirable Properties of Bayes Classifier Incrementality: with each training example, the prior and the likelihood can be updated dynamically: flexible and robust to errors. Combines prior knowledge and observed data: prior probability of a hypothesis multiplied with probability of the hypothesis given the training data Probabilistic hypothesis: outputs not only a classification, but a probability distribution over all classes

Bayes Classifiers Assumption: training set consists of instances of different classes described cj as conjunctions of attributes values Task: Classify a new instance d based on a tuple of attribute values into one of the classes cj  C Key idea: assign the most probable class using Bayes Theorem.

Parameters estimation P(cj) Can be estimated from the frequency of classes in the training examples. P(x1,x2,…,xn|cj) O(|X|n•|C|) parameters Could only be estimated if a very, very large number of training examples was available. Independence Assumption: attribute values are conditionally independent given the target value: naïve Bayes.

Derriving Naive Bayes All attribute values are independent of each other given the class. (conditional independence assumption) The conditional probabilities for a term are the same independent of position in the document. So the final formula -> finding maximum a posterior 21/11/2018

Example Problem [1] Two classes: “China”, “not China” Training set docID c = China? 1 Chinese Beijing Chinese Yes 2 Chinese Chinese Shangai 3 Chinese Macao 4 Tokyo Japan Chinese No Test set 5 Chinese Chinese Chinese Tokyo Japan ? Two classes: “China”, “not China” V = {Beijing, Chinese, Japan, Macao, Tokyo, Shangai} N = 4

Smoothing For each term, t, we need to estimate P(t|c) Tct is the count of term t in all documents of class c Because an estimate will be 0 if a term does not appear with a class in the training data, we need smoothing: Laplace Smoothing |V| is the number of terms in the vocabulary

Example Problem [2] Estimation Classification Training set docID c = China? 1 Chinese Beijing Chinese Yes 2 Chinese Chinese Shangai 3 Chinese Macao 4 Tokyo Japan Chinese No Test set 5 Chinese Chinese Chinese Tokyo Japan ? Estimation Classification

Try this at home Question: For the day <sunny, cool, high, strong>, what’s the play prediction? 21/11/2018

Daftar Pustaka Tan, Steinbach, Kumar , Lecture Notes for Chapter 4, Introduction to Data Mining Eamonn Keogh, Naive Bayes Classifier, UCR Wellesley.edu, Lecture_16, Text Classification and Naïve Bayes, http://cs.wellesley.edu/~cs315/315_PPTs/L16- NaiveBayes/lecture_16.ppt Temple.edu, Lecture Naive Bayes Classifier, http://www.cis.temple.edu/~latecki/Courses/RobotFall08/Talks/bay esNaive.ppt

21/11/2018