CSIS 100
CSIS 100 - Discussion Board Topic #1:
One of the objectives of this course is to enable students to differentiate between the disciplines of Information Systems, Information Technology, and Computer Science. Oftentimes, these areas overlap and are difficult to distinguish – even among professionals within the industries.
There are some distinctions that become evident, but all too frequently, people do not understand these distinctions until they are already deep within their programs of study. Consequently, many decide that it is too late to pursue a different avenue in the computing world without losing valuable time and money spent on courses that may or may not apply to a different major.
Given the importance of achieving effective planning from the beginning, your first assignment in this course is to delve into the broad areas of Information Systems, Information Technology, and Computer Science and write about your career choice in a discussion board post. This should be your thought process:
· First, define each field (i.e. IS, IT, CS). Understand the similarities and differences.
· Second, determine what jobs are available in each area.
· Third, look at the degree completion plans for each of these programs.
· Fourth, assess your own skills (e.g. Are you good in math? Do you like business? Do you like algorithms? Are you gifted at problem-solving? Do you like learning about new technology? Do you enjoy working hands-on with equipment/hardware/wires?)
· Fifth, (and most importantly) ask God what He wants you to pursue based on your talents, interests, and abilities.
· Sixth, based on your analysis above, what career do you hope to obtain after graduation, and what degree will you pursue to achieve this goal?
To facilitate your research, there are four videos in your Reading & Study folder that will help you understand the differences between the computing fields and become familiar with the job opportunities in each area. Be sure to view these videos first.
The LU Registrar’s home page has information on degree completion plans. Here is a link to all of the currently available ones in the university:
http://www.liberty.edu/academics/registrar/index.cfm?PID=2981
Be sure to look at all of the ones listed for Information Systems and Information Technology. At the time of this writing, Computer Science is only listed under residential degree plans. That does not mean that you should rule out Computer Science as a potential major. You must consider all options and listen to God’s calling upon your life. With God, all things are possible.
Discussion Board Deliverables
Main Post:
In a minimum of 300 words, create a thread in Module 1’s discussion board forum that describes the following:
1. Your desired career upon graduation
2. Why you chose this career
3. Your intended major
4. Your strengths, weaknesses, and interests
5. How the major supports your chosen career
6. How God has led you to reach your decision
7. A Bib.
CSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docx
1. CSIS 100
CSIS 100 - Discussion Board Topic #1:
One of the objectives of this course is to enable students to
differentiate between the disciplines of Information Systems,
Information Technology, and Computer Science. Oftentimes,
these areas overlap and are difficult to distinguish – even
among professionals within the industries.
There are some distinctions that become evident, but all too
frequently, people do not understand these distinctions until
they are already deep within their programs of study.
Consequently, many decide that it is too late to pursue a
different avenue in the computing world without losing valuable
time and money spent on courses that may or may not apply to a
different major.
Given the importance of achieving effective planning from the
beginning, your first assignment in this course is to delve into
the broad areas of Information Systems, Information
Technology, and Computer Science and write about your career
choice in a discussion board post. This should be your thought
process:
· First, define each field (i.e. IS, IT, CS). Understand the
similarities and differences.
· Second, determine what jobs are available in each area.
· Third, look at the degree completion plans for each of these
programs.
· Fourth, assess your own skills (e.g. Are you good in math? Do
you like business? Do you like algorithms? Are you gifted at
problem-solving? Do you like learning about new technology?
Do you enjoy working hands-on with
equipment/hardware/wires?)
· Fifth, (and most importantly) ask God what He wants you to
pursue based on your talents, interests, and abilities.
· Sixth, based on your analysis above, what career do you hope
to obtain after graduation, and what degree will you pursue to
2. achieve this goal?
To facilitate your research, there are four videos in your
Reading & Study folder that will help you understand the
differences between the computing fields and become familiar
with the job opportunities in each area. Be sure to view these
videos first.
The LU Registrar’s home page has information on degree
completion plans. Here is a link to all of the currently available
ones in the university:
http://www.liberty.edu/academics/registrar/index.cfm?PID=298
1
Be sure to look at all of the ones listed for Information Systems
and Information Technology. At the time of this writing,
Computer Science is only listed under residential degree plans.
That does not mean that you should rule out Computer Science
as a potential major. You must consider all options and listen
to God’s calling upon your life. With God, all things are
possible.
Discussion Board Deliverables
Main Post:
In a minimum of 300 words, create a thread in Module 1’s
discussion board forum that describes the following:
1. Your desired career upon graduation
2. Why you chose this career
3. Your intended major
4. Your strengths, weaknesses, and interests
5. How the major supports your chosen career
6. How God has led you to reach your decision
7. A Bible verse that reminds you to trust in God to lead you in
your career/educational choices.
Note that the discussion board main thread requires a minimum
of two citations. The Holy Bible may be used in this discussion
board to satisfy these requirements.
Number your responses. Make complete sentences.
Title your main post as follows: [Your career choice] – [Your
3. major]
Here is an example:
Title: Network Engineer – Information Technology
(Networking/Security Cognate)
1. After graduation, I hope to obtain employment as a Network
Administrator within a medium-to-large organization and
eventually become certified as a CCNA.
2. I chose this career because I enjoy working with hardware
and troubleshooting connectivity issues. I like to help others
when it comes to setting up routers/modems in their homes and
even running the cables. There are also numerous, well-paying
jobs in this arena right now.
3. My intended major is Information Technology with a cognate
in Networking and Security.
4. My strengths are being able to see how the “big picture”
works. Looking at schematics and diagrams of networks is
fascinating, and I want to learn more about it. Math is not my
strongest area. Therefore, I have chosen a degree that requires
only a few math classes. I enjoy helping people communicate
and protecting them from hackers. Thus, I am also very
interested in the security aspect of data communications.
5. Liberty offers a degree in Information Technology with a
cognate (specialization) in data networking and security. This
degree not only prepares you to perform networking in the field,
but it also prepares you for the CCNA (Cisco Certified Network
Associate) exam, a certification that I hope to obtain after I
graduate.
6. God has directed my career choices by giving me the interest
and ability to work with networking equipment. I can see how
learning about networking and security can help protect God’s
children from cyber-attacks and persecution and, therefore, help
build His kingdom.
7. I actually have two Bible verses that I use to remind myself
of God’s control in my life (and especially my career):
Psalm 37:4 (ESV): Delight yourself in the Lord, and he will
give you the desires of your heart.
4. Proverbs 19:21 (ESV): Many are the plans in the mind of a man,
but it is the purpose of the lord that will stand.
Replies:
Reply to two of your classmates’ threads. Each reply should be
100 words each, include at least 1 citation, and should say
something meaningful rather than just “Great choice of career.
I really agree with you…” Use this as an opportunity to share
insights, cares, troubles, suggestions, etc. These replies should
serve to foster professional relationships and build bridges
between each other.
This discussion board should serve as an opportunity for you to
review your career and educational choices. Most importantly,
it should be a reminder let God guide you in the process and
open your heart to His will for your life. He loves you so much
and wants only the best for you. Have fun with this!
関係者外秘
関係者外秘
関係者外秘
Submission instructions: Complete the answers below the given
questions here itself. DO NOT create a new Word document.
Failure to follow instructions may lead to 10% deduction of
points from the final exam.
Q. 1. Consider the market basket transactions. When answering
the below questions, provide reasoning whenever possible. (30
points)
1. What is the maximum number of association rules that can be
extracted from this data (including rules that have zero
support)?
1. What is the maximum size of frequent itemsets that can be
5. extracted (assuming minsup > 0)?
1. Write an expression for the maximum number of size-3
itemsets that can be derived from this data set.
1. Find an itemset (of size 2 or larger) that has the largest
support.
1. Find a pair of items, a and b, such that the rules and have the
same confidence.
Q. 2. What is Anomaly Detection? Describe in detail the
characteristics of the Anomaly Detection Problems. Also,
describe in detail the characteristics of Anomaly Detection
Methods. (30 points)
When referring to other articles, you need to cite using the
format given here (either APA or MLA):
https://owl.purdue.edu/owl/research_and_citation/resources.htm
l
Note: Failure of citations will lead to several deduction of
points or zero points may be awarded for the answer.
Data Mining
Association Analysis: Basic Concepts
7. 3
Milk, Diaper, Beer, Coke
4
Bread, Milk, Diaper, Beer
5
Bread, Milk, Diaper, Coke
Definition: Frequent ItemsetItemsetA collection of one or more
itemsExample: {Milk, Bread, Diaper}k-itemsetAn itemset that
of transactions that contain an itemsetE.g. s({Milk, Bread,
Diaper}) = 2/5Frequent ItemsetAn itemset whose support is
greater than or equal to a minsup threshold
TIDItems
1
Bread, Milk
2
Bread, Diaper, Beer, Eggs
3
Milk, Diaper, Beer, Coke
4
Bread, Milk, Diaper, Beer
5
Bread, Milk, Diaper, Coke
Definition: Association RuleAssociation RuleAn implication
itemsetsExample:
Rule Evaluation MetricsSupport (s)Fraction of transactions that
8. contain both X and YConfidence (c)Measures how often items
in Y
appear in transactions that
contain X
Example:
TIDItems
1
Bread, Milk
2
Bread, Diaper, Beer, Eggs
3
Milk, Diaper, Beer, Coke
4
Bread, Milk, Diaper, Beer
5
Bread, Milk, Diaper, Coke
Association Rule Mining TaskGiven a set of transactions T, the
goal of association rule mining is to find all rules having
support ≥ minsup thresholdconfidence ≥ minconf threshold
Brute-force approach:List all possible association rulesCompute
the support and confidence for each rulePrune rules that fail the
minsup and minconf thresholds
putationally prohibitive!
Mining Association Rules
Example of Rules:
9. =0.4, c=0.5)
Observations: All the above rules are binary partitions of the
same itemset:
{Milk, Diaper, Beer} Rules originating from the same itemset
have identical support but
can have different confidence Thus, we may decouple the
support and confidence requirements
TIDItems
1
Bread, Milk
2
Bread, Diaper, Beer, Eggs
3
Milk, Diaper, Beer, Coke
4
Bread, Milk, Diaper, Beer
5
Bread, Milk, Diaper, Coke
Mining Association RulesTwo-step approach:
Frequent Itemset Generation
Rule Generation
Generate high confidence rules from each frequent itemset,
where each rule is a binary partitioning of a frequent itemset
Frequent itemset generation is still computationally expensive
10. Frequent Itemset Generation
Given d items, there are 2d possible candidate itemsets
Frequent Itemset GenerationBrute-force approach: Each itemset
in the lattice is a candidate frequent itemsetCount the support of
each candidate by scanning the database
Match each transaction against every candidateComplexity ~
O(NMw) => Expensive since M = 2d !!!
N�
w�
M�
List of Candidates�
Computational ComplexityGiven d unique items:Total number
of itemsets = 2dTotal number of possible association rules:
If d=6, R = 602 rules
Frequent Itemset Generation StrategiesReduce the number of
candidates (M)Complete search: M=2dUse pruning techniques
11. to reduce M
Reduce the number of transactions (N)Reduce size of N as the
size of itemset increasesUsed by DHP and vertical-based mining
algorithms
Reduce the number of comparisons (NM)Use efficient data
structures to store the candidates or transactionsNo need to
match every candidate against every transaction
Reducing Number of CandidatesApriori principle:If an itemset
is frequent, then all of its subsets must also be frequent
Apriori principle holds due to the following property of the
support measure:
Support of an itemset never exceeds the support of its
subsetsThis is known as the anti-monotone property of support
Illustrating Apriori Principle
Found to be Infrequent
Pruned supersets
Illustrating Apriori Principle
Items (1-itemsets)
Pairs (2-itemsets)
(No need to generate
candidates involving Coke
12. or Eggs)
Triplets (3-itemsets)
Minimum Support = 3
If every subset is considered,
6C1 + 6C2 + 6C3 = 41
With support-based pruning,
6 + 6 + 1 = 13
ItemCount
Bread
4
Coke
2
Milk
4
Beer
3
Diaper
4
Eggs
1
ItemsetCount
{Bread,Milk}
3
13. {Bread,Beer}
2
{Bread,Diaper}
3
{Milk,Beer}
2
{Milk,Diaper}
3
{Beer,Diaper}
3
ItemsetCount
{Bread,Milk,Diaper}
3
Apriori AlgorithmMethod:
Let k=1Generate frequent itemsets of length 1Repeat until no
new frequent itemsets are identifiedGenerate length (k+1)
candidate itemsets from length k frequent itemsetsPrune
candidate itemsets containing subsets of length k that are
infrequent Count the support of each candidate by scanning the
DBEliminate candidates that are infrequent, leaving only those
that are frequent
Reducing Number of ComparisonsCandidate counting:Scan the
database of transactions to determine the support of each
14. candidate itemsetTo reduce the number of comparisons, store
the candidates in a hash structure Instead of matching each
transaction against every candidate, match it against candidates
contained in the hashed buckets
N�
k�
Buckets�
Hash Structure�
Generate Hash Tree
Suppose you have 15 candidate itemsets of length 3:
{1 4 5}, {1 2 4}, {4 5 7}, {1 2 5}, {4 5 8}, {1 5 9}, {1 3 6}, {2
3 4}, {5 6 7}, {3 4 5}, {3 5 6}, {3 5 7}, {6 8 9}, {3 6 7}, {3 6
8}
You need: Hash function Max leaf size: max number of
itemsets stored in a leaf node (if number of candidate itemsets
exceeds max leaf size, split the node)
2 3 4
5 6 7
1 4 5
1 3 6
1 2 4
4 5 7
1 2 5
4 5 8
15. 1 5 9
3 4 5
3 5 6
3 5 7
6 8 9
3 6 7
3 6 8
1,4,7
2,5,8
3,6,9
Hash function
Association Rule Discovery: Hash tree
1,4,7
2,5,8
3,6,9
Hash Function
Candidate Hash Tree
Hash on 1, 4 or 7
29. 3 +
1 +
2 3 5 6
Factors Affecting ComplexityChoice of minimum support
threshold lowering support threshold results in more frequent
itemsets this may increase number of candidates and max length
of frequent itemsetsDimensionality (number of items) of the
data set more space is needed to store support count of each
item if number of frequent items also increases, both
computation and I/O costs may also increaseSize of database
since Apriori makes multiple passes, run time of algorithm may
increase with number of transactionsAverage transaction width
transaction width increases with denser data setsThis may
increase max length of frequent itemsets and traversals of hash
tree (number of subsets in a transaction increases with its
width)
Compact Representation of Frequent ItemsetsSome itemsets are
redundant because they have identical support as their supersets
Number of frequent itemsets
Need a compact representation
30. Maximal Frequent Itemset
Border
Infrequent Itemsets
Maximal Itemsets
An itemset is maximal frequent if none of its immediate
supersets is frequent
null�
AB�
AC�
AD�
AE�
BC�
BD�
BE�
CD�
CE�
DE�
ABC�
ABD�
ABE�
ACD�
ACE�
ADE�
BCD�
BCE�
BDE�
CDE�
A�
B�
C�
D�
31. E�
ABCD�
ABCE�
ABDE�
ACDE�
BCDE�
ABCDE�
Closed ItemsetAn itemset is closed if none of its immediate
supersets has the same support as the itemset
Sheet1TIDItems1{A,B}2{B,C,D}3{A,B,C,D}4{A,B,D}5{A,B,C
,D}
Sheet2
Sheet3
Sheet1ItemsetSupport{A}4{B}5{C}3{D}4{A,B}4{A,C}2{A,D}
3{B,C}3{B,D}4{C,D}3
Sheet2
Sheet3
Sheet1ItemsetSupport{A,B,C}2{A,B,D}3{A,C,D}2{B,C,D}3{A
,B,C,D}2
Sheet2
Sheet3
Maximal vs Closed Itemsets
Transaction Ids
Not supported by any transactions
Sheet1TIDItems1ABC2ABCD3BCE4ACDE5DE
32. Maximal vs Closed Frequent Itemsets
Minimum support = 2
# Closed = 9
# Maximal = 4
Closed and maximal
Closed but not maximal
Maximal vs Closed Itemsets
Frequent Itemsets�
Closed Frequent Itemsets�
Maximal Frequent Itemsets�
Alternative Methods for Frequent Itemset GenerationTraversal
of Itemset LatticeGeneral-to-specific vs Specific-to-general
....�
Frequent itemset border�
null�
{a1,a2,...,an}�
(a) General-to-specific�
....�
null�
{a1,a2,...,an}�
Frequent itemset border�
(b) Specific-to-general�
34. C�
D�
D�
ABC�
ABD�
ACD�
BCD�
ABCD�
(a) Prefix tree�
(b) Suffix tree�
ABCD�
Alternative Methods for Frequent Itemset GenerationTraversal
of Itemset LatticeBreadth-first vs Depth-first
(a) Breadth first�
(b) Depth first�
Alternative Methods for Frequent Itemset
GenerationRepresentation of Databasehorizontal vs vertical data
layout
Horizontal Data Layout�
Vertical Data Layout�
FP-growth AlgorithmUse a compressed representation of the
database using an FP-tree
35. Once an FP-tree has been constructed, it uses a recursive
divide-and-conquer approach to mine the frequent itemsets
FP-tree construction
null
A:1
B:1
null
A:1
B:1
B:1
C:1
D:1
After reading TID=1:
After reading TID=2:
Sheet1TIDItems1{A,B}2{B,C,D}3{A,C,D,E}4{A,D,E}5{A,B,C
}6{A,B,C,D}7{B,C}8{A,B,C}9{A,B,D}10{B,C,E}
Sheet2
Sheet3
FP-Tree Construction
38. (A:1,C:1),
(A:1),
(B:1,C:1)}
Recursively apply FP-growth on P
Frequent Itemsets found (with sup > 1):
AD, BD, CD, ACD, BCD
D:1
Tree Projection
Set enumeration tree:
Possible Extension: E(A) = {B,C,D,E}
Possible Extension: E(ABC) = {D,E}
Tree ProjectionItems are listed in lexicographic orderEach node
P stores the following information:Itemset for node PList of
possible lexicographic extensions of P: E(P)Pointer to projected
database of its ancestor nodeBitvector containing information
about which transactions in the projected database contain the
itemset
Projected Database
Original Database:
Projected Database for node A:
41. Rule GenerationHow to efficiently generate rules from frequent
itemsets?In general, confidence does not have an anti-monotone
property
But confidence of rules generated from the same itemset has an
anti-monotone propertye.g., L = {A,B,C,D}:
D)
Confidence is anti-monotone w.r.t. number of items on the RHS
of the rule
Rule Generation for Apriori Algorithm
Lattice of rules
Low Confidence Rule
Pruned Rules
ABCD=>{ }�
BC=>AD�
BD=>AC�
CD=>AB�
AD=>BC�
AC=>BD�
AB=>CD�
D=>ABC�
C=>ABD�
B=>ACD�
A=>BCD�
ACD=>B�
ABD=>C�
ABC=>D�
BCD=>A�
42. Rule Generation for Apriori AlgorithmCandidate rule is
generated by merging two rules that share the same prefix
in the rule consequent
join(CD=>AB,BD=>AC)
would produce the candidate
rule D => ABC
Prune rule D=>ABC if its
subset AD=>BC does not have
high confidence
Effect of Support DistributionMany real data sets have skewed
support distribution
Support distribution of a retail data set
Effect of Support DistributionHow to set the appropriate minsup
threshold?If minsup is set too high, we could miss itemsets
involving interesting rare items (e.g., expensive products)
If minsup is set too low, it is computationally expensive and the
number of itemsets is very large
Using a single minimum support threshold may not be effective
Multiple Minimum SupportHow to apply multiple minimum
43. supports?MS(i): minimum support for item i e.g.:
MS(Milk)=5%, MS(Coke) = 3%,
MS(Broccoli)=0.1%, MS(Salmon)=0.5%MS({Milk,
Broccoli}) = min (MS(Milk), MS(Broccoli))
= 0.1%
Challenge: Support is no longer anti-monotone Suppose:
Support(Milk, Coke) = 1.5% and
Support(Milk, Coke, Broccoli) = 0.5%
{Milk,Coke} is infrequent but {Milk,Coke,Broccoli} is
frequent
Multiple Minimum Support
Multiple Minimum Support
Multiple Minimum Support (Liu 1999)Order the items according
to their minimum support (in ascending order)e.g.:
MS(Milk)=5%, MS(Coke) = 3%,
MS(Broccoli)=0.1%, MS(Salmon)=0.5%Ordering:
Broccoli, Salmon, Coke, Milk
Need to modify Apriori such that:L1 : set of frequent itemsF1 :
where MS(1) is mini( MS(i) )C2 : candidate itemsets of size 2 is
44. generated from F1
instead of L1
Multiple Minimum Support (Liu 1999)Modifications to
Apriori:In traditional Apriori, A candidate (k+1)-itemset is
generated by merging two
frequent itemsets of size k The candidate is pruned if it
contains any infrequent subsets
of size kPruning step has to be modified: Prune only if subset
contains the first item e.g.: Candidate={Broccoli, Coke, Milk}
(ordered according to
minimum support) {Broccoli, Coke} and {Broccoli, Milk}
are frequent but
{Coke, Milk} is infrequent
Candidate is not pruned because {Coke,Milk} does not contain
the first item, i.e., Broccoli.
Pattern EvaluationAssociation rule algorithms tend to produce
too many rules many of them are uninteresting or
have same support & confidence
Interestingness measures can be used to prune/rank the derived
patterns
In the original formulation of association rules, support &
confidence are the only measures used
45. Application of Interestingness Measure
Interestingness Measures
Computing Intere
information needed to compute rule interestingness can be
obtained from a contingency table
Used to define various measures support, confidence, lift, Gini,
J-measure, etc.YY Xf11f10f1+X f01f00fo+f+1f+0|T|
f11: support of X and Y
f10: support of X and Y
f01: support of X and Y
f00: support of X and Y
46. Drawback of Confidence
Coffee
CoffeeTea15520Tea755809010100
Confidence= P(Coffee|Tea) = 0.75
but P(Coffee) = 0.9 Although confidence is high, rule is
misleading P(Coffee|Tea) = 0.9375
Statistical IndependencePopulation of 1000 students600
students know how to swim (S)700 students know how to bike
(B)420 students know how to swim and bike (S,B)
Negatively correlated
47. Statistical-based MeasuresMeasures that take into account
statistical dependence
Example: Lift/Interest
Confidence= P(Coffee|Tea) = 0.75
but P(Coffee) = 0.9 Lift = 0.75/0.9= 0.8333 (< 1, therefore is
negatively associated)
Coffee
CoffeeTea15520Tea755809010100
Drawback of Lift & Interest
Statistical independence:
If P(X,Y)=P(X)P(Y) => Lift =
1YYX10010X090901090100YYX90090X010109010100
48. There are lots of measures proposed in the literature
Some measures are good for certain applications, but not for
others
What criteria should we use to determine whether a measure is
good or bad?
What about Apriori-style support based pruning? How does it
affect these measures?
49. Properties of A Good MeasurePiatetsky-Shapiro:
3 properties a good measure M must satisfy:M(A,B) = 0 if A
and B are statistically independent
M(A,B) increase monotonically with P(A,B) when P(A) and
P(B) remain unchanged
M(A,B) decreases monotonically with P(A) [or P(B)] when
P(A,B) and P(B) [or P(A)] remain unchanged
Comparing Different Measures
10 examples of contingency tables:
Rankings of contingency tables using various measures:
Sheet1ExampleE18123834241370100001.1581671343E2833026
221046100001.116800672E3948194127298100001.030581565E
43954308052961100001.4198707063E528861363132044311000
01.6148802655E6150020005006000100002.1428571429E74000
200010003000100001.3333333333E84000200020002000100001
.1111111111E91720712151154100001.127815235E1061248347
452100003.6889211418
Sheet2
Sheet3
Property under Variable Permutation
Does M(A,B) = M(B,A)?
Symmetric measures: support, lift, collective strength, cosine,
Jaccard, etc
50. Asymmetric measures: confidence, conviction, Laplace, J-
measure, etc
Property under Row/Column Scaling
Grade-Gender Example (Mosteller, 1968):
Mosteller:
Underlying association should be independent of
the relative number of male and female students
in the samples
2x
10xMaleFemaleHigh235Low1453710MaleFemaleHigh43034Lo
w2404267076
51. Property under Inversion Operation
Transaction 1
Transaction N
.
.
.
.
.
- -coefficient is analogous to
correlation coefficient for continuous variables
tablesYYX601070X1020307030100YYX201030X106070307010
0
53. 0.25YesYesYesYesNoYesYesNoFCertainty factor-1 … 0 …
1YesYesYesNoNoNoYesNoAVAdded value0.5 … 1 …
1YesYesYesNoNoNoNoNoSCollective
strengthNoYesYesYesNoYes*YesNozJaccard0 ..
1NoYesYesYesNoNoNoYesKKlosgen'sYesYesYesNoNoNoNoN
owhere:O1: Symmetry under variable permutationO2:
Marginal invarianceO3: Antisymmetry under row or column
permutationO3': Inversion invarianceO4: Null
invarianceYes*: Yes if measure is normalizedYes**: Yes if
measure is symmetrized by taking max(M(A,B),M(B,A))No*:
Symmetry under row or column permutation
Sheet2
Sheet3
3
3
2
0
3
1
3
2
1
3
2
K
K
÷
÷
ø
ö
ç
ç
è
æ
-
54. -
÷
÷
ø
ö
ç
ç
è
æ
-
MBD01E1AF4B.unknown
Support-based PruningMost of the association rule mining
algorithms use support measure to prune rules and itemsets
Study effect of support pruning on correlation of
itemsetsGenerate 10000 random contingency tablesCompute
support and pairwise correlation for each tableApply support-
based pruning and examine the tables that are removed
Effect of Support-based Pruning
Chart1-1-0.9-0.8-0.7-0.6-0.5-0.4-0.3-0.2-
0.100.10.20.30.40.50.60.70.80.91
Correlation
All Itempairs
13
95
172
282
359
503
648
75. 99
67
45
15
8
4
2
1
0
0
0
Sheet1CorrelationAll> 0.9> 0.7> 0.5< 0.01< 0.03< 0.05-
1130713101313-0.99502992217191-0.81724701642268104-
0.72827952651866106-0.635991503272867107-
0.550371824282884128-0.4648252675424694141-
0.3716352965724093151-0.2830423366403393161-
0.18678638366525771360908923756642156990.191575370678
730670.288154332645214450.37592827254015150.4602142024
060380.5532161613550040.63703892370020.72595491390010.
81940411180000.98401751000111045000
Sheet2
Sheet3
Effect of Support-based PruningInvestigate how support-based
pruning affects other measures
Steps:Generate 10000 contingency tablesRank each table
according to the different measuresCompute the pair-wise
correlation between the measures
Effect of Support-based Pruning Without Support Pruning (All
Pairs) Red cells indicate correlation between
76. the pair of measures > 0.85 40.14% pairs have correlation >
0.85
Scatter Plot between Correlation & Jaccard Measure
Effect of Support-
pairs have correlation > 0.85
Scatter Plot between Correlation & Jaccard Measure:
Effect of Support-
pairs have correlation > 0.85
Scatter Plot between Correlation & Jaccard Measure
Subjective Interestingness MeasureObjective measure: Rank
patterns based on statistics computed from datae.g., 21
measures of association (support, confidence, Laplace, Gini,
mutual information, Jaccard, etc).
Subjective measure:Rank patterns according to user’s
interpretation A pattern is subjectively interesting if it
contradicts the
expectation of a user (Silberschatz & Tuzhilin) A pattern is
subjectively interesting if it is actionable
(Silberschatz & Tuzhilin)
77. Interestingness via UnexpectednessNeed to model expectation
of users (domain knowledge)
Need to combine expectation of users with evidence from data
(i.e., extracted patterns)
+
Pattern expected to be frequent
-
Pattern expected to be infrequent
Pattern found to be frequent
Pattern found to be infrequent
+
-
Expected Patterns
-
+
Unexpected Patterns
Interestingness via UnexpectednessWeb Data (Cooley et al
2001)Domain knowledge in the form of site structureGiven an
itemset F = {X1, X2, …, Xk} (Xi : Web pages) L: number of
78. -1) cfactor = 1
(if graph is connected), 0 (disconnected graph)Structure
Usage evidence
Use Dempster-Shafer theory to combine domain knowledge and
evidence from data
TID Items
1 Bread, Milk
2 Bread, Diaper, Beer, Eggs
3 Milk, Diaper, Beer, Coke
4 Bread, Milk, Diaper, Beer
5 Bread, Milk, Diaper, Coke
TID Items
1 Bread, Milk
2 Bread, Diaper, Beer, Eggs
3 Milk, Diaper, Beer, Coke
4 Bread, Milk, Diaper, Beer
5 Bread, Milk, Diaper, Coke
Beer
}
Diaper
,
Milk
{
Þ
4
.
0
5
2
|
T
|
111. s
B
B
A
p
q
A
r
s + k
SymbolMeasureRangeP1P2P3O1O2O3O3'O4
Correlation-1 … 0 … 1YesYesYesYesNoYesYesNo
Lambda0 … 1YesNoNoYesNoNo*YesNo
Q
Yule's Q-1 … 0 … 1YesYesYesYesYesYesYesNo
Y
Yule's Y-1 … 0 … 1YesYesYesYesYesYesYesNo
Cohen's-1 … 0 … 1YesYesYesYesNoNoYesNo
M
Mutual Information0 … 1YesYesYesYesNoNo*YesNo
112. J
J-Measure0 … 1YesNoNoNoNoNoNoNo
G
Gini Index0 … 1YesNoNoNoNoNo*YesNo
s
Support0 … 1NoYesNoYesNoNoNoNo
c
Confidence0 … 1NoYesNoYesNoNoNoYes
L
Laplace0 … 1NoYesNoYesNoNoNoNo
V
I
IS
IS (cosine)0 .. 1NoYesYesYesNoNoNoYes
PS
Piatetsky-Shapiro's-0.25 … 0 …
0.25YesYesYesYesNoYesYesNo
F
Certainty factor-1 … 0 … 1YesYesYesNoNoNoYesNo
AV
Added value0.5 … 1 … 1YesYesYesNoNoNoNoNo
S
Jaccard0 .. 1NoYesYesYesNoNoNoYes
K
Klosgen'sYesYesYesNoNoNoNoNo
33
2
0
3
1
321
3
123. �
Learning algorithm�
�
�
Induction�
Deduction�
Test Set�
Model�
Training Set�
Examples of Classification TaskPredicting tumor cells as benign
or malignant
Classifying credit card transactions
as legitimate or fraudulent
Classifying secondary structures of protein
as alpha-helix, beta-sheet, or random
coil
Categorizing news stories as finance,
weather, entertainment, sports, etc
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Classification TechniquesDecision Tree based MethodsRule-
based MethodsMemory based reasoningNeural NetworksNaïve
Bayes and Bayesian Belief NetworksSupport Vector Machines
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
124. Example of a Decision Tree
Refund
MarSt
TaxInc
YES
NO
NO
NO
Yes
No
Married
Single, Divorced
< 80K
> 80K
Splitting Attributes
Training Data
Model: Decision Tree
categorical
categorical
continuous
class
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Another Example of Decision Tree
categorical
categorical
continuous
class
MarSt
Refund
125. TaxInc
YES
NO
NO
Yes
No
Married
Single, Divorced
< 80K
> 80K
There could be more than one tree that fits the same data!
NO
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Tid
Refund
Marital
Status
Taxable
Income
Cheat
1
Yes
Single
125K
No
2
NoMarried
100K
128. Apply Model to Test Data
Test Data
Start from the root of tree.
Refund
MarSt
TaxInc
YES
NO
NO
NO
Yes
No
Married
Single, Divorced
< 80K
> 80K
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Refund
Marital
Status
Taxable
Income
129. Cheat
No
Married
80K
?
10
Apply Model to Test Data
Test Data
Refund
MarSt
TaxInc
YES
NO
NO
NO
Yes
No
Married
Single, Divorced
< 80K
> 80K
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
134. Marital
Status
Taxable
Income
Cheat
No
Married
80K
?
10
Decision Tree Classification Task
Decision Tree
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
�
Tree Induction algorithm�
�
�
Induction�
Deduction�
Test Set�
Model�
Training Set�
Decision Tree InductionMany Algorithms:Hunt’s Algorithm
(one of the earliest)CARTID3, C4.5SLIQ,SPRINT
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
135. 2002
General Structure of Hunt’s AlgorithmLet Dt be the set of
training records that reach a node tGeneral Procedure:If Dt
contains records that belong the same class yt, then t is a leaf
node labeled as ytIf Dt is an empty set, then t is a leaf node
labeled by the default class, ydIf Dt contains records that
belong to more than one class, use an attribute test to split the
data into smaller subsets. Recursively apply the procedure to
each subset.
Dt
?
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Tid
Refund
Marital
Status
Taxable
Income
Cheat
1
Yes
Single
125K
No
2
NoMarried
100K
No
141. Tree InductionGreedy strategy.Split the records based on an
attribute test that optimizes certain criterion.
IssuesDetermine how to split the recordsHow to specify the
attribute test condition?How to determine the best
split?Determine when to stop splitting
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Tree InductionGreedy strategy.Split the records based on an
attribute test that optimizes certain criterion.
IssuesDetermine how to split the recordsHow to specify the
attribute test condition?How to determine the best
split?Determine when to stop splitting
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
How to Specify Test Condition?Depends on attribute
typesNominalOrdinalContinuous
Depends on number of ways to split2-way splitMulti-way split
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Splitting Based on Nominal AttributesMulti-way split: Use as
many partitions as distinct values.
Binary split: Divides values into two subsets.
Need to find optimal partitioning.
OR
143. Small
Medium
Large
Size
{Medium,
Large}
{Small}
Size
{Small, Medium}
{Large}
Size
{Small, Large}
{Medium}
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Splitting Based on Continuous AttributesDifferent ways of
handlingDiscretization to form an ordinal categorical attribute
Static – discretize once at the beginning Dynamic – ranges can
be found by equal interval bucketing, equal frequency bucketing
(percentiles), or clustering.
and finds the best cut can be more compute intensive
144. (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Splitting Based on Continuous Attributes
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Taxable Income�> 80K?�
< 10K�
[10K,25K)�
Yes�
No�
[25K,50K)�
Taxable Income?�
[50K,80K)�
> 80K�
(i) Binary split�
(ii) Multi-way split�
Tree InductionGreedy strategy.Split the records based on an
attribute test that optimizes certain criterion.
IssuesDetermine how to split the recordsHow to specify the
attribute test condition?How to determine the best
split?Determine when to stop splitting
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
How to determine the Best Split
Before Splitting: 10 records of class 0,
145. 10 records of class 1
Which test condition is the best?
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Own Car?�
C0: 6
C1: 4�
C0: 4
C1: 6�
Car Type?�
C0: 1
C1: 3�
C0: 8
C1: 0�
C0: 1
C1: 7�
C0: 1
C1: 0�
C0: 1
C1: 0�
C0: 0
C1: 1�
Student ID?�
...�
Yes�
No�
Family�
Sports�
Luxury�
c1�
c10�
c20�
C0: 0
C1: 1�
...�
146. c11�
How to determine the Best SplitGreedy approach: Nodes with
homogeneous class distribution are preferredNeed a measure of
node impurity:
Non-homogeneous,
High degree of impurity
Homogeneous,
Low degree of impurity
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
C0: 5
C1: 5�
C0: 9
C1: 1�
Measures of Node ImpurityGini Index
Entropy
Misclassification error
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
How to Find the Best Split
B?
Yes
No
Node N3
Node N4
147. A?
Yes
No
Node N1
Node N2
Before Splitting:
Gain = M0 – M12 vs M0 – M34
M0
M1
M2
M3
M4
M12
M34
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
C0
N10C1
N11
C0
N20C1
N21
C0
N30C1
N31
C0
N40C1
N41
C0
148. N00C1
N01
Measure of Impurity: GINIGini Index for a given node t :
(NOTE: p( j | t) is the relative frequency of class j at node t).
Maximum (1 - 1/nc) when records are equally distributed among
all classes, implying least interesting informationMinimum
(0.0) when all records belong to one class, implying most
interesting information
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
C1
0
C2
6
Gini=0.000
C1
2
C2
4
Gini=0.444
C1
3
C2
3
150. Splitting Based on GINIUsed in CART, SLIQ, SPRINT.When a
node p is split into k partitions (children), the quality of split is
computed as,
where,ni = number of records at child i,
n = number of records at node p.
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Binary Attributes: Computing GINI Index
Splits into two partitionsEffect of Weighing partitions: Larger
and Purer Partitions are sought for.
B?
Yes
No
Node N1
Node N2
Gini(N1)
= 1 – (5/6)2 – (2/6)2
= 0.194
Gini(N2)
= 1 – (1/6)2 – (4/6)2
= 0.528
Gini(Children)
= 7/12 * 0.194 +
151. 5/12 * 0.528
= 0.333
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
ParentC1
6C2
6
Gini = 0.500
N1
N2C1
5
1C2
2
4Gini=0.333
Categorical Attributes: Computing Gini IndexFor each distinct
value, gather counts for each class in the datasetUse the count
matrix to make decisions
Multi-way split
Two-way split
(find best partition of values)
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
CarType
{Sports, Luxury}
{Family}
153. C1
1
2
1
C2
4
1
1
Gini
0.393
Continuous Attributes: Computing Gini IndexUse Binary
Decisions based on one valueSeveral Choices for the splitting
valueNumber of possible splitting values
= Number of distinct valuesEach splitting value has a count
matrix associated with itClass counts in each of the partitions,
the database to gather count matrix and compute its Gini
indexComputationally Inefficient! Repetition of work.
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Tid
Refund
Marital
Status
Taxable
156. 2002
Alternative Splitting Criteria based on INFOEntropy at a given
node t:
(NOTE: p( j | t) is the relative frequency of class j at node
t).Measures homogeneity of a node. Maximum (log nc) when
records are equally distributed among all classes implying least
informationMinimum (0.0) when all records belong to one class,
implying most informationEntropy based computations are
similar to the GINI index computations
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Examples for computing Entropy
P(C1) = 0/6 = 0 P(C2) = 6/6 = 1
Entropy = – 0 log 0 – 1 log 1 = – 0 – 0 = 0
P(C1) = 1/6 P(C2) = 5/6
Entropy = – (1/6) log2 (1/6) – (5/6) log2 (1/6) = 0.65
P(C1) = 2/6 P(C2) = 4/6
Entropy = – (2/6) log2 (2/6) – (4/6) log2 (4/6) = 0.92
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
C1
0C2
6
C1
2C2
4
C1
157. 1C2
5
Splitting Based on INFO...Information Gain:
Parent Node, p is split into k partitions;
ni is number of records in partition iMeasures Reduction in
Entropy achieved because of the split. Choose the split that
achieves most reduction (maximizes GAIN)Used in ID3 and
C4.5Disadvantage: Tends to prefer splits that result in large
number of partitions, each being small but pure.
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Splitting Based on INFO...Gain Ratio:
Parent Node, p is split into k partitions
ni is the number of records in partition i
Adjusts Information Gain by the entropy of the partitioning
(SplitINFO). Higher entropy partitioning (large number of small
partitions) is penalized!Used in C4.5Designed to overcome the
disadvantage of Information Gain
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
158. Splitting Criteria based on Classification ErrorClassification
error at a node t :
Measures misclassification error made by a node. Maximum (1 -
1/nc) when records are equally distributed among all classes,
implying least interesting informationMinimum (0.0) when all
records belong to one class, implying most interesting
information
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Examples for Computing Error
P(C1) = 0/6 = 0 P(C2) = 6/6 = 1
Error = 1 – max (0, 1) = 1 – 1 = 0
P(C1) = 1/6 P(C2) = 5/6
Error = 1 – max (1/6, 5/6) = 1 – 5/6 = 1/6
P(C1) = 2/6 P(C2) = 4/6
Error = 1 – max (2/6, 4/6) = 1 – 4/6 = 1/3
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
C1
0C2
6
C1
2C2
4
C1
1C2
159. 5
Comparison among Splitting Criteria
For a 2-class problem:
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Misclassification Error vs Gini
A?
Yes
No
Node N1
Node N2
Gini(N1)
= 1 – (3/3)2 – (0/3)2
= 0
Gini(N2)
= 1 – (4/7)2 – (3/7)2
= 0.489
Gini(Children)
= 3/10 * 0
+ 7/10 * 0.489
= 0.342
Gini improves !!
160. (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
ParentC1
7C2
3
Gini = 0.42
N1
N2C1
3
4C2
0
3Gini=0.361
Tree InductionGreedy strategy.Split the records based on an
attribute test that optimizes certain criterion.
IssuesDetermine how to split the recordsHow to specify the
attribute test condition?How to determine the best
split?Determine when to stop splitting
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Stopping Criteria for Tree InductionStop expanding a node
when all the records belong to the same class
Stop expanding a node when all the records have similar
attribute values
Early termination (to be discussed later)
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
161. Decision Tree Based ClassificationAdvantages:Inexpensive to
constructExtremely fast at classifying unknown recordsEasy to
interpret for small-sized treesAccuracy is comparable to other
classification techniques for many simple data sets
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Example: C4.5Simple depth-first construction.Uses Information
GainSorts Continuous Attributes at each node.Needs entire data
to fit in memory.Unsuitable for Large Datasets.Needs out-of-
core sorting.
You can download the software from:
http://www.cse.unsw.edu.au/~quinlan/c4.5r8.tar.gz
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Practical Issues of ClassificationUnderfitting and Overfitting
Missing Values
Costs of Classification
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Underfitting and Overfitting (Example)
500 circular and 500 triangular data points.
Circular points:
Triangular points:
162. sqrt(x12+x22) > 0.5 or
sqrt(x12+x22) < 1
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Underfitting and Overfitting
Overfitting
Underfitting: when model is too simple, both training and test
errors are large
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Overfitting due to Noise
Decision boundary is distorted by noise point
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Overfitting due to Insufficient Examples
Lack of data points in the lower half of the diagram makes it
difficult to predict correctly the class labels of that region
- Insufficient number of training records in the region causes
the decision tree to predict the test examples using other
training records that are irrelevant to the classification task
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Notes on OverfittingOverfitting results in decision trees that are
more complex than necessary
163. Training error no longer provides a good estimate of how well
the tree will perform on previously unseen records
Need new ways for estimating errors
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Estimating Generalization ErrorsRe-substitution errors: error on
Methods for estimating generalization errors:Optimistic
approach: e’(t) = e(t)Pessimistic approach: For each leaf
(N: number of leaf nodes) For a tree with 30 leaf nodes and 10
errors on training
(out of 1000 instances):
Training error = 10/1000 = 1%
Generalization error =
2.5%Reduced error pruning (REP): uses validation data set to
estimate generalization
error
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Occam’s RazorGiven two models of similar generalization
errors, one should prefer the simpler model over the more
complex model
For complex models, there is a greater chance that it was fitted
accidentally by errors in data
Therefore, one should include model complexity when
evaluating a model
164. (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Minimum Description Length (MDL)Cost(Model,Data) =
Cost(Data|Model) + Cost(Model)Cost is the number of bits
needed for encoding.Search for the least costly
model.Cost(Data|Model) encodes the misclassification
errors.Cost(Model) uses node encoding (number of children)
plus splitting condition encoding.
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Sheet1XyXy1?0?0?1?…………1?
Sheet2
Sheet3
Sheet1XyXy????…………?
Sheet2
Sheet3
How to Address OverfittingPre-Pruning (Early Stopping
Rule)Stop the algorithm before it becomes a fully-grown
treeTypical stopping conditions for a node: Stop if all instances
belong to the same class Stop if all the attribute values are the
sameMore restrictive conditions: Stop if number of instances is
less than some user-specified threshold Stop if class distribution
of instances are independent of the available features (e.g.,
improve impurity
measures (e.g., Gini or information gain).
165. (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
How to Address Overfitting…Post-pruningGrow decision tree to
its entiretyTrim the nodes of the decision tree in a bottom-up
fashionIf generalization error improves after trimming, replace
sub-tree by a leaf node.Class label of leaf node is determined
from majority class of instances in the sub-treeCan use MDL for
post-pruning
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Example of Post-Pruning
Training Error (Before splitting) = 10/30
Pessimistic error = (10 + 0.5)/30 = 10.5/30
Training Error (After splitting) = 9/30
Pessimistic error (After splitting)
PRUNE!Class = Yes20Class = No10Error = 10/30Class =
Yes8Class = No4Class = Yes3Class = No4Class = Yes4Class =
No1Class = Yes5Class = No1
166. (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Examples of Post-pruningOptimistic error?
Pessimistic error?
Reduced error pruning?
Don’t prune for both cases
Don’t prune case 1, prune case 2
Case 1:
Case 2:
Depends on validation set
167. C0: 11
C1: 3
C0: 2
C1: 4
C0: 14
C1: 3
C0: 2
C1: 2
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Handling Missing Attribute ValuesMissing values affect
decision tree construction in three different ways:Affects how
impurity measures are computedAffects how to distribute
instance with missing value to child nodesAffects how a test
instance with missing value is classified
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Computing Impurity Measure
Split on Refund:
Entropy(Refund=Yes) = 0
Entropy(Refund=No)
= -(2/6)log(2/6) – (4/6)log(4/6) = 0.9183
Entropy(Children)
168. = 0.3 (0) + 0.6 (0.9183) = 0.551
– 0.551) = 0.3303
Missing value
Before Splitting:
Entropy(Parent)
= -0.3 log(0.3)-(0.7)log(0.7) = 0.8813
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Tid
Refund
Marital
Status
Taxable
Income
Class
1
Yes
Single
125K
No
2
NoMarried
100K
No
3
No
Single
70K
No
170. Class
= Yes
Class
= NoRefund=Yes
0
3Refund=No
2
4Refund=?
1
0
Distribute Instances
Refund
Yes
No
Refund
Yes
No
Probability that Refund=Yes is 3/9
Probability that Refund=No is 6/9
Assign record to the left child with weight = 3/9 and to the right
child with weight = 6/9
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Tid
Refund
Marital
Status
Taxable
173. Class=Yes
2 + 6/9Class=No
4
Class=Yes
0 + 3/9Class=No
3
Classify Instances
Refund
MarSt
TaxInc
YES
NO
NO
NO
Yes
No
Married
Single,
Divorced
< 80K
> 80K
New record:
Probability that Marital Status
= Married is 3.67/6.67
Probability that Marital Status ={Single,Divorced} is
3/6.67MarriedSingleDivorcedTotalClass=No3104Class=Yes6/91
12.67Total3.67216.67
174. (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Tid
Refund
Marital
Status
Taxable
Income
Class
11
No
?
85K
?
10
Other IssuesData FragmentationSearch
StrategyExpressivenessTree Replication
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
175. Data FragmentationNumber of instances gets smaller as you
traverse down the tree
Number of instances at the leaf nodes could be too small to
make any statistically significant decision
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Search StrategyFinding an optimal decision tree is NP-hard
The algorithm presented so far uses a greedy, top-down,
recursive partitioning strategy to induce a reasonable solution
Other strategies?Bottom-upBi-directional
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
ExpressivenessDecision tree provides expressive representation
for learning discrete-valued functionBut they do not generalize
well to certain types of Boolean functions Example: parity
function:
Class = 1 if there is an even number of Boolean attributes with
truth value = True
Class = 0 if there is an odd number of Boolean attributes with
truth value = True For accurate modeling, must have a complete
tree
Not expressive enough for modeling continuous
variablesParticularly when test condition involves only a single
attribute at-a-time
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
176. Decision Boundary Border line between two neighboring
regions of different classes is known as decision boundary
Decision boundary is parallel to axes because test condition
involves a single attribute at-a-time
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
y < 0.33?�
: 0
: 3�
: 4
: 0�
y < 0.47?�
: 4
: 0�
: 0
: 4�
x < 0.43?�
Yes�
Yes�
No�
No�
Yes�
No�
0�
0.1�
0.2�
0.3�
0.4�
0.5�
0.6�
0.7�
0.8�
0.9�
1�
177. 0�
0.1�
0.2�
0.3�
0.4�
0.5�
0.6�
0.7�
0.8�
0.9�
1�
x�
y�
Oblique Decision Trees Test condition may involve multiple
attributes More expressive representation Finding optimal test
condition is computationally expensive
x + y < 1
Class = +
Class =
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Tree Replication Same subtree appears in multiple branches
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
178. Model EvaluationMetrics for Performance EvaluationHow to
evaluate the performance of a model?
Methods for Performance EvaluationHow to obtain reliable
estimates?
Methods for Model ComparisonHow to compare the relative
performance among competing models?
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Model EvaluationMetrics for Performance EvaluationHow to
evaluate the performance of a model?
Methods for Performance EvaluationHow to obtain reliable
estimates?
Methods for Model ComparisonHow to compare the relative
performance among competing models?
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Metrics for Performance EvaluationFocus on the predictive
capability of a modelRather than how fast it takes to classify or
build models, scalability, etc.Confusion Matrix:
a: TP (true positive)
b: FN (false negative)
c: FP (false positive)
d: TN (true negative)PREDICTED CLASS
ACTUAL
CLASSClass=YesClass=NoClass=YesabClass=Nocd
179. (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Metrics for Performance Evaluation…
Most widely-used metric:PREDICTED CLASS
ACTUAL
CLASSClass=YesClass=NoClass=Yesa
(TP)b
(FN)Class=Noc
(FP)d
(TN)
180. (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Limitation of AccuracyConsider a 2-class problemNumber of
Class 0 examples = 9990Number of Class 1 examples = 10
If model predicts everything to be class 0, accuracy is
9990/10000 = 99.9 %Accuracy is misleading because model
does not detect any class 1 example
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Cost Matrix
C(i|j): Cost of misclassifying class j example as class i
PREDICTED CLASS
ACTUAL
CLASSC(i|j)Class=YesClass=NoClass=YesC(Yes|Yes)C(No|Yes
)Class=NoC(Yes|No)C(No|No)
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
181. Computing Cost of Classification
Accuracy = 80%
Cost = 3910
Accuracy = 90%
Cost = 4255Cost MatrixPREDICTED CLASS
ACTUAL
CLASSC(i|j)+-+-1100-10Model M1PREDICTED CLASS
ACTUAL
CLASS+-+15040-60250Model M2PREDICTED CLASS
ACTUAL
CLASS+-+25045-5200
182. (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Cost vs AccuracyCountPREDICTED CLASS
ACTUAL
CLASSClass=YesClass=NoClass=YesabClass=NocdCostPREDI
CTED CLASS
ACTUAL
CLASSClass=YesClass=NoClass=YespqClass=Noqp
183. N = a + b + c + d
Accuracy = (a + d)/N
Cost = p (a + d) + q (b + c)
= p (a + d) + q (N – a – d)
= q N – (q – p)(a + d)
= N [q – (q-
Accuracy is proportional to cost if
1. C(Yes|No)=C(No|Yes) = q
2. C(Yes|Yes)=C(No|No) = p
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Cost-Sensitive MeasuresPrecision is biased towards C(Yes|Yes)
& C(Yes|No)Recall is biased towards C(Yes|Yes) &
C(No|Yes)F-measure is biased towards all except C(No|No)
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Model EvaluationMetrics for Performance EvaluationHow to
evaluate the performance of a model?
Methods for Performance EvaluationHow to obtain reliable
184. estimates?
Methods for Model ComparisonHow to compare the relative
performance among competing models?
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Methods for Performance EvaluationHow to obtain a reliable
estimate of performance?
Performance of a model may depend on other factors besides the
learning algorithm:Class distributionCost of
misclassificationSize of training and test sets
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Learning CurveLearning curve shows how accuracy changes
with varying sample sizeRequires a sampling schedule for
creating learning curve:Arithmetic sampling
(Langley, et al)Geometric sampling
(Provost et al)
Effect of small sample size:Bias in the estimateVariance of
estimate
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Methods of EstimationHoldoutReserve 2/3 for training and 1/3
185. for testing Random subsamplingRepeated holdoutCross
validationPartition data into k disjoint subsetsk-fold: train on k-
1 partitions, test on the remaining oneLeave-one-out:
k=nStratified sampling oversampling vs
undersamplingBootstrapSampling with replacement
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Model EvaluationMetrics for Performance EvaluationHow to
evaluate the performance of a model?
Methods for Performance EvaluationHow to obtain reliable
estimates?
Methods for Model ComparisonHow to compare the relative
performance among competing models?
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
ROC (Receiver Operating Characteristic)Developed in 1950s for
signal detection theory to analyze noisy signals Characterize the
trade-off between positive hits and false alarmsROC curve plots
TP (on the y-axis) against FP (on the x-axis)Performance of
each classifier represented as a point on the ROC curvechanging
the threshold of algorithm, sample distribution or cost matrix
changes the location of the point
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
ROC Curve
- 1-dimensional data set containing 2 classes (positive and
negative)
186. - any points located at x > t is classified as positive
At threshold t:
TP=0.5, FN=0.5, FP=0.12, FN=0.88
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
ROC Curve
(TP,FP):(0,0): declare everything
to be negative class(1,1): declare everything
to be positive class(1,0): ideal
Diagonal line:Random guessingBelow diagonal line: prediction
is opposite of the true class
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Using ROC for Model ComparisonNo model consistently
outperform the otherM1 is better for small FPRM2 is better for
large FPR
Area Under the ROC curveIdeal: Area = 1Random guess: Area
= 0.5
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
How to Construct an ROC curve Use classifier that produces
posterior probability for each test instance P(+|A) Sort the
instances according to P(+|A) in decreasing order Apply
threshold at each unique value of P(+|A) Count the number of
187. TP, FP,
TN, FN at each threshold TP rate, TPR = TP/(TP+FN) FP rate,
FPR = FP/(FP + TN)InstanceP(+|A)True
Class10.95+20.93+30.87-40.85-50.85-60.85+70.76-
80.53+90.43-100.25+
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
How to construct an ROC curve
Threshold >=
ROC Curve:
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Class
+
191. Test of SignificanceGiven two models:Model M1: accuracy =
85%, tested on 30 instancesModel M2: accuracy = 75%, tested
on 5000 instances
Can we say M1 is better than M2?How much confidence can we
place on accuracy of M1 and M2?Can the difference in
performance measure be explained as a result of random
fluctuations in the test set?
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Confidence Interval for AccuracyPrediction can be regarded as
a Bernoulli trialA Bernoulli trial has 2 possible
outcomesPossible outcomes for prediction: correct or
wrongCollection of Bernoulli trials has a Binomial distribution:
ictions e.g: Toss a
fair coin 50 times, how many heads would turn up?
Given x (# of correct predictions) or equivalently, acc=x/N, and
N (# of test instances),
Can we predict p (true accuracy of model)?
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Confidence Interval for AccuracyFor large test sets (N > 30),
acc has a normal distribution
192. with mean p and variance
p(1-p)/N
Confidence Interval for p:
Area = 1 -
Z1-
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Confidence Interval for AccuracyConsider a model that
produces an accuracy of 80% when evaluated on 100 test
instances:N=100, acc = 0.8Let 1-
confidence)From probability table, Z -
wer)0.6700.7110.7630.7740.789p(upper)0.8880.8660.8330.8240
.811
193. (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Comparing Performance of 2 ModelsGiven two models, say M1
and M2, which is better?M1 is tested on D1 (size=n1), found
error rate = e1M2 is tested on D2 (size=n2), found error rate =
e2Assume D1 and D2 are independentIf n1 and n2 are
sufficiently large, then
Approximate:
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Comparing Performance of 2 ModelsTo test if performance
difference is statistically significant: d = e1 –
where dt is the true differenceSince D1 and D2 are independent,
their variance adds up:
194. At (1-
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
An Illustrative ExampleGiven: M1: n1 = 30, e1 = 0.15
M2: n2 = 5000, e2 = 0.25d = |e2 – e1| = 0.1 (2-sided test)
=> Interval contains 0 => difference may not be
statistically significant
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Comparing Performance of 2 AlgorithmsEach learning
algorithm may produce k models:L1 may produce M11 , M12,
…, M1kL2 may produce M21 , M22, …, M2kIf models are
generated on the same test sets D1,D2, …, Dk (e.g., via cross-
validation)For each set: compute dj = e1j – e2jdj has mean dt
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
199. n
n
n
n
SplitINFO
1
log
Tid Refund Marital
Status
Taxable
Income
Cheat
1 Yes Single 125K
No
2 No Married 100K
No
3 No Single 70K
No
4 Yes Married 120K
No
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
10 No Single 90K
Yes
10
Tid
Refund
204. Tid
Attrib1 Attrib2 Attrib3 Class
11 No Small 55K
?
12 Yes Medium 80K
?
13 Yes Large 110K
?
14 No Small 95K
?
15 No Large 67K
?
10
Test Set
Tree
Induction
algorithm
Training Set
Apply
Model
Induction
Deduction
Learn
Model
Model
Tid
Attrib1 Attrib2 Attrib3 Class
1 Yes Large 125K
No
2 No Medium 100K
No
3 No Small 70K
No
4 Yes Medium 120K
205. No
5 No Large 95K
Yes
6 No Medium 60K
No
7 Yes Large 220K
No
8 No Small 85K
Yes
9 No Medium 75K
No
10 No Small 90K
Yes
10
Tid
Attrib1 Attrib2 Attrib3 Class
11 No Small 55K
?
12 Yes Medium 80K
?
13 Yes Large 110K
?
14 No Small 95K
?
15 No Large 67K
?
10
Test Set
Learning
algorithm
Training Set
Taxable
Income
> 80K?
206. YesNo
Taxable
Income?
(i) Binary split(ii) Multi-way split
< 10K
[10K,25K)[25K,50K)[50K,80K)
> 80K
Apply
Model
Induction
Deduction
Learn
Model
Model
Tid
Attrib1 Attrib2 Attrib3 Class
1 Yes Large 125K
No
2 No Medium 100K
No
3 No Small 70K
No
4 Yes Medium 120K
No
5 No Large 95K
Yes
6 No Medium 60K
No
7 Yes Large 220K
No
8 No Small 85K
Yes
9 No Medium 75K
No
10 No Small 90K
Yes
207. 10
Tid
Attrib1 Attrib2 Attrib3 Class
11 No Small 55K
?
12 Yes Medium 80K
?
13 Yes Large 110K
?
14 No Small 95K
?
15 No Large 67K
?
10
Test Set
Tree
Induction
algorithm
Training Set
CarType
{Sports,
Luxury}
{Family}
C1
3
1
C2
2
4
Gini
0.400
CarType
{Sports}
{
215. Tid Refund Marital
Status
Taxable
Income
Cheat
1 Yes Single 125K
No
2 No Married 100K
No
3 No Single 70K
No
4 Yes Married 120K
No
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
10 No Single 90K
Yes
10
Own
Car?
C0: 6
C1: 4
C0: 4
C1: 6
C0: 1
C1: 3
216. C0: 8
C1: 0
C0: 1
C1: 7
Car
Type?
C0: 1
C1: 0
C0: 1
C1: 0
C0: 0
C1: 1
Student
ID?
...
Yes
No
Family
Sports
Luxuryc
1
c
10
c
20
C0: 0
C1: 1
...
c
11
C0 N10
C1 N11
C0 N00
C1 N01
221. Tid Refund Marital
Status
Taxable
Income
Class
1 Yes Single 125K
No
2 No Married 100K
No
3 No Single 70K
No
4 Yes Married 120K
No
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
10
?
Single 90K
Yes
10
Class
= Yes
Class
223. Yes
6 No Married 60K
No
7 Yes Divorced 220K
No
8 No Single 85K
Yes
9 No Married 75K
No
10
Class=Yes 0
Class=No 3
Cheat=Yes 2
Cheat=No 4
Tid Refund Marital
Status
Taxable
Income
Class
10
?
Single 90K
Yes
10
Class=Yes 2 + 6/9
Class=No 4
Class=Yes 0 + 3/9
Class=No 3
224. Tid Refund Marital
Status
Taxable
Income
Class
11 No
?
85K
?
10
y < 0.33?
: 0
: 3
: 4
: 0
y < 0.47?
: 4
: 0
: 0
: 4
x < 0.43?
Yes
Yes
No
NoYesNo
00.10.20.30.40.50.60.70.80.91
0
0.1
0.2
0.3
0.4
0.5
0.6
241. 2002
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
What is Cluster Analysis?Finding groups of objects such that
the objects in a group will be similar (or related) to one another
and different from (or unrelated to) the objects in other groups
242. Inter-cluster distances are maximized
Intra-cluster distances are minimized
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Applications of Cluster AnalysisUnderstandingGroup related
documents for browsing, group genes and proteins that have
similar functionality, or group stocks with similar price
fluctuations
SummarizationReduce the size of large data sets
Clustering precipitation in Australia
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Discovered Clusters
Industry Group
1
Applied-Matl-DOWN,Bay-Network-Down,3-COM-DOWN,
Cabletron-Sys-DOWN,CISCO-DOWN,HP-DOWN,
DSC-Comm-DOWN,INTEL-DOWN,LSI-Logic-DOWN,
Micron-Tech-DOWN,Texas-Inst-Down,Tellabs-Inc-Down,
Natl-Semiconduct-DOWN,Oracl-DOWN,SGI-DOWN,
246. Six Clusters
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Types of ClusteringsA clustering is a set of clusters
Important distinction between hierarchical and partitional sets
of clusters
Partitional ClusteringA division data objects into non-
overlapping subsets (clusters) such that each data object is in
exactly one subset
Hierarchical clusteringA set of nested clusters organized as a
hierarchical tree
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
247. Partitional Clustering
Original Points
A Partitional Clustering
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Hierarchical Clustering
Traditional Hierarchical Clustering
Non-traditional Hierarchical Clustering
Non-traditional Dendrogram
Traditional Dendrogram
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Other Distinctions Between Sets of ClustersExclusive versus
non-exclusiveIn non-exclusive clusterings, points may belong to
multiple clusters.Can represent multiple classes or ‘border’
pointsFuzzy versus non-fuzzyIn fuzzy clustering, a point
belongs to every cluster with some weight between 0 and
1Weights must sum to 1Probabilistic clustering has similar
characteristicsPartial versus completeIn some cases, we only
want to cluster some of the dataHeterogeneous versus
homogeneousCluster of widely different sizes, shapes, and
densities
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
248. Types of Clusters Well-separated clusters
Center-based clusters
Contiguous clusters
Density-based clusters
Property or Conceptual
Described by an Objective Function
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Types of Clusters: Well-SeparatedWell-Separated Clusters: A
cluster is a set of points such that any point in a cluster is closer
(or more similar) to every other point in the cluster than to any
point not in the cluster.
3 well-separated clusters
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Types of Clusters: Center-BasedCenter-based A cluster is a set
of objects such that an object in a cluster is closer (more
similar) to the “center” of a cluster, than to the center of any
other cluster The center of a cluster is often a centroid, the
average of all the points in the cluster, or a medoid, the most
“representative” point of a cluster
4 center-based clusters
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
249. Types of Clusters: Contiguity-BasedContiguous Cluster
(Nearest neighbor or Transitive)A cluster is a set of points such
that a point in a cluster is closer (or more similar) to one or
more other points in the cluster than to any point not in the
cluster.
8 contiguous clusters
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Types of Clusters: Density-BasedDensity-basedA cluster is a
dense region of points, which is separated by low-density
regions, from other regions of high density. Used when the
clusters are irregular or intertwined, and when noise and
outliers are present.
6 density-based clusters
250. (C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Types of Clusters: Conceptual ClustersShared Property or
Conceptual ClustersFinds clusters that share some common
property or represent a particular concept.
.
2 Overlapping Circles
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Types of Clusters: Objective FunctionClusters Defined by an
Objective FunctionFinds clusters that minimize or maximize an
objective function. Enumerate all possible ways of dividing the
points into clusters and evaluate the `goodness' of each
potential set of clusters by using the given objective function.
(NP Hard) Can have global or local objectives. Hierarchical
clustering algorithms typically have local objectives Partitional
algorithms typically have global objectivesA variation of the
global objective function approach is to fit the data to a
parameterized model. Parameters for the model are determined
from the data. Mixture models assume that the data is a
‘mixture' of a number of statistical distributions.
(C) Vipin Kumar, Parallel Issues in Data Mining, VECPAR
2002
Types of Clusters: Objective Function …Map the clustering
problem to a different domain and solve a related problem in
that domainProximity matrix defines a weighted graph, where
the nodes are the points being clustered, and the weighted edges