What Is Not Data Mining - Ex: Generation of Attendance Report (Of A Course) From Registration Cards. - Student Table (STD)
What Is Not Data Mining - Ex: Generation of Attendance Report (Of A Course) From Registration Cards. - Student Table (STD)
CSE-307-Data Mining 1
Recap …Introduction
• Query : Find all students registered in a course
• Select std.idno, std.name from std, reg where
std.idno = reg.idno and reg.ccode = “CSE 307”
• Query processing is straight forward, information is
not non-obvious, not so interesting patterns
CSE-307-Data Mining 2
Recap….Introduction
• What is data mining?
• Extraction of interesting patterns, hidden(not
obvious)information, knowledge discovery in
databases(KDD)
• Ex: Which electives can be offered simultaneously ?
• Which combination/group of electives are opted by
most students?
CSE-307-Data Mining 3
Examples of DB query and DM
query
• DB query :
• Find all credit card applicants with first name as Sane
• DM query:
• Find all credit applicants who have poor credit risks -
classification
Examples of DB query and DM
query
• DB query:
• Identify customers who purchased more than
Rs.10,000
• DM query:
• Identify customers with similar buying habits
(Clustering)
• DM query:
• Find all items which are frequently purchased
together by customers – ARM
Examples of DB query and DM
query
• So, DB query – factual information – shallow
knowledge
• DM query – more than mere factual information
– hidden knowledge
Recap …What is Data Mining?
• Many Definitions
• Non-trivial extraction of implicit, previously unknown
and potentially useful information from data
• “Data Mining involves the use of sophisticated data
analysis tools to discover previously unknown, valid
patterns and relationships
in large data sets.”
Recap…Origins of Data Mining
• Draws ideas from machine learning/AI, pattern
recognition, statistics, and database systems
Data Mining
Database
systems
Data Mining Tasks
• Predictive tasks: Predict the values of unknown
variable(attribute), based on known values of other
variables.
• Classification : Discrete target variables
• Ex: Play/Not Play on weather conditions
• Regression: continuous target variables
• Ex: Stock Price
• Descriptive tasks : Derive patterns(rules, correlations,
anomalies)
• Clustering : Document clustering.
• Association Analysis: Market- Basket Analysis
• Anomaly Detection : unusual credit card purchases
Data Mining Tasks...
• Classification [Predictive]
• Clustering [Descriptive]
• Association Rule Discovery [Descriptive]
• Sequential Pattern Discovery [Descriptive]
• Regression [Predictive]
• Deviation Detection [Descriptive]
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.
• 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
6 No Married 60K No
10
No Married 80K ? Test
7 Yes Divorced 220K No Set
8 No Single 85K Yes
9 No Married 75K No Learn
Training
Model
10
10 No Single 90K Yes
Set Classifier
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, 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.
1 sunny 85 85 FALSE no
1 sunny 81 82 FALSE ?
5 rainy 68 80 FALSE no
7 overcast 64 65 TRUE no
13 overcast 81 75 FALSE no
Classification
14 rainy 71 91 TRUE no
Algo
(Learning )
Training Data
19
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
x Euclidean Distance Based Clustering in 3-D space.
22
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 Bread, Coke, Milk
Rules Discovered:
2 Beer, Bread {Milk} --> {Coke}
3 Beer, Coke, Diaper, Milk
{Diaper, Milk} --> {Beer}
4 Beer, Bread, Diaper, Milk
5 Coke, Diaper, Milk
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.
• 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
• 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.
Sequential Pattern Discovery:
Examples
• 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
advertising 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:
• Credit Card Fraud Detection
• Network Intrusion
Detection
Typical network traffic at University level may reach over 100 million connections per day
Data Mining Steps in KDD
Evaluation
& Present Knowledge
Data Mining
Patterns
Selection and
Transformation
Cleaning and
Integration Datawarehouse
Databases
31
Challenges of Data Mining (T1 1.2)
• Scalability
• Dimensionality
• Complex and Heterogeneous Data
• Data Quality
• Privacy Preservation
• Streaming Data
Thank You
CSE-307-Data Mining 33