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

Datamining-lect1 - Introduction to Data Mining

Data mining involves analyzing large data sets to discover useful patterns and relationships. It is essential in the digital age due to the massive amounts of data generated daily from various sources, necessitating efficient techniques for knowledge extraction. Applications include recommendation systems, clustering, and frequent itemset analysis, which can provide significant insights across different fields such as commerce, science, and social networks.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Datamining-lect1 - Introduction to Data Mining

Data mining involves analyzing large data sets to discover useful patterns and relationships. It is essential in the digital age due to the massive amounts of data generated daily from various sources, necessitating efficient techniques for knowledge extraction. Applications include recommendation systems, clustering, and frequent itemset analysis, which can provide significant insights across different fields such as commerce, science, and social networks.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 77

DATA MINING

LECTURE 1
Introduction
2

What is data mining?


• After years of data mining there is still no unique
answer to this question.

• A tentative definition:

Data mining is the use of efficient techniques for


the analysis of very large collections of data and the
extraction of useful and possibly unexpected
patterns in data.
3

Why do we need data mining?


• Really, really huge amounts of raw data!!
• In the digital age, TB of data is generated by the
second.
• Web, Wikipedia, Mobile devices, Digital photographs and
videos, Facebook, Twitter, Instagram, Transactions,
sensor data, behavioral data, scientific measurements,
wearable computing
• New ways of generating data are constantly created.
• Cheap storage has made possible to maintain this
data
• Need to analyze the data to extract
knowledge
4

Why do we need data mining?


• “The data is the computer”
• Large amounts of data can be more powerful than complex algorithms
and models
• Google has solved many Natural Language Processing problems, simply by
looking at the data
• Example: misspellings, synonyms
• Data is power!
• Today, the collected data is one of the biggest assets of an online company
• Query logs of Google, The friendship and updates of Facebook, Tweets and follows of
Twitter, Amazon transactions
• Data for the people:
• Using data from the people activity we can improve their individual lives but also
the overall society life.
• We need a way to harness the collective intelligence

• From Data mining to Data Science


5

Example: transaction data


• Billions of real-life customers:
• WALMART: 20M transactions per day
• AT&T 300 M calls per day
• Credit card companies: billions of transactions per day.
• Amazon: millions of purchases per day

• The point cards allow companies to collect


information about specific users
6

Example: document data


• Web as a document repository: estimated 50
billions of web pages in Google index
• Several trillions overall

• Wikipedia: 4.9 million articles (and counting)

• Online news portals: steady stream of 100’s of


new articles every day

• Twitter: ~500 million tweets every day


7

Example: network data


• Web: 50 billion pages linked via hyperlinks

• Facebook: 1.5 billion users

• Twitter: 300 million users

• LinkedIn: 300 million users


8

Example: genomic sequences


• http://www.1000genomes.org/page.php

• Full sequence of 1000 individuals

• 3 billion nucleotides per person  3 trillion


nucleotides

• Lots more data in fact: medical history of the


persons, gene expression data
9

Medical data
• Wearable devices can measure your heart rate, blood sugar,
blood pressure, and other signals about your health. Medical
records are becoming available to individuals
• Wearable computing

• Brain imaging
• Images that monitor the activity in different areas of the brain under
different stimuli
• TB of data that need to be analyzed.

• Gene and Protein interaction networks


• It is rare that a single gene regulates deterministically the expression of
a condition.
• There are complex networks and probabilistic models that govern the
protein expression.
10

Example: environmental data


• Climate data (just an example)
http://www.ncdc.gov/oa/climate/ghcn-monthly/index.php

• “a database of temperature, precipitation and


pressure records managed by the National Climatic
Data Center, Arizona State University and the
Carbon Dioxide Information Analysis Center”

• “6000 temperature stations, 7500 precipitation


stations, 2000 pressure stations”
• Spatiotemporal data
11

Behavioral data
• Mobile phones today record a large amount of information about the user
behavior
• GPS records position
• Camera produces images
• Communication via phone and SMS
• Text via facebook updates
• Association with entities via check-ins

• Amazon collects all the items that you browsed, placed into your basket,
read reviews about, purchased.

