0% found this document useful (0 votes)
31 views

2a. Basic Data Mining Techniques

The document discusses various basic data mining techniques including classification, clustering, association rule discovery, sequential pattern discovery, and regression. These techniques are used to find patterns in data, predict future outcomes, and describe important groupings or subclasses in the data.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

2a. Basic Data Mining Techniques

The document discusses various basic data mining techniques including classification, clustering, association rule discovery, sequential pattern discovery, and regression. These techniques are used to find patterns in data, predict future outcomes, and describe important groupings or subclasses in the data.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

Basic Data Mining Techniques

Data Mining Tasks


Prediction Methods
Use U some variables to predict unknown or future values of bl d k f l f 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...


Classification [Predictive] Regression [Predictive] Deviation Detection [Predictive] Clustering [Descriptive] Association Rule Discovery [Descriptive] Sequential Pattern Discovery [Descriptive]

Classification: Definition
Given a collection of records (training set )
Each record contains a set of attributes one of the attributes is attributes, the class.

Find a model for class attribute as a function of the values of other attributes. l f h ib Goal: previously unseen records should be assigned a class as accurately as p y 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 g validate it.

Classification Example
Tid Refund Marital Status 1 2 3 4 5 6 7 8 9 10
10

Taxable Income Cheat 125K 100K 70K 120K No No No No Yes Y No


10

Refund Marital Status No Yes No Yes No N No Single Married Married

Taxable Income Cheat 75K 50K 150K ? ? ? ? ? ?

Yes No No Yes No N No Yes No No No

Single Married Single Married

Divorced 90K Single Si l Married 40K 80K

Divorced 95K Di d Married 60K

Divorced 220K Single Married Single 85K 75K 90K

No Yes No Yes

Test Set

Training Set

Learn Classifier

Model

Classification: Application 1
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, dont buy} decision forms the class attribute. Collect various d C ll demographic, lifestyle, and company-interaction related h lf l d l d information about all such customers. Type of business, where they stay, how much they earn, etc. Use this information as i U thi i f ti input attributes t l t tt ib t to learn a classifier model. l ifi d l

From [Berry & Linoff] Data Mining Techniques, 1997

Classification: Application 2
Fraud Detection Goal: Predict fraudulent cases in credit card transactions transactions. Approach:
Use credit card transactions and the information on its account-holder as attributes. When does a customer buy, what does he buy, how often he pays on time, etc Label past transactions as fraud or fair transactions. This forms the class attribute. attribute Learn a model for the class of the transactions. Use this model to detect fraud by observing credit card transactions on an account.

Classification: Application 3
Customer Attrition/Churn:
Goal: To predict whether a customer is likely to be lost to a competitor. Approach:
Use detailed record of transactions with each of the past and present customers, to find attributes. How often the customer calls, where he calls, what time-ofthe day he calls most, his financial status, marital status, etc. Label the customers as loyal or disloyal. Find a model for loyalty. y y

From [Berry & Linoff] Data Mining Techniques, 1997

Classification: Application 4
Sky Survey Cataloging Goal: To predict class (star or g p ( galaxy) of sky objects, especially y) y j p y visually faint ones, based on the telescopic survey images (from Palomar Observatory).
3000 images with 23,040 x 23,040 pixels per image. g p p g

Approach:
Segment the image. Measure image attributes (features) - 40 of them per object object. Model the class based on these features. Success Story: Could find 16 new high red-shift quasars, some of the farthest objects that are difficult to find!

From [Fayyad, et.al.] Advances in Knowledge Discovery and Data Mining, 1996

Clustering Definition
Given a set of data points, each having a set of attributes, and a similarity measure among them, find clusters such y g 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
Euclidean Distance Based Clustering in 3-D space.

Intracluster distances are minimized

Intercluster distances are maximized

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 b observing buying patterns of customers M h l i li by b i b i f in same cluster vs. those from different clusters.

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 b d on the d F i il i based h 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


