Data Mining. Practical Machine Learning Tools and Techniques. Slides for Chapter 3 of Data Mining by I. H. Witten, E. Frank and M. A.

Similar documents
Machine Learning Chapter 2. Input

Data Mining Practical Machine Learning Tools and Techniques

Basic Concepts Weka Workbench and its terminology

Input: Concepts, Instances, Attributes

Normalization and denormalization Missing values Outliers detection and removing Noisy Data Variants of Attributes Meta Data Data Transformation

Data Mining Input: Concepts, Instances, and Attributes

Data Mining. 1.3 Input. Fall Instructor: Dr. Masoud Yaghini. Chapter 3: Input

Data Mining. Part 1. Introduction. 1.3 Input. Fall Instructor: Dr. Masoud Yaghini. Input

Data Mining. Part 1. Introduction. 1.4 Input. Spring Instructor: Dr. Masoud Yaghini. Input

Data Representation Information Retrieval and Data Mining. Prof. Matteo Matteucci

Data Mining. Practical Machine Learning Tools and Techniques. Slides for Chapter 3 of Data Mining by I. H. Witten, E. Frank and M. A.

Summary. Machine Learning: Introduction. Marcin Sydow

Representing structural patterns: Reading Material: Chapter 3 of the textbook by Witten

Data Mining Practical Machine Learning Tools and Techniques

Instance-Based Representations. k-nearest Neighbor. k-nearest Neighbor. k-nearest Neighbor. exemplars + distance measure. Challenges.

DATA ANALYSIS I. Types of Attributes Sparse, Incomplete, Inaccurate Data

CS513-Data Mining. Lecture 2: Understanding the Data. Waheed Noor

Data Mining Algorithms: Basic Methods

Homework 1 Sample Solution

Decision Trees In Weka,Data Formats

Practical Data Mining COMP-321B. Tutorial 1: Introduction to the WEKA Explorer

COMP33111: Tutorial and lab exercise 7

Classification with Decision Tree Induction

WEKA: Practical Machine Learning Tools and Techniques in Java. Seminar A.I. Tools WS 2006/07 Rossen Dimov

Unsupervised: no target value to predict

Data Preprocessing. Slides by: Shree Jaswal

Data Mining and Analytics

Introduction to Artificial Intelligence

CS 8520: Artificial Intelligence. Weka Lab. Paula Matuszek Fall, CSC 8520 Fall Paula Matuszek

The Explorer. chapter Getting started

CMPUT 391 Database Management Systems. Data Mining. Textbook: Chapter (without 17.10)

Slides for Data Mining by I. H. Witten and E. Frank

Analytical model A structure and process for analyzing a dataset. For example, a decision tree is a model for the classification of a dataset.

MACHINE LEARNING Example: Google search

Data Preprocessing. S1 Teknik Informatika Fakultas Teknologi Informasi Universitas Kristen Maranatha

Prediction. What is Prediction. Simple methods for Prediction. Classification by decision tree induction. Classification and regression evaluation

DESIGN AND IMPLEMENTATION OF BUILDING DECISION TREE USING C4.5 ALGORITHM

Data Exploration and Preparation Data Mining and Text Mining (UIC Politecnico di Milano)

2. Data Preprocessing

Chapter 4: Algorithms CS 795

Model Selection Introduction to Machine Learning. Matt Gormley Lecture 4 January 29, 2018

KTH ROYAL INSTITUTE OF TECHNOLOGY. Lecture 14 Machine Learning. K-means, knn

Preprocessing Short Lecture Notes cse352. Professor Anita Wasilewska

University of Florida CISE department Gator Engineering. Data Preprocessing. Dr. Sanjay Ranka

Sponsored by AIAT.or.th and KINDML, SIIT

Data Mining: Concepts and Techniques Classification and Prediction Chapter 6.1-3

Basic Data Mining Technique

Data Preprocessing. Data Preprocessing

9/6/14. Our first learning algorithm. Comp 135 Introduction to Machine Learning and Data Mining. knn Algorithm. knn Algorithm (simple form)

Machine Learning Techniques for Data Mining

Lecture 6: Unsupervised Machine Learning Dagmar Gromann International Center For Computational Logic

3. Data Preprocessing. 3.1 Introduction

Chapter Two: Descriptive Methods 1/50

COMP 465: Data Mining Classification Basics

Chapter 4: Algorithms CS 795

Data Mining. Covering algorithms. Covering approach At each stage you identify a rule that covers some of instances. Fig. 4.

UNIT 2 Data Preprocessing

University of Florida CISE department Gator Engineering. Visualization

Data Mining and Machine Learning: Techniques and Algorithms

DATA MINING INTRODUCTION TO CLASSIFICATION USING LINEAR CLASSIFIERS