• Google and Bing record all your browsing activity via toolbar plugins.
They also record the queries you asked, the pages you saw and the
clicks you did.

• Data collected for millions of users on a daily basis


12

The data is also very complex


• Multiple types of data: database tables, text, time
series, images, videos, graphs, etc

• Interconnected data of different types:


• From the mobile phone we can collect, location of the
user, friendship information, check-ins to venues,
opinions through twitter, status updates in FB, images
though cameras, queries to search engines

• Spatial and temporal aspects


13

What can you do with the data?


• Suppose that you are the owner of a supermarket
and you have collected billions of market basket
data. What information would you extract from it
and how would you use it?
TID Items
Product placement
1 Bread, Coke, Milk
2 Beer, Bread
3 Beer, Coke, Diaper, Milk Catalog creation
4 Beer, Bread, Diaper, Milk
5 Coke, Diaper, Milk
14

What can you do with the data?


• In online sites such as Amazon, YouTube, Netflix
the data collected can be at the individual level:
we know for every user the items they have
looked at, reviewed, selected.
• What information can you get from this data?

Recommendations
15

Amazon Recommendations
• “People who have bought this also bought…”

• A huge breakthrough for amazon


• Took advantage of the big tail
• A big breakthrough for data mining in general
16

The Long Tail

Source: Chris Anderson (2004)


17

Other recommendation systems


• Netflix, YouTube, Pandora, etc

• Recommendation systems exploit the collective behavior of users


to draw conclusions for an individual
• Collaborative filtering
18

What can you do with the data?


• Suppose you are a search engine and you have
a toolbar log consisting of
• pages browsed,
• queries, Ad click prediction

• pages clicked,
Query auto-completion
• ads clicked and spelling correction

each with a user id and a timestamp. What


information would you like to get our of the data?
19

Example Application
• Google auto-complete and spelling correction
20

What can you do with the data?


• Suppose you are biologist who has microarray
expression data: thousands of genes, and their
expression values over thousands of different settings
(e.g. tissues). What information would you like to get
out of your data?

Groups of genes and tissues


21

What can you do with the data?


• Suppose you are a stock broker and you observe
the fluctuations of multiple stocks over time. What
information would you like to get our of your
data?
Groups of similar stocks

Correlation of stocks

Stock Value prediction


22

What can you do with the data?


• You are the owner of a social network, and you
have full access to the social graph, what kind of
information do you want to get out of your graph?

• Who is the most important node in the graph?


• What is the shortest path between two nodes?
• How many friends two nodes have in common?
• How does information spread in the network?
• How likely are two nodes to become friends?
23

What is the most


important node in this
graph?
24

The Web as a graph


• Application: When retrieving pages, the
authoritativeness is factored in the ranking.
• This is the idea that made Google a success around
2000
• Today a lot more information is used, like clicks,
browsing behavior, etc
• Ranking of the pages is a very complex task that
requires sophisticated techniques
25
26
27

Viral Marketing
• Word-of-Mouth marketing where the network of
users do the advertising themselves.
• It is considered the most effective, but also the hardest
way to advertise

To which users should


we advertise in order to
maximize the spread of
the message?
28

Friendship suggestions
• LinkedIn, Twitter, Facebook friendship
suggestions
• Useful for the users to discover their friends, but also
useful for the network in order to grow, and increase
engagement
• LinkedIn success story
29

Big data
• The new trend in data mining…
• An all-encompassing term to describe problems in science,
industry, everyday life where there are huge amounts of data
that need to be stored, maintained and analyzed to produce
value.
• The overall idea:
• Every activity generates data
• Wearable computing, Internet of Things, Brain Imaging, Urban behavior
• If we collect and understand this data we can improve life for the
individual and the world
• E.g., Urban computing, Health informatics.

• Deep Learning:
• New techniques that can extract useful information (learn) from
massive amounts of data.
30

Example: Big Data and Sports


• All major soccer and basketball teams use data
mining to make decisions.
The national team of
Germany had a special
software for the analysis of
video.

They concluded that the


possession time per player
should be reduced.

Germany won the 2014 word cup


31

NBA and Data Mining


