Docsity

Data Preprocessing - Lecture Slides | CIS 6930, Study notes of Computer Science

Toggle sidebar
bg1
1
University of Florida CISE department Gator Engineering
Data Preprocessing
Dr. Sanjay Ranka
Professor
Computer and Information Science and Engineering
University of Florida, Gainesville
Data Mining Sanjay Ranka Fall 2003 2
University of Florida CISE department Gator Engineering
Data Preprocessing
• What preprocessing step can or should we
apply to the data to make it more suitable
for data mining?
– Aggregation
– Sampling
– Dimensionality Reduction
– Feature Subset Selection
– Feature Creation
– Discretization and Binarization
– Attribute Transformation
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Data Preprocessing - Lecture Slides | CIS 6930 and more Study notes Computer Science in PDF only on Docsity!

Data Preprocessing

Dr. Sanjay Ranka

Professor

Computer and Information Science and Engineering

University of Florida, Gainesville

[email protected]

Data Mining Sanjay Ranka Fall 2003 2 University of Florida CISE department Gator Engineering

Data Preprocessing

• What preprocessing step can or should we

apply to the data to make it more suitable

for data mining?

– Aggregation

– Sampling

– Dimensionality Reduction

– Feature Subset Selection

– Feature Creation

– Discretization and Binarization

– Attribute Transformation

Data Mining Sanjay Ranka Fall 2003 3

Aggregation

• Aggregation refers to combing two or more

attributes (or objects) into a single attribute (or

object)

• For example, merging daily sales figures to

obtain monthly sales figures

• Why aggregation?

– Data reduction

• Allows use of more expensive algorithms

– If done properly, aggregation can act as scope or

scale, providing a high level view of data instead of a

low level view

Data Mining Sanjay Ranka Fall 2003 4 University of Florida CISE department Gator Engineering

– Behavior of group of objects in more stable

than that of individual objects

• The aggregate quantities have less variability than

the individual objects being aggregated

Standard Deviation of Average Monthly Precipitation Standard Deviation of Average Yearly Precipitation

Data Mining Sanjay Ranka Fall 2003 7

Sampling Approaches

• Simple Random Sampling

– There is an equal probability of selecting

any particular item

– Sampling without replacement: Once an

item is selected, it is removed from the

population for obtaining future samples

– Sampling with replacement: Selected

item is not removed from the population

for obtaining future samples

Data Mining Sanjay Ranka Fall 2003 8 University of Florida CISE department Gator Engineering

• Stratified Sampling

– When subpopulations vary considerably, it is

advantageous to sample each subpopulation

(stratum) independently

– Stratification is the process of grouping members of

the population into relatively homogeneous

subgroups before sampling

– The strata should be mutually exclusive : every

element in the population must be assigned to only

one stratum. The strata should also be collectively

exhaustive : no population element can be excluded

– Then random sampling is applied within each

stratum. This often improves the representative-ness

of the sample by reducing sampling error

Sampling Approaches

Data Mining Sanjay Ranka Fall 2003 9

Sample Size

• Even if proper sampling technique is

known, it is important to choose proper

sample size

• Larger sample sizes increase the

probability that a sample will be

representative, but also eliminate much of

the advantage of sampling

• With smaller sample size, patterns may be

missed or erroneous patters detected

Data Mining Sanjay Ranka Fall 2003 10 University of Florida CISE department Gator Engineering

Sample Size / Fraction

8000 points 2000 points 500 points

Example of the Loss of Structure with Sampling

Data Mining Sanjay Ranka Fall 2003 13

Dimensionality Reduction

• Determining dimensions (or combinations of

dimensions) that are important for modeling

• Why dimensionality reduction?

– Many data mining algorithms work better if the

dimensionality of data (i.e. number of attributes) is

lower

– Allows the data to be more easily visualized

– If dimensionality reduction eliminates irrelevant

features or reduces noise, then quality of results may

improve

– Can lead to a more understandable model

Data Mining Sanjay Ranka Fall 2003 14 University of Florida CISE department Gator Engineering

Dimensionality Reduction

• Redundant features duplicate much or all of

the information contained in one or more

attributes

– The purchase price of product and the sales

tax paid contain the same information

• Irrelevant features contain no information

that is useful for data mining task at hand

– Student ID numbers would be irrelevant to

the task of predicting their GPA

Data Mining Sanjay Ranka Fall 2003 15

Dimensionality Reduction using

Principal Component Analysis

• Some of the most common approaches for

dimensionality reduction, particularly for

continuous data, use a linear or non-linear

projection of data from a high dimensional space

to a lower dimensional space

• PCA is a linear algebra technique for continuous

attributes that finds new attributes (principal

components) that

– Are linear combinations of original attributes

– Are orthogonal to each other

– Capture the maximum amount of variation in data

Data Mining Sanjay Ranka Fall 2003 16 University of Florida CISE department Gator Engineering

Dimensionality Reduction by

Feature Subset Selection

• There are three standard approaches to

feature selection:

– Embedded approaches: Feature selection

occurs naturally as part of the data mining

algorithm

– Filter approaches: Features are selected before

the data mining algorithm is run

– Wrapper approaches: Use the target data

mining algorithm as a black box to find the

best subset of attributes (typically without

enumerating all subsets)

Data Mining Sanjay Ranka Fall 2003 19

Feature Extraction

• One approach to dimensionality reduction is feature

extraction, which is creation of a new, smaller set of

features from the original set of features

• For example, consider a set of photographs, where each

photograph is to be classified whether its human face or

not

• The raw data is set of pixels, and as such is not suitable

for many classification algorithms

• However, if data is processed to provide high-level

features like presence or absence of certain types of

edges or areas correlated with presence of human faces,

then a broader set of classification techniques can be

applied to the problem

Data Mining Sanjay Ranka Fall 2003 20 University of Florida CISE department Gator Engineering

Mapping the Data to a New Space

• Sometimes, a totally different view of the data can reveal important

and interesting features

• Example: Applying Fourier transformation to data to detect time

series patterns

Original Time Series Time Series with noise Frequency plot

Data Mining Sanjay Ranka Fall 2003 21

Feature Construction

• Sometimes features have the necessary

information, but not in the form necessary for

the data mining algorithm. In this case, one or

more new features constructed out of the

original features may be useful

• Example, there are two attributes that record

volume and mass of a set of objects

• Suppose there exists a classification model based

on material of which the objects are constructed

• Then a density feature constructed from the

original two features would help classification

Data Mining Sanjay Ranka Fall 2003 22 University of Florida CISE department Gator Engineering

Discretization and Binarization

• Discretization is the process of converting a

continuous attribute to a discrete attribute

• A common example is rounding off real

numbers to integers

• Some data mining algorithms require that the

data be in the form of categorical or binary

attributes. Thus, it is often necessary to convert

continuous attributes in to categorical attributes

and / or binary attributes

• Its pretty straightforward to convert categorical

attributes in to discrete or binary attributes

Data Mining Sanjay Ranka Fall 2003 25

Different Discretization Techniques

• Entropy based approach

3 categories for both x and y 5 categories for both x and y

Data Mining Sanjay Ranka Fall 2003 26 University of Florida CISE department Gator Engineering

Attribute Transformation

• An attribute transformation refers to a

transformation that is applied to all values

of an attribute, i.e., for each object, the

transformation is applied to the value of

the attribute for that object

• There are two important types of attribute

transformations

– Simple function transformations

• Example: xk, log x, ex, sqrt x, etc.

– Standardization or normalization