Download Data Minining - Discretization and concept hierarchy generation and more Study notes Data Mining in PDF only on Docsity!
November 19, 2014 Data Mining: Concepts and 1
CHAPTER 2: Data
Preprocessing
• Why preprocess the data?
• Data cleaning
• Data integration and transformation
• Data reduction
• Discretization and concept hierarchy
generation
• Summary
November 19, 2014 Data Mining: Concepts and 2
Discretization
- (^) Three types of attributes:
- (^) Nominal — values from an unordered set, e.g., color, profession
- (^) Ordinal — values from an ordered set, e.g., military or academic rank
- (^) Continuous — real numbers, e.g., integer or real numbers
- (^) Discretization:
- Divide the range of a continuous attribute into intervals
- (^) Some classification algorithms only accept categorical attributes.
- (^) Reduce data size by discretization
- (^) Prepare for further analysis
November 19, 2014 Data Mining: Concepts and 4
Discretization and Concept Hierarchy
Generation for Numeric Data
- (^) Typical methods: All the methods can be applied recursively
- (^) Binning (covered above)
- (^) Top-down split, unsupervised,
- (^) Histogram analysis (covered above)
- (^) Top-down split, unsupervised
- (^) Clustering analysis (covered above)
- (^) Either top-down split or bottom-up merge, unsupervised
- (^) Entropy-based discretization: supervised, top-down split
- (^) Interval merging by ^2 Analysis: unsupervised, bottom-up merge
- (^) Segmentation by natural partitioning: top-down split, unsupervised
November 19, 2014 Data Mining: Concepts and 5
Entropy-Based
Discretization
- (^) Given a set of samples S, if S is partitioned into two intervals S 1 and S 2 using boundary T, the information gain after partitioning is
- (^) Entropy is calculated based on class distribution of the samples in the set. Given m classes, the entropy of S 1 is where pi is the probability of class i in S 1
- (^) The boundary that minimizes the entropy function over all possible boundaries is selected as a binary discretization
- (^) The process is recursively applied to partitions obtained until some stopping criterion is met
- (^) Such a boundary may reduce data size and improve classification accuracy
2 1 1 Entropy S S
S
Entropy S S
S
I S T
m i Entropy S pi p i 1 ( 1 ) log 2 ( )
November 19, 2014 Data Mining: Concepts and 7
Segmentation by Natural
Partitioning
- (^) A simply 3-4-5 rule can be used to segment numeric data into relatively uniform, “natural” intervals.
- (^) If an interval covers 3, 6, 7 or 9 distinct values at the most significant digit, partition the range into 3 equi-width intervals
- (^) If it covers 2, 4, or 8 distinct values at the most significant digit, partition the range into 4 intervals
- (^) If it covers 1, 5, or 10 distinct values at the most significant digit, partition the range into 5 intervals
November 19, 2014 Data Mining: Concepts and 8
Example of 3-4-5 Rule
(-$400 -$5,000) (-$400 - 0) (-$400 - -$300) (-$300 - -$200) (-$200 - -$100) (-$100 -
(0 - $1,000) (0 - $200) ($200 - $400) ($400 - $600) ($600 - $800) ($800 - $1,000) ($2,000 - $5, 000) ($2,000 - $3,000) ($3,000 - $4,000) ($4,000 - $5,000) ($1,000 - $2, 000) ($1,000 - $1,200) ($1,200 - $1,400) ($1,400 - $1,600) ($1,600 - $1,800) ($1,800 - $2,000) Step 2: msd=1,000 Low=-$1,000 High=$2, Step 4: Step 1: -$351 -$159 profit $1,838 $4, Min Low (i.e, 5%-tile) High(i.e, 95%-0 tile) Max count (-$1,000 - $2,000) (-$1,000 - 0) (^) (0 -$ 1,000) Step 3: ($1,000 - $2,000)
November 19, 2014 Data Mining: Concepts and 10 Automatic Concept Hierarchy Generation
- (^) Some hierarchies can be automatically generated based on the analysis of the number of distinct values per attribute in the data set - (^) The attribute with the most distinct values is placed at the lowest level of the hierarchy - (^) Exceptions, e.g., weekday, month, quarter, year country province_or_ state city street 15 distinct values 365 distinct values 3567 distinct values 674,339 distinct values
November 19, 2014 Data Mining: Concepts and 11 Concept Hierarchy Generation
November 19, 2014 Data Mining: Concepts and 13 Concept Hierarchy Generation
November 19, 2014 Data Mining: Concepts and 14
UNIT I: Data
Preprocessing
• Why preprocess the data?
• Data cleaning
• Data integration and transformation
• Data reduction
• Discretization and concept hierarchy
generation
• Summary