In NBA there are special conferences for data science
32

James Harden defence


33
34

Why data mining?


• Commercial point of view
• Data has become the key competitive advantage of companies
• Examples: Facebook, Google, Amazon
• Being able to extract useful information out of the data is key for exploiting
them commercially.
• Scientific point of view
• Scientists are at an unprecedented position where they can collect TB of
information
• Examples: Sensor data, astronomy data, social network data, gene data
• We need the tools to analyze such data to get a better understanding of the
world and advance science and help people
• Scale (in data size and feature dimension)
• Why not use traditional analytic methods?
• Enormity of data, curse of dimensionality
• The amount and the complexity of data does not allow for manual
processing of the data. We need automated techniques.
35

What is Data Mining again?


• “Data mining is the analysis of (often large)
observational data sets to find unsuspected
relationships and to summarize the data in novel ways
that are both understandable and useful to the data
analyst” (Hand, Mannila, Smyth)

• “Data mining is the discovery of models for data”


(Rajaraman, Ullman)
• We can have the following types of models
• Models that explain the data (e.g., a single function)
• Models that predict the future data instances.
• Models that summarize the data
• Models the extract the most prominent features of the data.
36

What is data mining again?


• The industry point of view: The analysis of huge
amounts of data for extracting useful and
actionable information, which is then integrated
into production systems in the form of new
features of products
• Data Scientists should be good at data analysis, math,
statistics, but also be able to code with huge amounts of
data and use the extracted information to build
products.
37

What can we do with data mining?


• Some Data Mining topics:
• Frequent itemsets and Association Rules extraction
• Recommendation systems
• Coverage
• Clustering
• Classification
• Ranking
• Exploratory analysis
38

Frequent Itemsets and Association Rules


• Given a set of records each of which contain some number of
items from a given collection;
• Identify sets of items (itemsets) occurring frequently together
• Produce dependency rules which will predict occurrence of
an item based on occurrences of other items.
• Challenge: Do this efficiently for millions of records and items

Itemsets
ItemsetsDiscovered:
Discovered:
TID Items {Milk,Coke}
{Milk,Coke}
1 Bread, Coke, Milk {Diaper,
{Diaper,Milk}
Milk}
2 Beer, Bread
3 Beer, Coke, Diaper, Milk Rules
RulesDiscovered:
Discovered:
4 Beer, Bread, Diaper, Milk {Milk}
{Milk}-->
-->{Coke}
{Coke}
5 Coke, Diaper, Milk {Diaper,
{Diaper,Milk}
Milk}-->
-->{Beer}
{Beer}
Tan, M. Steinbach and V. Kumar, Introduction to Data Mining
39

Example Application
• 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.
• A classic rule --
• If a customer buys diaper and milk, then he is very
likely to buy beer.
• So, don’t be surprised if you find six-packs stacked
next to diapers!

Tan, M. Steinbach and V. Kumar, Introduction to Data Mining


40

Frequent Itemsets: Applications


• Text mining: finding associated phrases in text
• There are lots of documents that contain the phrases
“association rules”, “data mining” and “efficient
algorithm”
• Can be used to define key phrases, correct spelling
mistakes, associate different concepts.
• Recommendations:
• Users who buy this item often buy this item as well
• Users who watched James Bond movies, also watched
Jason Bourne movies.

• Recommendations make use of item and user similarity


41

Recommender systems
Collaborative filtering: Use the collective behavior of the users to
draw conclusions for an individual
Harry Harry Harry Twilight Star Star Star
Potter 1 Potter 2 Potter 3 Wars 1 Wars 2 Wars 3
A 4 5 1
B 5 5 4
C 2 4 5
D 3 3

Fill the empty entries of the matrix.


Use the fact that similar users will behave similarly
And similar items will be rated similarly
But how do we define similarity?
How do we make use of the collective behavior?
Big problem – Complicated math using probabilities/linear algerba
42

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.

Tan, M. Steinbach and V. Kumar, Introduction to Data Mining


43

Illustrating Clustering
Euclidean Distance Based Clustering in 3-D space.

