You are on page 1of 48

BA ZG522 : Business Data Mining

(Lecture #8)

BITS Pilani T V Rao, BITS-Pilani Off-campus Centre, Hyderabad


Pilani|Dubai|Goa|Hyderabad
Text Books

T1: Data Mining: Concepts and Techniques, Third


Edition 2011 by Jiawei Han, Micheline Kamber and
Jian Pei Morgan Kaufmann Publishers

Reference Book(s) & other resources

Introduction to Data Mining, Pearson Education 2006 by Tan P. N., Steinbach M & Kumar V.

Predictive Analytics and Data Mining: Concepts and Practice with RapidMiner by Vijay Kotu and
Bala Deshpande Morgan Kaufmann Publishers © 2015

Source Courtesy: Some of the contents of this presentation are sourced from materials provided by publishers of prescribed books
3/5/2023 BA ZG522 - Business Data Mining 2

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Business Data Mining
M6: Classification and Prediction
BITS Pilani
Pilani|Dubai|Goa|Hyderabad
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

6.3 Rule Based Classification


Classification Techniques
• Decision Tree based Methods
• Rule-based Methods
• Naïve Bayes and Bayesian Belief Networks
- uses the probability theory to find the most likely of the possible
classifications
• Neural Networks
- computational networks that simulate the decision process in
neurons (networks of nerve cell)
• Support Vector Machines
- fits a boundary to a region of points that are all alike; uses the
boundary to classify a new point

3/5/2023 BA ZG522 - Business Data Mining

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 19565


Rule-Based Classifier

• Classify records by using a collection of “if…then…” rules

• Rule: (Condition) → y where


• Condition is a conjunctions of attributes
• y is the class label
• LHS: rule antecedent or condition
• RHS: rule consequent
• Examples of classification rules:
• (Blood Type=Warm)  (Lay Eggs=Yes) → Birds
• (Taxable Income < 50K)  (Refund=Yes) → Evade=No
3/5/2023 BA ZG522 - Business Data Mining

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


6
Rule-based Classifier (Example)
Name Blood Type Give Birth Can Fly Live in Water Class
human warm yes no no mammals
python cold no no no reptiles
salmon cold no no yes fishes
whale warm yes no yes mammals
frog cold no no sometimes amphibians
komodo cold no no no reptiles
bat warm yes yes no mammals
pigeon warm no yes no birds
cat warm yes no no mammals
leopard shark cold yes no yes fishes
turtle cold no no sometimes reptiles
penguin warm no no sometimes birds
porcupine warm yes no no mammals
eel cold no no yes fishes
salamander cold no no sometimes amphibians
gila monster cold no no no reptiles
platypus warm no no no mammals
owl warm no yes no birds
dolphin warm yes no yes mammals
eagle warm no yes no birds

R1: (Give Birth = no)  (Can Fly = yes) → Birds


R2: (Give Birth = no)  (Live in Water = yes) → Fishes
R3: (Give Birth = yes)  (Blood Type = warm) → Mammals
R4: (Give Birth = no)  (Can Fly = no) → Reptiles
R5: (Live in Water = sometimes) → Amphibians
3/5/2023 BA ZG522 - Business Data Mining

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 19567


Application of Rule-Based Classifier
• A rule r covers an instance x if the attributes of the instance satisfy the
condition of the rule

R1: (Give Birth = no)  (Can Fly = yes) → Birds


R2: (Give Birth = no)  (Live in Water = yes) → Fishes
R3: (Give Birth = yes)  (Blood Type = warm) → Mammals
R4: (Give Birth = no)  (Can Fly = no) → Reptiles
R5: (Live in Water = sometimes) → Amphibians

Name Blood Type Give Birth Can Fly Live in Water Class
hawk warm no yes no ?
grizzly bear warm yes no no ?

The rule R1 covers a hawk => Bird


The rule R3 covers the grizzly bear => Mammal

3/5/2023 BA ZG522 - Business Data Mining


8
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Rule Coverage and Accuracy
Tid Refund Marital Taxable
Income Class
• Coverage of a rule: Status

• Fraction of records that satisfy the 1 Yes Single 125K No


antecedent of a rule 2 No Married 100K No
• Accuracy of a rule: 3 No Single 70K No
• Fraction of records that satisfy both 4 Yes Married 120K No
the antecedent and consequent of
a rule 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
(Status=Single) → No 10 No Single 90K Yes
10

Coverage = 40%, Accuracy = 50%

3/5/2023 BA ZG522 - Business Data Mining

9
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
How does Rule-based Classifier Work?
R1: (Give Birth = no)  (Can Fly = yes) → Birds
R2: (Give Birth = no)  (Live in Water = yes) → Fishes
R3: (Give Birth = yes)  (Blood Type = warm) → Mammals
R4: (Give Birth = no)  (Can Fly = no) → Reptiles
R5: (Live in Water = sometimes) → Amphibians

Name Blood Type Give Birth Can Fly Live in Water Class
lemur warm yes no no ?
turtle cold no no sometimes ?
dogfish shark cold yes no yes ?

A lemur triggers rule R3, so it is classified as a mammal


A turtle triggers both R4 and R5
A dogfish shark triggers none of the rules

3/5/2023 BA ZG522 - Business Data Mining


10
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Characteristics of Rule-Based Classifier

• Mutually exclusive rules


• Classifier contains mutually exclusive rules if the rules are
independent of each other
• Every record is covered by at most one rule

• Exhaustive rules
• Classifier has exhaustive coverage if it accounts for every possible
combination of attribute values
• Each record is covered by at least one rule

3/5/2023 BA ZG522 - Business Data Mining


11
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
From Decision Trees To Rules

Refund Classification Rules


Yes No
(Refund=Yes) ==> No
NO Marita l
Status (Refund=No, Marital Status={Single,Divorced},
{Single, Taxable Income<80K) ==> No
{Married}
Divorced}
(Refund=No, Marital Status={Single,Divorced},
Taxable NO Taxable Income>80K) ==> Yes
Income
(Refund=No, Marital Status={Married}) ==> No
< 80K > 80K

NO YES

Rules are mutually exclusive and exhaustive


Rule set contains as much information as the
tree

3/5/2023 BA ZG522 - Business Data Mining


12
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Rules Can Be Simplified
Tid Refund Marital Taxable
Refund Status Income Cheat
Yes No
1 Yes Single 125K No
NO Marita l 2 No Married 100K No
{Single, Status
{Married} 3 No Single 70K No
Divorced}
4 Yes Married 120K No
Taxable NO 5 No Divorced 95K Yes
Income
6 No Married 60K No
< 80K > 80K
7 Yes Divorced 220K No
NO YES 8 No Single 85K Yes
9 No Married 75K No
10 No Single 90K Yes
10

Initial Rule: (Refund=No)  (Status=Married) → No


Simplified Rule: (Status=Married) → No
3/5/2023 BA ZG522 - Business Data Mining
13
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Effect of Rule Simplification

• Rules are no longer mutually exclusive


• A record may trigger more than one rule
• Solution?
• Ordered rule set
• Unordered rule set – use voting schemes

• Rules are no longer exhaustive


• A record may not trigger any rules
• Solution?
• Use a default class

3/5/2023 BA ZG522 - Business Data Mining


14
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Ordered Rule Set
• Rules are rank ordered according to their priority
• An ordered rule set is known as a decision list
• When a test record is presented to the classifier
• It is assigned to the class label of the highest ranked rule it has triggered
• If none of the rules fired, it is assigned to the default class

R1: (Give Birth = no)  (Can Fly = yes) → Birds


R2: (Give Birth = no)  (Live in Water = yes) → Fishes
R3: (Give Birth = yes)  (Blood Type = warm) → Mammals
R4: (Give Birth = no)  (Can Fly = no) → Reptiles
R5: (Live in Water = sometimes) → Amphibians

Name Blood Type Give Birth Can Fly Live in Water Class
turtle cold no no sometimes ?
3/5/2023 BA ZG522 - Business Data Mining
15
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Rule Ordering Schemes
• Rule-based ordering
• Individual rules are ranked based on their quality
• Class-based ordering
• Rules that belong to the same class appear together

Rule-based Ordering Class-based Ordering


(Refund=Yes) ==> No (Refund=Yes) ==> No

(Refund=No, Marital Status={Single,Divorced}, (Refund=No, Marital Status={Single,Divorced},


Taxable Income<80K) ==> No Taxable Income<80K) ==> No

(Refund=No, Marital Status={Single,Divorced}, (Refund=No, Marital Status={Married}) ==> No


Taxable Income>80K) ==> Yes
(Refund=No, Marital Status={Single,Divorced},
(Refund=No, Marital Status={Married}) ==> No Taxable Income>80K) ==> Yes

16
3/5/2023 BA ZG522 - Business Data Mining

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Building Classification Rules

• Direct Method:
• Extract rules directly from data
• e.g.: RIPPER, CN2, Holte’s 1R

• Indirect Method:
• Extract rules from other classification models (e.g.
decision trees, neural networks, etc).
• e.g: C4.5rules

3/5/2023 BA ZG522 - Business Data Mining 17

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Direct Method: Sequential Covering

1. Start from an empty rule


2. Grow a rule using the Learn-One-Rule function
3. Remove training records covered by the rule
4. Repeat Step (2) and (3) until stopping criterion is met

3/5/2023 BA ZG522 - Business Data Mining


18
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Indirect Methods

P
No Yes

Q R Rule Set

No Yes No Yes r1: (P=No,Q=No) ==> -


r2: (P=No,Q=Yes) ==> +
- + + Q r3: (P=Yes,R=No) ==> +
r4: (P=Yes,R=Yes,Q=No) ==> -
No Yes
r5: (P=Yes,R=Yes,Q=Yes) ==> +
- +

3/5/2023 BA ZG522 - Business Data Mining


19
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Bayesian Classification Techniques


Bayes Classifier
• A probabilistic framework for solving classification problems
• Conditional Probability:
P( A, C )
P(C | A) =
P( A)
P( A, C )
P( A | C ) =
P(C )
• Bayes theorem:

P( A | C ) P(C )
P(C | A) =
P( A)

3/5/2023 BA ZG522 - Business Data Mining


21
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Example of Bayes Theorem
• Given:
• A doctor knows that meningitis causes stiff neck 50% of the
time
• Prior probability of any patient having meningitis is 1/50,000
• Prior probability of any patient having stiff neck is 1/20

• If a patient has stiff neck, what’s the probability he/she has


meningitis?

P( S | M ) P( M ) 0.5 1 / 50000
P( M | S ) = = = 0.0002
P( S ) 1 / 20

3/5/2023 BA ZG522 - Business Data Mining

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


22
Bayesian Classifiers

• Consider each attribute and class label as random variables

• Given a record with attributes (A1, A2,…,An)


• Goal is to predict class C
• Specifically, we want to find the value of C that maximizes P(C| A1, A2,…,An )

• Can we estimate P(C| A1, A2,…,An ) directly from data?

3/5/2023 BA ZG522 - Business Data Mining

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


23
Bayesian Classifiers

• Approach:
• compute the posterior probability P(C | A1, A2, …, An) for all
values of C using the Bayes theorem
P ( A A  A | C ) P (C )
P (C | A A  A ) = 1 2 n

P( A A  A )
1 2 n

1 2 n

• Choose value of C that maximizes


P(C | A1, A2, …, An)

• Equivalent to choosing value of C that maximizes


P(A1, A2, …, An|C) P(C)

• How to estimate P(A1, A2, …, An | C )?

3/5/2023 BA ZG522 - Business Data Mining


24
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Naive Bayes Classifier

• Assume independence among attributes Ai when class is


given:
• P(A1, A2, …, An |C) = P(A1| Cj) P(A2| Cj)… P(An| Cj)

• Can estimate P(Ai| Cj) for all Ai and Cj.

• New point is classified to Cj if P(Cj)  P(Ai| Cj) is maximal.

3/5/2023 BA ZG522 - Business Data Mining


25
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
How to Estimate Probabilities from Data?
• Class: P(C) = Nc/N
Tid Refund Marital Taxable Evade
Status Income • e.g., P(No) = 7/10,
P(Yes) = 3/10
1 Yes Single 125K No
2 No Married 100K No
• For discrete attributes:
3 No Single 70K No
P(Ai | Ck) = |Aik|/ Nck
4 Yes Married 120K No
5 No Divorced 95K Yes • where |Aik| is number
6 No Married 60K No of instances having
7 Yes Divorced 220K No
attribute Ai and belongs
to class Ck
8 No Single 85K Yes
• Examples:
9 No Married 75K No
10 No Single 90K Yes P(Status=Married|No) = 4/7
P(Refund=Yes|Yes)=0

3/5/2023 BA ZG522 - Business Data Mining


26
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
How to Estimate Probabilities from Data?
• For continuous attributes:
• Discretize the range into bins
• one ordinal attribute per bin
• Too many bins – training records are too few to provide reliable probability for each
interval
• Too few bins – some intervals may aggregate from different classes & we may miss the
correct decision boundary
• Two-way split: (A < v) or (A > v)
• choose only one of the two splits as new attribute
• Probability density estimation:
• Assume attribute follows a normal distribution
• Use data to estimate parameters of distribution
(e.g., mean and standard deviation)
• Once probability distribution is known, can use it to estimate the conditional probability
P(Ai|Ck)

3/5/2023 BA ZG522 - Business Data Mining

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


27
How to Estimate Probabilities from Data?

Tid Refund Marital


Status
Taxable
Income
Evade
• Normal distribution:
( Ai −  ij ) 2

1 Yes Single 125K No 1 2 ij2
P ( Ai | c j ) = e
2 No Married 100K No 2 ij2
3 No Single 70K No
4 Yes Married 120K No • One for each (Ai,ci) pair
5 No Divorced 95K Yes
6 No Married 60K No • For (Income, Class=No):
7 Yes Divorced 220K No
• If Class=No
8 No Single 85K Yes
• sample mean = 110
9 No Married 75K No
• sample variance = 3179.16
10 No Single 90K Yes

(120 −110) 2
1 −
P( Income = 120 | No) = e 2 (3179)
= 0.0069
2 (56.38)
3/5/2023 BA ZG522 - Business Data Mining 28

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Example of Naïve Bayes Classifier
Given a Test Record:
X = (Refund = No, Married, Income = 120K)

Tid Refund Marital Taxable Evade P(X|Class=No) = P(Refund=No|Class=No)


Status Income  P(Married| Class=No)
1 Yes Single 125K No  P(Income=120K| Class=No)
2 No Married 100K No = 4/7  4/7  0.0069 = 0.0023
3 No Single 70K No
P(X|Class=Yes) = P(Refund=No| Class=Yes)
4 Yes Married 120K No  P(Married| Class=Yes)
5 No Divorced 95K Yes  P(Income=120K| Class=Yes)
6 No Married 60K No = 1  0  1.2  10-9 = 0
7 Yes Divorced 220K No
8 No Single 85K Yes
Since P(X|No)P(No) > P(X|Yes)P(Yes)
9 No Married 75K No Therefore P(No|X) > P(Yes|X)
10 No Single 90K Yes => Class = No

3/5/2023 BA ZG522 - Business Data Mining


29
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Naive Bayes Classifier
• If one of the conditional probability is zero, then the entire
expression becomes zero
• Probability estimation is done with Laplacian correction:

N ic
Original : P ( Ai | C ) =
Nc
c: number of classes
N ic + 1
Laplace : P ( Ai | C ) =
Nc + c

3/5/2023 BA ZG522 - Business Data Mining

30
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Example of Naïve Bayes Classifier
Name Give Birth Can Fly Live in Water Have Legs Class
human yes no no yes mammals
A: attributes
python no no no no non-mammals M: mammals
salmon no no yes no non-mammals
whale yes no yes no mammals N: non-mammals
frog no no sometimes yes non-mammals
komodo no no no yes non-mammals
6 6 2 2
bat
pigeon
yes
no
yes
yes
no
no
yes
yes
mammals
non-mammals
P ( A | M ) =    = 0.06
cat yes no no yes mammals
7 7 7 7
leopard shark yes no yes no non-mammals 1 10 3 4
turtle no no sometimes yes non-mammals P ( A | N ) =    = 0.0042
penguin no no sometimes yes non-mammals 13 13 13 13
porcupine yes no no yes mammals
7
P ( A | M ) P ( M ) = 0.06  = 0.021
eel no no yes no non-mammals
salamander no no sometimes yes non-mammals
gila monster no no no yes non-mammals 20
platypus no no no yes mammals
13
owl
dolphin
no
yes
yes
no
no
yes
yes
no
non-mammals
mammals
P ( A | N ) P ( N ) = 0.004  = 0.0027
eagle no yes no yes non-mammals 20

P(A|M)P(M) > P(A|N)P(N)


Give Birth Can Fly Live in Water Have Legs Class
yes no yes no ? => Mammals

3/5/2023 BA ZG522 - Business Data Mining 31

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Naïve Bayes (Summary)

• Robust to isolated noise points

• Handle missing values by ignoring the instance during probability


estimate calculations

• Robust to irrelevant attributes

• Independence assumption may not hold for some attributes


• Use other techniques such as Bayesian Belief Networks (BBN)

3/5/2023 BA ZG522 - Business Data Mining

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


32
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Ensemble Classification Techniques


Ensemble Methods

• Construct a set of classifiers from the training data

• Predict class label of previously unseen records by


aggregating predictions made by multiple classifiers

3/5/2023 BA ZG522 - Business Data Mining


34
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
General Idea
Original
D Training data

Step 1:
Create Multiple D1 D2 .... Dt-1 Dt
Data Sets

Step 2:
Build Multiple C1 C2 Ct -1 Ct
Classifiers

Step 3:
Combine C*
Classifiers

3/5/2023 BA ZG522 - Business Data Mining

35
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Why does it work?

• Suppose there are 25 base classifiers


• Each classifier has error rate,  = 0.35
• Assume classifiers are independent
• Probability that the ensemble classifier makes a wrong
prediction:
  i
25 25

  
 i 
i =13 
 (1 −  ) 25 −i
= 0.06

3/5/2023 BA ZG522 - Business Data Mining


36
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
When error rate differs…

• Suppose there are k base classifiers


• Each classifier has different error rate, i
• Again, assume classifiers are independent
• Probability that the ensemble classifier makes a wrong
prediction:
• Majority of classifiers have to make wrong prediction
• Compute the probability for each combination that can make
wrong prediction (brute force method)
• Sum up for all possible combinations

BA ZG522 - Business Data Mining 37

3/5/2023 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
How does it work?

• Suppose there are 3 base classifiers


• Classifiers have error rates,  = 0.3, 0.2, and 0.1
• Assume classifiers are independent
• Probability that the ensemble classifier makes a wrong
prediction ?

3/5/2023 BA ZG522 - Business Data Mining


38
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Mid Semester Review


What Is Data Mining?

• Data mining (knowledge discovery • Draws ideas from machine learning/AI,


from data) pattern recognition, statistics, and
• Extraction of interesting (non-trivial,
database systems
implicit, previously unknown and • Traditional Techniques
potentially useful) patterns or may be unsuitable due to
knowledge from huge amount of data • Enormity of data
• Data mining: a misnomer? • High dimensionality
of data
• Alternative names • Heterogeneous,
• Knowledge discovery (mining) in distributed nature
databases (KDD), knowledge extraction, Statistics/ Machine Learning/
of data
data/pattern analysis, data archeology, AI Pattern
data dredging, information harvesting, Recognition
business intelligence, etc.
Data Mining
• Everything is NOT “data mining”?
• Simple search and query processing
• (Deductive) expert systems Database
systems

3/5/2023 BA ZG522 - Business Data Mining 40

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Data Preprocessing

• Measures for data quality: A


• Data cleaning
multidimensional view
• Fill in missing values, smooth noisy data, identify or
remove outliers, and resolve inconsistencies
• Accuracy: correct or wrong,
accurate or not • Data integration
• Completeness: not recorded, • Integration of multiple databases, data cubes, or
unavailable, … files
• Consistency: some modified • Data reduction
but some not, dangling, … • Dimensionality reduction
• Timeliness: timely update? • Numerosity reduction
• Believability: how trustable • Data compression
the data are correct?
• Data transformation and data
• Interpretability: how easily
the data can be understood?
discretization
• Normalization
• Concept hierarchy generation
3/5/2023 BA ZG522 - Business Data Mining 41
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Basic Statistical Descriptions of Data
• Motivation
• To better understand the data: central tendency, variation and spread
• Data dispersion characteristics
• median, max, min, quantiles, outliers, variance, etc.
• Numerical dimensions correspond to sorted intervals
• Data dispersion: analyzed with multiple granularities of precision
• Boxplot or quantile analysis on sorted intervals
• Dispersion analysis on computed measures
• Folding measures into numerical dimensions
• Boxplot or quantile analysis on the transformed cube

3/5/2023 BA ZG522 - Business Data Mining 42


BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Distance between Objects
• A database may contain all attribute types
• Nominal, symmetric binary, asymmetric binary,
numeric, ordinal
• One may use a weighted formula to combine their effects
 pf = 1 ij( f ) dij( f )
d (i, j) =
 pf = 1 ij( f )

• f is binary or nominal:
dij(f) = 0 if xif = xjf , or dij(f) = 1 otherwise
• f is numeric: use the normalized distance
• f is ordinal
• Compute ranks rif and zif = r − 1 if

• Treat z as interval-scaled M −1 f
if

3/5/2023 BA ZG522 - Business Data Mining 43


BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Data Warehouse?
• Defined in many different ways, but • Modeling data warehouses: dimensions &
not rigorously. measures
• A decision support database that is • Star schema: A fact table in the middle
maintained separately from the
connected to a set of dimension tables
organization’s operational database
• Support information processing by • Snowflake schema: A refinement of star
providing a solid platform of schema where some dimensional
consolidated, historical data for hierarchy is normalized into a set of
analysis. smaller dimension tables, forming a
• “A data warehouse is a subject- shape similar to snowflake
oriented, integrated, time-variant, and • Fact constellations: Multiple fact tables
share dimension tables, viewed as a
nonvolatile collection of data in
collection of stars, therefore called galaxy
support of management’s decision- schema or fact constellation
making process.”—W. H. Inmon (Bill
Inmon)

BA ZG522 - Business Data Mining 44


BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Association Analysis
• Association analysis measures the strength of co-occurrence between one
item and another.
• The objective of this class of data mining algorithms is not to predict an occurrence of an
item, like classification or regression do, but to find usable patterns in the co-occurrences of
the items.
• Association rules learning is a branch of an unsupervised learning process that discovers
hidden patterns in data, in the form of easily recognizable rules

• Association algorithms are widely used in retail analysis of transactions,


recommendation engines, and online clickstream analysis across web pages.
• One of the popular applications of this technique is called market basket analysis, which
finds co-occurrences of one retail item with another item within the same retail purchase
transaction

• Retailer can take advantage of this association for bundle pricing, product
placement, and even shelf space optimization within the store layout.

March 5, 2023 BA ZG522 - Business Data Mining 45

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Better Frequent-pattern Mining

• Apriori principle helps • Use a compressed


representation of the
• Multiple database scans are costly database using an FP-tree
• Mining long patterns needs many • Once an FP-tree has been
passes of scanning and generates constructed, it uses a
lots of candidates recursive divide-and-
• To find frequent itemset i1i2…i100
conquer approach to mine
the frequent itemsets
• # of scans: 100
• # of Candidates: (1001) + (1002) + … + (110000)
= 2100-1 = 1.27*1030 ! 1. Scan DB once, find frequent 1-
itemset (single item pattern)
• Bottleneck: candidate-generation-
and-test 2. Sort frequent items in
frequency descending order, f-
list
• Can we avoid candidate
generation? 3. Scan DB again, construct FP-
tree

BA ZG522 - Business Data Mining 46


March 5, 2023
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Classification
• Classification • Decision Tree based Methods
• predicts categorical class
labels (discrete or • Rule-based Methods
nominal) • Neural Networks
• classifies data (constructs - computational networks that
a model) based on the simulate the decision process in
training set and the values neurons (networks of nerve cell)
(class labels) in a
classifying attribute and • Naïve Bayes and Bayesian Belief
uses it in classifying new Networks
data - uses the probability theory to find
the most likely of the possible
classifications
• Prediction
• Support Vector Machines
• models continuous-valued
functions, i.e., predicts - fits a boundary to a region of points
unknown or missing values that are all alike; uses the boundary
to classify a new point

3/5/2023 BA ZG522 - Business Data Mining 47

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Text Books

Author(s), Title, Edition, Publishing House


T1 Data Mining: Concepts and Techniques, Third Edition by Jiawei Han, Micheline
Kamber and Jian Pei Morgan Kaufmann Publishers
T2 Tan P. N., Steinbach M & Kumar V. “Introduction to Data Mining” Pearson
Education
R1 Predictive Analytics and Data Mining: Concepts and Practice with RapidMiner
by Vijay Kotu and Bala Deshpande Morgan Kaufmann Publishers

3/5/2023 BA ZG522 - Business Data Mining 48

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

You might also like