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

001Lecture_1 Introduction-1

Uploaded by

hussienayman366
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

001Lecture_1 Introduction-1

Uploaded by

hussienayman366
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

1

About the course – Administrivia Instructor:

Dr. Osama Farouk Hassan


[email protected]

IS471, Sunday 2:00-5:00 pm (online)

2
Text Book:

3
Assessment Methods
• Class Work : Quiz + Assignment during the term
Degree Item
5 Quiz1
5 Quiz2
2 Assignment1
2 Assignment2
2 Assignment3
2 Assignment4
2 Assignment5
Total 20
Oral and Lab. 20

• Final exam (80).


• Total (120).
4
Data Mining
 Lecture 1 - Introduction
Lecture Outlines
 What is Data Mining?
 Knowledge Discovery from Data ( KDD )
 Examples of Large Datasets
 Examples of Data mining Applications
 How Data Mining is used
 The Data Mining Process
 What Kinds of Data Can Be Mined?
 Why Data Preprocessing?
 What Kinds of Patterns Can Be Mined?
 Which Technologies are Used?
What is Data Mining?

 Data Mining is:


The process of discovering interesting patterns and
knowledge from large amounts of data. The data
sources can include databases, data warehouses, the
Web, other information repositories, or data that are
streamed into the system dynamically.
What Is Data Mining?
Knowledge Discovery from Data ( KDD )

The knowledge discovery process is shown in Figure 1.4 as an iterative sequence of the
following steps:
1) Data cleaning (to remove noise and inconsistent data)
2) Data integration (where multiple data sources may be combined)
3) Data selection (where data relevant to the analysis task are retrieved from the database)
4) Data transformation (where data are transformed and consolidated into forms
appropriate for mining by performing summary or aggregation operations)
5) Data mining (an essential process where intelligent methods are applied to extract data
patterns)
6) Pattern evaluation (to identify the truly interesting patterns representing knowledge
based on interestingness measures.)
7) Knowledge presentation (where visualization and knowledge representation techniques
are used to present mined knowledge to users)
Data warehouses are constructed via
a process of data cleaning, data
integration, data transformation, data
loading, and periodic data refreshing.
Examples of Large Datasets

 Government: IRS, NGA, …


 Large corporations
 WALMART: 20M transactions per day
 MOBIL: 100 TB geological databases
 AT&T 300 M calls per day
 Credit card companies

 Scientific
 NASA, EOS project: 50 GB per hour
 Environmental datasets
Examples of Data mining Applications

1. Fraud detection: credit cards, phone cards


2. Marketing: customer targeting
3. Data Warehousing: WalMart
4. Astronomy
5. biology
How Data Mining is used

1. Identify the problem


2. Use data mining techniques to transform the
data into information
3. Act on the information
4. Measure the results
The Data Mining Process

1. Understand the domain


2. Create a dataset:
 Select the interesting attributes
 Data cleaning and preprocessing
3. Choose the data mining task and the specific
algorithm
4. Interpret the results, and possibly return to 2
What Kinds of Data Can Be Mined?

 Database Data.
 Data Warehouses.
 Transactional Data.
 Other Kinds of Data.
Database Data

 A database system, also called a database management system (DBMS), consists of a


collection of interrelated data, known as a database, and a set of software programs
to manage and access the data.
 A relational database is a collection of tables, each of which is assigned a unique
name. Each table consists of a set of attributes (columns or fields) and usually stores
a large set of tuples (records or rows). Each tuple in a relational table represents an
object identified by a unique key and described by a set of attribute values. A
semantic data model, such as an entity-relationship (ER) data model, is often
constructed for relational databases. An ER data model represents the database as a
set of entities and their relationships.
Example 1.2 A relational database for AllElectronics
Data Warehouses

Suppose that AllElectronics is a successful international company with branches


around the world. Each branch has its own set of databases.
Example 1.3 A data cube for AllElectronics.
Transactional Data
 The transactional database is usually either stored in a flat file in a format
similar to the table in Figure 1.8 or unfolded into a standard relation in a
format similar to the items sold table in Figure 1.5.
Other Kinds of Data

Such kinds of data can be seen in many applications: time-related or


sequence data (e.g., historical records, stock exchange data, and time-
series and biological sequence data), data streams (e.g., video
surveillance and sensor data, which are continuously transmitted), spatial
data (e.g., maps), engineering design data (e.g., the design of buildings,
system components, or integrated circuits), hypertext and multimedia
data (including text, image, video, and audio data), graph and networked
data (e.g., social and information networks), and the Web (a huge, widely
distributed information repository made available by the Internet).
Why Data Preprocessing?

 Data in the real world is dirty


 incomplete: lacking attribute values, lacking certain attributes of
