SlideShare a Scribd company logo
1 of 43
DATA WAREHOUSING
AND
DATA MINING
UNIT – 2
Prepared by
Mr. P. Nandakumar
Assistant Professor,
Department of IT, SVCET
Introduction to Data Mining
Why Mine Data? Commercial Viewpoint
• Lots of data is being collected
and warehoused
– Web data, e-commerce
– purchases at department/
grocery stores
– Bank/Credit Card
transactions
• Twice as much information was created in 2002 as in 1999 (~30% growth rate)
• Other growth rate estimates even higher
Largest databases in 2007
• Largest database in the world: World Data Centre for Climate
(WDCC) operated by the Max Planck Institute and German
Climate Computing Centre
– 220 terabytes of data on climate research and climatic trends,
– 110 terabytes worth of climate simulation data.
– 6 petabytes worth of additional information stored on tapes.
• AT&T
– 323 terabytes of information
– 1.9 trillion phone call records
• Google
– 91 million searches per day,
• After a year worth of searches, this figure amounts to more than 33
trillion database entries.
Top 10 Largest Databases in the
World
• Library of Congress
• Central Intelligence Agency
• Amazon
• YouTube
• ChoicePoint
• Sprint
• Google
• AT&T
• National Energy Research Scientific Computing Center
• World Data Centre for Climate
Source: https://www.comparebusinessproducts.com/fyi/10-
largest-databases-in-the-world
Why Mine Data? Scientific Viewpoint
• Data is collected and stored at
enormous speeds (GB/hour). E.g.
– remote sensors on a satellite
– telescopes scanning the skies
– scientific simulations
generating terabytes of data
• Very little data will ever be looked at
by a human
• Knowledge Discovery is NEEDED
to make sense and use of data.
Data Mining
• Data mining is the process of automatically discovering useful
information in large data repositories.
• Human analysts may take weeks to discover useful information.
• Much of the data is never analyzed at all.
0
500,000
1,000,000
1,500,000
2,000,000
2,500,000
3,000,000
3,500,000
4,000,000
1995 1996 1997 1998 1999
The Data Gap
Total new disk (TB) since 1995
Number of
analysts
From: R. Grossman, C. Kamath, V. Kumar, “Data Mining for Scientific and Engineering Applications”
What is (not) Data Mining?
 What is Data Mining?
– Certain names are more
prevalent in certain locations
(O’Brien, O’Rurke, O’Reilly…
in Boston area)
–Discover groups of similar
documents on the Web
 What is not Data
