Jeff Howbert Introduction to Machine Learning Winter 2014 1 Machine Learning Data.

Slides:



Advertisements
Similar presentations
Data Engineering.
Advertisements

Computational Biology Lecture Slides Week 10 Classification (some parts taken from Introduction to Data Mining by Tan, Steinbach, Kumar)
Lecture Notes for Chapter 2 Introduction to Data Mining
Data preprocessing before classification In Kennedy et al.: “Solving data mining problems”
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Data Mining: Data Lecture Notes for Chapter 2 Introduction to Data Mining by Tan, Steinbach,
Lecture Notes for Chapter 2 Introduction to Data Mining
Data Mining: Concepts and Techniques
CSci 8980: Data Mining (Fall 2002)
Chapter 3 Data Issues. What is a Data Set? Attributes (describe objects) Variable, field, characteristic, feature or observation Objects (have attributes)
EECS 800 Research Seminar Mining Biological Data
© Vipin Kumar CSci 8980 Fall CSci 8980: Data Mining (Fall 2002) Vipin Kumar Army High Performance Computing Research Center Department of Computer.
Data Basics. Data Matrix Many datasets can be represented as a data matrix. Rows corresponding to entities Columns represents attributes. N: size of the.
Jeff Howbert Introduction to Machine Learning Winter Machine Learning Feature Creation and Selection.
Special Topics in Data Mining. Direct Objectives To learn data mining techniques To see their use in real-world/research applications To get an understanding.
COSC 4335 DM: Preprocessing Techniques
Data Mining Lecture 2: data.
1 Statistics 202: Statistical Aspects of Data Mining Professor David Mease Tuesday, Thursday 9:00-10:15 AM Terman 156 Lecture 2 = Start chapter 2 Agenda:
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Data Mining: Data Lecture Notes for Chapter 2 Introduction to Data Mining by Tan, Steinbach,
Data Mining & Knowledge Discovery Lecture: 2 Dr. Mohammad Abu Yousuf IIT, JU.
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Data Mining Basics: Data Remark: Discusses “basics concerning data sets (first half of Chapter.
Minqi Zhou Introduction to Data Mining 3/23/ Data Mining: Data Lecture Notes for Chapter 2 Introduction to Data Mining by Minqi Zhou.
Data Reduction Strategies Why data reduction? A database/data warehouse may store terabytes of data Complex data analysis/mining may take a very long time.
Tan,Steinbach, Kumar: Exploratory Data Analysis (with modifications by Ch. Eick) Data Mining: “New” Teaching Road Map 1. Introduction to Data Mining and.
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Data Mining: Data Lecture Notes for Chapter 2 Introduction to Data Mining by Tan, Steinbach,
What is Data? Attributes
CIS527: Data Warehousing, Filtering, and Mining
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Data Mining: Data Lecture Notes for Chapter 2 Introduction to Data Mining by Tan, Steinbach,
1 Data Mining: Data Lecture Notes for Chapter 2. 2 What is Data? l Collection of data objects and their attributes l An attribute is a property or characteristic.
1 Data Mining Lecture 2: Data. 2 What is Data? l Collection of data objects and their attributes l Attribute is a property or characteristic of an object.
1 Chapter 2 Data. What is Data? Collection of data objects and their attributes An attribute is a property or characteristic of an object –Examples: eye.
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Data Mining: Data Lecture Notes for Chapter 2 Introduction to Data Mining by Tan, Steinbach,
Lecture 1 Stat Applications, Types of Data And Statistical Inference.
© Tan,Steinbach, Kumar Introduction to Data Mining 8/05/ Data Mining: Exploring Data Lecture Notes for Chapter 3 Introduction to Data Mining by Tan,
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Data Mining: Data Lecture Notes for Chapter 2 Introduction to Data Mining by Tan, Steinbach,
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Data Mining: Data Lecture Notes for Chapter 2 Introduction to Data Mining by Tan, Steinbach,
CSE4334/5334 DATA MINING CSE4334/5334 Data Mining, Fall 2014 Department of Computer Science and Engineering, University of Texas at Arlington Chengkai.
1 What is Data? l An attribute is a property or characteristic of an object l Examples: eye color of a person, temperature, etc. l Attribute is also known.
Tallahassee, Florida, 2016 CIS4930 Introduction to Data Mining Getting to Know Your Data Peixiang Zhao.
3/13/2016Data Mining 1 Lecture 1-2 Data and Data Preparation Phayung Meesad, Ph.D. King Mongkut’s University of Technology North Bangkok (KMUTNB) Bangkok.
CENG 770. Data mining (knowledge discovery from data) – Extraction of interesting ( non-trivial, implicit, previously unknown and potentially useful)
CS 405G: Introduction to Database Systems. 9/29/20162 Review What Is Data Mining? Data mining (knowledge discovery from data) Extraction of interesting.
1 Data Mining Lecture 02a: Data Theses slides are based on the slides by Tan, Steinbach and Kumar (textbook authors)
Data Preliminaries CSC 600: Data Mining Class 1.
Lecture Notes for Chapter 2 Introduction to Data Mining
Data Mining Lecture 02a: Theses slides are based on the slides by Data
Lecture Notes for Chapter 2 Introduction to Data Mining
Lecture Notes for Chapter 2 Introduction to Data Mining
Ying shen Sse, tongji university Sep. 2016
Lecture Notes for Chapter 2 Introduction to Data Mining
Lecture Notes for Chapter 2 Introduction to Data Mining
CISC 4631 Data Mining Lecture 02:
Lecture Notes for Chapter 2 Introduction to Data Mining
Lecture Notes for Chapter 2 Introduction to Data Mining
Data Mining: Exploring Data
Lecture Notes for Chapter 2 Introduction to Data Mining
Principal Component Analysis (PCA)
Data Mining: “New” Teaching Road Map
Lecture Notes for Chapter 2 Introduction to Data Mining
Lecture Notes for Chapter 2 Introduction to Data Mining
Lecture Notes for Chapter 2 Introduction to Data Mining
Lecture 6: Data Quality and Pandas
Lecture Notes for Chapter 2 Introduction to Data Mining
Data Mining Lecture 02a: Theses slides are based on the slides by Data
Lecture Notes for Chapter 2 Introduction to Data Mining
Group 9 – Data Mining: Data
Data Preliminaries CSC 576: Data Mining.
Lecture Notes for Chapter 2 Introduction to Data Mining
Data Pre-processing Lecture Notes for Chapter 2
Data exploration and visualization
Lecture Notes for Chapter 2 Introduction to Data Mining
Presentation transcript:

Jeff Howbert Introduction to Machine Learning Winter Machine Learning Data

Jeff Howbert Introduction to Machine Learning Winter Data topics l Types of attributes l Data quality issues l Transformations l Visualization l Types of datasets l Preprocessing l Summary statistics

Jeff Howbert Introduction to Machine Learning Winter What is data? l Collection of data objects and their attributes l An attribute is a property or characteristic of an object –Examples: eye color of a person, temperature, etc. –Attribute is also known as variable, field, characteristic, or feature l A collection of attributes describe an object –Object is also known as record, point, case, sample, entity, or instance Attributes Objects

Jeff Howbert Introduction to Machine Learning Winter l Attribute values are numbers or symbols assigned to an attribute l Distinction between attributes and attribute values –Same attribute can be mapped to different attribute values  Example: height can be measured in feet or meters –Different attributes can be mapped to the same set of values  Example: Attribute values for ID and age are integers  But properties of attribute values can be different –ID has no limit but age has a maximum and minimum value Attribute values

Jeff Howbert Introduction to Machine Learning Winter l There are different types of attributes –Nominal  Examples: ID numbers, eye color, zip codes –Ordinal  Examples: rankings (e.g., taste of potato chips on a scale from 1-10), grades, height in {tall, medium, short} –Interval  Examples: calendar dates, temperatures in Celsius or Fahrenheit. –Ratio  Examples: temperature in Kelvin, length, time, counts Types of attributes

Jeff Howbert Introduction to Machine Learning Winter l The type of an attribute depends on which of the following properties it possesses: –Distinctness: =  –Order: –Addition: + - –Multiplication: * / –Nominal attribute: distinctness –Ordinal attribute: distinctness & order –Interval attribute: distinctness, order & addition –Ratio attribute: all four properties Properties of attributes

Attribute Type DescriptionExamplesStatistical Operations NominalThe values of a nominal attribute are just different names, i.e., nominal attributes provide only enough information to distinguish one object from another. (=,  ) zip codes, employee ID numbers, eye color, sex: {male, female} mode, entropy, contingency correlation,  2 test OrdinalThe values of an ordinal attribute provide enough information to order objects. ( ) hardness of minerals, {good, better, best}, grades, street numbers median, percentiles, rank correlation, run tests, sign tests IntervalFor interval attributes, the differences between values are meaningful, i.e., a unit of measurement exists. (+, - ) calendar dates, temperature in Celsius or Fahrenheit mean, standard deviation, Pearson's correlation, t and F tests RatioFor ratio variables, both differences and ratios are meaningful. (*, /) temperature in Kelvin, monetary quantities, counts, age, mass, length, electrical current geometric mean, harmonic mean, percent variation

Attribute Level Allowed TransformationsComments NominalAny permutation of valuesIf all employee ID numbers were reassigned, would it make any difference? OrdinalAn order preserving change of values, i.e., new_value = f(old_value) where f is a monotonic function. An attribute encompassing the notion of { good, better best } can be represented equally well by values, e.g. {1, 2, 3} or {0.5, 1, 10}. Intervalnew_value = a * old_value + b where a and b are constants The Fahrenheit and Celsius temperature scales differ in terms of where their zero value is and the size of a unit (degree). Rationew_value = a * old_valueLength can be measured in meters or feet.

Jeff Howbert Introduction to Machine Learning Winter l Discrete attribute –Has only a finite or countably infinite set of values –Examples: zip codes, counts, or the set of words in a collection of documents –Often represented as integer variables. –Note: binary attributes are a special case of discrete attributes l Continuous attribute –Has real numbers as attribute values –Examples: temperature, height, or weight. –Practically, real values can only be measured and represented using a finite number of digits. –Continuous attributes are typically represented as floating-point variables. Discrete and continuous attributes

Jeff Howbert Introduction to Machine Learning Winter l Record –Data matrix –Document data –Transaction data l Graph –World Wide Web –Molecular structures l Ordered –Spatial data –Temporal (time series) data –Sequential data –Genetic sequence data Types of data sets

Jeff Howbert Introduction to Machine Learning Winter l Data that consists of a collection of records, each of which consists of a fixed set of attributes Record data

Jeff Howbert Introduction to Machine Learning Winter l 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. l Such data set can be represented by an m x n matrix, where there are m rows, one for each object, and n columns, one for each attribute Data matrix

Jeff Howbert Introduction to Machine Learning Winter l Each document becomes a ‘term’ vector, –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. Document data team coach play ball score game win lost timeout season document document document

Jeff Howbert Introduction to Machine Learning Winter l A special type of record data, where –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. Transaction data

Jeff Howbert Introduction to Machine Learning Winter l Examples: Generic graph and HTML Links Graph data

Jeff Howbert Introduction to Machine Learning Winter l Benzene molecule: C 6 H 6 Chemical data

Jeff Howbert Introduction to Machine Learning Winter l Sequences of transactions Ordered data An element of the sequence Items/Events

Jeff Howbert Introduction to Machine Learning Winter l Genomic sequence data Ordered data

Jeff Howbert Introduction to Machine Learning Winter Ordered data l Spatio-temporal data Average monthly temperature of land and ocean

Jeff Howbert Introduction to Machine Learning Winter Preprocessed data Stages of knowledge extraction Data Target data Selection Knowledge Transformed data Patterns Machine learning Interpretation / evaluation Preprocessing Transformation

Jeff Howbert Introduction to Machine Learning Winter l What kinds of data quality problems? l How can we detect problems with the data? l What can we do about these problems? l Examples of data quality problems: –noise and outliers –missing values –duplicate data Data quality

Jeff Howbert Introduction to Machine Learning Winter l Noise refers to random modification of original values l Examples: – distortion of a person’s voice when talking on a poor phone –“snow” on television screen Noise Two sine wavesTwo sine waves + noise

Jeff Howbert Introduction to Machine Learning Winter l Dealing with noise –Mostly you have to live with it –Certain kinds of smoothing or averaging can be helpful –In the right domain (e.g. signal processing), transformation to a different space can get rid of majority of noise Noise

Jeff Howbert Introduction to Machine Learning Winter l Outliers are data objects with characteristics that are considerably different than most of the other data objects in the data set Outliers

Jeff Howbert Introduction to Machine Learning Winter l Dealing with outliers –There are robust statistical methods for detecting outliers –In some situations, you want to get rid of outliers  but be judicious – they may carry useful, even important information –In other situations, the outliers are the objects of interest  anomaly detection Outliers

Jeff Howbert Introduction to Machine Learning Winter l Reasons for missing values –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) l Handling missing values –Eliminate data objects –Estimate missing values (imputation) –Ignore the missing value during analysis –Replace with all possible values (weighted by their probabilities) Missing values

