Data Preprocessing Lecture Notes for Chapter 2 Introduction






















- Slides: 22

Data Pre-processing Lecture Notes for Chapter 2 Introduction to Data Mining by Tan, Steinbach, Kumar (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 1

What is Data? p Collection of data objects and their attributes p An attribute is a property or characteristic of an object n n p Examples: eye color of a person, temperature, etc. Attribute is also known as variable, field, characteristic, or feature Attributes Objects A collection of attributes describe an object n Object is also known as record, point, case, sample, entity, or instance (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 2

Types of Attributes p There are different types of attributes n Nominal p n Ordinal p n Examples: rankings (e. g. , taste of potato chips on a scale from 1 -10), grades, height in {tall, medium, short} Interval p n Examples: ID numbers, eye color, zip codes Examples: calendar dates, temperatures in Celsius or Fahrenheit. Ratio p Examples: temperature in Kelvin, length, time, (C) Vipin Kumar, Parallel Issues in Data counts Mining, VECPAR 2002 3

Types of data sets p Record n n n Data Matrix Document Data Transaction Data p Graph n n World Wide Web Molecular Structures p Ordered n n Spatial Data Temporal Data Sequential Data Genetic Sequence Data (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 4

Important Characteristics of Structured Data n Dimensionality p n Sparsity p n Curse of Dimensionality Only presence counts Resolution p Patterns depend on the scale (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 5

Record Data p Data that consists of a collection of records, each of which consists of a fixed set of attributes (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 6

Data Matrix p If data objects have the same fixed set of numeric attributes, then the data objects can be thought of as points in a multi-dimensional space, where each dimension represents a distinct attribute p Such data set can be represented by an m by n matrix, where there are m rows, one for each object, and n columns, one for each attribute (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 7

Document Data p Each document becomes a `term' vector, n n each term is a component (attribute) of the vector, the value of each component is the number of times the corresponding term occurs in the document. (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 8

Transaction Data p A special type of record data, where n n each record (transaction) involves a set of items. For example, consider a grocery store. The set of products purchased by a customer during one shopping trip constitute a transaction, while the individual products that were purchased are the items. (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 9

Graph Data p Examples: Generic graph and HTML Links (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 10

Data Quality What kinds of data quality problems? p How can we detect problems with the data? p What can we do about these problems? p p Examples of data quality problems: n n n Noise and outliers missing values duplicate data (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 11

Noise p Noise refers to modification of original values n Examples: distortion of a person’s voice when talking on a poor phone and “snow” on television screen Two Sine Waves + Noise (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 12

Outliers p Outliers are data objects with characteristics that are considerably different than most of the other data objects in the data set (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 13

Missing Values p Reasons for missing values n n p Information is not collected (e. g. , people decline to give their age and weight) Attributes may not be applicable to all cases (e. g. , annual income is not applicable to children) Handling missing values n n Eliminate Data Objects Estimate Missing Values Ignore the Missing Value During Analysis Replace with all possible values (weighted by their probabilities) (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 14

Duplicate Data p Data set may include data objects that are duplicates, or almost duplicates of one another n p Examples: n p Major issue when merging data from heterogeous sources Same person with multiple email addresses Data cleaning n Process of dealing with duplicate data issues (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 15

Data Preprocessing Aggregation p Sampling p Dimensionality Reduction p Feature subset selection p Feature creation p Discretization and Binarization p Attribute Transformation p (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 16

Aggregation p Combining two or more attributes (or objects) into a single attribute (or object) p Purpose n Data reduction p n Change of scale p n Reduce the number of attributes or objects Cities aggregated into regions, states, countries, etc More “stable” data p Aggregated data tends to have less variability (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 17

Sampling p Sampling is the main technique employed for data selection. n It is often used for both the preliminary investigation of the data and the final data analysis. p Sampling is useful when processing the entire set of data of interest is too expensive or time consuming. p The key principle for effective sampling is the following: n using a sample will work almost as well as using the entire data sets, if the sample is representative n A sample is representative if it has approximately the same property (of interest) as the original set of data (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 18

Dimensionality Reduction p Purpose: n n p Avoid curse of dimensionality Reduce amount of time and memory required by data mining algorithms Allow data to be more easily visualized May help to eliminate irrelevant features or reduce noise Techniques (will be studied later) n n n Principal Component Analysis Feature Subset Selection Others: supervised and non-linear techniques (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 19

Feature Creation p p Create new attributes that can capture the important information in a data set much more efficiently than the original attributes Three general methodologies: n Feature Extraction p n n domain-specific Mapping Data to New Space Feature Construction p combining features (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 20

Attribute Transformation p A function that maps the entire set of values of a given attribute to a new set of replacement values such that each old value can be identified with one of the new values n n Simple functions: xk, log(x), ex, |x| Standardization and Normalization (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 21

Similarity and Dissimilarity p Similarity n n n p Dissimilarity n n p Numerical measure of how alike two data objects are. Is higher when objects are more alike. Often falls in the range [0, 1] Numerical measure of how different are two data objects Lower when objects are more alike Minimum dissimilarity is often 0 Upper limit varies Proximity refers to a similarity or dissimilarity (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR 2002 22