Data Mining: Mengenal dan memahami data

Slides:



Advertisements
Presentasi serupa
Kelompok 1 - 2A Sekolah Tinggi Ilmu Statistik
Advertisements

Clustering Okt 2012.
© aSup-2007 PENGENALAN SPSS   1 INTRODUCTION to SPSS Statistical Package for Social Science.
MPS 2 Kamis, 14 Oktober  Univariat Analysis: the examination of the distribution of cases on only one variable at a time.  Distribusi frekuensi:
KUSWANTO, SUB POKOK BAHASAN Mata kuliah dan SKS Manfaat Deskripsi Tujuan instruksional umum Pokok bahasan.
BUDIYONO Program Pascasarjana UNS
Korelasi Linier KUSWANTO Korelasi Keeratan hubungan antara 2 variabel yang saling bebas Walaupun dilambangkan dengan X dan Y namun keduanya diasumsikan.
K-Map Using different rules and properties in Boolean algebra can simplify Boolean equations May involve many of rules / properties during simplification.
© 2002 Prentice-Hall, Inc.Chap 3-1 Bab 3 Pengukuran.
Pertemuan 02 Ukuran Numerik Deskriptif
Perancangan Database Pertemuan 07 s.d 08
Pengertian dan Peranan Statistika dan Data Statistik Pertemuan 01
Variabel Acak 2.1 Variabel Acak Diskrit 2.2 Variabel Acak Kontinu
Presented By : Group 2. A solution of an equation in two variables of the form. Ax + By = C and Ax + By + C = 0 A and B are not both zero, is an ordered.
1 Pertemuan 02 Ukuran Pemusatan dan Lokasi Matakuliah: I Statistika Tahun: 2008 Versi: Revisi.
INTRODUCTION TO SPSS Statistical Package for Social Science 1.
Pertemuan 05 Sebaran Peubah Acak Diskrit
Ruang Contoh dan Peluang Pertemuan 05
Pendugaan Parameter Proporsi dan Varians (Ragam) Pertemuan 14 Matakuliah: L0104 / Statistika Psikologi Tahun : 2008.
1 Pertemuan 03 dan 04 Ukuran Variasi Matakuliah: I Statistika Tahun: 2008 Versi: Revisi.
UKURAN PENYEBARAN DATA
Appropriate Measures of Central Tendency Nominal variables Mode Ordinal variables Median Interval level variables Mean - If the distribution is normal.
Population and sample. Population is complete actual/theoretical collection of numerical values (scores) that are of interest to the researcher. Simbol.
1 Pertemuan 10 Fungsi Kepekatan Khusus Matakuliah: I0134 – Metode Statistika Tahun: 2007.
Pertemuan 03 Ukuran Penyimpangan (Variasi)
PENDUGAAN PARAMETER Pertemuan 7
BAB 6 KOMBINATORIAL DAN PELUANG DISKRIT. KOMBINATORIAL (COMBINATORIC) : ADALAH CABANG MATEMATIKA YANG MEMPELAJARI PENGATURAN OBJEK- OBJEK. ADALAH CABANG.
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
HAMPIRAN NUMERIK SOLUSI PERSAMAAN NIRLANJAR Pertemuan 3
MULTIPLE REGRESSION ANALYSIS THE THREE VARIABLE MODEL: NOTATION AND ASSUMPTION 08/06/2015Ika Barokah S.
1 HAMPIRAN NUMERIK SOLUSI PERSAMAAN LANJAR Pertemuan 5 Matakuliah: K0342 / Metode Numerik I Tahun: 2006 TIK:Mahasiswa dapat meghitung nilai hampiran numerik.
1 Pertemuan 24 Matakuliah: I0214 / Statistika Multivariat Tahun: 2005 Versi: V1 / R1 Analisis Struktur Peubah Ganda (IV): Analisis Kanonik.
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.
Ukuran Pemusatan dan Lokasi Pertemuan 03 Matakuliah: L0104 / Statistika Psikologi Tahun : 2008.
Chapter 5 Discrete Random Variables and Probability Distributions Statistika.
Smoothing. Basic Smoothing Models Moving average, weighted moving average, exponential smoothing Single and Double Smoothing First order exponential smoothing.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 9 Relational Database Design by ER- to-Relational Mapping.
Tim Dosen Data Mining Fakultas Informatika
Ukuran Penyimpangan atau Disversi Pertemuan 04
PROBABILITY DISTRIBUTION
STATISTIKA CHATPER 4 (Perhitungan Dispersi (Sebaran))
Chapter 2 Representasi Data: Grafik
Rekayasa Perangkat Lunak Class Diagram
Fungsi Analisis pada SIG
Preparing the Data.
Cartesian coordinates in two dimensions
Cartesian coordinates in two dimensions
Kode Hamming.
Pengujian Hipotesis (I) Pertemuan 11
Matakuliah : I0014 / Biostatistika Tahun : 2005 Versi : V1 / R1
CLASS DIAGRAM.
Pendugaan Parameter (I) Pertemuan 9
Pohon Keputusan (Decision Trees)
BILANGAN REAL BILANGAN BERPANGKAT.
Similarity/ Dissimilarity
Pendugaan Parameter (II) Pertemuan 10
STATISTIK 1 Pertemuan 5,6: Ukuran Pemusatan dan Penyebaran
Semester Pendek FMIPA UGM 2005
STATISTIKA Pertemuan 3: Ukuran Pemusatan dan Penyebaran
VARIABEL ACAK (RANDOM VARIABLES)
CENTRAL TENDENCY Hartanto, SIP, MA Ilmu Hubungan Internasional
Fungsi Kepekatan Peluang Khusus Pertemuan 10
Pertemuan 4 CLASS DIAGRAM.
Self-Organizing Network Model (SOM) Pertemuan 10
UJI NORMALITAS MENGGUNAKAN P-P PLOT STATISTIKA
Magnitude and Vector Physics 1 By : Farev Mochamad Ihromi / 010
Kuliah ke 3 Elementary Statistics Eleventh Edition
JENIS DATA PENELITIAN Data kualitatif (qualitative data)
Universitas Gunadarma
Transcript presentasi:

