【正文】
? 數據集成 ? 數據歸約 ? 離散化和概念分層產生 ? 小結 19 數據集成 ? 數據集成 Data integration: ? 合并多個數據源中的數據,存在一個一致的數據存儲中 ? 涉及 3個主要問題:模式集成、冗余數據、沖突數據值 ? 模式集成 Schema integration ? 例如 ., ?? ? 實體識別問題 Entity identification problem: ? 多個數據源的真實世界的實體的識別 , ., Bill Clinton = William Clinton ? 集成不同來源的元數據 ? 沖突數據值的檢測和解決 ? 對真實世界的實體,其不同來源的屬性值可能不同 ? 原因 :不同的表示 ,不同尺度 ,公制 vs. 英制 20 數據集成中冗余數據處理 ? 冗余數據 Redundant data (集成多個數據庫時出現) ? 目標識別:同一個屬性在不同的數據庫中有不同的名稱 ? 衍生數據:一個屬性值可由其他表的屬性推導出 , .,年收入 ? 相關分析 correlation analysis /協(xié)方差分析covariance analysis ? 可用于檢測冗余數據 ? 小心的集成多個來源的數據可以幫助降低和避免結果數據集中的冗余和不一致,提高數據挖掘的速度和質量 21 相關分析 (數值數據 ) ? Correlation coefficient (also called Pearson’s product moment coefficient) ? 相關系數(皮爾遜相關系數) n元組個數 , 和 屬性 A和 B上的平均值 , σA and σB分別為各自標準差, Σ(aibi) is the AB叉積 crossproduct之和 . ? If rA,B 0, A and B 整相關 (A’s values increase as B’s). 值越大相關程度越高 . ? rA,B = 0: 不相關 。 rAB 0: 負相關 BAni iiBAni iiBA nBAnbanBbAar???? )1()()1())(( 11, ??????? ?? ??A B22 相關性的視覺評價 Scatter plots showing the similarity from –1 to 1. 23 相關 (線形關系 ) ? 相關測量的是對象間的線性關系 ? To pute correlation, we standardize data objects, A and B, and then take their dot product )(/))((39。 Bs t dBme a nbb kk ??39。),( BABAnc o r r e l a t i o ??24 ? Covariance is similar to correlation n元組個數 , 和 屬性 A和 B上的平均值 , σA and σB分別為各自標準差 . ? 正 covariance: If CovA,B 0, 則 A 和 B 同時傾向于大于期望值 . ? 負 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 ? 設兩個股票 A 和 B 一周內值如下 (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 相關分析 (名義數據 Nominal Data) ? Χ2 (chisquare) test 開方檢驗 ? σ ij是 (ai,bj)的觀測頻度(實際計數) ? eij是 (ai,bj)的期望頻度 ? N數據元組的個數 屬 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 值越大 ,相關的可能越大 ?對 Χ2 值貢獻最大的項,其實際值與期望值相差最大的相 ?相關不意味著因果關系 27 ChiSquare 卡方值計算 : 例子 ? Χ2 (chisquare) 計算 (括號中的值為期望計值,由兩個類別的分布數據計算得到 ) ? 結果表明 like_fiction 和 play_chess 關聯(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 901500 300*450)(*)(11 ??? N c o u n tc o u n te 下棋看小說28 數據變換 Data Transformation ? 光滑 : 去掉噪音,技術:分箱、回歸、聚類 ? 聚集 Aggregation:匯總 , 數據立方體構造 ? 數據泛化 Generalization:概念分層 ? 規(guī)范化 Normalization:按比例縮放到一個具體區(qū)間 ? 最小 最大規(guī)范化 ? zscore 規(guī)范化 ? 小數定標規(guī)范化 ? 屬性 Attribute/特征 feature 構造 ? 從給定的屬性構造新屬性 ? 機器學習中稱為:特征構造 數據規(guī)約 29 規(guī)范化數據的方法 ? 最小 最大規(guī)范化 min