Data Mining Chapter3 0
Data Mining Chapter3 0
Preprocess Steps
Data cleaning
Data in the real world is dirty incomplete: lacking attribute values, lacking certain attributes of interest, or containing only aggregate data noisy: containing errors or outliers inconsistent: containing discrepancies in codes or names No quality data, no quality mining results! Quality decisions must be based on quality data Data warehouse needs consistent integration of quality data
Data Mining: Babu Ram Dawadi 2
A well-accepted multidimensional view: Accuracy Completeness Consistency Timeliness Believability Value added Interpretability Accessibility
Data Mining: Babu Ram Dawadi 3
Data cleaning
Fill in missing values, smooth noisy data, identify or remove outliers, and resolve inconsistencies Integration of multiple databases, data cubes, or files Normalization and aggregation Obtains reduced representation in volume but produces the same or similar analytical results
Data integration
Data transformation
Data reduction
Data Cleaning
Fill in missing values Identify outliers and smooth out noisy data Correct inconsistent data
Missing Data
E.g., many tuples have no recorded value for several attributes, such as customer income in sales data
equipment malfunction inconsistent with other recorded data and thus deleted data not entered due to misunderstanding certain data may not be considered important at the time of entry not register history or changes of the data
Ignore the tuple: usually done when class label is missing (assuming
Fill in the missing value manually: tedious + infeasible? Use a global constant to fill in the missing value: e.g., unknown, a new class?! Use the attribute mean to fill in the missing value Use the attribute mean for all samples belonging to the same class to fill in the missing value: smarter Use the most probable value to fill in the missing value: inferencebased such as Bayesian formula or decision tree
Data Mining: Babu Ram Dawadi 8
Noisy Data
Noise: random error or variance in a measured variable Incorrect attribute values may due to faulty data collection instruments data entry problems data transmission problems technology limitation inconsistency in naming convention Other data problems which requires data cleaning duplicate records incomplete data inconsistent data
Data Mining: Babu Ram Dawadi 9
Binning method: first sort data and partition into (equi-depth) bins then one can smooth by bin means, smooth by bin median Equal-width (distance) partitioning:
It divides the range into N intervals of equal size: uniform grid if A and B are the lowest and highest values of the attribute, the width of intervals will be: W = (B-A)/N. It divides the range into N intervals, each containing approximately same number of samples Managing categorical attributes can be tricky.
Combined computer and human inspection detect suspicious values and check by human
Data Mining: Babu Ram Dawadi
10
Cluster Analysis
Clustering: detect and remove outliers
11
Regression
y Regression: smooth by fitting the data into regression functions
Y1
Y1
y=x+1
X1
12
Data Integration
Data integration: combines data from multiple sources. Schema integration integrate metadata from different sources Entity identification problem: identify real world entities from multiple data sources, e.g., A.cust-id B.cust-# Detecting and resolving data value conflicts for the same real world entity, attribute values from different sources are different possible reasons: different representations, different scales, e.g., metric vs. British units
Data Mining: Babu Ram Dawadi 13
Careful integration of the data from multiple sources may help reduce/avoid redundancies and inconsistencies and improve mining speed and quality
Data Mining: Babu Ram Dawadi 14
Data Transformation
Smoothing: remove noise from data Aggregation: summarization, data cube construction Generalization: concept hierarchy climbing Normalization: scaled to fall within a small, specified range
Attribute/feature construction
min-max normalization
Suppose that mina and maxa are the minimum and the maximum values for attribute A. Min-max normalization maps a value v of A to v in the range [new-mina, new-maxa] by computing:
16
Z-score Normalization:
In z-score normalization, attribute A are normalized based on the mean and standard deviation of A. a value v of A is normalized to v by computing:
v = ( ( v
)/ A)
where and A are the mean and the standard deviation respectively of attribute A.
This method of normalization is useful when the actual minimum and maximum of attribute A are unknown.
Data Mining: Babu Ram Dawadi 17
Normalization by decimal scaling normalizes by moving the decimal point of values of attribute A.
The number of decimal points moved depends on the maximum absolute value of A.
a value v of A is normalized to v by computing: v = ( v / 10j ). Where j is the smallest integer such that Max(|v|)<1.
18
Warehouse may store terabytes of data: Complex data analysis/mining may take a very long time to run on the complete data set Data reduction Obtains a reduced representation of the data set that is much smaller in volume but yet produces the same (or almost the same) analytical results
Data reduction strategies Data cube aggregation Dimensionality reduction concept hierarchy generation
Data Mining: Babu Ram Dawadi 19
Data Compression
String compression Typically lossless Audio/video compression Typically lossy compression, with progressive refinement Sometimes small fragments of signal can be reconstructed without reconstructing the whole
20
Data Compression
Original Data
lossless
Compressed Data
characterize the general properties of the data in the database finds patterns in data and the user determines which ones are important
perform inference on the current data to make predictions we know what to predict
used together Descriptive predictive Eg. Customer segmentation descriptive by clustering Followed by a risk assignment model predictive by ANN
Data Mining: Babu Ram Dawadi 22
Discovering new patterns inside the data Used during the data exploration steps Typical questions answered by descriptive data mining what is in the data what does it look like are there any unusual patterns what dose the data suggest for customer segmentation users may have no idea which kind of patterns may be interesting
23
student
24
X: vector of independent variables or inputs Y =f(X) : an unknown function Y: dependent variables or output a single variable or a vector inputs X1,X2 Model Y output
The user does not care what the model is doing it is a black box
April 19, 2013 Data Mining: Babu Ram Dawadi 25
Using known examples the model is trained the unknown function is learned from data the more data with known outcomes is available the better the predictive power of the model Used to predict outcomes whose inputs are known but the output values are not realized yet
Database
April 19, 2013
Architecture: DM system
A good data mining architecture will help to make best use of software environment, perform DM tasks in efficient and timely manner, interoperate and exchange information with other information systems, be adaptable to varying user requirement.
Data mining system architecture includes the consideration of coupling a data mining system with a database or data warehouse system
37
Coupling
There are several possible designs such as no coupling, loose coupling, semi tight coupling and tight coupling
No coupling means that a data mining system will not utilize any function of a database or data warehouse system
It may fetch data from a particular source (such as a file system), process data using some data mining algorithms, and then store the mining results in another file
Data Mining: Babu Ram Dawadi 38
Loose Coupling
Loose coupling means that a data mining system will use some facilities of a database or data warehouse system Fetching data from a data repository managed by database or data warehouse system, and then storing the mining results either in a file or in a designated place in a database or data warehouse
39
besides linking a data mining system to database or data warehouse system, efficient implementations of a few essential data mining primitives can be provided in the database or data warehouse system These primitives can include sorting, indexing, aggregation, histogram analysis, multi-way join, and some pre-computation of some essential statistical measures, such as sum, count max, min, and so on.
Data Mining: Babu Ram Dawadi 40
Tight Coupling
Tight coupling means that a data mining systems smoothly integrated into the database or data warehouse system The data mining subsystem is treated as one functional component of an information system This approach is highly desirable since it facilitates efficient implementations of data mining functions, high system performance, and an integrated information processing environment
A well designed data mining system should offer tight or semi tight coupling with a database or data warehouse system.
Data Mining: Babu Ram Dawadi 41