Mining?
– Look up phone
number in phone
directory
– Query a Web
search engine for
information about
“Amazon”
• Draws ideas from: machine learning/AI, statistics, and database
systems
Origins of Data Mining
Machine Learning
Statistics
Data Mining
Database
systems
Data Mining Tasks
Data mining involves six common classes of tasks:
• Anomaly detection (Outlier/change/deviation detection)
• Association rule learning (Dependency modelling)
• Clustering
• Classification
• Regression
• Summarization
Data Mining Tasks
Data mining tasks are generally divided into two major categories:
• Predictive tasks [Use some attributes to predict unknown or future
values of other attributes.]
• Classification
• Regression
• Deviation Detection
• Descriptive tasks [Find human-interpretable patterns that describe the
data.]
• Association Discovery
• Clustering
Architecture of Data Mining
• Knowledge Base
• Data Mining Engine
• Pattern Evaluation
Module
• User interface
Classification of Data Mining Systems
Data mining process:
• State the problem
and formulate the
hypothesis
• Collect the data
Major Issues In Data Mining
1. Mining different kinds of knowledge in databases
2. Interactive mining of knowledge at multiple levels of
abstraction
3. Incorporation of background knowledge
4. Data mining query languages and ad hoc data mining
5. Presentation and visualization of data mining results
6. Handling noisy or incomplete data
7. Pattern evaluation
8. Efficiency and scalability of data mining algorithms
9. Parallel, distributed, and incremental mining algorithms
Predictive Data Mining or
Supervised learning
• Given a collection of records (training set)
– Each record contains a set of attributes, one of the attributes is the class.
• Find ("learn") a model for the class attribute as a function of the
values of the other attributes.
• Goal: previously unseen records should be assigned a class as
accurately as possible.
Learning
We can think of at least three different problems being involved in
learning:
• memory,
• averaging, and
• generalization.
Example problem
(Adapted from Leslie Kaelbling's example in the MIT courseware)
• Imagine that I'm trying predict whether my neighbor is going to
drive into work, so I can ask for a ride.
• Whether she drives into work seems to depend on the following
attributes of the day:
– temperature,
– expected precipitation,
– day of the week,
– what she's wearing.
Memory
• Okay. Let's say we observe our neighbor on three days:
Clothes
Shop
Day
Precip
Temp
Walk
Casual
No
Sat
None
25
Drive
Casual
Yes
Mon
Snow
-5
Walk
Casual
Yes
Mon
Snow
15
Memory
• Now, we find ourselves on a snowy “–5” – degree Monday, when
the neighbor is wearing casual clothes and going shopping.
• Do you think she's going to drive?
Temp Precip Day Clothes
25 None Sat Casual Walk
-5 Snow Mon Casual Drive
15 Snow Mon Casual Walk
-5 Snow Mon Casual
Memory
• The standard answer in this case is "yes".
– This day is just like one of the ones we've seen before, and so it
seems like a good bet to predict "yes."
• This is about the most rudimentary form of learning, which is just
to memorize the things you've seen before.
Temp Precip Day Clothes
25 None Sat Casual Walk
-5 Snow Mon Casual Drive
15 Snow Mon Casual Walk
-5 Snow Mon Casual Drive
Noisy Data
• Things aren’t always as easy as they were in the previous case. What if
you get this set of noisy data?
Temp Precip Day Clothes
25 None Sat Casual Walk
25 None Sat Casual Walk
25 None Sat Casual Drive
25 None Sat Casual Drive
25 None Sat Casual Walk
25 None Sat Casual Walk
25 None Sat Casual Walk
25 None Sat Casual ?
• Now, we are asked to predict what's going to happen.
• We have certainly seen this case before.
• But the problem is that it has had different answers. Our neighbor is
not entirely reliable.
Averaging
• One strategy would be to predict the majority outcome.
– The neighbor walked more times than she drove in this situation, so
we might predict "walk".
Temp Precip Day Clothes
25 None Sat Casual Walk
25 None Sat Casual Walk
25 None Sat Casual Drive
25 None Sat Casual Drive
25 None Sat Casual Walk
25 None Sat Casual Walk
25 None Sat Casual Walk
25 None Sat Casual Walk
Generalization
• Dealing with previously unseen cases
• Will she walk or drive?
Temp Precip Day Clothes
22 None Fri Casual Walk
3 None Sun Casual Walk
10 Rain Wed Casual Walk
30 None Mon Casual Drive
20 None Sat Formal Drive
25 None Sat Casual Drive
-5 Snow Mon Casual Drive
27 None Tue Casual Drive
24 Rain Mon Casual ?
• We might plausibly
make any of the
following arguments:
– She's going to
walk because it's
raining today and
the only other time
it rained, she
walked.
– She's going to
drive because she
has always driven
on Mondays…
Classification Another Example
Tid Refund Marital
Status
Taxable
Income Cheat
1 Yes Single 125K No
2 No Married 100K No
3 No Single 70K No
4 Yes Married 120K No
5 No Divorced 95K Yes
6 No Married 60K No
7 Yes Divorced 220K No
8 No Single 85K Yes
9 No Married 75K No
10 No Single 90K Yes
10
Refund Marital
Status
Taxable
Income Cheat
No Single 75K ?
Yes Married 50K ?
No Married 150K ?
Yes Divorced 90K ?
No Single 40K ?
No Married 80K ?
10
Test
Set
Training
Set
Model
Learn
Classifier
Example of a Decision Tree
Tid Refund Marital
Status
Taxable
Income Cheat
1 Yes Single 125K No
2 No Married 100K No
3 No Single 70K No
4 Yes Married 120K No
5 No Divorced 95K Yes
6 No Married 60K No
7 Yes Divorced 220K No
8 No Single 85K Yes
9 No Married 75K No
10 No Single 90K Yes
10
Refund
MarSt
TaxInc
YES
NO
NO
NO
Yes No
Married
Single, Divorced
< 80K > 80K
Splitting Attributes
Training Data Model: Decision Tree
Apply Model to Test Data
Refund
MarSt
TaxInc
YES
NO
NO
NO
Yes No
Married
Single, Divorced
< 80K > 80K
Refund Marital
Status
Taxable
Income Cheat
No Married 80K ?
10
Test Data
Start from the root of tree.
Apply Model to Test Data
Refund
MarSt
TaxInc
YES
NO
NO
NO
Yes No
Married
Single, Divorced
< 80K > 80K
Refund Marital
Status
Taxable
Income Cheat
No Married 80K ?
10
Test Data
Apply Model to Test Data
Refund
MarSt
TaxInc
YES
NO
NO
NO
Yes No
Married
Single, Divorced
< 80K > 80K
Refund Marital
Status
Taxable
Income Cheat
No Married 80K ?
10
Test Data
Apply Model to Test Data
Refund
MarSt
TaxInc
YES
NO
NO
NO
Yes No
Married
Single, Divorced
< 80K > 80K
Refund Marital
Status
Taxable
Income Cheat
No Married 80K ?
10
Test Data
Apply Model to Test Data
Refund
MarSt
TaxInc
YES
NO
NO
NO
Yes No
Married
Single, Divorced
< 80K > 80K
Refund Marital
Status
Taxable
Income Cheat
No Married 80K ?
10
Test Data
Apply Model to Test Data
Refund
MarSt
TaxInc
YES
NO
NO
NO
Yes No
Married
Single, Divorced
< 80K > 80K
Refund Marital
Status
Taxable
Income Cheat
No Married 80K ?
10
Test Data
Assign Cheat to “No”
Classification: 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 other related information
about all such customers. E.g.
• Type of business,
• where they stay,
• how much they earn, etc.
• Use this information as input attributes to learn a classifier model.
Classification: Fraud Detection
• Goal: Predict fraudulent cases in credit
card transactions.
• Approach:
• Use credit card transactions and the
information associated with them as
attributes, e.g.
– when does a customer buy,
– what does he buy,
– where does he buy, etc.
• Label some past transactions as fraud or fair
transactions. This forms the class 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: Attrition/Churn
• Situation: Attrition rate for mobile
phone customers is around 25-30% a
year!
• 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. E.g.
– 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.
Success story (Reported in 2003):
• Verizon Wireless performed
this kind of data mining
reducing attrition rate from
over 2% per month to under
1.5% per month.
• Huge impact, with >30 M
subscribers (0.5% is 150,000
customers).
Assessing Credit Risk
• Situation: Person applies for a loan
• Task: Should a bank approve the loan?
– People who have the best credit don’t need the loans
– People with worst credit are not likely to repay.
– Bank’s best customers are in the middle
• Banks develop credit models using a variety of data mining
methods.
• Mortgage and credit card proliferation are the results of being
able to "successfully" predict if a person is likely to default on a
loan.
• Widely deployed in many countries.
Frequent-Itemset Mining
(Association Discovery)
The Market-Basket Model
• A large set of items, e.g., things sold in a supermarket.
• A large set of baskets, each of which is a small set of the items,
e.g., the things one customer buys on one day.
Fundamental problem
• What sets of items are often bought together?
Application
• If a large number of baskets contain both hot dogs and mustard,
we can use this information in several ways. How?
Hot Dogs and Mustard
1. Apparently, many people walk from where the hot dogs are to
where the mustard is.
• We can put them close together, and put between them other foods
that might also be bought with hot dogs and mustard, e.g., ketchup
or potato chips.
• Doing so can generate additional "impulse" sales.
2. The store can run a sale on hot dogs and at the same time raise
the price of mustard.
• People will come to the store for the cheap hot dogs, and many will
need mustard too.
• It is not worth the trouble to go to another store for cheaper
mustard, so they buy that too.
• The store makes back on mustard what it loses on hot dogs, and
also gets more customers into the store.
On-Line Purchases
• Amazon.com offers several million different items for sale, and
has several tens of millions of customers.
• Basket = Customer, Item = Book, DVD, etc.
– Motivation: Find out what items are bought together.
• Basket = Book, DVD, etc. Item = Customer
– Motivation: Find out similar customers.
Words and Documents
• Baskets = sentences; items = words in those sentences.
– Lets us find words that appear together unusually frequently, i.e.,
linked concepts.
• Baskets = sentences, items = documents containing those
sentences.
– Items that appear together too often could represent plagiarism.
Genes
• Baskets = people; items = genes or blood-chemistry factors.
– Has been used to detect combinations of genes that result in
diabetes
Clustering
• 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.
E.g. 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.
Clustering: Application 2
• Document Clustering:
– Goal: To find groups of documents that are similar to each other based
on the important words appearing in them.
– Approach:
• Identify frequently occurring words 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 to clustered documents.
Each article is represented as a set of word-
frequency pairs (w, c).
There are two natural
clusters in the data set.
The first cluster
consists of the first four
articles, which
correspond to news
about the economy.
The second cluster
contains the last four
articles, which
correspond to news
about health care.

More Related Content

Similar to UNIT 2: Part 1: Data Warehousing and Data Mining

Pitfalls and pro-tips for effective and transparent Business Intelligence too...
Pitfalls and pro-tips for effective and transparent Business Intelligence too...Pitfalls and pro-tips for effective and transparent Business Intelligence too...
Pitfalls and pro-tips for effective and transparent Business Intelligence too...Data Con LA
 
Data Mining: an Introduction
Data Mining: an IntroductionData Mining: an Introduction
Data Mining: an IntroductionAli Abbasi
 
How to get value out of data
How to get value out of dataHow to get value out of data
How to get value out of dataLars Trieloff
 
Tis The Season: Load Testing Tips and Checklist for Retail Seasonal Readiness
Tis The Season: Load Testing Tips and Checklist for Retail Seasonal ReadinessTis The Season: Load Testing Tips and Checklist for Retail Seasonal Readiness
Tis The Season: Load Testing Tips and Checklist for Retail Seasonal ReadinessSOASTA
 
Tis The Season: Load Testing Tips and Checklist for Retail Seasonal Readiness
Tis The Season: Load Testing Tips and Checklist for Retail Seasonal ReadinessTis The Season: Load Testing Tips and Checklist for Retail Seasonal Readiness
Tis The Season: Load Testing Tips and Checklist for Retail Seasonal ReadinessSOASTA
 
Automated Decision making with Predictive Applications – Big Data Hamburg
Automated Decision making with Predictive Applications – Big Data HamburgAutomated Decision making with Predictive Applications – Big Data Hamburg
Automated Decision making with Predictive Applications – Big Data HamburgLars Trieloff
 
Risk Management and Reliable Forecasting using Un-reliable Data (magennis) - ...
Risk Management and Reliable Forecasting using Un-reliable Data (magennis) - ...Risk Management and Reliable Forecasting using Un-reliable Data (magennis) - ...
Risk Management and Reliable Forecasting using Un-reliable Data (magennis) - ...Troy Magennis
 
351315535-Module-1-Intro-to-Data-Science-pptx.pptx
351315535-Module-1-Intro-to-Data-Science-pptx.pptx351315535-Module-1-Intro-to-Data-Science-pptx.pptx
351315535-Module-1-Intro-to-Data-Science-pptx.pptxXanGwaps
 
datamining and warehousing ppt
datamining  and warehousing pptdatamining  and warehousing ppt
datamining and warehousing pptSatyamverma2011
 
Data Visualization Workflow
Data Visualization WorkflowData Visualization Workflow
Data Visualization Workflowjeremycadams
 
Data Visualization Workflow
Data Visualization WorkflowData Visualization Workflow
Data Visualization Workflowjeremycadams
 
Automated Decision Making with Predictive Applications – Big Data Düsseldorf
Automated Decision Making with Predictive Applications – Big Data DüsseldorfAutomated Decision Making with Predictive Applications – Big Data Düsseldorf
Automated Decision Making with Predictive Applications – Big Data DüsseldorfLars Trieloff
 
How To Get Started With Machine Learning
How To Get Started With Machine LearningHow To Get Started With Machine Learning
How To Get Started With Machine LearningAlexander Schäfer
 
Introduction-to-Knowledge Discovery in Database
Introduction-to-Knowledge Discovery in DatabaseIntroduction-to-Knowledge Discovery in Database
Introduction-to-Knowledge Discovery in DatabaseKartik Kalpande Patil
 
IBANK - Big data www.ibank.uk.com 07474222079
IBANK - Big data www.ibank.uk.com 07474222079IBANK - Big data www.ibank.uk.com 07474222079
IBANK - Big data www.ibank.uk.com 07474222079ibankuk
 
The Business Case for DevOps - Justifying the Journey
The Business Case for DevOps - Justifying the JourneyThe Business Case for DevOps - Justifying the Journey
The Business Case for DevOps - Justifying the JourneyXebiaLabs
 
Automated decision making with predictive applications – Big Data Frankfurt
Automated decision making with predictive applications – Big Data FrankfurtAutomated decision making with predictive applications – Big Data Frankfurt
Automated decision making with predictive applications – Big Data FrankfurtLars Trieloff
 

Similar to UNIT 2: Part 1: Data Warehousing and Data Mining (20)

Pitfalls and pro-tips for effective and transparent Business Intelligence too...
Pitfalls and pro-tips for effective and transparent Business Intelligence too...Pitfalls and pro-tips for effective and transparent Business Intelligence too...
Pitfalls and pro-tips for effective and transparent Business Intelligence too...
 
Data Mining: an Introduction
Data Mining: an IntroductionData Mining: an Introduction
Data Mining: an Introduction
 
How to get value out of data
How to get value out of dataHow to get value out of data
How to get value out of data
 
Tis The Season: Load Testing Tips and Checklist for Retail Seasonal Readiness
Tis The Season: Load Testing Tips and Checklist for Retail Seasonal ReadinessTis The Season: Load Testing Tips and Checklist for Retail Seasonal Readiness
Tis The Season: Load Testing Tips and Checklist for Retail Seasonal Readiness
 
Tis The Season: Load Testing Tips and Checklist for Retail Seasonal Readiness
Tis The Season: Load Testing Tips and Checklist for Retail Seasonal ReadinessTis The Season: Load Testing Tips and Checklist for Retail Seasonal Readiness
Tis The Season: Load Testing Tips and Checklist for Retail Seasonal Readiness
 
Automated Decision making with Predictive Applications – Big Data Hamburg
Automated Decision making with Predictive Applications – Big Data HamburgAutomated Decision making with Predictive Applications – Big Data Hamburg
Automated Decision making with Predictive Applications – Big Data Hamburg
 
Risk Management and Reliable Forecasting using Un-reliable Data (magennis) - ...
Risk Management and Reliable Forecasting using Un-reliable Data (magennis) - ...Risk Management and Reliable Forecasting using Un-reliable Data (magennis) - ...
Risk Management and Reliable Forecasting using Un-reliable Data (magennis) - ...
 
351315535-Module-1-Intro-to-Data-Science-pptx.pptx
351315535-Module-1-Intro-to-Data-Science-pptx.pptx351315535-Module-1-Intro-to-Data-Science-pptx.pptx
351315535-Module-1-Intro-to-Data-Science-pptx.pptx
 
datamining and warehousing ppt
datamining  and warehousing pptdatamining  and warehousing ppt
datamining and warehousing ppt
 
Data Visualization Workflow
Data Visualization WorkflowData Visualization Workflow
Data Visualization Workflow
 
Data Visualization Workflow
Data Visualization WorkflowData Visualization Workflow
Data Visualization Workflow
 
Automated Decision Making with Predictive Applications – Big Data Düsseldorf
Automated Decision Making with Predictive Applications – Big Data DüsseldorfAutomated Decision Making with Predictive Applications – Big Data Düsseldorf
Automated Decision Making with Predictive Applications – Big Data Düsseldorf
 
Big data
Big dataBig data
Big data
 
How To Get Started With Machine Learning
How To Get Started With Machine LearningHow To Get Started With Machine Learning
How To Get Started With Machine Learning
 
Introduction-to-Knowledge Discovery in Database
Introduction-to-Knowledge Discovery in DatabaseIntroduction-to-Knowledge Discovery in Database
Introduction-to-Knowledge Discovery in Database
 
IBANK - Big data www.ibank.uk.com 07474222079
IBANK - Big data www.ibank.uk.com 07474222079IBANK - Big data www.ibank.uk.com 07474222079
IBANK - Big data www.ibank.uk.com 07474222079
 
Skillwise Big data
Skillwise Big dataSkillwise Big data
Skillwise Big data
 
The Business Case for DevOps - Justifying the Journey
The Business Case for DevOps - Justifying the JourneyThe Business Case for DevOps - Justifying the Journey
The Business Case for DevOps - Justifying the Journey
 
Automated decision making with predictive applications – Big Data Frankfurt
Automated decision making with predictive applications – Big Data FrankfurtAutomated decision making with predictive applications – Big Data Frankfurt
Automated decision making with predictive applications – Big Data Frankfurt
 
Big data
Big dataBig data
Big data
 

More from Nandakumar P

UNIT - 5: Data Warehousing and Data Mining
UNIT - 5: Data Warehousing and Data MiningUNIT - 5: Data Warehousing and Data Mining
UNIT - 5: Data Warehousing and Data MiningNandakumar P
 
UNIT - 4: Data Warehousing and Data Mining
UNIT - 4: Data Warehousing and Data MiningUNIT - 4: Data Warehousing and Data Mining
UNIT - 4: Data Warehousing and Data MiningNandakumar P
 
UNIT 3: Data Warehousing and Data Mining
UNIT 3: Data Warehousing and Data MiningUNIT 3: Data Warehousing and Data Mining
UNIT 3: Data Warehousing and Data MiningNandakumar P
 
UNIT 2: Part 2: Data Warehousing and Data Mining
UNIT 2: Part 2: Data Warehousing and Data MiningUNIT 2: Part 2: Data Warehousing and Data Mining
UNIT 2: Part 2: Data Warehousing and Data MiningNandakumar P
 
UNIT - 1 Part 2: Data Warehousing and Data Mining
UNIT - 1 Part 2: Data Warehousing and Data MiningUNIT - 1 Part 2: Data Warehousing and Data Mining
UNIT - 1 Part 2: Data Warehousing and Data MiningNandakumar P
 
UNIT - 1 : Part 1: Data Warehousing and Data Mining
UNIT - 1 : Part 1: Data Warehousing and Data MiningUNIT - 1 : Part 1: Data Warehousing and Data Mining
UNIT - 1 : Part 1: Data Warehousing and Data MiningNandakumar P
 
UNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHONUNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHONNandakumar P
 
UNIT - 2 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT - 2 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHONUNIT - 2 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT - 2 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHONNandakumar P
 
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON Nandakumar P
 
Python Course for Beginners
Python Course for BeginnersPython Course for Beginners
Python Course for BeginnersNandakumar P
 
CS6601-Unit 4 Distributed Systems
CS6601-Unit 4 Distributed SystemsCS6601-Unit 4 Distributed Systems
CS6601-Unit 4 Distributed SystemsNandakumar P
 
Unit-4 Professional Ethics in Engineering
Unit-4 Professional Ethics in EngineeringUnit-4 Professional Ethics in Engineering
Unit-4 Professional Ethics in EngineeringNandakumar P
 
Unit-3 Professional Ethics in Engineering
Unit-3 Professional Ethics in EngineeringUnit-3 Professional Ethics in Engineering
Unit-3 Professional Ethics in EngineeringNandakumar P
 
Naming in Distributed Systems
Naming in Distributed SystemsNaming in Distributed Systems
Naming in Distributed SystemsNandakumar P
 
Unit 3.1 cs6601 Distributed File System
Unit 3.1 cs6601 Distributed File SystemUnit 3.1 cs6601 Distributed File System
Unit 3.1 cs6601 Distributed File SystemNandakumar P
 
Unit 3 cs6601 Distributed Systems
Unit 3 cs6601 Distributed SystemsUnit 3 cs6601 Distributed Systems
Unit 3 cs6601 Distributed SystemsNandakumar P
 
Professional Ethics in Engineering
Professional Ethics in EngineeringProfessional Ethics in Engineering
Professional Ethics in EngineeringNandakumar P
 

More from Nandakumar P (17)

UNIT - 5: Data Warehousing and Data Mining
UNIT - 5: Data Warehousing and Data MiningUNIT - 5: Data Warehousing and Data Mining
UNIT - 5: Data Warehousing and Data Mining
 
UNIT - 4: Data Warehousing and Data Mining
UNIT - 4: Data Warehousing and Data MiningUNIT - 4: Data Warehousing and Data Mining
UNIT - 4: Data Warehousing and Data Mining
 
UNIT 3: Data Warehousing and Data Mining
UNIT 3: Data Warehousing and Data MiningUNIT 3: Data Warehousing and Data Mining
UNIT 3: Data Warehousing and Data Mining
 
UNIT 2: Part 2: Data Warehousing and Data Mining
UNIT 2: Part 2: Data Warehousing and Data MiningUNIT 2: Part 2: Data Warehousing and Data Mining
UNIT 2: Part 2: Data Warehousing and Data Mining
 
UNIT - 1 Part 2: Data Warehousing and Data Mining
UNIT - 1 Part 2: Data Warehousing and Data MiningUNIT - 1 Part 2: Data Warehousing and Data Mining
UNIT - 1 Part 2: Data Warehousing and Data Mining
 
UNIT - 1 : Part 1: Data Warehousing and Data Mining
UNIT - 1 : Part 1: Data Warehousing and Data MiningUNIT - 1 : Part 1: Data Warehousing and Data Mining
UNIT - 1 : Part 1: Data Warehousing and Data Mining
 
UNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHONUNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT - 5 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
 
UNIT - 2 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT - 2 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHONUNIT - 2 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT - 2 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
 
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
 
Python Course for Beginners
Python Course for BeginnersPython Course for Beginners
Python Course for Beginners
 
CS6601-Unit 4 Distributed Systems
CS6601-Unit 4 Distributed SystemsCS6601-Unit 4 Distributed Systems
CS6601-Unit 4 Distributed Systems
 
Unit-4 Professional Ethics in Engineering
Unit-4 Professional Ethics in EngineeringUnit-4 Professional Ethics in Engineering
Unit-4 Professional Ethics in Engineering
 
Unit-3 Professional Ethics in Engineering
Unit-3 Professional Ethics in EngineeringUnit-3 Professional Ethics in Engineering
Unit-3 Professional Ethics in Engineering
 
Naming in Distributed Systems
Naming in Distributed SystemsNaming in Distributed Systems
Naming in Distributed Systems
 
Unit 3.1 cs6601 Distributed File System
Unit 3.1 cs6601 Distributed File SystemUnit 3.1 cs6601 Distributed File System
Unit 3.1 cs6601 Distributed File System
 
Unit 3 cs6601 Distributed Systems
Unit 3 cs6601 Distributed SystemsUnit 3 cs6601 Distributed Systems
Unit 3 cs6601 Distributed Systems
 
Professional Ethics in Engineering
Professional Ethics in EngineeringProfessional Ethics in Engineering
Professional Ethics in Engineering
 

Recently uploaded

Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 

Recently uploaded (20)

Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 

UNIT 2: Part 1: Data Warehousing and Data Mining

  • 1. DATA WAREHOUSING AND DATA MINING UNIT – 2 Prepared by Mr. P. Nandakumar Assistant Professor, Department of IT, SVCET
  • 3. Why Mine Data? Commercial Viewpoint • Lots of data is being collected and warehoused – Web data, e-commerce – purchases at department/ grocery stores – Bank/Credit Card transactions • Twice as much information was created in 2002 as in 1999 (~30% growth rate) • Other growth rate estimates even higher
  • 4. Largest databases in 2007 • Largest database in the world: World Data Centre for Climate (WDCC) operated by the Max Planck Institute and German Climate Computing Centre – 220 terabytes of data on climate research and climatic trends, – 110 terabytes worth of climate simulation data. – 6 petabytes worth of additional information stored on tapes. • AT&T – 323 terabytes of information – 1.9 trillion phone call records • Google – 91 million searches per day, • After a year worth of searches, this figure amounts to more than 33 trillion database entries.
  • 5. Top 10 Largest Databases in the World • Library of Congress • Central Intelligence Agency • Amazon • YouTube • ChoicePoint • Sprint • Google • AT&T • National Energy Research Scientific Computing Center • World Data Centre for Climate Source: https://www.comparebusinessproducts.com/fyi/10- largest-databases-in-the-world
  • 6. Why Mine Data? Scientific Viewpoint • Data is collected and stored at enormous speeds (GB/hour). E.g. – remote sensors on a satellite – telescopes scanning the skies – scientific simulations generating terabytes of data • Very little data will ever be looked at by a human • Knowledge Discovery is NEEDED to make sense and use of data.
  • 7. Data Mining • Data mining is the process of automatically discovering useful information in large data repositories. • Human analysts may take weeks to discover useful information. • Much of the data is never analyzed at all. 0 500,000 1,000,000 1,500,000 2,000,000 2,500,000 3,000,000 3,500,000 4,000,000 1995 1996 1997 1998 1999 The Data Gap Total new disk (TB) since 1995 Number of analysts From: R. Grossman, C. Kamath, V. Kumar, “Data Mining for Scientific and Engineering Applications”
  • 8. What is (not) Data Mining?  What is Data Mining? – Certain names are more prevalent in certain locations (O’Brien, O’Rurke, O’Reilly… in Boston area) –Discover groups of similar documents on the Web  What is not Data Mining? – Look up phone number in phone directory – Query a Web search engine for information about “Amazon”
  • 9. • Draws ideas from: machine learning/AI, statistics, and database systems Origins of Data Mining Machine Learning Statistics Data Mining Database systems
  • 10. Data Mining Tasks Data mining involves six common classes of tasks: • Anomaly detection (Outlier/change/deviation detection) • Association rule learning (Dependency modelling) • Clustering • Classification • Regression • Summarization
  • 11. Data Mining Tasks Data mining tasks are generally divided into two major categories: • Predictive tasks [Use some attributes to predict unknown or future values of other attributes.] • Classification • Regression • Deviation Detection • Descriptive tasks [Find human-interpretable patterns that describe the data.] • Association Discovery • Clustering
  • 12. Architecture of Data Mining • Knowledge Base • Data Mining Engine • Pattern Evaluation Module • User interface
  • 13. Classification of Data Mining Systems Data mining process: • State the problem and formulate the hypothesis • Collect the data
  • 14. Major Issues In Data Mining 1. Mining different kinds of knowledge in databases 2. Interactive mining of knowledge at multiple levels of abstraction 3. Incorporation of background knowledge 4. Data mining query languages and ad hoc data mining 5. Presentation and visualization of data mining results 6. Handling noisy or incomplete data 7. Pattern evaluation 8. Efficiency and scalability of data mining algorithms 9. Parallel, distributed, and incremental mining algorithms
  • 15. Predictive Data Mining or Supervised learning • Given a collection of records (training set) – Each record contains a set of attributes, one of the attributes is the class. • Find ("learn") a model for the class attribute as a function of the values of the other attributes. • Goal: previously unseen records should be assigned a class as accurately as possible.
  • 16. Learning We can think of at least three different problems being involved in learning: • memory, • averaging, and • generalization.
  • 17. Example problem (Adapted from Leslie Kaelbling's example in the MIT courseware) • Imagine that I'm trying predict whether my neighbor is going to drive into work, so I can ask for a ride. • Whether she drives into work seems to depend on the following attributes of the day: – temperature, – expected precipitation, – day of the week, – what she's wearing.
  • 18. Memory • Okay. Let's say we observe our neighbor on three days: Clothes Shop Day Precip Temp Walk Casual No Sat None 25 Drive Casual Yes Mon Snow -5 Walk Casual Yes Mon Snow 15
  • 19. Memory • Now, we find ourselves on a snowy “–5” – degree Monday, when the neighbor is wearing casual clothes and going shopping. • Do you think she's going to drive? Temp Precip Day Clothes 25 None Sat Casual Walk -5 Snow Mon Casual Drive 15 Snow Mon Casual Walk -5 Snow Mon Casual
  • 20. Memory • The standard answer in this case is "yes". – This day is just like one of the ones we've seen before, and so it seems like a good bet to predict "yes." • This is about the most rudimentary form of learning, which is just to memorize the things you've seen before. Temp Precip Day Clothes 25 None Sat Casual Walk -5 Snow Mon Casual Drive 15 Snow Mon Casual Walk -5 Snow Mon Casual Drive
  • 21. Noisy Data • Things aren’t always as easy as they were in the previous case. What if you get this set of noisy data? Temp Precip Day Clothes 25 None Sat Casual Walk 25 None Sat Casual Walk 25 None Sat Casual Drive 25 None Sat Casual Drive 25 None Sat Casual Walk 25 None Sat Casual Walk 25 None Sat Casual Walk 25 None Sat Casual ? • Now, we are asked to predict what's going to happen. • We have certainly seen this case before. • But the problem is that it has had different answers. Our neighbor is not entirely reliable.
  • 22. Averaging • One strategy would be to predict the majority outcome. – The neighbor walked more times than she drove in this situation, so we might predict "walk". Temp Precip Day Clothes 25 None Sat Casual Walk 25 None Sat Casual Walk 25 None Sat Casual Drive 25 None Sat Casual Drive 25 None Sat Casual Walk 25 None Sat Casual Walk 25 None Sat Casual Walk 25 None Sat Casual Walk
  • 23. Generalization • Dealing with previously unseen cases • Will she walk or drive? Temp Precip Day Clothes 22 None Fri Casual Walk 3 None Sun Casual Walk 10 Rain Wed Casual Walk 30 None Mon Casual Drive 20 None Sat Formal Drive 25 None Sat Casual Drive -5 Snow Mon Casual Drive 27 None Tue Casual Drive 24 Rain Mon Casual ? • We might plausibly make any of the following arguments: – She's going to walk because it's raining today and the only other time it rained, she walked. – She's going to drive because she has always driven on Mondays…
  • 24. Classification Another Example Tid Refund Marital Status Taxable Income Cheat 1 Yes Single 125K No 2 No Married 100K No 3 No Single 70K No 4 Yes Married 120K No 5 No Divorced 95K Yes 6 No Married 60K No 7 Yes Divorced 220K No 8 No Single 85K Yes 9 No Married 75K No 10 No Single 90K Yes 10 Refund Marital Status Taxable Income Cheat No Single 75K ? Yes Married 50K ? No Married 150K ? Yes Divorced 90K ? No Single 40K ? No Married 80K ? 10 Test Set Training Set Model Learn Classifier
  • 25. Example of a Decision Tree Tid Refund Marital Status Taxable Income Cheat 1 Yes Single 125K No 2 No Married 100K No 3 No Single 70K No 4 Yes Married 120K No 5 No Divorced 95K Yes 6 No Married 60K No 7 Yes Divorced 220K No 8 No Single 85K Yes 9 No Married 75K No 10 No Single 90K Yes 10 Refund MarSt TaxInc YES NO NO NO Yes No Married Single, Divorced < 80K > 80K Splitting Attributes Training Data Model: Decision Tree
  • 26. Apply Model to Test Data Refund MarSt TaxInc YES NO NO NO Yes No Married Single, Divorced < 80K > 80K Refund Marital Status Taxable Income Cheat No Married 80K ? 10 Test Data Start from the root of tree.
  • 27. Apply Model to Test Data Refund MarSt TaxInc YES NO NO NO Yes No Married Single, Divorced < 80K > 80K Refund Marital Status Taxable Income Cheat No Married 80K ? 10 Test Data
  • 28. Apply Model to Test Data Refund MarSt TaxInc YES NO NO NO Yes No Married Single, Divorced < 80K > 80K Refund Marital Status Taxable Income Cheat No Married 80K ? 10 Test Data
  • 29. Apply Model to Test Data Refund MarSt TaxInc YES NO NO NO Yes No Married Single, Divorced < 80K > 80K Refund Marital Status Taxable Income Cheat No Married 80K ? 10 Test Data
  • 30. Apply Model to Test Data Refund MarSt TaxInc YES NO NO NO Yes No Married Single, Divorced < 80K > 80K Refund Marital Status Taxable Income Cheat No Married 80K ? 10 Test Data
  • 31. Apply Model to Test Data Refund MarSt TaxInc YES NO NO NO Yes No Married Single, Divorced < 80K > 80K Refund Marital Status Taxable Income Cheat No Married 80K ? 10 Test Data Assign Cheat to “No”
  • 32. Classification: 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 other related information about all such customers. E.g. • Type of business, • where they stay, • how much they earn, etc. • Use this information as input attributes to learn a classifier model.
  • 33. Classification: Fraud Detection • Goal: Predict fraudulent cases in credit card transactions. • Approach: • Use credit card transactions and the information associated with them as attributes, e.g. – when does a customer buy, – what does he buy, – where does he buy, etc. • Label some past transactions as fraud or fair transactions. This forms the class attribute. • Learn a model for the class of the transactions. • Use this model to detect fraud by observing credit card transactions on an account.
  • 34. Classification: Attrition/Churn • Situation: Attrition rate for mobile phone customers is around 25-30% a year! • 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. E.g. – 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. Success story (Reported in 2003): • Verizon Wireless performed this kind of data mining reducing attrition rate from over 2% per month to under 1.5% per month. • Huge impact, with >30 M subscribers (0.5% is 150,000 customers).
  • 35. Assessing Credit Risk • Situation: Person applies for a loan • Task: Should a bank approve the loan? – People who have the best credit don’t need the loans – People with worst credit are not likely to repay. – Bank’s best customers are in the middle • Banks develop credit models using a variety of data mining methods. • Mortgage and credit card proliferation are the results of being able to "successfully" predict if a person is likely to default on a loan. • Widely deployed in many countries.
  • 36. Frequent-Itemset Mining (Association Discovery) The Market-Basket Model • A large set of items, e.g., things sold in a supermarket. • A large set of baskets, each of which is a small set of the items, e.g., the things one customer buys on one day. Fundamental problem • What sets of items are often bought together? Application • If a large number of baskets contain both hot dogs and mustard, we can use this information in several ways. How?
  • 37. Hot Dogs and Mustard 1. Apparently, many people walk from where the hot dogs are to where the mustard is. • We can put them close together, and put between them other foods that might also be bought with hot dogs and mustard, e.g., ketchup or potato chips. • Doing so can generate additional "impulse" sales. 2. The store can run a sale on hot dogs and at the same time raise the price of mustard. • People will come to the store for the cheap hot dogs, and many will need mustard too. • It is not worth the trouble to go to another store for cheaper mustard, so they buy that too. • The store makes back on mustard what it loses on hot dogs, and also gets more customers into the store.
  • 38. On-Line Purchases • Amazon.com offers several million different items for sale, and has several tens of millions of customers. • Basket = Customer, Item = Book, DVD, etc. – Motivation: Find out what items are bought together. • Basket = Book, DVD, etc. Item = Customer – Motivation: Find out similar customers.
  • 39. Words and Documents • Baskets = sentences; items = words in those sentences. – Lets us find words that appear together unusually frequently, i.e., linked concepts. • Baskets = sentences, items = documents containing those sentences. – Items that appear together too often could represent plagiarism.
  • 40. Genes • Baskets = people; items = genes or blood-chemistry factors. – Has been used to detect combinations of genes that result in diabetes
  • 41. Clustering • 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. E.g. Euclidean Distance Based Clustering in 3-D space. Intracluster distances are minimized Intercluster distances are maximized
  • 42. 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.
  • 43. Clustering: Application 2 • Document Clustering: – Goal: To find groups of documents that are similar to each other based on the important words appearing in them. – Approach: • Identify frequently occurring words 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 to clustered documents. Each article is represented as a set of word- frequency pairs (w, c). There are two natural clusters in the data set. The first cluster consists of the first four articles, which correspond to news about the economy. The second cluster contains the last four articles, which correspond to news about health care.