Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Data Mining Concepts 15061


Published on

  • Be the first to comment

Data Mining Concepts 15061

  1. 1. Data Mining Concept Ho Viet Lam - Nguyen Thi My Dung May, 14 th 2007
  2. 2. Content <ul><li>Introduction </li></ul><ul><li>Overview of data mining technology </li></ul><ul><li>Association rules </li></ul><ul><li>Classification </li></ul><ul><li>Clustering </li></ul><ul><li>Applications of data mining </li></ul><ul><li>Commercial tools </li></ul><ul><li>Conclusion </li></ul>
  3. 3. Introduction <ul><li>What is data mining? </li></ul><ul><li>Why do we need to ‘mine’ data? </li></ul><ul><li>On what kind of data can we ‘mine’? </li></ul>
  4. 4. What is data mining? <ul><li>The process of discovering meaningful new correlations, patterns and trends by sifting through large amounts of data stored in repositoties, using pattern recognition technologies as well as statical and methematics techniques. </li></ul><ul><li>A part of K nowledge D iscovery in D ata (KDD) process. </li></ul>
  5. 5. Why data mining? <ul><li>The explosive growth in data collection </li></ul><ul><ul><li>The storing of data in data warehouses </li></ul></ul><ul><ul><li>The availability of increased access to data from Web navigation and intranet </li></ul></ul><ul><li> We have to find a more effective way to use these data in decision support process than just using traditional querry languages </li></ul>
  6. 6. On what kind of data? <ul><li>Relational databases </li></ul><ul><li>Data warehouses </li></ul><ul><li>Transactional databases </li></ul><ul><li>Advanced database systems </li></ul><ul><ul><li>Object-relational </li></ul></ul><ul><ul><li>Spacial and Temporal </li></ul></ul><ul><ul><li>Time-series </li></ul></ul><ul><ul><li>Multimedia, text </li></ul></ul><ul><ul><li>WWW </li></ul></ul><ul><ul><li>… </li></ul></ul>Structure - 3D Anatomy Function – 1D Signal Metadata – Annotation
  7. 7. Overview of data mining technology <ul><li>Data Mining vs. Data Warehousing </li></ul><ul><li>Data Mining as a part of Knowledge Discovery Process </li></ul><ul><li>Goals of Data Mining and Knowledge Discovery </li></ul><ul><li>Types of Knowledge Discovery during Data Mining </li></ul>
  8. 8. Data Mining vs. Data Warehousing <ul><li>A Data Warehouse is a repository of integrated information, available for queries and analysis. Data and information are extracted from heterogeneous sources as they are generated....This makes it much easier and more efficient to run queries over data that originally came from different sources. </li></ul><ul><li>The goal of data warehousing is to support decision making with data! </li></ul>
  9. 9. Knowledge Discovery in Databases and Data Mining <ul><li>The non-trivial extraction of implicit, unknown, and potentially useful information from databases. </li></ul><ul><li>The knowledge discovery process comprises six phases: </li></ul>
  10. 10. Goals of Data Mining and KDD <ul><li>Prediction : how certain attibutes within the data will behave in the future. </li></ul><ul><li>Identification : identify the existence of an item, an event, an activity. </li></ul><ul><li>Classification : partition the data into categories. </li></ul><ul><li>Optimization : optimize the use of limited resources. </li></ul>
  11. 11. Types of Knowledge Discovery during Data Mining <ul><li>Association rules </li></ul><ul><li>Classification heirarchies </li></ul><ul><li>Sequential patterns </li></ul><ul><li>Patterns within time-series </li></ul><ul><li>Clustering </li></ul>
  12. 12. <ul><li>Introduction </li></ul><ul><li>Overview of data mining technology </li></ul><ul><li>Association rules </li></ul><ul><li>Classification </li></ul><ul><li>Clustering </li></ul><ul><li>Application of data mining </li></ul><ul><li>Commercial tools </li></ul><ul><li>Conclusion </li></ul>Content
  13. 13. Association Rules <ul><li>Purpose </li></ul><ul><ul><ul><li>Providing the rules correlate the presence of a set of items with another set of item </li></ul></ul></ul><ul><ul><ul><li>Examples: </li></ul></ul></ul>
  14. 14. Association Rules <ul><li>Some concepts </li></ul><ul><ul><ul><li>Market-basket model </li></ul></ul></ul><ul><ul><ul><ul><ul><li>Look for combinations of products </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Put the SHOES near the SOCKS so that if a customer buys one they will buy the other </li></ul></ul></ul></ul></ul><ul><ul><ul><li>Transactions: is the fact the person buys some items in the itemset at supermarket </li></ul></ul></ul>
  15. 15. Association Rules <ul><li>Some concepts </li></ul><ul><ul><ul><li>Support: it refers how frequently a specific itemset occurs in the database </li></ul></ul></ul><ul><ul><ul><li>X => Y: Bread => Juice is 50% </li></ul></ul></ul><ul><ul><ul><li>the confidence of the rule X=>Y: </li></ul></ul></ul><ul><ul><ul><li>support (X U Y) / support (X) </li></ul></ul></ul><ul><ul><ul><li>The goal of mining association rules is generate all possible rules that exceed some minimum user-specified support and confidence thresholds </li></ul></ul></ul>Bread, cookies, coffee 8:40 1735 Milk, eggs 8:05 1130 Milk, juice 7:38 792 Bread, Milk, cookies, juice 6:35 101 Items-Bought time Transaction-id 1 Coffee 1 Eggs 2 Juice 2 Cookies 2 Bread 3 Milk support Item
  16. 16. Association Rules <ul><li>Apriori Algorithm </li></ul><ul><ul><li>Input: database of m transactions, D, and a minimum support, mins, represented as a fraction of m </li></ul></ul><ul><ul><li>Output : frequent itemsets, L 1 , L 2 , …, L k </li></ul></ul>
  17. 17. Association Rules <ul><li>Apriori algorithm </li></ul>D mins = 2 minf = 0.5 freq > 0.5 Bread, cookies, coffee 8:40 1735 Milk, eggs 8:05 1130 Milk, juice 7:38 792 Bread, milk, cookies, juice 6:35 101 Items-Bought time Transaction-id 1 Eggs 1 Coffee 2 Juice 2 Cookies 2 Bread 3 Milk support Item 0.75, 0.5, 0.5, 0.5, 0.25, 0.25 milk, bread, juice, cookies, eggs, coffee The candidate 1-itemsets 0.75, 0.5, 0.5, 0.5 milk, bread, juice, cookies frequent 1-itemsets 0.25, 0.5, 0.25, 0.25, 0.5, 0.25 {milk, bread}, {milk, juice}, {bread, juice}, {milk, cookies}, {bread, cookies}, {juice, cookies} The candidate 2-itemsets 0.5, 0.5 {milk, juice}, {bread, cookies} frequent 2-itemsets {……………….} {……………..} The candidate 3-itemsets Ф Ф frequent 3-itemsets milk, bread, juice, cookies, {milk, juice}, {bread, cookies} result
  18. 18. <ul><li>Apriori Algorithm </li></ul><ul><ul><li>Begin </li></ul></ul><ul><ul><li>+ compute support(i j ) = count(i j )/m for each individual item, i 1 , i 2 , ..,i n by scanning the database once and counting the number of transactions that item i j appears in </li></ul></ul><ul><ul><li>+ the candidate frequent 1-itemset, C1, will be the set of items i1, i2, …, in </li></ul></ul><ul><ul><li>+ the subset of items containing i j form Ci where support(i j ) >= mins becomes the frequent </li></ul></ul><ul><ul><li>+ 1-itemset, L1; </li></ul></ul><ul><ul><li>+ k=1; </li></ul></ul><ul><ul><li>+ termination = false; </li></ul></ul><ul><ul><li>+ repeat </li></ul></ul><ul><ul><ul><li>+ L k+1 = ; </li></ul></ul></ul><ul><ul><ul><li>+ create the candidate frequent (k+1)-itemset, C k+1 , by combining members of L k that have k-1 items in common; (this forms candidate frequent (k+1)-itemsets by selectively extending frequent k-itemsets by one item) </li></ul></ul></ul><ul><ul><ul><li>+ in addition, only consider as elements of C k+1 those k+1 items such that every subset of size k appears in L k ; </li></ul></ul></ul><ul><ul><ul><li>+ scan the database once and compute the support for each member of C k+1; if the support for a member of C k+1 ; if the support for a member of C k+1 >= min then add that member to L k+1 ; </li></ul></ul></ul><ul><ul><ul><li>+ if L k+1 is empty then termination = true </li></ul></ul></ul><ul><ul><ul><li> else k = k+1; </li></ul></ul></ul><ul><ul><ul><li>+ until termination </li></ul></ul></ul><ul><ul><li>end; </li></ul></ul>
  19. 19. Association Rules <ul><li>Demo of Apriori Algorithm </li></ul>
  20. 20. Association Rules <ul><li>Frequent-pattern tree algorithm </li></ul><ul><ul><ul><li>Motivated by the fact that Apriori based algorithms may generate and test a very large number of candidate itemsets. </li></ul></ul></ul><ul><ul><ul><li>Example: </li></ul></ul></ul><ul><ul><ul><ul><ul><li>with 1000 frequent 1-items, Apriori would have to generate 2^1000 candidate 2-itemsets </li></ul></ul></ul></ul></ul><ul><ul><ul><li>The FP-growth algorithm is one aproach that eliminates the generation of a large number of candidate itemsets </li></ul></ul></ul>
  21. 21. Association Rules <ul><li>Frequent-pattern tree algorithm </li></ul><ul><ul><li>Generating a compressed version of the database in terms of an FP-Tree </li></ul></ul><ul><ul><li>FP-Growth Algorithm for finding frequent itemsets </li></ul></ul>
  22. 22. Association Rules <ul><li>FP-Tree algorithm </li></ul>Item head table Root Bread, milk, cookies, juice Milk, bread, cookies, juice Milk:1 Bread:1 Cookies:1 Juice:1 Milk, juice Juice:1 Milk:2 Milk, eggs Milk Milk: 3 Bread, cookies, coffee Bread, cookies Bread:1 Cookies:1 Transaction 1 Transaction 2 Transaction 3 Transaction 4 2 juice 2 cookies 2 bread 3 Milk link Support Item
  23. 23. Association Rules <ul><li>FP-Growth algorithm </li></ul>Root Bread:1 Cookies:1 Juice:1 Juice:1 Milk: 3 Bread:1 Cookies:1 Milk, juice Bread, cookies Milk bread cookies juice
  24. 24. Association Rules <ul><li>FP-Growth algorithm </li></ul><ul><ul><li>Procedure FP-growth (tree, alpha); </li></ul></ul><ul><ul><li>Begin </li></ul></ul><ul><ul><ul><li>If tree contains a single path then </li></ul></ul></ul><ul><ul><ul><ul><li>For each combination, beta, of the nodes in the path </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Generate pattern (beta U alpha) with support = minimum support of nodes in beta </li></ul></ul></ul></ul><ul><ul><ul><li>Else </li></ul></ul></ul><ul><ul><ul><ul><li>For each item, I, in the header of the tree do </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Begin </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Generate pattern beta = (I U alpha) with support =; </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Construct beta’s conditional pattern base; </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Construct beta’s conditional FP-tree, bete_tree; </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>If beta_tree is not empty then </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>FP-growth (beta_tree, beta); </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><li>End </li></ul></ul></ul></ul><ul><ul><li>end </li></ul></ul>
  25. 25. Association Rules <ul><li>Demo of FP-Growth algorithm </li></ul>
  26. 26. Classification <ul><li>Introduction </li></ul><ul><ul><li>Classification is the process of learning a model that describes different classes of data, the classes are predetermined </li></ul></ul><ul><ul><li>The model that is produced is usually in the form of a decision tree or a set of rules </li></ul></ul>married salary Acct balance age Yes <20k Poor risk >=20k <50k Fair risk >=50 Good risk no <5k Poor risk >=25 <25 >5k Fair risk Good risk
  27. 27. Class attribute Expected information Salary I(3,3)=1 Information gain Gain(A) = I-E(A) E(Married)=0.92 Gain(Married)=0.08 E(Salary)=0.33 Gain(Salary)= 0.67 E(A.balance)=0.82 Gain(A.balance)=0.18 E(Age)=0.81 Gain(Age)= 0.19 age Class is “no” {4,5} >=50k 20k..50k <20k Class is “no” {3} Class is “yes” {6} Class is “yes” {1,2} Entropy <25 >=25 Yes >=25 >=5k 20k..50k Yes 6 No >=25 <5k <20k No 5 No <25 >=5k <20k No 4 No <25 <5k 20k..50k Yes 3 Yes >=25 >=5k >=50 Yes 2 Yes >=25 <5k >=50 No 1 Loanworthy Age Acct balance Salary Married RID
  28. 28. Classification <ul><li>Algorithm for decision tree induction </li></ul><ul><ul><li>Procedure Build_tree (records, attributes); </li></ul></ul><ul><ul><li>Begin </li></ul></ul><ul><ul><ul><li>Create a node N; </li></ul></ul></ul><ul><ul><ul><li>If all records belongs to the same class, C then </li></ul></ul></ul><ul><ul><ul><ul><li>Return N as a leaf node with class label C; </li></ul></ul></ul></ul><ul><ul><ul><li>If Attributes is empty then </li></ul></ul></ul><ul><ul><ul><ul><li>Return n as a leaf node with class label C, such that the majority of records belong to it; </li></ul></ul></ul></ul><ul><ul><ul><li>Select attribute Ai (with the highest information gain) from Attributes; </li></ul></ul></ul><ul><ul><ul><li>Label node N with Ai; </li></ul></ul></ul><ul><ul><ul><li>For each know value, Vj, of Ai do </li></ul></ul></ul><ul><ul><ul><li>Begin </li></ul></ul></ul><ul><ul><ul><ul><li>Add a brach from node N for the condition Ai=Vj; </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Sj=subset of Records where Ai=Vj; </li></ul></ul></ul></ul><ul><ul><ul><ul><li>If Sj is empty then </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Add a leaf, L, with class label C, such that the majority of records belong to it and return L </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><li>Else add the node returned by build_tree(Sj, Attributes – Aj) </li></ul></ul></ul></ul><ul><ul><ul><li>End; </li></ul></ul></ul><ul><ul><li>End; </li></ul></ul>
  29. 29. Classification <ul><li>Demo of decision tree </li></ul>
  30. 30. Clustering <ul><li>Introduction </li></ul><ul><ul><li>The previous data mining task of classification deals with partitioning data based on a pre-classified training sample </li></ul></ul><ul><ul><li>Clustering is an automated process to group related records together. </li></ul></ul><ul><ul><li>Related records are grouped together on the basis of having similar values for attributes </li></ul></ul><ul><ul><li>The groups are usually disjoint </li></ul></ul>
  31. 31. Clustering <ul><li>Some concepts </li></ul><ul><ul><li>An important facet of clustering is the similarity function that is used </li></ul></ul><ul><ul><li>When the data is number, a similarity function based on distance is typically used </li></ul></ul><ul><ul><li>Euclidean metric (Euclidean distance), Minkowsky metric, Mahattan metric. </li></ul></ul>
  32. 32. Clustering <ul><li>K-means clustering algorithm </li></ul><ul><ul><li>Input: a database D, of m records r1,…,rm and a desired number of clusters. k </li></ul></ul><ul><ul><li>Output: set of k clusters </li></ul></ul><ul><ul><li>Begin </li></ul></ul><ul><ul><ul><li>Randomly choose k records as the centroids for the k clusters’ </li></ul></ul></ul><ul><ul><ul><li>Repeat </li></ul></ul></ul><ul><ul><ul><ul><li>Assign each record, ri, to a cluster such that the distance between ri and the cluster centroid (mean) is the smallest among the k clusters; </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Recalculate the centroid (mean) for each cluster based on the records assigned to the cluster; </li></ul></ul></ul></ul><ul><ul><ul><li>Until no change; </li></ul></ul></ul><ul><ul><li>End; </li></ul></ul>
  33. 33. Clustering <ul><li>Demo of K-means algorithm </li></ul>
  34. 34. Content <ul><li>Introduction </li></ul><ul><li>Overview of data mining technology </li></ul><ul><li>Association rules </li></ul><ul><li>Classification </li></ul><ul><li>Clustering </li></ul><ul><li>Applications of data mining </li></ul><ul><li>Commercial tools </li></ul><ul><li>Conclusion </li></ul>
  35. 35. Applications of data mining <ul><li>Market analysis </li></ul><ul><ul><li>Marketing stratergies </li></ul></ul><ul><ul><li>Advertisement </li></ul></ul><ul><li>Risk analysis and management </li></ul><ul><ul><li>Finance and finance investments </li></ul></ul><ul><ul><li>Manufacturing and production </li></ul></ul><ul><li>Fraud detection and detection of unusual patterns (outliers) </li></ul><ul><ul><li>Telecommunication </li></ul></ul><ul><ul><li>Finanancial transactions </li></ul></ul><ul><ul><li>Anti-terrorism (!!!) </li></ul></ul>
  36. 36. Applications of data mining <ul><li>Text mining (news group, email, documents) and Web mining </li></ul><ul><li>Stream data mining </li></ul><ul><li>DNA and bio-data analysis </li></ul><ul><ul><li>Diseases outcome </li></ul></ul><ul><ul><li>Effectiveness of treatments </li></ul></ul><ul><ul><li>Identify new drugs </li></ul></ul>
  37. 37. Commercial tools <ul><li>Oracle Data Miner </li></ul><ul><li> </li></ul><ul><li>Data To Knowledge </li></ul><ul><li> </li></ul><ul><li>SAS </li></ul><ul><li> </li></ul><ul><li>Clementine </li></ul><ul><li> </li></ul><ul><li>Intelligent Miner </li></ul><ul><li> </li></ul>
  38. 38. Conclusion <ul><li>Data mining is a “decision support” process in which we search for patterns of information in data. </li></ul><ul><li>This technique can be used on many types of data. </li></ul><ul><li>Overlaps with machine learning, statistics, artificial intelligence, databases, visualization… </li></ul>
  39. 39. Conclusion <ul><li>The result of mining may be to discover the following type of “new” information: </li></ul><ul><ul><li>Association rules </li></ul></ul><ul><ul><li>Sequencial patterns </li></ul></ul><ul><ul><li>Classification trees </li></ul></ul><ul><ul><li>… </li></ul></ul>
  40. 40. References <ul><li>Fundamentals of Database Systems </li></ul><ul><ul><li>fourth edition -- R.Elmasri, S.B.Navathe -- Addition Wesley -- ISBN 0-321-20448-4 </li></ul></ul><ul><li>Discovering Knowledge in Data: An Introduction to Data Mining </li></ul><ul><ul><li>Daniel T.Larose –Willey – ISBN 0-471-66652-2 </li></ul></ul><ul><li>RESOURCES FROM THE INTERNET </li></ul>Thanks for listening!!!