Data Mining: Mengenal dan memahami data

Mengenal dan memahami data Objek data dan macam-macam atribut Statistik diskriptif data Visualisasi data Mengukur kesamaan dan ketidaksamaan data

Types of Data Sets Record Relational records Data matrix, e.g., numerical matrix Document data: text documents: term-frequency vector Transaction data Graph and network World Wide Web Social or information networks Ordered Video data: sequence of images Temporal data: time-series Spatial, image and multimedia: Spatial data: maps Image data: Video data: May we categorize data along the following dimensions? - structured, semi-structured, and unstructured - numeric and categorical - static and dynamic (temporal?) - by application

Data Objects Data object menyatakan suatu entitas Contoh: Database penjualan: customers, barang-barang yang dijual, penjualan Database medis: pasien, perawatan Database universitas: mahasiswa, professor, perkuliahan Data objects dijelaskan dengan attribut-atribut. Baris-baris Database -> data objects; Kolom-kolom ->attribut-atribut.

Atribut Attribut ( dimensi, fitur, variabel): menyatakan karakteristik atau fitur dari data objek Misal., ID_pelanggan, nama, alama Tipe-tipe: Nominal Ordina Biner Numerik: Interval-scaled Ratio-scaled

Attribute Types Nominal: kategori, keadaan, atau “nama suatu hal” Warna rambut Status , kode pos, dll, NRP dll Binary :Atribut Nominal dengan hanya 2 keadaan (0 dan 1) Symmetric binary: keduanya sama penting Misal: jenis kelamin, Asymmetric binary: keduanya tidak sama penting. Misal : medical test (positive atau negative) Dinyatakan dengan 1 untuk menyatakan hal yang lebih penting ( positif HIV) Ordinal Memiliki arti secara berurutan, (ranking) tetapi tidak dinyatakan dengan besaran angka atau nilai. Size = {small, medium, large}, kelas, pangkat