SOCIAL MEDIA MINING. Data Mining Essentials

Data Mining Practical Machine Learning Tools and Techniques

COMP33111: Tutorial/lab exercise 2

Machine Learning: Algorithms and Applications Mockup Examination

Extra readings beyond the lecture slides are important:

Jue Wang (Joyce) Department of Computer Science, University of Massachusetts, Boston Feb Outline

CONCEPT FORMATION AND DECISION TREE INDUCTION USING THE GENETIC PROGRAMMING PARADIGM

Data Mining: Exploring Data. Lecture Notes for Chapter 3

CSIS. Pattern Recognition. Prof. Sung-Hyuk Cha Fall of School of Computer Science & Information Systems. Artificial Intelligence CSIS

CSE4334/5334 DATA MINING

Naïve Bayes Classification. Material borrowed from Jonathan Huang and I. H. Witten s and E. Frank s Data Mining and Jeremy Wyatt and others

Data Mining: Exploring Data. Lecture Notes for Chapter 3. Introduction to Data Mining

Data Mining: Exploring Data. Lecture Notes for Data Exploration Chapter. Introduction to Data Mining

Introduction to Machine Learning

Data Preprocessing. Why Data Preprocessing? MIT-652 Data Mining Applications. Chapter 3: Data Preprocessing. Multi-Dimensional Measure of Data Quality

Data Preprocessing Yudho Giri Sucahyo y, Ph.D , CISA

Overview. Data Mining for Business Intelligence. Shmueli, Patel & Bruce

ECLT 5810 Clustering

PSS718 - Data Mining

Data Mining with Weka

Data Mining Tools. Jean-Gabriel Ganascia LIP6 University Pierre et Marie Curie 4, place Jussieu, Paris, Cedex 05

Data Mining. 3.3 Rule-Based Classification. Fall Instructor: Dr. Masoud Yaghini. Rule-Based Classification

Enhancing Forecasting Performance of Naïve-Bayes Classifiers with Discretization Techniques

A Systematic Overview of Data Mining Algorithms. Sargur Srihari University at Buffalo The State University of New York

Machine Learning in Real World: C4.5

Machine Learning - Clustering. CS102 Fall 2017

CIS 4930/6930 Spring 2014 Introduction to Data Science /Data Intensive Computing. University of Florida, CISE Department Prof.

Association Rules. Charles Sutton Data Mining and Exploration Spring Based on slides by Chris Williams and Amos Storkey. Thursday, 8 March 12

Sabbatical Leave Report

Nominal Data. May not have a numerical representation Distance measures might not make sense. PR and ANN

Introduction to Data Mining and Data Analytics

Hsiaochun Hsu Date: 12/12/15. Support Vector Machine With Data Reduction

Data Mining. Part 2. Data Understanding and Preparation. 2.4 Data Transformation. Spring Instructor: Dr. Masoud Yaghini. Data Transformation

Data Mining. 3.2 Decision Tree Classifier. Fall Instructor: Dr. Masoud Yaghini. Chapter 5: Decision Tree Classifier

A System for Managing Experiments in Data Mining. A Thesis. Presented to. The Graduate Faculty of The University of Akron. In Partial Fulfillment

Outline. RainForest A Framework for Fast Decision Tree Construction of Large Datasets. Introduction. Introduction. Introduction (cont d)

An Empirical Study on feature selection for Data Classification

Chapter 3: Data Mining:

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CISC 4631 Data Mining

Transcription:

Data Mining Practical Machine Learning Tools and Techniques Slides for Chapter 3 of Data Mining by I. H. Witten, E. Frank and M. A. Hall

Input: Concepts, instances, attributes Terminology What s a concept? Classification, association, clustering, numeric prediction What s in an example? Relations, flat files, recursion What s in an attribute? Nominal, ordinal, interval, ratio Preparing the input ARFF, attributes, missing values, getting to know data 2

Terminology Components of the input: Concepts: kinds of things that can be learned Aim: intelligible and operational concept description Instances: the individual, independent examples of a concept Note: more complicated forms of input are possible Attributes: measuring aspects of an instance We will focus on nominal and numeric ones 3

What s a concept? Styles of learning: Classification learning: predicting a discrete class Association learning: detecting associations between features Clustering: grouping similar instances into clusters Numeric prediction: predicting a numeric quantity Concept: thing to be learned Concept description: output of learning scheme 4

Classification learning Example problems: weather data, contact lenses, irises, labor negotiations Classification learning is supervised Scheme is provided with actual outcome Outcome is called the class of the example Measure success on fresh data for which class labels are known (test data) In practice success is often measured subjectively 5

