Data Cleaning as a Process Data discrepancy detection Use metadata(e.g. domain, range, dependency distribution) Check field overloading Check uniqueness rule consecutive rule and null rule Use commercial tools Data scrubbing: use simple domain knowledge(e.g. postal code, spell-check) to detect errors and make corrections Data auditing: by analyzing data to discover rules and relationship to detect violators(e.g. correlation and clusterin to find outliers) Data migration and integration Data migration tools: allow transformations to be specified ETL(EXtraction/Transformation/Loading tools: allow users to specify transformations through a graphical user interface Integration of the two processes Iterative and interactive(e.g, Potters Wheels 11
11 Data Cleaning as a Process ◼ Data discrepancy detection ◼ Use metadata (e.g., domain, range, dependency, distribution) ◼ Check field overloading ◼ Check uniqueness rule, consecutive rule and null rule ◼ Use commercial tools ◼ Data scrubbing: use simple domain knowledge (e.g., postal code, spell-check) to detect errors and make corrections ◼ Data auditing: by analyzing data to discover rules and relationship to detect violators (e.g., correlation and clustering to find outliers) ◼ Data migration and integration ◼ Data migration tools: allow transformations to be specified ◼ ETL (Extraction/Transformation/Loading) tools: allow users to specify transformations through a graphical user interface ◼ Integration of the two processes ◼ Iterative and interactive (e.g., Potter’s Wheels)
Data Integrati。n Data integration Combines data from multiple sources into a coherent store Schema integration: e. g. A cust-id B cust-# Integrate metadata from different sources Entity identification problem: Identify real world entities from multiple data sources e.g. Bil Clinton= William Clinton 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 12
12 Data Integration ◼ Data integration: ◼ Combines data from multiple sources into a coherent store ◼ Schema integration: e.g., A.cust-id B.cust-# ◼ Integrate metadata from different sources ◼ Entity identification problem: ◼ Identify real world entities from multiple data sources, e.g., Bill Clinton = William Clinton ◼ 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
Handling Redundancy in Data Integration Redundant data occur often when integration of multiple databases Object identification The same attribute or object may have different names in different databases Derivable data, One attribute may be a derived attribute in another table, e.g. annual revenue Redundant attributes may be able to be detected by correlation analysis and covariance analysis Careful integration of the data from multiple sources may help reduce/ avoid redundancies and inconsistencies and improve mining speed and quality 13
13 Handling Redundancy in Data Integration ◼ Redundant data occur often when integration of multiple databases ◼ Object identification: The same attribute or object may have different names in different databases ◼ Derivable data: One attribute may be a “derived” attribute in another table, e.g., annual revenue ◼ Redundant attributes may be able to be detected by correlation analysis and covariance analysis ◼ Careful integration of the data from multiple sources may help reduce/avoid redundancies and inconsistencies and improve mining speed and quality
Correlation Analysis( Nominal Data) X(chi-square) test (Observed-Expected) Expected The larger the X2 value, the more likely the variables are related The cells that contribute the most to the x2 value are those whose actual count is very different from the expected count Correlation does not imply causality f of hospitals and of car-theft in a city are correlated Both are causally linked to the third variable: population 14
14 Correlation Analysis (Nominal Data) ◼ Χ2 (chi-square) test ◼ The larger the Χ 2 value, the more likely the variables are related ◼ The cells that contribute the most to the Χ 2 value are those whose actual count is very different from the expected count ◼ Correlation does not imply causality ◼ # of hospitals and # of car-theft in a city are correlated ◼ Both are causally linked to the third variable: population − = Expected Observed Expected 2 2 ( )
Chi-Square Calculation: An Example Play chess Not play chess Sum(row) Like science fiction 250(90)20(360) 450 Not like science fiction 50(210) 1000(840) 1050 Sum(col 300 1200 1500 X2(chi-square) calculation(numbers in parenthesis are expected counts calculated based on the data distribution in the two categories (250-90)2(50-210)2(200-360)2(1000-840) x =507.93 90 210 360 840 It shows that like_science_fiction and play_chess are correlated in the group 15
15 Chi-Square Calculation: An Example ◼ Χ 2 (chi-square) calculation (numbers in parenthesis are expected counts calculated based on the data distribution in the two categories) ◼ It shows that like_science_fiction and play_chess are correlated in the group 507.93 840 (1000 840) 360 (200 360) 210 (50 210) 90 (250 90) 2 2 2 2 2 = − + − + − + − = Play chess Not play chess Sum (row) Like science fiction 250(90) 200(360) 450 Not like science fiction 50(210) 1000(840) 1050 Sum(col.) 300 1200 1500