Atribut Numerik Kuantitas (integer atau nilai real) Interval Diukur pada skala dengan unit satuan yang sama Nilai memiliki urutan tanggal kalender No true zero-point Ratio Inherent zero-point Contoh:Panjang, berat badan, dll Bisa mengatakan perkalian dari nilai objek data yang lain Misal : panjang jalan A adalah 2 kali dari panjang jalan B

Atribut Discrete dan kontinu Atribut Diskrit Terhingga, dapat dihitung walaupun itu tak terhingga Kode pos, kata dalam sekumpulan dokumen Kadang dinyatakan dengan variabel integer Catatan Atribut Binary: kasus khusus atribut diskrit Atribut Kontinu Memilki nilai real E.g., temperature, tinggi, berat Atribut kontinu dinyatakn dengan floating-point variables

Basic Statistical Descriptions of Data Tujuan Untuk memahami data: central tendency, variasi dan sebaran Karakteristik Sebaran data median, max, min, quantiles, outliers, variance, dll. Note to self (MK): last part of slide does not clearly match slides that follow Introduction slides: In the current version, we only talk about numeric data. Can we add some materials about non-numeric data. - text statistics, TF/IDF - visualization of text statistics such as word cloud - distribution of Internet (IN, SCC, OUT, …) - visualization of social relationship (e.g., http://renlifang.msra.cn/)

Mengukur Central Tendency Mean (algebraic measure) (sample vs. population): Note: n jumlah sample dan N nilai populasi. Mean/rata-rata: Trimmed mean: Median: Estimated by interpolation (for grouped data): Mode Value that occurs most frequently in the data Unimodal, bimodal, trimodal Empirical formula: Median interval

Symmetric vs. Skewed Data Median, mean and mode of symmetric, positively and negatively skewed data symmetric positively skewed negatively skewed April 26, 2017 Data Mining: Concepts and Techniques

Mengukur sebaran Data Quartiles, outliers and boxplots Quartiles: Q1 (25th percentile), Q3 (75th percentile) Inter-quartile range: IQR = Q3 – Q1 Five number summary: min, Q1, median, Q3, max Outlier: biasanya lebih tinggi atau lebih rendah dari 1.5 x IQR Variansi dan standar deviasi (sample: s, population: σ) Variance: (algebraic, scalable computation) Standard deviation s (atau σ) akar kuadrat daro variance s2 ( atau σ2 )

Boxplot Analysis Lima nilai dari sebaran data Minimum, Q1, Median, Q3, Maximum Boxplot Data dinyatakan dengan box Ujung dari box kuartil pertama dan ketiga, tinggi kotak adalah IQR Median ditandai garis dalam box Outliers: diplot sendiri diluar Redraw the boxplot! Yes, we need a more real boxplot graph!

Sifat-sifat kurva Distribusi Normal Kurva norma dari μ–σ to μ+σ: berisi 68% pengukukuran (μ: mean, σ: standar deviasi) Dari μ–2σ to μ+2σ: berisi 95% pengukuran Dari μ–3σ to μ+3σ: berisi 99.7% pengukuran

Histogram Analysis Histogram: grafik menampilkan tabulasi dari frekwensi data JH: A better and BASIC histogram figure --- because this one overlaps with a later one!

Histograms Often Tell More than Boxplots Dua histogram menunjukkan boxplot yang sama Nilai yang sama: min, Q1, median, Q3, max Tetapi distribusi datanya berbeda

Scatter plot Melihat data bivariate data untuk melihat cluster dan outlier data, etc Setiap data menunjukkan pasangan koordinat dari suatu data Need a better and more MEANINGFUL scatter plot! -JH

Positively and Negatively Correlated Data Kiri atas korelasi positif Kanan atas korelasi negatif

Uncorrelated Data

Data Visualization Why data visualization? Gain insight into an information space by mapping data onto graphical primitives Provide qualitative overview of large data sets Search for patterns, trends, structure, irregularities, relationships among data Help find interesting regions and suitable parameters for further quantitative analysis CC (conference call) 08.11.02: Need to check Wiki to update references.

Geometric Projection Visualization Techniques Visualization of geometric transformations and projections of the data Methods Scatterplot and scatterplot matrices CC 08/11/02: Need a good survey. JH or JP may find a good book on amazon in order to update this slide. JH’s colleagues may generate some images for book. We may consider the following books. Visualizing Data: Exploring and Explaining Data with the Processing Environment - Paperback - Illustrated (Jan 11, 2008) by Ben Fry. JH: I have ordered the book.

Scatterplot Matrices Used by ermission of M. Ward, Worcester Polytechnic Institute Matrix of scatterplots (x-y-diagrams) of the k-dim. data [total of (k2/2-k) scatterplots]

Similarity and Dissimilarity Mengukur secara Numerik bagaimana kesamaan dua objek data Tinggi nilainya bila benda yang lebih mirip Range [0,1] Dissimilarity (e.g., distance/jarak) Ukuran numerik dari perbedaan dua objek Sangat rendah bila benda yang lebih mirip Minimum dissimilarity i0 Keep here because keeping it in clustering chapter seems far away. 08.11.02

Data Matrix and Dissimilarity Matrix n titik data dengan p dimensi Two modes Dissimilarity matrix n titik data yang didata adalah distance/jarak Matrik segitiga Single mode Distance is just once way of measuring dissimilarity (wiki). Changed “register only the distance” to “registers only the difference” or “dissimiarity”?

Proximity Measure for Nominal Attributes Misal terdapat 2 atau lebih nilai, misal., red, yellow, blue, green (generalisasi dari atribut binary) Metode Simple matching m: # yang sesuai, p: total # variabel

Proximity Measure for Binary Attributes Object j A contingency table for binary data Distance measure for symmetric binary variables: Distance measure for asymmetric binary variables: Jaccard coefficient (similarity measure for asymmetric binary variables): Object i MK: I tried to change equations so as to match notation in book, but each time I try to install the equation editor, it fails! Agh! Note: Jaccard coefficient is the same as “coherence”:

Dissimilarity between Binary Variables Example Gender is a symmetric attribute The remaining attributes are asymmetric binary Let the values Y and P be 1, and the value N 0

Standardizing Numeric Data Z-score: X: raw score to be standardized, μ: mean of the population, σ: standard deviation the distance between the raw score and the population mean in units of the standard deviation negative when the raw score is below the mean, “+” when above An alternative way: Calculate the mean absolute deviation where standardized measure (z-score): Using mean absolute deviation is more robust than using standard deviation MK: For lecture, this may be OK here, but I think discussion of standardization/normalization is better kept all together in Chapter 3

Example: Data Matrix and Dissimilarity Matrix (with Euclidean Distance)

Distance on Numeric Data: Minkowski Distance Minkowski distance: A popular distance measure where i = (xi1, xi2, …, xip) and j = (xj1, xj2, …, xjp) are two p- dimensional data objects, and h is the order (the distance so defined is also called L-h norm) Properties d(i, j) > 0 if i ≠ j, and d(i, i) = 0 (Positive definiteness) d(i, j) = d(j, i) (Symmetry) d(i, j)  d(i, k) + d(k, j) (Triangle Inequality)

Special Cases of Minkowski Distance h = 1: Manhattan (city block, L1 norm) distance E.g., the Hamming distance: the number of bits that are different between two binary vectors h = 2: (L2 norm) Euclidean distance h  . “supremum” (Lmax norm, L norm) distance. This is the maximum difference between any component (attribute) of the vectors

Example: Minkowski Distance Dissimilarity Matrices Manhattan (L1) Euclidean (L2) Supremum

Ordinal Variables An ordinal variable can be discrete or continuous Order is important, e.g., rank Can be treated like interval-scaled replace xif by their rank map the range of each variable onto [0, 1] by replacing i-th object in the f-th variable by compute the dissimilarity using methods for interval-scaled variables

Attributes of Mixed Type A database may contain all attribute types Nominal, symmetric binary, asymmetric binary, numeric, ordinal One may use a weighted formula to combine their effects f is binary or nominal: dij(f) = 0 if xif = xjf , or dij(f) = 1 otherwise f is numeric: use the normalized distance f is ordinal Compute ranks rif and Treat zif as interval-scaled

Cosine Similarity A document can be represented by thousands of attributes, each recording the frequency of a particular word (such as keywords) or phrase in the document. Other vector objects: gene features in micro-arrays, … Applications: information retrieval, biologic taxonomy, gene feature mapping, ... Cosine measure: If d1 and d2 are two vectors (e.g., term-frequency vectors), then cos(d1, d2) = (d1  d2) /||d1|| ||d2|| , where  indicates vector dot product, ||d||: the length of vector d MK: Machine learning used the term “feature VECTORS” > I made some changes to the wording of this slide because it implied that our previous data were not vectors, but they were all feature vectors. I also changed the example since the one used was from Tan’s book (see next slide). Chapter 3: Statistics Methods Co-variance distance K-L divergence

Example: Cosine Similarity cos(d1, d2) = (d1  d2) /||d1|| ||d2|| , where  indicates vector dot product, ||d|: the length of vector d Ex: Find the similarity between documents 1 and 2. d1 = (5, 0, 3, 0, 2, 0, 0, 2, 0, 0) d2 = (3, 0, 2, 0, 1, 1, 0, 1, 0, 1) d1d2 = 5*3+0*0+3*2+0*0+2*1+0*1+0*1+2*1+0*0+0*1 = 25 ||d1||= (5*5+0*0+3*3+0*0+2*2+0*0+0*0+2*2+0*0+0*0)0.5=(42)0.5 = 6.481 ||d2||= (3*3+0*0+2*2+0*0+1*1+1*1+0*0+1*1+0*0+1*1)0.5=(17)0.5 = 4.12 cos(d1, d2 ) = 0.94 09/09/25MK: New example (previous one was from Tan’s book). Chapter 3: Statistics Methods Co-variance distance K-L divergence

KL Divergence: Comparing Two Probability Distributions The Kullback-Leibler (KL) divergence: Measure the difference between two probability distributions over the same variable x From information theory, closely related to relative entropy, information divergence, and information for discrimination DKL(p(x) || q(x)): divergence of q(x) from p(x), measuring the information lost when q(x) is used to approximate p(x) Discrete form: The KL divergence measures the expected number of extra bits required to code samples from p(x) (“true” distribution) when using a code based on q(x), which represents a theory, model, description, or approximation of p(x) Its continuous form: The KL divergence: not a distance measure, not a metric: asymmetric, not satisfy triangular inequality

How to Compute the KL Divergence? Base on the formula, DKL(P,Q) ≥ 0 and DKL(P || Q) = 0 if and only if P = Q. How about when p = 0 or q = 0? limp→0 p log p = 0 when p != 0 but q = 0, DKL(p || q) is defined as ∞, i.e., if one event e is possible (i.e., p(e) > 0), and the other predicts it is absolutely impossible (i.e., q(e) = 0), then the two distributions are absolutely different However, in practice, P and Q are derived from frequency distributions, not counting the possibility of unseen events. Thus smoothing is needed Example: P : (a : 3/5, b : 1/5, c : 1/5). Q : (a : 5/9, b : 3/9, d : 1/9) need to introduce a small constant ϵ, e.g., ϵ = 10−3 The sample set observed in P, SP = {a, b, c}, SQ = {a, b, d}, SU = {a, b, c, d} Smoothing, add missing symbols to each distribution, with probability ϵ P′ : (a : 3/5 − ϵ/3, b : 1/5 − ϵ/3, c : 1/5 − ϵ/3, d : ϵ) Q′ : (a : 5/9 − ϵ/3, b : 3/9 − ϵ/3, c : ϵ, d : 1/9 − ϵ/3). DKL(P’ || Q’) can be computed easily