2a. basic data mining techniques

Upload: riki-siregar-ruli

Post on 06-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 2a. Basic Data Mining Techniques

    1/39

    Basic Data Mining Techniques

  • 8/2/2019 2a. Basic Data Mining Techniques

    2/39

    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

  • 8/2/2019 2a. Basic Data Mining Techniques

    3/39

    Classification [Predictive]

    Deviation Detection [Predictive]

    Association Rule Discovery [Descriptive]

  • 8/2/2019 2a. Basic Data Mining Techniques

    4/39

    Given a collection of records (training set ),

    the class. Find a model for class attribute as a function of the

    va ues o ot er attr utes.

    Goal: previously unseen records should be assigned aclass as accuratel as ossible. 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.

  • 8/2/2019 2a. Basic Data Mining Techniques

    5/39

    Tid Refund MaritalStatus

    TaxableIncome Cheat

    1 Yes Single 125K No

    Refund Marital

    Status

    Taxable

    Income Cheat

    No Single 75K ?

    2 No Married 100K No

    3 No Single 70K No

    4 Yes Married 120K No

    Yes Married 50K ?

    No Married 150K ?

    Yes Divorced 90K ?

    o vorce es

    6 No Married 60K No

    7 Yes Divorced 220K No

    o ng e 40

    No Married 80K ?10

    TestSet

    9 No Married 75K No

    10 No Single 90K Yes10

    TrainingSet

    ModelLearn

    Classifier

  • 8/2/2019 2a. Basic Data Mining Techniques

    6/39

    Direct Marketing

    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. o ect various emograp ic, i esty e, an company-interaction re ate

    information about all such customers.

    Type of business, where they stay, how much they earn, etc.

    se s n orma on as npu a r u es o earn a c ass er mo e .

    From [Berry & Linoff] Data Mining Techniques, 1997

  • 8/2/2019 2a. Basic Data Mining Techniques

    7/39

    Fraud Detection

    .

    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 payson time, etc

    Label past transactions as fraud or fair transactions. This forms the classa r u e.

    Learn a model for the class of the transactions.

    Use this model to detect fraud by observing credit card transactions onan account.

  • 8/2/2019 2a. Basic Data Mining Techniques

    8/39

    Customer Attrition/Churn:

    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-of-the day he calls most, his financial status, marital status, etc.

    Label the customers as loyal or disloyal.

    Find a model for loyalty.

    From [Berry & Linoff] Data Mining Techniques, 1997

  • 8/2/2019 2a. Basic Data Mining Techniques

    9/39

    Sky Survey Cataloging

    Goal: To redict class star or alax of sk ob ects, es eciall

    visually faint ones, based on the telescopic survey images (fromPalomar Observatory).

    3000 images with 23,040 x 23,040 pixels per image.

    Approach:

    Segment the image.- .

    Model the class based on these features.

    Success Story: Could find 16 new high red-shift quasars, some of the

    farthest ob ects that are difficult to find!

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

  • 8/2/2019 2a. Basic Data Mining Techniques

    10/39

    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.

    another.

    Similarity Measures: Euclidean Distance if attributes are continuous.

    Other Problem-specific Measures.

  • 8/2/2019 2a. Basic Data Mining Techniques

    11/39

    Euclidean Distance Based Clustering in 3-D space.

    Intracluster distancesare minimized

    Intracluster distancesare minimized

    Intercluster distancesare maximized

    Intercluster distancesare maximized

  • 8/2/2019 2a. Basic Data Mining Techniques

    12/39

    Market Segmentation:

    Goal: subdivide a market into distinct subsets of customers whereany subset may conceivably be selected as a market target to bereached with a distinct marketing mix.

    Approach:

    Collect different attributes of customers based on their geographical andlifestyle related information.

    Find clusters of similar customers. easure t e c uster ng qua ty y o serv ng uy ng patterns o customers

    in same cluster vs. those from different clusters.

  • 8/2/2019 2a. Basic Data Mining Techniques

    13/39

    Document Clustering:

    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.

  • 8/2/2019 2a. Basic Data Mining Techniques

    14/39

    Clustering Points: 3204 Articles of Los Angeles Times.

    Similarit Measure: How man words are common in these

    documents (after some word filtering).

    Ar t i cl es Pl aced

    Financial 555 364

    National 273 36

    Sports 738 573

    Entertainment 354 278

  • 8/2/2019 2a. Basic Data Mining Techniques

    15/39

    Observe Stock Movements every day. Clustering points: Stock-{UP/DOWN}

    described by them frequently happen together on the same day.We used association rules to quantify a similarity measure.

    1Applied-Matl-DOWN,Bay-Network-Down,3-COM-DOWN,

    Cabletron-Sys-DOWN,CISCO-DOWN,HP-DOWN,

    DSC-Comm-DOW N,INTEL-DOWN,LSI-Logic-DOWN,

    Micron-Tech-DOWN,Texas-Inst-Down,Tellabs-Inc-Down,Natl-Semiconduct-DOWN,Oracl-DOWN,SGI-DOWN,

    Technology1-DOWN

    Sun-DOW N

    2Apple-Comp-DOWN,Autodesk-DOWN,DEC-DOWN,

    ADV-Micro-Device-DOWN,Andrew-Corp-DOWN,

    Computer-Assoc-DOWN,Circuit-City-DOWN,

    Compaq-DOWN, EMC-Corp-DOWN, Gen-Ins t-DOWN,

    Motorola-DOW N,Microsoft-DOWN,Scientific-Atl-DOWN

    Technology2-DOWN

    3Fannie-Mae-DOWN,Fed-Home-Loan-DOWN,

    MBNA-Corp-DOWN,Morgan-Stanley-DOWN Financial-DOWN

    4Baker-Hughes-UP,Dresser-Inds-UP,Halliburton-HLD-UP,

    Louisiana-Land-UP,Phillips-Petro-UP,Unocal-UP,

    Schlumberger-UPOil-UP

  • 8/2/2019 2a. Basic Data Mining Techniques

    16/39

    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 Bread, Coke, Milk

    2 Beer, Bread

    3 Beer, Coke, Diaper, Milk

    4 Beer, Bread, Diaper, Milk

    { Milk } - -> { Coke}

    { Diaper, Mi lk} - -> { Beer}

    { Milk } - -> { Coke}

    { Diaper, Mi lk} - -> { Beer}

    5 Coke, Diaper, Milk

  • 8/2/2019 2a. Basic Data Mining Techniques

    17/39

    Marketing and Sales Promotion:

    {Bagels, } --> {Potato Chips} Potato Chips as consequent => Can be used to determine what

    .

    Bagels in the antecedent => Can be used to see which products

    would be affected if the store discontinues selling bagels.used to see what products should be sold with Bagels to promotesale of Potato chips!

  • 8/2/2019 2a. Basic Data Mining Techniques

    18/39

    Supermarket shelf management.

    many customers. Approach: Process the point-of-sale data collected with

    barcode scanners to find dependencies among items.

    A classic rule --

    If a customer bu s dia er and milk then he is ver likel to bu

    beer.

    So, dont be surprised if you find six-packs stacked next to diapers!

  • 8/2/2019 2a. Basic Data Mining Techniques

    19/39

    Association Rule Discovery: Application 3

    Inventory Management:

    Goal: A consumer a liance re air com an wants to antici ate the

    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 co-

    occurrence atterns.

  • 8/2/2019 2a. Basic Data Mining Techniques

    20/39

    Sequential Pattern Discovery: Definition

    Given is a set ofobjects, with each object associated with its own timeline of events, findrules 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 aregoverned by timing constraints.

    (A B) (C) (D E)

  • 8/2/2019 2a. Basic Data Mining Techniques

    21/39

    Sequential Pattern Discovery: Examples

    In telecommunications alarm logs,

    (Inverter_Problem Excessive_Line_Current)

    (Rectifier_Alarm) --> (Fire_Alarm)

    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)

  • 8/2/2019 2a. Basic Data Mining Techniques

    22/39

    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.

    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.

  • 8/2/2019 2a. Basic Data Mining Techniques

    23/39

    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

  • 8/2/2019 2a. Basic Data Mining Techniques

    24/39

    Classical View

    Exemplar View

    To help categorize the data mining technique

    Roiger, 2003

  • 8/2/2019 2a. Basic Data Mining Techniques

    25/39

    All concepts have definite defining properties.

    Example:

    annual income >= 30,000

    & years at current position >= 5 owns ome = true

    Then

    Good Credit Risk = true

  • 8/2/2019 2a. Basic Data Mining Techniques

    26/39

    Concepts are represented by properties that are

    probable of concept number

    Example

    A good credit risk might look like:

    The mean annual income for individuals who consistently make loan

    payments on time is $30,000Most individuals who are good credit risks have been working forthe same company for at least 5 years

    The majority of good credit risks own their own home

    omeowner wit an annua incomeo , emp oye at t esame position for 4 years might be classified as a good credit riskwith a probability of 0.85

  • 8/2/2019 2a. Basic Data Mining Techniques

    27/39

    People store and recall likely concept exemplars that are

    Exemplar#1

    Annual income = 32,000

    Number of years at current position = 6

    Exemplar#2

    Annual income = 52,000

    Number of years at current position = 16

  • 8/2/2019 2a. Basic Data Mining Techniques

    28/39

    Supervised Learning

    .

    Use the model to determine the outcome new instances ofunknown origin

    Unsupervised Learning

    ata m n ng met o t at u s mo e s rom ata w t out

    predefined classes.

  • 8/2/2019 2a. Basic Data Mining Techniques

    29/39

    Supervised Learning:

  • 8/2/2019 2a. Basic Data Mining Techniques

    30/39

    Decision Tree

    A tree structure where non-terminal nodes

    terminal nodes reflect decision outcomes.

  • 8/2/2019 2a. Basic Data Mining Techniques

    31/39

    Table 1.1 H othetical Trainin Data for Disease Dia nosis

    Patient Sore SwollenID# Throat Fever Glands Congestion Headache Diagnosis

    1 Yes Yes Yes Yes Yes Strep throat2 No No No Yes Yes Allergy3 Yes Yes No Yes No Cold

    4 Yes No Yes No No Strep throat5 No Yes No Yes No Cold6 No No No Yes No Allergy7 No No Yes No No Strep throat8 Yes No No Yes Yes Allergy9 No Yes No Yes Yes Cold

    Input Attributes Output Attributes

  • 8/2/2019 2a. Basic Data Mining Techniques

    32/39

    Swollen

    Glands

    No Yes

    Fever

    Diagnosis = Strep Throat

    Yes

    Diagnosis = Allergy Diagnosis = Cold

    No

  • 8/2/2019 2a. Basic Data Mining Techniques

    33/39

    Table 1.2 Data Instances with an Unknown Classification

    Patient Sore SwollenID# Throat Fever Glands Congestion Headache Diagnosis

    11 No No Yes Yes Yes ?12 Yes Yes No No Yes ?13 No No No No Yes ?

  • 8/2/2019 2a. Basic Data Mining Techniques

    34/39

    Translation from decision tree

    Form:

    IF antecedant conditions

    THEN consequent conditions

    Example

    IF Swollen Glands = YesTHEN Diagnosis = Strep Throat

    IF Swollen Glands = No & Fever = Yes

    THEN Diagnosis = Cold

    IF Swollen Glands = No & Fever = NoTHEN Diagnosis = Allergy

  • 8/2/2019 2a. Basic Data Mining Techniques

    35/39

    The Acme Investors Dataset & Supervised

    1. Can I develop a general profile of an online investor?

    2. Can I determine if a new customer is likely to open a margin account?

    3. an u a mo e pre c e average num er o ra es per mon or

    a new investor?4. What characteristics differentiate female and male investors?

    Output attribute:No 1. transaction method

    No 2. margin accountNo 3. trades/month

    No 4. sex

  • 8/2/2019 2a. Basic Data Mining Techniques

    36/39

    The Acme Investors Dataset & Unsupervised

    1. What attribute similarities group customers of Acme

    2. What differences in attribute values segment thecustomer database?

  • 8/2/2019 2a. Basic Data Mining Techniques

    37/39

    Require us to provide an initial best estimate about the

    OR Use an al orithm to determine a best number of clusters

    In either case, a clusterin s stem will attem t to rouinstances into clusters of significant interests

  • 8/2/2019 2a. Basic Data Mining Techniques

    38/39

  • 8/2/2019 2a. Basic Data Mining Techniques

    39/39

    Dunham chapter 1.2