Clustering Points: 3204 Articles of Los Angeles Times. Similarity Measure: How many words are common in these y y documents (after some word filtering).
Category Financial Foreign National Metro Sports Entertainment Total Articles
555 341 273 943 738 354

Correctly Placed
364 260 36 746 573 278

Clustering of S&P 500 Stock Data


Observe Stock Movements every day. Clustering points: Stock-{UP/DOWN} Similarity Measure: Two points are more similar if the events described by them frequently happen together on the same day.
We used association rules to quantify a similarity measure.
Discovered Clusters Industry Group
Applied-Matl-DOW N,Bay-Net work-Down,3-COM-DOWN, Cabletron-Sys-DOWN,CISCO-DOWN,HP-DOWN, DSC-Co mm-DOW N,INTEL-DOWN,LSI-Logic-DOWN, Micron-Tech-DOWN,Texas-Inst-Down,Tellabs-Inc-Down, Natl-Semiconduct-DOWN,Oracl-DOWN,SGI-DOW N, Sun-DOW N Apple-Co mp-DOW N,Autodesk-DOWN,DEC-DOWN, ADV-M icro-Device-DOWN,Andrew-Corp-DOWN, Co mputer-Assoc-DOWN,Circuit-City-DOWN, Co mpaq-DOWN, EM C-Corp-DOWN, Gen-Inst-DOWN, Motorola-DOW N,Microsoft-DOWN,Scientific-Atl-DOWN Fannie-Mae-DOWN,Fed-Ho me-Loan-DOW N, MBNA-Corp -DOWN,Morgan-Stanley-DOWN Baker-Hughes-UP,Dresser-Inds-UP,Halliburton-HLD-UP, Louisiana-Land-UP,Phillips-Petro-UP,Unocal-UP, Schlu mberger-UP

1 2 3 4

Technology1-DOWN

Technology2-DOWN

Financial-DOWN Oil-UP

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.

TID

Items

1 2 3 4 5

Bread, Coke, Milk Beer, Bread Beer, Coke, Diaper, Milk Beer, Bread, Diaper, Milk Coke, Diaper, Milk

Rules Discovered:
{Milk} --> {Coke} {Diaper, Milk} --> {Beer}

Association Rule Discovery: Application 1


Marketing and Sales Promotion: Let the rule discovered be {Bagels, } --> {Potato Chips} Potato Chips as consequent => Can be used to determine what should be done to boost its sales sales. Bagels in the antecedent => Can be used to see which products would be affected if the store discontinues selling bagels. 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!

Association Rule Discovery: Application 2


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. b d fi d d d i i A classic rule -If a customer buys diaper and milk, then he is very likely to buy y p , y y y beer. So, dont be surprised if you find six-packs stacked next to diapers!

Association Rule Discovery: Application 3


Inventory Management: Goal: A consumer appliance repair company wants to anticipate the pp p p y p nature of repairs on its consumer products and keep the service vehicles equipped with right parts to reduce on number of visits to consumer households. Approach: Process the data on tools and parts required in previous repairs at different consumer locations and discover the cooccurrence patterns. p

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.

(A B)

(C)

(D E)

Rules are formed by first disovering patterns. Event occurrences in the patterns are governed by timing constraints.

(A B)
<= xg

(C)
<= ms

(D E)
>ng <= ws

Sequential Pattern Discovery: Examples


In telecommunications alarm logs,
(Inverter_Problem Excessive_Line_Current) (Rectifier_Alarm) --> ( ( f A ) (Fire_Alarm) A )

In point-of-sale transaction sequences,


Computer Bookstore: (Intro_To_Visual_C) (C++_Primer) --> (Perl_for_dummies,Tcl_Tk) Athletic Apparel Store: (Shoes) (Racket, Racketball) --> (Sports_Jacket)

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 sales amounts of new product based on advetising expenditure. Predicting wind velocities as a function of temperature, humidity, air pressure, etc. Time series prediction of stock market indices.