Jeff Howbert Introduction to Machine Learning Winter l Data set may include data objects that are duplicates, or almost duplicates of one another –Major issue when merging data from heterogeous sources l Example: –Same person with multiple addresses l Data cleaning –Includes process of dealing with duplicate data issues Duplicate data

Jeff Howbert Introduction to Machine Learning Winter l Aggregation l Sampling l Discretization and binarization l Attribute transformation l Feature creation l Feature selection –Choose subset of existing features l Dimensionality reduction –Create smaller number of new features through linear or nonlinear combination of existing features Data preprocessing

Jeff Howbert Introduction to Machine Learning Winter l Combining two or more attributes (or objects) into a single attribute (or object) l Purpose –Data reduction  Reduce the number of attributes or objects –Change of scale  Cities aggregated into regions, states, countries, etc. –More “stable” data  Aggregated data tends to have less variability Aggregation

Jeff Howbert Introduction to Machine Learning Winter Aggregation Standard deviation of average monthly precipitation Standard deviation of average yearly precipitation Variation of precipitation in Australia

Jeff Howbert Introduction to Machine Learning Winter l Sampling is the main technique employed for data selection. –Often used for both preliminary investigation of the data and the final data analysis. l Statisticians sample because obtaining the entire set of data of interest is too expensive or time consuming. l Sampling is used in data mining because processing the entire set of data of interest is too expensive or time consuming. Sampling