interest, or containing only aggregate data
 noisy: containing errors or outliers
 inconsistent: containing discrepancies in codes or names
 No quality data, no quality mining results!
 Quality decisions must be based on quality data
 Data warehouse needs consistent integration of quality data
 Required for both OLAP and Data Mining!
Why can Data be Incomplete?

 Attributes of interest are not available (e.g., customer


information for sales transaction data)
 Data were not considered important at the time of
transactions, so they were not recorded!
 Data not recorder because of misunderstanding or
malfunctions
 Data may have been recorded and later deleted!
 Missing/unknown values for some data
Data Cleaning
 Data cleaning tasks
 Fill in missing values
 Identify outliers and smooth out noisy data
 Correct inconsistent data
What Kinds of Patterns Can Be Mined?

In general, such tasks can be classified into two categories:


Descriptive mining: tasks characterize properties of the data in a
target data set.
Predictive mining: tasks perform induction on the current data in
order to make predictions.
 Class/Concept Description: Characterization and Discrimination.
 Mining Frequent Patterns, Associations, and Correlations.
 Classification and Regression for Predictive Analysis.
 Cluster Analysis.
 Outlier Analysis .
Class/Concept Description:
Characterization and Discrimination

 Data entries can be associated with classes or concepts. For example, in the
AllElectronics store, classes of items for sale include computers and printers,
and concepts of customers include big Spenders and budget Spenders.
 Data characterization is a summarization of the general characteristics or
features of a target class of data.
 Data discrimination is a comparison of the general features of the target
class data objects against the general features of objects from one or
multiple contrasting classes.
Mining Frequent Patterns, Associations,
and Correlations

 Frequent patterns, as the name suggests, are patterns that occur


frequently in data. There are many kinds of frequent patterns.
A frequent itemset typically refers to a set of items that
often appear together in a transactional data set—for
example, milk and bread, which are frequently bought
together in grocery stores by many customers.
A frequently occurring subsequence, such as the pattern
that customers, tend to purchase first a laptop, followed by a
digital camera, and then a memory card, is a (frequent)
sequential pattern.
A frequently substructure can refer to different structural
forms (e.g., graphs, trees, or lattices) that may be combined
with itemsets or subsequences.
Mining frequent patterns leads to the discovery of interesting
associations and correlations within data.
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
2 Beer, Bread
Rules Discovered:
3 Beer, Coke, Diaper, Milk
{Milk} --> {Coke}
4 Beer, Bread, Diaper, Milk {Diaper, Milk} --> {Beer}
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!
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

Tid Home Marital Taxable Home Marital Taxable


Owner Status Income Default Owner Status Income Default

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
Model
10
10 No Single 90K Yes Set Classifier
Example of a Decision Tree

Tid Home Marital Taxable


Splitting Attributes
Owner Status Income Default

1 Yes Single 125K No


2 No Married 100K No HO
Yes No
3 No Single 70K No
4 Yes Married 120K No NO MarSt
5 No Divorced 95K Yes Single, Divorced Married
6 No Married 60K No
TaxInc NO
7 Yes Divorced 220K No
8 No Single 85K Yes
< 80K > 80K

9 No Married 75K No NO YES


10 No Single 90K Yes
10

Training Data Model: Decision Tree


Another Example of Decision Tree

MarSt Single,
Married Divorced
Tid Home Marital Taxable
Owner Status Income Default
NO HO
1 Yes Single 125K No No
Yes
2 No Married 100K No
3 No Single 70K No NO TaxInc
4 Yes Married 120K No < 80K > 80K
5 No Divorced 95K Yes
NO YES
6 No Married 60K No
7 Yes Divorced 220K No
8 No Single 85K Yes
9 No Married 75K No There could be more than one tree that
10 No Single 90K Yes
fits the same data!
10
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.

From [Berry & Linoff] Data Mining Techniques, 1997


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

 Partitions data set into clusters, and models it by one


representative from each cluster
 Can be very effective if data is clustered but not if data
is “smeared”
 There are many choices of clustering definitions and
clustering algorithms, more later!
Sampling
 Allow a mining algorithm to run in complexity that is
potentially sub-linear to the size of the data
 Choose a representative subset of the data
 Simple random sampling may have very poor performance in the
presence of skew
 Develop adaptive sampling methods
 Stratified sampling:
 Approximate the percentage of each class (or subpopulation of

interest) in the overall database


 Used in conjunction with skewed data

 Sampling may not reduce database I/Os (page at a time).


Sampling

Raw Data
Sampling
Raw Data Cluster/Stratified Sample

•The number of samples drawn from each


cluster/stratum is analogous to its size
•Thus, the samples represent better the data and
outliers are avoided
Which Technologies Are Used?

You might also like