Deviation/Anomaly Detection
Detect significant deviations from normal behavior Applications: pp
Credit Card Fraud Detection

Network Intrusion Detection

Typical network traffic at University level may reach over 100 million connections per day

Three DM Concept Views


Classical View Probabilistic View Exemplar View To help categorize the data mining technique

Roiger, 2003

Classical View
All concepts have definite defining properties. Example:
If
annual income >= 30,000 & years at current position >= 5 & owns h home = true

Then
Good Credit Risk = true

Probabilistic View
Concepts are represented by properties that are p probable of concept number p Example
A good credit risk might look like:
The mean annual income for individuals who consistently make loan payments on time is $30,000 Most individuals who are good credit risks have been working for the same company for at least 5 years The majority of good credit risks own their own home

A homeowner with an annual incomeof $27,000 employed at the h h l f $27 000 l d h same position for 4 years might be classified as a good credit risk with a probability of 0.85

Exemplar View
People store and recall likely concept exemplars that are used to classify unknown instances.
Exemplar#1 p Annual income = 32,000 Number of years at current position = 6 Homeowner Exemplar#2 Annual income = 52,000 Number of years at current position = 16 Renter

DM Categories
Supervised Learning
Build a learner model using data instances of known origin origin. Use the model to determine the outcome new instances of unknown origin

Unsupervised Learning
A data mining method th t builds models from data without d t i i th d that b ild d l f d t ith t predefined classes.

Supervised Learning: A Decision Tree Example

Decision Tree
A tree structure where non-terminal nodes represent tests on one or more attributes and terminal nodes reflect decision outcomes.

yp g g Table 1.1 Hypothetical Training Data for Disease Diagnosis


Patient ID#
1 2 3 4 5 6 7 8 9 10

Sore Throat
Yes No Yes Yes No No No Yes No Yes

Fever
Yes No Yes No Yes No No No Yes Yes

Swollen Glands
Yes No No Yes No No Yes No No No

Congestion
Yes Yes Yes No Yes Yes No Yes Yes Yes

Headache
Yes Yes No No No No No Yes Yes Yes

Diagnosis
Strep throat Allergy Cold Strep throat Cold Allergy Strep throat Allergy Cold Cold

Input Attributes

Output Attributes

Swollen Glands

No

Yes
Diagnosis = Strep Throat

Fever

No
Diagnosis = Allergy

Yes
Diagnosis = Cold

Table 1.2 Data Instances with an Unknown Classification


Patient ID#
11 12 13

Sore Throat
No Yes No

Fever
No Yes No

Swollen Glands
Yes No No

Congestion
Yes No No

Headache
Yes Yes Yes

Diagnosis
? ? ?

Production Rules
Translation from decision tree Form:
IF antecedant conditions THEN consequent conditions

Example
IF Swollen Glands = Yes THEN Diagnosis = Strep Throat IF Swollen Glands = No & Fever = Yes THEN Diagnosis = Cold IF Swollen Glands = No & Fever = No THEN Diagnosis = Allergy

The Acme Investors Dataset & Supervised Learning


1. 2. 3. 3 4.

Can I develop a general profile of an online investor? Can I determine if a new customer is likely to open a margin account? Can build C I b ild a model predict th average number of trades per month for d l di t the b ft d th f a new investor? What characteristics differentiate female and male investors?

Output attribute:
No 1. transaction method No 2. margin account No 3. trades/month No 4. sex

The Acme Investors Dataset & Unsupervised Clustering


1. 2.

What attribute similarities group customers of Acme Investors together? What differences in attribute values segment the customer database?

Unsupervised Clustering
Require us to provide an initial best estimate about the total number of clusters in the data, OR Use an algorithm to determine a best number of clusters g In either case, a clustering system will attempt to group g y p g p instances into clusters of significant interests

A Closer Look

REFERENCES
Dunham chapter 1.2 Roiger chapter 5

You might also like