Association learning Can be applied if no class is specified and any kind of structure is considered interesting Difference to classification learning: Can predict any attribute s value, not just the class, and more than one attribute s value at a time Hence: far more association rules than classification rules Thus: constraints are necessary Minimum coverage and minimum accuracy 6

Clustering Finding groups of items that are similar Clustering is unsupervised The class of an example is not known Success often measured subjectively Sepal length Sepal width Petal length Petal width Type 1 5.1 3.5 1.4 0.2 Iris setosa 2 4.9 3.0 1.4 0.2 Iris setosa 51 7.0 3.2 4.7 1.4 Iris versicolor 52 6.4 3.2 4.5 1.5 Iris versicolor 101 6.3 3.3 6.0 2.5 Iris virginica 102 5.8 2.7 5.1 1.9 Iris virginica 7

Numeric prediction Variant of classification learning where class is numeric (also called regression ) Learning is supervised Scheme is being provided with target value Measure success on test data Outlook Temperature Humidity Windy Play-time Sunny Hot High False 5 Sunny Hot High True 0 Overcast Hot High False 55 Rainy Mild Normal False 40 8

What s in an example? Instance: specific type of example Thing to be classified, associated, or clustered Individual, independent example of target concept Characterized by a predetermined set of attributes Input to learning scheme: set of instances/dataset Represented as a single relation/flat file Rather restricted form of input No relationships between objects Most common form in practical data mining 9

A family tree M = Peggy F Grace F = Ray M Steven M Graham M F = Ian M Pippa F Brian M Anna F Nikki F 10

Family tree represented as a table Name Gender Parent1 parent2 Male?? Peggy?? Steven Male Peggy Graham Male Peggy Peggy Ian Male Grace Ray Pippa Grace Ray Brian Male Grace Ray Anna Ian Nikki Ian 11

The sister-of relation First person Second person Sister of? First person Second person Sister of? Peggy No Steven Steven No Graham Ian Pippa Steven No Brian Pippa Steven Graham No Anna Nikki Steven Nikki Anna All the rest No Ian Pippa Anna Nikki Closed-world assumption Nikki Anna yes 12

A full representation in one table First person Second person Sister of? Name Gender Parent1 Parent2 Name Gender Parent1 Parent2 Steven Male Peggy Peggy Graham Male Peggy Peggy Ian Male Grace Ray Pippa Grace Ray Brian Male Grace Ray Pippa Grace Ray Anna Ian Nikki Ian Nikki Ian Anna Ian All the rest No If second person s gender = female and first person s parent = second person s parent then sister-of = yes 13

Generating a flat file Process of flattening called denormalization Several relations are joined together to make one Possible with any finite set of finite relations Problematic: relationships without pre-specified number of objects Example: concept of nuclear-family Denormalization may produce spurious regularities that reflect structure of database Example: supplier predicts supplier address 14

The ancestor-of relation First person Second person Ancestor of? Name Gender Parent1 Parent2 Name Gender Parent1 Parent2 Male?? Steven Male Peggy Male?? Peggy Male?? Anna Ian Male?? Nikki Ian Peggy Nikki Ian Grace?? Ian Male Grace Ray Grace?? Nikki Ian Other positive examples here All the rest No 15

Recursion Infinite relations require recursion If person1 is a parent of person2 then person1 is an ancestor of person2 If person1 is a parent of person2 and person2 is an ancestor of person3 then person1 is an ancestor of person3 Appropriate techniques are known as inductive logic programming (e.g. Quinlan s FOIL) Problems: (a) noise and (b) computational complexity 16

Multi-instance Concepts Each individual example comprises a set of instances All instances are described by the same attributes One or more instances within an example may be responsible for its classification Goal of learning is still to produce a concept description Important real world applications e.g. drug activity prediction 17

What s in an attribute? Each instance is described by a fixed predefined set of features, its attributes But: number of attributes may vary in practice Possible solution: irrelevant value flag Related problem: existence of an attribute may depend of value of another one Possible attribute types ( levels of measurement ): Nominal, ordinal, interval and ratio 18

Nominal quantities Values are distinct symbols Values themselves serve only as labels or names Nominal comes from the Latin word for name Example: attribute outlook from weather data Values: sunny, overcast, and rainy No relation is implied among nominal values (no ordering or distance measure) Only equality tests can be performed 19

Ordinal quantities Impose order on values But: no distance between values defined Example: attribute temperature in weather data Values: hot > mild > cool Note: addition and subtraction don t make sense Example rule: temperature < hot play = yes Distinction between nominal and ordinal not always clear (e.g. attribute outlook ) 20

Interval quantities Interval quantities are not only ordered but measured in fixed and equal units Example 1: attribute temperature expressed in degrees Fahrenheit Example 2: attribute year Difference of two values makes sense Sum or product doesn t make sense Zero point is not defined! 21