Jeff Howbert Introduction to Machine Learning Winter l The key principle for effective sampling is the following: –Using a sample will work almost as well as using the entire data set, provided the sample is representative. –A sample is representative if it has approximately the same distribution of properties (of interest) as the original set of data Sampling

Jeff Howbert Introduction to Machine Learning Winter l Simple random sampling –There is an equal probability of selecting any particular item. l Sampling without replacement –As each item is selected, it is removed from the population. l Sampling with replacement –Objects are not removed from the population as they are selected for the sample.  Same object can be selected more than once. l Stratified sampling –Split the data into several partitions; then draw random samples from each partition. –Example: During polling, you might want equal numbers of male and female respondents. You create separate pools of men and women, and sample separately from each. Types of sampling

Jeff Howbert Introduction to Machine Learning Winter Sample size 8000 points 2000 Points500 Points

Jeff Howbert Introduction to Machine Learning Winter l What sample size is necessary to get at least one object from each of 10 equal-sized groups? Sample size

Jeff Howbert Introduction to Machine Learning Winter Approaches to discretization Original attribute values Equal interval width Equal frequencyk-means

Jeff Howbert Introduction to Machine Learning Winter Attribute transformation Definition: 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.

Jeff Howbert Introduction to Machine Learning Winter Attribute transformation l Simple functions –Examples of transform functions: x k log( x )e x | x | –Often used to make the data more like some standard distribution, to better satisfy assumptions of a particular algorithm.  Example: discriminant analysis explicitly models each class distribution as a multivariate Gaussian log( x )

