D M1


Published on

Published in: Technology, Education
  • Be the first to comment

  • Be the first to like this

D M1

  1. 1. Lecture Notes 1: Introduction to Data Mining Zhangxi Lin ISQS 6347 Texas Tech University ISQS 6347, Data & Text Mining
  2. 2. What is Data Mining? <ul><li>Many Definitions </li></ul><ul><ul><li>Non-trivial extraction of implicit, previously unknown and potentially useful information from data </li></ul></ul><ul><ul><li>Exploration & analysis, by automatic or semi-automatic means, of large quantities of data in order to discover meaningful patterns. (Berry and Linoff, 1997, 2000) </li></ul></ul><ul><ul><li>Data Mining is the process of discovering meaningful new correlations, patterns and trends by sifting through large amount of data stored in repositories, using pattern recognition technologies as well as statistical and mathematical techniques. (Gartner Group, 2004) </li></ul></ul>ISQS 6347, Data & Text Mining
  3. 3. Data Mining Process ISQS 6347, Data & Text Mining
  4. 4. What is Text Mining? <ul><li>Discover useful and previously unknown “gems” of information in large text collections </li></ul>ISQS 6347, Data & Text Mining Patterns Trends Associations
  5. 5. Motivation for Text Mining <ul><li>Approximately 90% of the world’s data is held in unstructured formats (source: Oracle Corporation) </li></ul><ul><li>Information intensive business processes demand that we transcend from simple document retrieval to “knowledge” discovery. </li></ul>ISQS 6347, Data & Text Mining 90% Structured Numerical or Coded Information 10% Unstructured or Semi-structured Information
  6. 6. Text Mining Process <ul><li>Text Preprocessing </li></ul><ul><ul><li>Syntactic/Semantic Text Analysis </li></ul></ul><ul><li>Features Generation </li></ul><ul><ul><li>Bag of Words </li></ul></ul><ul><li>Feature Selection </li></ul><ul><ul><li>Simple Counting </li></ul></ul><ul><ul><li>Statistics </li></ul></ul><ul><li>Text/Data Mining </li></ul><ul><ul><li>Classification- Supervised Learning </li></ul></ul><ul><ul><li>Clustering- Unsupervised Learning </li></ul></ul><ul><li>Analyzing Results </li></ul>ISQS 6347, Data & Text Mining
  7. 7. <ul><li>Lots of data is being collected and warehoused </li></ul><ul><ul><li>Web data, e-commerce </li></ul></ul><ul><ul><li>purchases at department/ grocery stores </li></ul></ul><ul><ul><li>Bank/Credit Card transactions </li></ul></ul><ul><li>Computers have become cheaper and more powerful </li></ul><ul><li>Competitive Pressure is Strong </li></ul><ul><ul><li>Provide better, customized services for an edge (e.g. in Customer Relationship Management) </li></ul></ul>Why Mine Data? Commercial Viewpoint ISQS 6347, Data & Text Mining
  8. 8. Why Mine Data? Scientific Viewpoint <ul><li>Data collected and stored at enormous speeds (GB/hour) </li></ul><ul><ul><li>remote sensors on a satellite </li></ul></ul><ul><ul><li>telescopes scanning the skies </li></ul></ul><ul><ul><li>microarrays generating gene expression data </li></ul></ul><ul><ul><li>scientific simulations generating terabytes of data </li></ul></ul><ul><li>Traditional techniques infeasible for raw data </li></ul><ul><li>Data mining may help scientists </li></ul><ul><ul><li>in classifying and segmenting data </li></ul></ul><ul><ul><li>in Hypothesis Formation </li></ul></ul>
  9. 9. <ul><li>Draws ideas from machine learning/AI, pattern recognition, statistics, and database systems </li></ul><ul><li>Traditional Techniques may be unsuitable due to </li></ul><ul><ul><li>Enormity of data </li></ul></ul><ul><ul><li>High dimensionality of data </li></ul></ul><ul><ul><li>Heterogeneous, distributed nature of data </li></ul></ul>Origins of Data Mining ISQS 6347, Data & Text Mining Machine Learning/ Pattern Recognition Statistics/ AI Data Mining Database systems
  10. 10. ISQS 6347, Data & Text Mining <ul><li>Sources: </li></ul><ul><li> http://www2.sims.berkeley.edu/research/projects/how-much-info-2003/execsum.htm , </li></ul><ul><li>The Expanding Digital Universe, IDC white paper, March 2007 </li></ul><ul><li>55% in personal PCs </li></ul><ul><li>16% in corporate data warehouses </li></ul><ul><li>Internet only 21 TB </li></ul><ul><li>Email 500x more than Internet / year </li></ul><ul><li>How much is 12 Exabytes? </li></ul><ul><ul><li>1,200,000 Libraries of Congress </li></ul></ul><ul><li>Emerging data sources </li></ul><ul><li>Medical images: potential 1 EB/year </li></ul><ul><ul><li>Video monitors: potential 100 EB/year </li></ul></ul>
  11. 11. Data Mining Tasks <ul><li>Prediction Methods. Use some variables to predict unknown or future values of other variables. </li></ul><ul><ul><li>Classification </li></ul></ul><ul><ul><li>Regression </li></ul></ul><ul><ul><li>Deviation Detection </li></ul></ul><ul><li>Description Methods. Find human-interpretable patterns that describe the data. </li></ul><ul><ul><li>Clustering </li></ul></ul><ul><ul><li>Association Rule Discovery </li></ul></ul><ul><ul><li>Sequential Pattern Discovery </li></ul></ul>ISQS 6347, Data & Text Mining
  12. 12. Classification: Definition <ul><li>Given a collection of records ( training set ) </li></ul><ul><ul><li>Each record contains a set of attributes , one of the attributes is the class . </li></ul></ul><ul><li>Find a model for class attribute as a function of the values of other attributes. </li></ul><ul><li>Goal: previously unseen records should be assigned a class as accurately as possible. </li></ul><ul><ul><li>A test set is used to determine the accuracy of the model. Usually, the given data set is divided into training and test sets, with training set used to build the model and test set used to validate it. </li></ul></ul>ISQS 6347, Data & Text Mining
  13. 13. Classification Example ISQS 6347, Data & Text Mining categorical categorical continuous class Training Set Learn Classifier Test Set Model
  14. 14. Classification: Application 1 <ul><li>Direct Marketing </li></ul><ul><ul><li>Goal: Reduce cost of mailing by targeting a set of consumers likely to buy a new cell-phone product. </li></ul></ul><ul><ul><li>Approach: </li></ul></ul><ul><ul><ul><li>Use the data for a similar product introduced before. </li></ul></ul></ul><ul><ul><ul><li>We know which customers decided to buy and which decided otherwise. This {buy, don’t buy} decision forms the class attribute . </li></ul></ul></ul><ul><ul><ul><li>Collect various demographic, lifestyle, and company-interaction related information about all such customers. </li></ul></ul></ul><ul><ul><ul><ul><li>Type of business, where they stay, how much they earn, etc. </li></ul></ul></ul></ul><ul><ul><ul><li>Use this information as input attributes to learn a classifier model. </li></ul></ul></ul>ISQS 6347, Data & Text Mining From [Berry & Linoff] Data Mining Techniques, 1997
  15. 15. Classification: Application 2 <ul><li>Fraud Detection </li></ul><ul><ul><li>Goal: Predict fraudulent cases in credit card transactions. </li></ul></ul><ul><ul><li>Approach: </li></ul></ul><ul><ul><ul><li>Use credit card transactions and the information on its account-holder as attributes. </li></ul></ul></ul><ul><ul><ul><ul><li>When does a customer buy, what does he buy, how often he pays on time, etc </li></ul></ul></ul></ul><ul><ul><ul><li>Label past transactions as fraud or fair transactions. This forms the class attribute. </li></ul></ul></ul><ul><ul><ul><li>Learn a model for the class of the transactions. </li></ul></ul></ul><ul><ul><ul><li>Use this model to detect fraud by observing credit card transactions on an account. </li></ul></ul></ul>ISQS 6347, Data & Text Mining
  16. 16. Clustering Definition <ul><li>Given a set of data points, each having a set of attributes, and a similarity measure among them, find clusters such that </li></ul><ul><ul><li>Data points in one cluster are more similar to one another. </li></ul></ul><ul><ul><li>Data points in separate clusters are less similar to one another. </li></ul></ul><ul><li>Similarity Measures: </li></ul><ul><ul><li>Euclidean Distance if attributes are continuous. </li></ul></ul><ul><ul><li>Other Problem-specific Measures. </li></ul></ul>ISQS 6347, Data & Text Mining
  17. 17. Illustrating Clustering ISQS 6347, Data & Text Mining <ul><li>Euclidean Distance Based Clustering in 3-D space. </li></ul>Intracluster distances are minimized Intercluster distances are maximized
  18. 18. Clustering Example <ul><li>Market Segmentation: </li></ul><ul><ul><li>Goal: subdivide a market into distinct subsets of customers where any subset may conceivably be selected as a market target to be reached with a distinct marketing mix. </li></ul></ul><ul><ul><li>Approach: </li></ul></ul><ul><ul><ul><li>Collect different attributes of customers based on their geographical and lifestyle related information. </li></ul></ul></ul><ul><ul><ul><li>Find clusters of similar customers. </li></ul></ul></ul><ul><ul><ul><li>Measure the clustering quality by observing buying patterns of customers in same cluster vs. those from different clusters. </li></ul></ul></ul>ISQS 6347, Data & Text Mining
  19. 19. Association Rule Discovery: Definition <ul><li>Given a set of records each of which contain some number of items from a given collection; </li></ul><ul><ul><li>Produce dependency rules which will predict occurrence of an item based on occurrences of other items. </li></ul></ul>ISQS 6347, Data & Text Mining Rules Discovered: {Milk} --> {Coke} {Diaper, Milk} --> {Beer}
  20. 20. Association Rule Discovery Example <ul><li>Marketing and Sales Promotion: </li></ul><ul><ul><li>Let the rule discovered be </li></ul></ul><ul><ul><li>{Bagels, … } --> {Potato Chips} </li></ul></ul><ul><ul><li>Potato Chips as consequent => Can be used to determine what should be done to boost its sales. </li></ul></ul><ul><ul><li>Bagels in the antecedent => C an be used to see which products would be affected if the store discontinues selling bagels. </li></ul></ul><ul><ul><li>Bagels in antecedent and Potato chips in consequent => Can be used to see what products should be sold with Bagels to promote sale of Potato chips! </li></ul></ul>ISQS 6347, Data & Text Mining
  21. 21. Regression <ul><li>Predict a value of a given continuous valued variable based on the values of other variables, assuming a linear or nonlinear model of dependency. </li></ul><ul><li>Greatly studied in statistics, neural network fields. </li></ul><ul><li>Examples: </li></ul><ul><ul><li>Predicting sales amounts of new product based on advertising expenditure. </li></ul></ul><ul><ul><li>Predicting wind velocities as a function of temperature, humidity, air pressure, etc. </li></ul></ul><ul><ul><li>Time series prediction of stock market indices. </li></ul></ul>ISQS 6347, Data & Text Mining
  22. 22. Deviation/Anomaly Detection <ul><li>Detect significant deviations from normal behavior </li></ul><ul><li>Applications: </li></ul><ul><ul><li>Credit Card Fraud Detection </li></ul></ul><ul><ul><li>Network Intrusion Detection </li></ul></ul>ISQS 6347, Data & Text Mining Typical network traffic at University level may reach over 100 million connections per day
  23. 23. Text Mining Tasks <ul><li>Exploratory Data Analysis </li></ul><ul><ul><li>Using text to form hypotheses about diseases (Swanson and Smalheiser, 1997). </li></ul></ul><ul><li>Information Extraction </li></ul><ul><ul><li>(Semi)automatically create (domain specific) knowledge bases, and then use standard data-mining techniques. </li></ul></ul><ul><ul><ul><li>Bootstrapping methods (Riloff and Jones, 1999). </li></ul></ul></ul><ul><li>Text Classification </li></ul><ul><ul><li>Useful intermediary step for information extraction </li></ul></ul><ul><ul><ul><li>Bootstrapping method using EM (Nigam et al., 2000). </li></ul></ul></ul>ISQS 6347, Data & Text Mining
  24. 24. <ul><li>The Needs: </li></ul><ul><ul><li>Analysis of call records as input into decision-making process of Bank’s management </li></ul></ul><ul><ul><li>Quick answers to important questions </li></ul></ul><ul><ul><ul><li>Which offices receive the most angry calls? </li></ul></ul></ul><ul><ul><ul><li>What products have the fewest satisfied customers? </li></ul></ul></ul><ul><ul><ul><li>(“Angry” and “Satisfied” are recognizable sentiments) </li></ul></ul></ul><ul><ul><li>User friendly interface and visualization tools </li></ul></ul>Example: Decision Support using Bank Call Center Data ISQS 6347, Data & Text Mining
  25. 25. Example: Decision Support using Bank Call Center Data <ul><li>The Information Source: </li></ul><ul><ul><li>Call center records </li></ul></ul><ul><ul><li>Example: </li></ul></ul>ISQS 6347, Data & Text Mining AC2G31, 01, 0101, PCC, 021, 0053352, NEW YORK, NY , H-SUPRVR8, STMT , “ Mr. Stark has been with the company for about 20 yrs. He hates his stmt format and wishes that we would show a daily balance to help him know when he falls below the required balance on the account.”
  26. 26. Challenges of Data Mining <ul><li>Scalability </li></ul><ul><li>Dimensionality </li></ul><ul><li>Complex and Heterogeneous Data </li></ul><ul><li>Data Quality </li></ul><ul><li>Data Ownership and Distribution </li></ul><ul><li>Privacy Preservation </li></ul><ul><li>Streaming Data </li></ul>ISQS 6347, Data & Text Mining
  27. 27. Challenges of Text Mining <ul><li>Very high number of possible “dimensions” </li></ul><ul><ul><li>All possible word and phrase types in the language!! </li></ul></ul><ul><li>Unlike data mining: </li></ul><ul><ul><li>records (= docs) are not structurally identical </li></ul></ul><ul><ul><li>records are not statistically independent </li></ul></ul><ul><li>Complex and subtle relationships between concepts in text </li></ul><ul><ul><li>“ AOL merges with Time-Warner” </li></ul></ul><ul><ul><li>“ Time-Warner is bought by AOL” </li></ul></ul><ul><li>Ambiguity and context sensitivity </li></ul><ul><ul><li>automobile = car = vehicle = Toyota </li></ul></ul><ul><ul><li>Apple (the company) or apple (the fruit) </li></ul></ul>ISQS 6347, Data & Text Mining
  28. 28. SAS Training/Self-taught Courses <ul><li>Getting Start with SAS ® Enterprise Miner 4.3, 132p (EM_GS_7281.PDF) </li></ul><ul><li>Getting Start with SAS ® 9.1 Text Miner, 60p (EM_TMGS_7693.PDF) </li></ul><ul><li>Data Mining - A Case Study Approach, 135p </li></ul><ul><li>Text Mining Using SAS ® Software, 274p (DMTM.PDF) </li></ul><ul><li>Applying Data Mining Techniques Using Enterprise Miner, 308p (ADMT_001.PDF) </li></ul><ul><li>Effective Web Mining: Attracting and Keeping Valued Cyber Consumers, 632p (CCWEB_TKIT.PDF) </li></ul>ISQS 6347, Data & Text Mining