Data MiningCode: ECS066/AL/LP/02 Instructor: Adrian Besimi, MSc.Spring 2009 :Data MiningCode: ECS066/AL/LP/02 Instructor: Adrian Besimi, MSc.Spring 2009
Course Information :Course Information Login LIBRI for Notes, Assignments, Announcements, etc.https://libri.seeu.edu.mk
Instructor contact info:
– Office: 305.03
– Email: a.besimi@seeu.edu.mk
v.shehu@seeu.edu.mk
–Office Hours:
Adrian Besimi: Tuesday 11:00 – 12:00
Thursday 10:00 – 11:00
Slide 3:Grading Policy:
Attendance: 5 %
Assignments : 20 % (2 x 10%)
Project: 15 % (Team project, 2-3 people)
Midterm Exam 1: 30 %
Final Exam : 30 %
Total 100 %
Grading scale:
10 = > 95 %
9 = 86 - 94 %
8 = 77 - 85 %
7 = 68 - 76 %
6 = 60 - 67 %
5 = < 59 %
Data Mining: Concepts and Techniques :Data Mining: Concepts and Techniques Jiawei Han and Micheline KamberData Mining: Concepts and Techniques
2nd Edition, Morgan Kaufmann Publishers.
Published in Jan. 2006
Data Mining: IntroductionSlides courtesy of Han, Kamber, Tan, et al. :Data Mining: IntroductionSlides courtesy of Han, Kamber, Tan, et al.
Why Mine Data? Commercial Viewpoint :Lots of data is being collected and warehoused
purchases at department/grocery stores
Bank/Credit Card transactions
Web data, e-commerce
Competitive Pressure is Strong
Provide better, customized services for an edge Why Mine Data? Commercial Viewpoint
Why Mine Data? Scientific Viewpoint :Why Mine Data? Scientific Viewpoint Data collected and stored at enormous speeds (GB/hour)
remote sensors on a satellite
telescopes scanning the skies
microarrays generating gene expression data
scientific simulations generating terabytes of data
Data mining may help scientists
in classifying and segmenting data
in Hypothesis Formation
Mining Large Data Sets - Motivation :Mining Large Data Sets - Motivation There is often information “hidden” in the data that is not readily evident
Human analysts may take weeks or longer to discover useful information
Much of the data is never analyzed at all
Data Mining - Motivation :Data Mining - Motivation
What is Data Mining? :What is Data Mining? Many Definitions
Non-trivial extraction of implicit, previously unknown and potentially useful information from data
Exploration & analysis, by automatic or semi-automatic means, of large quantities of data in order to discover Meaningful patterns
Data Mining Process :Data Mining Process
What is (not) Data Mining? :What is (not) Data Mining? What is Data Mining?
Certain names are more prevalent in certain US locations (O’Brien, O’Rurke, O’Reilly… in Boston area)
Group together similar documents returned by search engine according to their context What is not Data Mining?
Look up phone number in phone directory
Query a Web search engine for information about “Amazon”
Origins of Data Mining :Draws ideas from machine learning/AI, pattern recognition, statistics, and database systems
Traditional Techniquesmay be unsuitable due to
Enormity of data
High dimensionality of data
Heterogeneous, distributed nature of data Origins of Data Mining Machine Learning/
Pattern Recognition Statistics/AI Data Mining Database systems
Data Mining Tasks :Data Mining Tasks Prediction Methods
Use some variables to predict unknown or future values of other variables.
Description Methods
Find human-interpretable patterns that describe the data. From [Fayyad, et.al.] Advances in Knowledge Discovery and Data Mining, 1996
Data Mining Tasks... :Data Mining Tasks... Classification
Clustering
Association Rule Discovery
Sequential Pattern Discovery
Regression
Deviation Detection
Classification: Definition :Classification: Definition Given a collection of records (training set )
Each record contains a set of attributes, one of the attributes is the class.
Find a model for class attribute as a function of the values of other attributes.
Classification: Definition :Classification: Definition Goal: previously unseen records should be assigned a class as accurately as possible.
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.
Classification Example :Classification Example categorical categorical continuous class Training
Set Learn
Classifier
Classification: Application :Classification: Application Direct Marketing
Goal: Reduce cost of mailing by targeting a set of consumers likely to buy a new cell-phone product.
Approach:
Use the data for a similar product introduced before.
We know which customers decided to buy and which decided otherwise. This {buy, don’t buy} decision forms the class attribute.
Collect various demographic, lifestyle, and company-interaction related information about all such customers.
Type of business, where they stay, how much they earn, etc.
Use this information as input attributes to learn a classifier model. From [Berry & Linoff] Data Mining Techniques, 1997
Data Mining Tasks... :Data Mining Tasks... Classification
Clustering
Association Rule Discovery
Sequential Pattern Discovery
Regression
Deviation Detection
Clustering Definition :Clustering Definition Given a set of data points, each having a set of attributes, and a similarity measure among them, find clusters such that
Data points in one cluster are more similar to one another.
Data points in separate clusters are less similar to one another.
Similarity Measures:
Euclidean Distance if attributes are continuous.
Other Problem-specific Measures.
Illustrating Clustering :Illustrating Clustering Euclidean Distance Based Clustering in 3-D space. Intracluster distances
are minimized Intercluster distances
are maximized
Clustering: Application 1 :Clustering: Application 1 Market Segmentation:
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.
Approach:
Collect different attributes of customers based on their geographical and lifestyle related information.
Find clusters of similar customers.
Measure the clustering quality by observing buying patterns of customers in same cluster vs. those from different clusters.
Clustering: Application 2 :Clustering: Application 2 Document Clustering:
Goal: To find groups of documents that are similar to each other based on the important terms appearing in them.
Approach: To identify frequently occurring terms in each document. Form a similarity measure based on the frequencies of different terms. Use it to cluster.
Gain: Information Retrieval can utilize the clusters to relate a new document or search term to clustered documents.
Illustrating Document Clustering :Illustrating Document Clustering Clustering Points: 3204 Articles of Los Angeles Times.
Similarity Measure: How many words are common in these documents (after some word filtering).
Data Mining Tasks... :Data Mining Tasks... Classification
Clustering
Association Rule Discovery
Sequential Pattern Discovery
Regression
Deviation Detection
Association Rule Discovery: Definition :Association Rule Discovery: Definition Given a set of records each of which contain some number of items from a given collection;
Produce dependency rules which will predict occurrence of an item based on occurrences of other items. Rules Discovered:
{Milk} --> {Coke}
{Diaper, Milk} --> {Beer}
Association Rule Discovery: Application :Association Rule Discovery: Application Supermarket shelf management.
Goal: To identify items that are bought together by sufficiently many customers.
Approach: Process the point-of-sale data collected with barcode scanners to find dependencies among items.
A classic rule --
If a customer buys diaper and milk, then he is very likely to buy beer.
So, don’t be surprised if you find six-packs stacked next to diapers!
Data Mining Tasks... :Data Mining Tasks... Classification
Clustering
Association Rule Discovery
Sequential Pattern Discovery
Regression
Deviation Detection
Sequential Pattern Discovery: Definition :Sequential Pattern Discovery: Definition Given is a set of objects, with each object associated with its own timeline of events, find rules that predict strong sequential dependencies among different events.
Rules are formed by first discovering patterns. Event occurrences in the patterns are governed by timing constraints.
Data Mining Tasks... :Data Mining Tasks... Classification
Clustering
Association Rule Discovery
Sequential Pattern Discovery
Regression
Deviation Detection
Regression :Regression Predict a value of a given continuous valued variable based on the values of other variables, assuming a linear or nonlinear model of dependency.
Greatly studied in statistics, neural network fields.
Examples:
Predicting wind velocities as a function of temperature, humidity, air pressure, etc.
Time series prediction of stock market indices.
Data Mining Tasks... :Data Mining Tasks... Classification
Clustering
Association Rule Discovery
Sequential Pattern Discovery
Regression
Deviation Detection
Deviation/Anomaly Detection :Deviation/Anomaly Detection Detect significant deviations from normal behavior
Applications:
Credit Card Fraud Detection
Network Intrusion Detection Typical network traffic at University level may reach over 100 million connections per day
Homework 0 :Homework 0 Exercise your programming skills!
Read the data from the text file dataset.txt
The file has 5 tab separated columns.
Use the appropriate data structure to store each row (int, char, string.). Use arrays, lists, trees . as needed
Show the result of the 5th row and 4th column
Get the AVERAGE of 4th column
Programming language? Any language you know