Jeff Howbert Introduction to Machine Learning Winter Attribute transformation l Standardization or normalization –Usually involves making attribute: mean = 0 standard deviation = 1  in MATLAB, use zscore() function –Important when working in Euclidean space and attributes have very different numeric scales. –Also necessary to satisfy assumptions of certain algorithms.  Example: principal component analysis (PCA) requires each attribute to be mean-centered (i.e. have mean subtracted from each value)

Jeff Howbert Introduction to Machine Learning Winter l Fourier transform –Eliminates noise present in time domain Transform data to a new space Two sine wavesTwo sine waves + noiseFrequency

Jeff Howbert Introduction to Machine Learning Winter Let’s use a tool that’s good at those things … PowerPoint isn’t it Summary statistics and visualization

Jeff Howbert Introduction to Machine Learning Winter Iris dataset l Many exploratory data techniques are nicely illustrated with the iris dataset. –Dataset created by famous statistician Ronald Fisher –150 samples of three species in genus Iris (50 each)  Iris setosa  Iris versicolor  Iris virginica –Four attributes  sepal width  sepal length  petal width  petal length –Species is class label Iris virginica. Robert H. Mohlenbrock. USDA NRCS Northeast wetland flora: Field office guide to plant species. Northeast National Technical Center, Chester, PA. Courtesy of USDA NRCS Wetland Science Institute.