Intracluster
Intraclusterdistances
distances Intercluster
Interclusterdistances
distances
are
areminimized
minimized are
aremaximized
maximized

Tan, M. Steinbach and V. Kumar, Introduction to Data Mining


44

Clustering: Application 1
• Bioinformatics applications:
• Goal: Group genes and tissues together such that genes are
coexpressed on the same tissues
45

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

Tan, M. Steinbach and V. Kumar, Introduction to Data Mining


46

Coverage
• Given a set of customers and items and the
transaction relationship between the two, select a
small set of items that “covers” all users.
• For each user there is at least one item in the set that
the user has bought.

• Application:
• Create a catalog to send out that has at least one item
of interest for every customer.
47

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.

• In simple terms: Create a model that predicts a


specific property of the data
48

Classification Example: Tax Fraud


l l
ir ca ir ca o us
u
ego ego t in
at at on
ass
c c c cl
Tid Refund Marital Taxable Refund Marital Taxable
Status Income Cheat Status Income Cheat

1 Yes Single 125K No No Single 75K ?


2 No Married 100K No Yes Married 50K ?
3 No Single 70K No No Married 150K ?
4 Yes Married 120K No Yes Divorced 90K ?
5 No Divorced 95K Yes No Single 40K ?
6 No Married 60K No No Married 80K ? Test
10

Set
7 Yes Divorced 220K No
8 No Single 85K Yes
9 No Married 75K No
Training
Learn
10
10 No Single 90K Yes
Set Classifier Model

Tan, M. Steinbach and V. Kumar, Introduction to Data Mining


49

Model Example: Decision Trees

Refund
Yes No

NO MarSt

Single, Divorced Married

TaxInc NO

< 80K > 80K

NO YES
50

Classification: Application 1
• Ad Click Prediction
• Goal: Predict if a user that visits a web page will click
on a displayed ad. Use it to target users with high click
probability.
• Approach:
• Collect data for users over a period of time and record who
clicks and who does not. The {click, no click} information
forms the class attribute.
• Use the history of the user (web pages browsed, queries
issued) as the features.
• Learn a classifier model and test on new users.
51

Classification: Application 2
• Fraud Detection
• Goal: Predict fraudulent cases in credit card 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.
• Learn a model for the class of the transactions.
• Use this model to detect fraud by observing credit card
transactions on an account.

Tan, M. Steinbach and V. Kumar, Introduction to Data Mining


52

Network data analysis


• Link Analysis Ranking: Given a collection of web
pages that are linked to each other, rank the
pages according to importance
(authoritativeness) in the graph
• Intuition: A page gains authority if it is linked to by
another authoritative page.
53

The PageRank algorithm

Think of the nodes in the


graph as containers of
capacity of 1 liter.

We distribute a liter of
liquid equally to all
containers
54

The PageRank algorithm

The edges act like pipes


that transfer liquid
between nodes.
55

The PageRank algorithm

The edges act like pipes


that transfer liquid
between nodes.

The contents of each


node are distributed to
its neighbors.
56

The PageRank algorithm

The edges act like pipes


that transfer liquid
between nodes.

The contents of each


node are distributed to
its neighbors.
57

The PageRank algorithm

The edges act like pipes


that transfer liquid
between nodes.

The contents of each


node are distributed to
its neighbors.
58

The PageRank algorithm

The system will reach an


equilibrium state where
the amount of liquid in
each node remains
constant.
59

The PageRank algorithm

The amount of liquid in


each node determines
the importance of the
node.

Large quantity means


large incoming flow from
nodes with large quantity
of liquid.

Mathematically, we compute an eigenvector of a matrix


defined by the adjacency matrix of the graph
60

Network data analysis


• Given a social network can you predict which
individuals will connect in the future?
• Triadic closure principle: Links are created in a way that
usually closes a triangle
• If both Bob and Charlie know Alice, then they are likely to meet
at some point.

• Application: Friend/Connection suggestions in


social networks
61

Exploratory Analysis
• Trying to understand the data as a physical
phenomenon, and describe them with simple metrics
• What does the web graph look like?
• How often do people repeat the same query?
• Are friends in facebook also friends in twitter?

• The important thing is to find the right metrics and


