Introduction to Data Mining Course
Introduction to Data Mining Course
Data Mining
Why data mining?
(EECS 6412)
What is data mining?
Process of data mining or KDD
Introduction to Data Mining
Course information
Instructor: Aijun An
Overview of data mining
EECS, York University
What kind of data to mine from?
What kind of patterns to mine? (Data Mining
Tasks)
Data mining R&D issues
2
5 6
1
Value Purpose of Data Mining
Data mining is a tool to get the value out of
Valuable information hidden in data data.
For example:
What types of credit card transactions are fraud?
What items are often bought together? Value
Veracity
What types of customers like a particular product?
What news or ads should be recommended to an online
news reader? Variety Volume
Who are the most influential people in a social network?
Velocity
What topics are people discussing in social media?
What types of patients react positively to a new drug?
7 8
9 10
Example 1 Example 2
Hypothetical Training Data for Disease Diagnosis
Data about investors
Patient Sore Swollen
ID# Throat Fever Glands Congestion Headache Diagnosis
Customer Account Margin Transaction Trades/ Favorite Annual
ID Type Account Method Month Sex Age Recreation Income 1 Yes Yes Yes Yes Yes Strep throat
2 No No No Yes Yes Allergy
3 Yes Yes No Yes No Cold
1005 Joint No Online 12.5 F 30–39 Tennis 40–59K 4 Yes No Yes No No Strep throat
1013 Custodial No Broker 0.5 F 50–59 Skiing 80–99K 5 No Yes No Yes No Cold
1245 Joint No Online 3.6 M 20–29 Golf 20–39K 6 No No No Yes No Allergy
2110 Individual Yes Broker 22.3 M 40–49 Fishing 40–59K 7 No No Yes No No Strep throat
1001 Individual Yes Online 5.0 M 30–39 Golf 60–79K 8 Yes No No Yes Yes Allergy
9 No Yes No Yes Yes Cold
10 Yes Yes No Yes Yes Cold
Possible business questions
• In this example dataset, attributes correspond to Symptoms,
Can we develop a general characterization/profile of and Diagnosis.
different investor types? (characterization/frequent patterns)
What characteristics distinguish between Online and Broker • The natural question is to predict the Diagnosis (class) [the
investors? (classification) Output variable] from the symptoms [the input variables].
Can we develop a model which will predict the average
trades/month for a new investor? (regression) 11 12
2
Example 2 (Cont’d)
Swollen
Example 2 (Cont’d) No
Glands
Yes
13 14
3
Some Related Fields
Alternative Name: KDD
Machine Learning
Subfield of AI Knowledge discovery in databases (KDD)
Used by AI, Machine Learning Community since
Exploratory data analysis 1989
Subfield of Statistics
Data warehousing and OLAP (Database) Data mining
Data summarization and aggregation Used by DB, business people since 1990
Data mining (in comparison to ML)
inherits techniques from ML and statistics Two names are now used interchangeably
emphasizes processing very large data sets
finds more types of patterns 19 20
4
Project
Evaluation and Grading
Should be done in a group of 2 students.
Pick a recent advanced topic in data mining
Topic list will be released in the second week
Assignments (20%) Conduct a survey on the topic
2 assignments Present the survey to the class in November (10%)
Survey Presentation
Make a 30-minute presentation to the class
Instructor Information
What is the topic area about?
Motivation, objectives, and problem definition Office hours
What are the categories of existing techniques?
Thursdays: 1:00pm-2:00pm
Briefly present a representative method in at least two
categories. Location: LAS 2048
What are the advantages of each category or technique?
What are the limitations of each category or technique?
What are the open (unresolved) issues in the research? Email: aan@[Link]
Purpose:
Course eClass site:
Make the class understand the topic areas and techniques
for solving the problem [Link]
Develop presentation skills 27 28
5
Tabular Data
Transactional Data
Attributes/Features/Variables
Structured data
Transaction-id Itemset
Table
T100 Milk, bread, beer, diaper
Examples Examples/ T200 Beer, cook, fish, potato, orange, diaper
Instances/
Attributes Cases/ … …
Observations
Can be stored in Some transactional databases also contain time stamp and
plain text files, or the customer id for each transaction
relational databases.
An attribute can be:
Patterns
Most common form of • Symbolic (discrete, categorical) What kind of product combinations that customers
• Numeric (continuous, integer)
data for classification, • Ordinal (categorical with a value
like to buy together?
clustering and regression order, e.g., temperature with values
of low, medium, high)
tasks 31 32
Text Data
<breakfast_menu>
<food>
<name>Belgian Waffles</name>
Example of XML Data
<price>$5.95</price>
<description>Two of our famous Belgian Waffles with plenty of real maple syrup</description>
Documents <calories>650</calories>
</food>
<food>
articles, Web pages, blogs, tweets, emails, product <name>Strawberry Belgian Waffles</name>
<price>$7.95</price>
specifications, reports, notes, reviews, etc. <description>Light Belgian waffles covered with strawberries and whipped cream</description>
<calories>900</calories>
</food>
Structure <food>
<name>Berry-Berry Belgian Waffles</name>
summaries, topics, sentiments, emotions <description>Two eggs, bacon or sausage, toast, and our ever-popular hash browns</description>
<calories>950</calories>
... 33
</food>
</breakfast_menu> 34
6
Graph Data Example 1 of Graph Dataset
Data entities are connected, forming graphs
Aspirin Biological Networks Graph data set: containing one or more graphs (3 in this example)
Social Networks
Financial Networks
1
2 2
4 4
5 5
(1) (2)
37 38
7
Predictive Tasks Types of Predictive Tasks / Supervised Learning
A form of Supervised Learning
− Training examples are labeled with target outputs
Input/independent/Condition
Classification
Target/Output/Decision
attributes/features/variables
attribute/variable Regression
Structured prediction
Examples/
Instances/
Cases/
Observations
− Learn a model from labelled data to make predictions on the future data
43 44
Class attribute
45 46
47 48
8
Input/independent variables/predictors
Target attribute/variable
Regression
Regression Hours
1
Prep
exams
1
Exam
score
76
(Dependent
variable)
2 3 78
2 3 85
49 50
51 52
Target attribute/variable
Hours
Prep
exams
Exam
score Linear regression model learned: Classification
1 1 76
2
2
3
3
78
85
Exam score = 67.67 + 5.56*(Hours) – 0.60*(Prep exams)
Regression
4 5 88
2
1
2
2
72
69 Structured prediction
5
4
1
1
94
94 Prediction:
2 0 88
4 3 92 − A new student with Hours=4 and Prep exams = 2
4 4 90
3 3 75
− Predicted exam score:
6 2 96
5 4 90 Exam score = 67.67 + 5.56*4– 0.60*2 = 88.71
3 4 82
4 4 85
6 5 99
2 1 83
1 0 62
2 1 76
53 54
9
Structured Prediction Structured Prediction
• Another example: Named entity recognition
Outputs are structured objects, e.g.,
Labeled Training data: Prediction on new data:
− Sequences, trees, graphs, or other interrelated
components
− There are often relationships among output components
Example:
− Sequence-to-sequence problems
Both input and output are a sequence
E.g., machine translation (English French)
56
55
10
Association Analysis Mining Sequential Patterns
Examples of association rules: Find frequently occurring patterns in a
age(X, “20..29”) ^ income(X, “20..29K”) buys(X, “PC”) sequence database.
[support = 2%, confidence = 60%]
Within 3 months, buy computer buy USB
contains(T, “computer”) contains(T, “software”)
drive buy digital camera
[support=1%, confidence=75%] (T stands for a transaction)
Applications
Sale campaign analysis
Widely used for market basket or transactional
What are the subsequent purchases after buying a
data analysis. PC?
What products were often purchased together? Web log analysis
DNA or protein analysis
61 62
63 64
11
Outline of Introduction
Questions
Why data mining?
What is the difference between classification What is data mining?
and clustering?
Process of data mining or KDD
Course information
What is the difference between classification
Overview of data mining
and regression?
What kind of data to mine from?
What kind of patterns to mine? (Data Mining
Tasks)
Data mining R&D issues
67 68
69 70
71 72
12
Data Mining with Privacy
Fairness and Bias in AI
Data may contain private information
Data mining can invade privacy A model is considered fair if errors are
Technical solutions can limit privacy invasion distributed similarly across different groups
Replacing sensitive personal data with anon. ID of data
Alter the data so that real values are obscured Unfairness is usually caused by bias in
Multi-party computation – distributed data data, or/and
… learning algorithm
Bayardo & Srikant, Technological Solutions
for Protecting Privacy, IEEE Computer, Sep
2003 73 74
How easy to interpret a learned model/pattern Frequent pattern and association rule
How easy for a human to understand the cause of mining
a decision made by a model
75 76
13