Ratio quantities Ratio quantities are ones for which the measurement scheme defines a zero point Example: attribute distance Distance between an object and itself is zero Ratio quantities are treated as real numbers All mathematical operations are allowed But: is there an inherently defined zero point? Answer depends on scientific knowledge (e.g. Fahrenheit knew no lower limit to temperature) 22

Attribute types used in practice Most schemes accommodate just two levels of measurement: nominal and ordinal Nominal attributes are also called categorical, enumerated, or discrete But: enumerated and discrete imply order Special case: dichotomy ( boolean attribute) Ordinal attributes are called numeric, or continuous But: continuous implies mathematical continuity 23

Metadata Information about the data that encodes background knowledge Can be used to restrict search space Examples: Dimensional considerations (i.e. expressions must be dimensionally correct) Circular orderings (e.g. degrees in compass) Partial orderings (e.g. generalization/specialization relations) 24

Preparing the input Denormalization is not the only issue Problem: different data sources (e.g. sales department, customer billing department, ) Differences: styles of record keeping, conventions, time periods, data aggregation, primary keys, errors Data must be assembled, integrated, cleaned up Data warehouse : consistent point of access External data may be required ( overlay data ) Critical: type and level of data aggregation 25

The ARFF format % % ARFF file for weather data with some numeric features % @relation weather @attribute outlook {sunny, overcast, rainy} @attribute temperature numeric @attribute humidity numeric @attribute windy {true, false} @attribute play? {yes, no} @data sunny, 85, 85, false, no sunny, 80, 90, true, no overcast, 83, 86, false, yes... 26

Additional attribute types ARFF supports string attributes: @attribute description string Similar to nominal attributes but list of values is not pre-specified It also supports date attributes: @attribute today date Uses the ISO-8601 combined date and time format yyyy-mm-dd-thh:mm:ss 27

Relational attributes Allow multi-instance problems to be represented in ARFF format The value of a relational attribute is a separate set of instances @attribute bag relational @attribute outlook { sunny, overcast, rainy } @attribute temperature numeric @attribute humidity numeric @attribute windy { true, false } @end bag Nested attribute block gives the structure of the referenced instances 28

Mulit-instance ARFF % % Multiple instance ARFF file for the weather data % @relation weather @attribute bag_id { 1, 2, 3, 4, 5, 6, 7 } @attribute bag relational @attribute outlook {sunny, overcast, rainy} @attribute temperature numeric @attribute humidity numeric @attribute windy {true, false} @attribute play? {yes, no} @end bag @data 1, sunny, 85, 85, false\nsunny, 80, 90, true, no 2, overcast, 83, 86, false\nrainy, 70, 96, false, yes... 29

Sparse data In some applications most attribute values in a dataset are zero E.g.: word counts in a text categorization problem ARFF supports sparse data 0, 26, 0, 0, 0,0, 63, 0, 0, 0, class A 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, class B {1 26, 6 63, 10 class A } {3 42, 10 class B } This also works for nominal attributes (where the first value corresponds to zero ) 30

Attribute types Interpretation of attribute types in ARFF depends on learning scheme Numeric attributes are interpreted as ordinal scales if less-than and greater-than are used ratio scales if distance calculations are performed (normalization/standardization may be required) Instance-based schemes define distance between nominal values (0 if values are equal, 1 otherwise) Integers in some given data file: nominal, ordinal, or ratio scale? 31

Nominal vs. ordinal Attribute age nominal If age = young and astigmatic = no and tear production rate = normal then recommendation = soft If age = pre-presbyopic and astigmatic = no and tear production rate = normal then recommendation = soft Attribute age ordinal (e.g. young < pre-presbyopic < presbyopic ) If age pre-presbyopic and astigmatic = no and tear production rate = normal then recommendation = soft 32

Missing values Frequently indicated by out-of-range entries Types: unknown, unrecorded, irrelevant Reasons: malfunctioning equipment changes in experimental design collation of different datasets measurement not possible Missing value may have significance in itself (e.g. missing test in a medical examination) Most schemes assume that is not the case: missing may need to be coded as additional value 33

Inaccurate values Reason: data has not been collected for mining it Result: errors and omissions that don t affect original purpose of data (e.g. age of customer) Typographical errors in nominal attributes values need to be checked for consistency Typographical and measurement errors in numeric attributes outliers need to be identified Errors may be deliberate (e.g. wrong zip codes) Other problems: duplicates, stale data 34

Getting to know the data Simple visualization tools are very useful Nominal attributes: histograms (Distribution consistent with background knowledge?) Numeric attributes: graphs (Any obvious outliers?) 2-D and 3-D plots show dependencies Need to consult domain experts Too much data to inspect? Take a sample! 35