ask the right questions

• It helps our understanding of the world, and can lead


to models of the phenomena we observe.
62

Exploratory Analysis: The Web


• What is the structure and the properties of the
web?
63

Exploratory Analysis: The Web


• What is the distribution of the incoming links?
64

Connections of Data Mining with other areas


• Draws ideas from machine learning/AI, pattern
recognition, statistics, and database systems
• Traditional Techniques
may be unsuitable due to
• Enormity of data Statistics/ Machine Learning/
AI Pattern
• High dimensionality Recognition
of data
• Heterogeneous, Data Mining

distributed nature
of data Database
• Emphasis on the use of data systems

Tan, M. Steinbach and V. Kumar, Introduction to Data Mining


65

Cultures
• Databases: concentrate on large-scale (non-
main-memory) data.
• AI (machine-learning): concentrate on complex
methods, small data.
• In today’s world data is more important than algorithms
• Statistics: concentrate on models.
• Big Data: Make machine learning scale on large
data

CS345A Data Mining on the Web: Anand Rajaraman, Jeff Ullman


66

Models vs. Analytic Processing

• To a database person, data-mining is an


extreme form of analytic processing – queries
that examine large amounts of data.
• Result is the query answer.
• To a statistician, data-mining is the inference
of models.
• Result is the parameters of the model.

CS345A Data Mining on the Web: Anand Rajaraman, Jeff Ullman


67

New era of data mining


• Boundaries are becoming less clear
• Today data mining and machine learning are
synonymous. It is assumed that there algorithms should
scale. It is clear that statistical inference is used for
building the models.
68

Data Mining: Confluence of Multiple Disciplines

Database
Technology Statistics

Machine Visualization
Data Mining
Learning

Pattern
Recognition Other
Algorithms Disciplines
69

Data Mining: Confluence of Multiple Disciplines

Database
Technology Statistics

Machine Visualization
Data Mining
Learning

Pattern
Recognition Other
Algorithms Disciplines
70

Data Mining: Confluence of Multiple Disciplines

Database
Technology Statistics

Machine Visualization
Data Mining
Learning

Pattern
Recognition Distributed
Algorithms Computing
71

Single-node architecture

CPU
Machine Learning, Statistics

Memory

“Classical” Data Mining

Disk
72

Commodity Clusters
• Web data sets can be very large
• Tens to hundreds of terabytes
• Cannot mine on a single server
• Standard architecture emerging:
• Cluster of commodity Linux nodes, Gigabit ethernet interconnect
• Google GFS; Hadoop HDFS; Kosmix KFS
• Typical usage pattern
• Huge files (100s of GB to TB)
• Data is rarely updated in place
• Reads and appends are common
• How to organize computations on this architecture?
• Map-Reduce paradigm
73

Cluster Architecture
2-10 Gbps backbone between racks
1 Gbps between Switch
any pair of nodes
in a rack
Switch Switch

CPU CPU CPU CPU

Mem … Mem Mem … Mem

Disk Disk Disk Disk

Each rack contains 16-64 nodes


74

Map-Reduce paradigm
• Map the data into key-value pairs
• E.g., map a document to word-count pairs
• Group by key
• Group all pairs of the same word, with lists of counts
• Reduce by aggregating
• E.g. sum all the counts to produce the total count.
75

Putting it all together:


The LinkedIn Data Mining Pipeline
Data Pipeline Model Fitting Pipeline (Hadoop)
feature extraction
offline modeling fitting nearline modeling fitting
feature transformation
(cold-start model) (warm-start model)
user modeling
daily/weekly minutes/hourly

Online Serving System

data tracking & logging multi-pass rankers candidates generation

online A/B test


real-time feedback
model evaluation
76

The Skills of a Data Miner – Data Scientist

It is a hard job
77

But also a rewarding one

"The success of companies


like Google, Facebook,
Amazon, and Netflix, not to
mention Wall Street firms and
industries from manufacturing
and retail to healthcare, is
increasingly driven by better
tools for extracting meaning
from very large quantities of
data. 'Data Scientist' is now
the hottest job title in Silicon
Valley." – Tim O'Reilly

You might also like