【正文】
g: 使用簡單的領(lǐng)域知識 (., 郵編 , 拼寫檢查 ) 檢查并糾正錯誤 ? 數(shù)據(jù)審計 Data auditing: 通過分析數(shù)據(jù)發(fā)現(xiàn)規(guī)則和聯(lián)系發(fā)現(xiàn)違規(guī)者 (孤立點(diǎn) ) ? 數(shù)據(jù)遷移和集成 ? 數(shù)據(jù)遷移工具 Data migration tools:允許指定轉(zhuǎn)換 ? 提取 /變換 /裝入工具 ETL (Extraction/Transformation/Loading) tools: 允許用戶通過圖形用戶界面指定變換 ? 整合兩個過程 ? 兩個過程迭代和交互執(zhí)行 (., Potter’s Wheels) 18 第 2章 : 數(shù)據(jù)預(yù)處理 ? 為什么預(yù)處理數(shù)據(jù) ? ? 數(shù)據(jù)清理 ? 數(shù)據(jù)集成 ? 數(shù)據(jù)歸約 ? 離散化和概念分層產(chǎn)生 ? 小結(jié) 19 數(shù)據(jù)集成 ? 數(shù)據(jù)集成 Data integration: ? 合并多個數(shù)據(jù)源中的數(shù)據(jù),存在一個一致的數(shù)據(jù)存儲中 ? 涉及 3個主要問題:模式集成、冗余數(shù)據(jù)、沖突數(shù)據(jù)值 ? 模式集成 Schema integration ? 例如 ., ?? ? 實(shí)體識別問題 Entity identification problem: ? 多個數(shù)據(jù)源的真實(shí)世界的實(shí)體的識別 , ., Bill Clinton = William Clinton ? 集成不同來源的元數(shù)據(jù) ? 沖突數(shù)據(jù)值的檢測和解決 ? 對真實(shí)世界的實(shí)體,其不同來源的屬性值可能不同 ? 原因 :不同的表示 ,不同尺度 ,公制 vs. 英制 20 數(shù)據(jù)集成中冗余數(shù)據(jù)處理 ? 冗余數(shù)據(jù) Redundant data (集成多個數(shù)據(jù)庫時出現(xiàn)) ? 目標(biāo)識別:同一個屬性在不同的數(shù)據(jù)庫中有不同的名稱 ? 衍生數(shù)據(jù):一個屬性值可由其他表的屬性推導(dǎo)出 , .,年收入 ? 相關(guān)分析 correlation analysis /協(xié)方差分析covariance analysis ? 可用于檢測冗余數(shù)據(jù) ? 小心的集成多個來源的數(shù)據(jù)可以幫助降低和避免結(jié)果數(shù)據(jù)集中的冗余和不一致,提高數(shù)據(jù)挖掘的速度和質(zhì)量 21 相關(guān)分析 (數(shù)值數(shù)據(jù) ) ? Correlation coefficient (also called Pearson’s product moment coefficient) ? 相關(guān)系數(shù)(皮爾遜相關(guān)系數(shù)) n元組個數(shù) , 和 屬性 A和 B上的平均值 , σA and σB分別為各自標(biāo)準(zhǔn)差, Σ(aibi) is the AB叉積 crossproduct之和 . ? If rA,B 0, A and B 整相關(guān) (A’s values increase as B’s). 值越大相關(guān)程度越高 . ? rA,B = 0: 不相關(guān) 。 rAB 0: 負(fù)相關(guān) BAni iiBAni iiBA nBAnbanBbAar???? )1()()1())(( 11, ??????? ?? ??A B22 相關(guān)性的視覺評價 Scatter plots showing the similarity from –1 to 1. 23 相關(guān) (線形關(guān)系 ) ? 相關(guān)測量的是對象間的線性關(guān)系 ? To pute correlation, we standardize data objects, A and B, and then take their dot product )(/))((39。 As t dAme a naa kk ??)(/))((39。 Bs t dBme a nbb kk ??39。39。),( BABAnc o r r e l a t i o ??24 ? Covariance is similar to correlation n元組個數(shù) , 和 屬性 A和 B上的平均值 , σA and σB分別為各自標(biāo)準(zhǔn)差 . ? 正 covariance: If CovA,B 0, 則 A 和 B 同時傾向于大于期望值 . ? 負(fù) covariance: If CovA,B 0,則如果 A〉 其期望值 , B is likely to be smaller than its expected value. ? Independence: CovA,B = 0 but the converse is not true: ? Some pairs of random variables may have a covariance of 0 but are not independent. Only under some additional assumptions (., the data follow multivariate normal distributions) does a covariance of 0 imply independence 協(xié)方差 Covariance (Numeric Data) A BCorrelation coefficient: 25 CoVariance: An Example ? It can be simplified in putation as ? 設(shè)兩個股票 A 和 B 一周內(nèi)值如下 (2, 5), (3, 8), (5, 10), (4, 11), (6, 14). ? 問 : 如果股票是由同行業(yè)趨勢的影響,它們的價格將一起上升或下降? ? E(A) = (2 + 3 + 5 + 4 + 6)/ 5 = 20/5 = 4 ? E(B) = (5 + 8 + 10 + 11 + 14) /5 = 48/5 = ? Cov(A,B) = (2 5+3 8+5 10+4 11+6 14)/5 ? 4 = 4 ? Thus, A and B rise together since Cov(A, B) 0. 26 相關(guān)分析 (名義數(shù)據(jù) Nominal Data) ? Χ2 (chisquare) test 開方檢驗 ? σ ij是 (ai,bj)的觀測頻度(實(shí)際計數(shù)) ? eij是 (ai,bj)的期望頻度 ? N數(shù)據(jù)元組的個數(shù) 屬 A 性 a1 a2 i? ac b1 B b2 j? br (A=ai,B=bj) ??????rj ijijijci ee1212 )(??NbBc o u n taAc o u n te jiij)(*)( ????Χ2 值越大 ,相關(guān)的可能越大 ?對 Χ2 值貢獻(xiàn)最大的項,其實(shí)際值與期望值相差最大的相 ?相關(guān)不意味著因果關(guān)系 27 ChiSquare 卡方值計算 : 例子 ? Χ2 (chisquare) 計算 (括號中的值為期望計值,由兩個類別的分布數(shù)據(jù)計算得到 ) ? 結(jié)果表明 like_fiction 和 play_chess 關(guān)聯(lián) )8401000(360 )360200(210 )21050(90 )90250( 22222 ??????????Play chess Not play chess Sum (row) 看小說 250(90) 200(360) 450 不看小說 50(210) 1000(840) 1050 Sum(col.) 300 1200 1500 9015