SlideShare a Scribd company logo
1 of 40
Download to read offline
Data Mining
Practical Machine Learning Tools and Techniques
Slides for Chapter 1, What’s it all about?
of Data Mining by I. H. Witten, E. Frank,
M. A. Hall, and C. J. Pal
2
Chapter 1: What’s it all about?
•Data mining and machine learning
•Simple examples: the weather problem and others
•Fielded applications
•The data mining process
•Machine learning and statistics
•Generalization as search
•Data mining and ethics
3
Information is crucial
•Example 1: in vitro fertilization
• Given: embryos described by 60 features
• Problem: selection of embryos that will survive
• Data: historical records of embryos and outcome
•Example 2: cow culling
• Given: cows described by 700 features
• Problem: selection of cows that should be culled
• Data: historical records and farmers’ decisions
4
From data to information
•Society produces huge amounts of data
• Sources: business, science, medicine, economics, geography,
environment, sports, …
•This data is a potentially valuable resource
•Raw data is useless: need techniques to automatically
extract information from it
• Data: recorded facts
• Information: patterns underlying the data
• We are concerned with machine learning techniques for
automatically finding patterns in data
• Patterns that are found may be represented as structural
descriptions or as black-box models
5
Structural descriptions
• Example: if-then rules
…
…
…
…
…
Hard
Normal
Yes
Myope
Presbyopic
None
Reduced
No
Hypermetrope
Pre-presbyopic
Soft
Normal
No
Hypermetrope
Young
None
Reduced
No
Myope
Young
Recommended
lenses
Tear production
rate
Astigmatism
Spectacle
prescription
Age
If tear production rate = reduced
then recommendation = none
Otherwise, if age = young and astigmatic = no
then recommendation = soft
6
Machine learning
•Definitions of “learning” from dictionary:
To get knowledge of by study,
experience, or being taught
To become aware by information or
from observation
To commit to memory
To be informed of, ascertain; to receive instruction
Difficult to measure
Trivial for computers
Things learn when they change their behavior
in a way that makes them perform better in
the future.
• Operational definition:
Does a slipper learn?
• Does learning imply intention?
7
Data mining
•Finding patterns in data that provide insight or enable
fast and accurate decision making
•Strong, accurate patterns are needed to make decisions
• Problem 1: most patterns are not interesting
• Problem 2: patterns may be inexact (or spurious)
• Problem 3: data may be garbled or missing
• Machine learning techniques identify patterns in data and
provide many tools for data mining
• Of primary interest are machine learning techniques that
provide structural descriptions
8
The weather problem
• Conditions for playing a certain game
…
…
…
…
…
Yes
False
Normal
Mild
Rainy
Yes
False
High
Hot
Overcast
No
True
High
Hot
Sunny
No
False
High
Hot
Sunny
Play
Windy
Humidity
Temperature
Outlook
If outlook = sunny and humidity = high then play = no
If outlook = rainy and windy = true then play = no
If outlook = overcast then play = yes
If humidity = normal then play = yes
If none of the above then play = yes
9
Classification vs. association rules
•Classification rule:
predicts value of a given attribute (the classification of an example)
•Association rule:
predicts value of arbitrary attribute (or combination)
If outlook = sunny and humidity = high
then play = no
If temperature = cool then humidity = normal
If humidity = normal and windy = false
then play = yes
If outlook = sunny and play = no
then humidity = high
If windy = false and play = no
then outlook = sunny and humidity = high
10
Weather data with mixed attributes
• Some attributes have numeric values
…
…
…
…
…
Yes
False
80
75
Rainy
Yes
False
86
83
Overcast
No
True
90
80
Sunny
No
False
85
85
Sunny
Play
Windy
Humidity
Temperature
Outlook
If outlook = sunny and humidity > 83 then play = no
If outlook = rainy and windy = true then play = no
If outlook = overcast then play = yes
If humidity < 85 then play = yes
If none of the above then play = yes
11
The contact lenses data
None
Reduced
Yes
Hypermetrope
Pre-presbyopic
None
Normal
Yes
Hypermetrope
Pre-presbyopic
None
Reduced
No
Myope
Presbyopic
None
Normal
No
Myope
Presbyopic
None
Reduced
Yes
Myope
Presbyopic
Hard
Normal
Yes
Myope
Presbyopic
None
Reduced
No
Hypermetrope
Presbyopic
Soft
Normal
No
Hypermetrope
Presbyopic
None
Reduced
Yes
Hypermetrope
Presbyopic
None
Normal
Yes
Hypermetrope
Presbyopic
Soft
Normal
No
Hypermetrope
Pre-presbyopic
None
Reduced
No
Hypermetrope
Pre-presbyopic
Hard
Normal
Yes
Myope
Pre-presbyopic
None
Reduced
Yes
Myope
Pre-presbyopic
Soft
Normal
No
Myope
Pre-presbyopic
None
Reduced
No
Myope
Pre-presbyopic
hard
Normal
Yes
Hypermetrope
Young
None
Reduced
Yes
Hypermetrope
Young
Soft
Normal
No
Hypermetrope
Young
None
Reduced
No
Hypermetrope
Young
Hard
Normal
Yes
Myope
Young
None
Reduced
Yes
Myope
Young
Soft
Normal
No
Myope
Young
None
Reduced
No
Myope
Young
Recommended
lenses
Tear production rate
Astigmatism
Spectacle prescription
Age
12
A complete and correct rule set
If tear production rate = reduced then recommendation = none
If age = young and astigmatic = no
and tear production rate = normal then recommendation = soft
If age = pre-presbyopic and astigmatic = no
and tear production rate = normal then recommendation = soft
If age = presbyopic and spectacle prescription = myope
and astigmatic = no then recommendation = none
If spectacle prescription = hypermetrope and astigmatic = no
and tear production rate = normal then recommendation = soft
If spectacle prescription = myope and astigmatic = yes
and tear production rate = normal then recommendation = hard
If age young and astigmatic = yes
and tear production rate = normal then recommendation = hard
If age = pre-presbyopic
and spectacle prescription = hypermetrope
and astigmatic = yes then recommendation = none
If age = presbyopic and spectacle prescription = hypermetrope
and astigmatic = yes then recommendation = none
13
A decision tree for this problem
14
Classifying iris flowers
…
…
…
Iris virginica
1.9
5.1
2.7
5.8
102
101
52
51
2
1
Iris virginica
2.5
6.0
3.3
6.3
Iris versicolor
1.5
4.5
3.2
6.4
Iris versicolor
1.4
4.7
3.2
7.0
Iris setosa
0.2
1.4
3.0
4.9
Iris setosa
0.2
1.4
3.5
5.1
Type
Petal width
Petal length
Sepal width
Sepal length
If petal length < 2.45 then Iris setosa
If sepal width < 2.10 then Iris versicolor
...
15
• Example: 209 different computer configurations
• Linear regression function
Predicting CPU performance
0
0
32
128
CHMAX
0
0
8
16
CHMIN
Channels Performance
Cache
(Kb)
Main memory
(Kb)
Cycle time
(ns)
45
0
4000
1000
480
209
67
32
8000
512
480
208
…
269
32
32000
8000
29
2
198
256
6000
256
125
1
PRP
CACH
MMAX
MMIN
MYCT
PRP = -55.9 + 0.0489 MYCT + 0.0153 MMIN + 0.0056 MMAX
+ 0.6410 CACH - 0.2700 CHMIN + 1.480 CHMAX
16
Data from labor negotiations
good
good
good
bad
{good,bad}
Acceptability of contract
half
full
?
none
{none,half,full}
Health plan contribution
yes
?
?
no
{yes,no}
Bereavement assistance
full
full
?
none
{none,half,full}
Dental plan contribution
yes
?
?
no
{yes,no}
Long-term disability assistance
avg
gen
gen
avg
{below-avg,avg,gen}
Vacation
12
12
15
11
(Number of days)
Statutory holidays
?
?
?
yes
{yes,no}
Education allowance
Shift-work supplement
Standby pay
Pension
Working hours per week
Cost of living adjustment
Wage increase third year
Wage increase second year
Wage increase first year
Duration
Attribute
4
4%
5%
?
Percentage
?
?
13%
?
Percentage
?
?
?
none
{none,ret-allw, empl-cntr}
40
38
35
28
(Number of hours)
none
?
tcf
none
{none,tcf,tc}
?
?
?
?
Percentage
4.0
4.4%
5%
?
Percentage
4.5
4.3%
4%
2%
Percentage
2
3
2
1
(Number of years)
40
…
3
2
1
Type
17
Decision trees for the labor data
18
Soybean classification
Diaporthe stem canker
19
Diagnosis
Normal
3
Condition
Root
…
Yes
2
Stem lodging
Abnormal
2
Condition
Stem
…
?
3
Leaf spot size
Abnormal
2
Condition
Leaf
?
5
Fruit spots
Normal
4
Condition of fruit
pods
Fruit
…
Absent
2
Mold growth
Normal
2
Condition
Seed
…
Above normal
3
Precipitation
July
7
Time of occurrence
Environment
Sample value
Number
of values
Attribute
19
The role of domain knowledge
But in this domain, “leaf condition is normal” implies
“leaf malformation is absent”!
If leaf condition is normal
and stem condition is abnormal
and stem cankers is below soil line
and canker lesion color is brown
then
diagnosis is rhizoctonia root rot
If leaf malformation is absent
and stem condition is abnormal
and stem cankers is below soil line
and canker lesion color is brown
then
diagnosis is rhizoctonia root rot
20
Fielded applications
•The result of learning—or the learning method itself—is
deployed in practical applications
• Processing loan applications
• Screening images for oil slicks
• Electricity supply forecasting
• Diagnosis of machine faults
• Marketing and sales
• Separating crude oil and natural gas
• Reducing banding in rotogravure printing
• Finding appropriate technicians for telephone faults
• Scientific applications: biology, astronomy, chemistry
• Automatic selection of TV programs
• Monitoring intensive care patients
21
Processing loan applications (American Express)
•Given: questionnaire with
financial and personal information
•Question: should money be lent?
•Simple statistical method covers 90% of cases
•Borderline cases referred to loan officers
•But: 50% of accepted borderline cases defaulted!
•Solution: reject all borderline cases?
• No! Borderline cases are most active customers
22
Enter machine learning
•1000 training examples of borderline cases
•20 attributes:
• age
• years with current employer
• years at current address
• years with the bank
• other credit cards possessed,…
•Learned rules: correct on 70% of cases
• human experts only 50%
•Rules could be used to explain decisions to customers
23
Screening images
•Given: radar satellite images of coastal waters
•Problem: detect oil slicks in those images
•Oil slicks appear as dark regions with changing size
and shape
•Not easy: lookalike dark regions can be caused by
weather conditions (e.g. high wind)
•Expensive process requiring highly trained personnel
24
Enter machine learning
•Extract dark regions from normalized image
•Attributes:
• size of region
• shape, area
• intensity
• sharpness and jaggedness of boundaries
• proximity of other regions
• info about background
•Constraints:
• Few training examples—oil slicks are rare!
• Unbalanced data: most dark regions aren’t slicks
• Regions from same image form a batch
• Requirement: adjustable false-alarm rate
25
Load forecasting
•Electricity supply companies
need forecast of future demand
for power
•Forecasts of min/max load for each hour
=> significant savings
•Given: manually constructed load model that assumes
“normal” climatic conditions
•Problem: adjust for weather conditions
•Static model consist of:
• base load for the year
• load periodicity over the year
• effect of holidays
26
Enter machine learning
•Prediction corrected using “most similar” days
•Attributes:
• temperature
• humidity
• wind speed
• cloud cover readings
• plus difference between actual load and predicted load
•Average difference among three “most similar” days added
to static model
•Linear regression coefficients form attribute weights in
similarity function
27
Diagnosis of machine faults
•Diagnosis: classical domain
of expert systems
•Given: Fourier analysis of vibrations measured at
various points of a device’s mounting
•Question: which fault is present?
•Preventative maintenance of electromechanical
motors and generators
•Information very noisy
•So far: diagnosis by expert/hand-crafted rules
28
Enter machine learning
•Available: 600 faults with expert’s diagnosis
•~300 unsatisfactory, rest used for training
•Attributes augmented by intermediate concepts that
embodied causal domain knowledge
•Expert not satisfied with initial rules because they did not
relate to his domain knowledge
•Further background knowledge resulted in more complex
rules that were satisfactory
•Learned rules outperformed hand-crafted ones
29
Marketing and sales I
•Companies precisely record massive amounts of
marketing and sales data
•Applications:
• Customer loyalty:
identifying customers that are likely to defect by detecting
changes in their behavior
(e.g. banks/phone companies)
• Special offers:
identifying profitable customers
(e.g. reliable owners of credit cards that need extra money
during the holiday season)
30
Marketing and sales II
•Market basket analysis
• Association techniques find groups of items that tend to
occur together in a transaction
(used to analyze checkout data)
•Historical analysis of purchasing patterns
•Identifying prospective customers
• Focusing promotional mailouts
(targeted campaigns are cheaper than mass-marketed ones)
31
The data mining process
32
Machine learning and statistics
•Historical difference (grossly oversimplified):
• Statistics: testing hypotheses
• Machine learning: finding the right hypothesis
•But: huge overlap
• Decision trees (C4.5 and CART)
• Nearest-neighbor methods
•Today: perspectives have converged
• Most machine learning algorithms employ statistical
techniques
33
Generalization as search
•Inductive learning: find a concept description that fits
the data
•Example: rule sets as description language
• Enormous, but finite, search space
•Simple solution:
• enumerate the concept space
• eliminate descriptions that do not fit examples
• surviving descriptions contain target concept
34
Enumerating the concept space
•Search space for weather problem
• 4 x 4 x 3 x 3 x 2 = 288 possible combinations
• With 14 rules => 2.7x1034 possible rule sets
•Other practical problems:
• More than one description may survive
• No description may survive
• Language is unable to describe target concept
• or data contains noise
• Another view of generalization as search:
hill-climbing in description space according to pre-specified
matching criterion
• Many practical algorithms use heuristic search that cannot guarantee to
find the optimum solution
35
Bias
•Important decisions in learning systems:
• Concept description language
• Order in which the space is searched
• Way that overfitting to the particular training data is avoided
•These form the “bias” of the search:
• Language bias
• Search bias
• Overfitting-avoidance bias
36
Language bias
•Important question:
• is language universal
or does it restrict what can be learned?
•Universal language can express arbitrary subsets of
examples
•If language includes logical or (“disjunction”), it is
universal
•Example: rule sets
•Domain knowledge can be used to exclude some
concept descriptions a priori from the search
37
Search bias
•Search heuristic
• “Greedy” search: performing the best single step
• “Beam search”: keeping several alternatives
• …
•Direction of search
• General-to-specific
• E.g. specializing a rule by adding conditions
• Specific-to-general
• E.g. generalizing an individual instance into a rule
38
Overfitting-avoidance bias
•Can be seen as a form of search bias
•Modified evaluation criterion
• E.g., balancing simplicity and number of errors
•Modified search strategy
• E.g., pruning (simplifying a description)
• Pre-pruning: stops at a simple description before search proceeds to
an overly complex one
• Post-pruning: generates a complex description first and simplifies it
afterwards
39
Data mining and ethics I
•Ethical issues arise in
practical applications
•Anonymizing data is difficult
•85% of Americans can be identified from just zip
code, birth date and sex
•Data mining often used to discriminate
• E.g., loan applications: using some information (e.g., sex,
religion, race) is unethical
•Ethical situation depends on application
• E.g., same information ok in medical application
•Attributes may contain problematic information
• E.g., area code may correlate with race
40
Data mining and ethics II
•Important questions:
• Who is permitted access to the data?
• For what purpose was the data collected?
• What kind of conclusions can be legitimately drawn from it?
•Caveats must be attached to results
•Purely statistical arguments are never sufficient!
•Are resources put to good use?

More Related Content

Similar to Data Mining - Practical Machine Learning.pdf

Strategies for Dealing with the CRF
Strategies for Dealing with the CRFStrategies for Dealing with the CRF
Strategies for Dealing with the CRFMary K.D. D'Rozario
 
What is Prediction? From Sports to Workplace Safety
What is Prediction? From Sports to Workplace SafetyWhat is Prediction? From Sports to Workplace Safety
What is Prediction? From Sports to Workplace SafetyPredictive Solutions
 
Easy Ways to Power Up Your PowerPoint
Easy Ways to Power Up Your PowerPointEasy Ways to Power Up Your PowerPoint
Easy Ways to Power Up Your PowerPointDiane Windingland
 
The Art of Speaking Data.
The Art of Speaking Data.The Art of Speaking Data.
The Art of Speaking Data.David Wellman
 
Module 1 introduction to machine learning
Module 1  introduction to machine learningModule 1  introduction to machine learning
Module 1 introduction to machine learningSara Hooker
 
The Real Lessons of Dr. Deming’s Red Bead Factory
The Real Lessons of Dr. Deming’s Red Bead FactoryThe Real Lessons of Dr. Deming’s Red Bead Factory
The Real Lessons of Dr. Deming’s Red Bead FactoryMark Graban
 
Decision Mining Revisited - Discovering Overlapping Rules
Decision Mining Revisited - Discovering Overlapping RulesDecision Mining Revisited - Discovering Overlapping Rules
Decision Mining Revisited - Discovering Overlapping RulesFelix Mannhardt
 
How Big Data identifies early indicators of Mental Stress
How Big Data identifies early indicators of Mental StressHow Big Data identifies early indicators of Mental Stress
How Big Data identifies early indicators of Mental StressCoert Du Plessis (杜康)
 
Tico facts lesson_eva
Tico facts lesson_evaTico facts lesson_eva
Tico facts lesson_evaNTHU_TICO
 
Data mining in healthcare
Data mining in healthcareData mining in healthcare
Data mining in healthcareVelappanSubha
 
Ellicium Solutions - Making Data Science Work
Ellicium  Solutions - Making Data Science Work Ellicium  Solutions - Making Data Science Work
Ellicium Solutions - Making Data Science Work Ellicium Solutions Inc.
 
Data Science unit 2 By: Professor Lili Saghafi
Data Science unit 2 By: Professor Lili SaghafiData Science unit 2 By: Professor Lili Saghafi
Data Science unit 2 By: Professor Lili SaghafiProfessor Lili Saghafi
 
Data Storytelling - Game changer for Analytics
Data Storytelling - Game changer for Analytics Data Storytelling - Game changer for Analytics
Data Storytelling - Game changer for Analytics Gramener
 
sience 2.0 : an illustration of good research practices in a real study
sience 2.0 : an illustration of good research practices in a real studysience 2.0 : an illustration of good research practices in a real study
sience 2.0 : an illustration of good research practices in a real studywolf vanpaemel
 
Cognitive biases - Logic vs. The brain
Cognitive biases - Logic vs. The brainCognitive biases - Logic vs. The brain
Cognitive biases - Logic vs. The brainAditya Shukla
 
Whatever happened to design based inference
Whatever happened to design based inferenceWhatever happened to design based inference
Whatever happened to design based inferenceStephenSenn2
 
Finfer research and publication august 2014
Finfer research and publication august 2014Finfer research and publication august 2014
Finfer research and publication august 2014SMACC Conference
 

Similar to Data Mining - Practical Machine Learning.pdf (20)

Strategies for Dealing with the CRF
Strategies for Dealing with the CRFStrategies for Dealing with the CRF
Strategies for Dealing with the CRF
 
What is Prediction? From Sports to Workplace Safety
What is Prediction? From Sports to Workplace SafetyWhat is Prediction? From Sports to Workplace Safety
What is Prediction? From Sports to Workplace Safety
 
Easy Ways to Power Up Your PowerPoint
Easy Ways to Power Up Your PowerPointEasy Ways to Power Up Your PowerPoint
Easy Ways to Power Up Your PowerPoint
 
The Art of Speaking Data.
The Art of Speaking Data.The Art of Speaking Data.
The Art of Speaking Data.
 
Module 1 introduction to machine learning
Module 1  introduction to machine learningModule 1  introduction to machine learning
Module 1 introduction to machine learning
 
The Real Lessons of Dr. Deming’s Red Bead Factory
The Real Lessons of Dr. Deming’s Red Bead FactoryThe Real Lessons of Dr. Deming’s Red Bead Factory
The Real Lessons of Dr. Deming’s Red Bead Factory
 
Decision Mining Revisited - Discovering Overlapping Rules
Decision Mining Revisited - Discovering Overlapping RulesDecision Mining Revisited - Discovering Overlapping Rules
Decision Mining Revisited - Discovering Overlapping Rules
 
How Big Data identifies early indicators of Mental Stress
How Big Data identifies early indicators of Mental StressHow Big Data identifies early indicators of Mental Stress
How Big Data identifies early indicators of Mental Stress
 
BIG DATA RESEARCH
BIG DATA RESEARCHBIG DATA RESEARCH
BIG DATA RESEARCH
 
Tico facts lesson_eva
Tico facts lesson_evaTico facts lesson_eva
Tico facts lesson_eva
 
Data mining in healthcare
Data mining in healthcareData mining in healthcare
Data mining in healthcare
 
Ellicium Solutions - Making Data Science Work
Ellicium  Solutions - Making Data Science Work Ellicium  Solutions - Making Data Science Work
Ellicium Solutions - Making Data Science Work
 
Data Science unit 2 By: Professor Lili Saghafi
Data Science unit 2 By: Professor Lili SaghafiData Science unit 2 By: Professor Lili Saghafi
Data Science unit 2 By: Professor Lili Saghafi
 
Data Storytelling - Game changer for Analytics
Data Storytelling - Game changer for Analytics Data Storytelling - Game changer for Analytics
Data Storytelling - Game changer for Analytics
 
sience 2.0 : an illustration of good research practices in a real study
sience 2.0 : an illustration of good research practices in a real studysience 2.0 : an illustration of good research practices in a real study
sience 2.0 : an illustration of good research practices in a real study
 
Cognitive biases - Logic vs. The brain
Cognitive biases - Logic vs. The brainCognitive biases - Logic vs. The brain
Cognitive biases - Logic vs. The brain
 
Whatever happened to design based inference
Whatever happened to design based inferenceWhatever happened to design based inference
Whatever happened to design based inference
 
1120 track2 bennett
1120 track2 bennett1120 track2 bennett
1120 track2 bennett
 
Finfer research and publication august 2014
Finfer research and publication august 2014Finfer research and publication august 2014
Finfer research and publication august 2014
 
Data Science and some classical challenges by Søren Højsgaard
Data Science and some classical challenges by Søren HøjsgaardData Science and some classical challenges by Søren Højsgaard
Data Science and some classical challenges by Søren Højsgaard
 

Recently uploaded

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 

Data Mining - Practical Machine Learning.pdf

  • 1. Data Mining Practical Machine Learning Tools and Techniques Slides for Chapter 1, What’s it all about? of Data Mining by I. H. Witten, E. Frank, M. A. Hall, and C. J. Pal
  • 2. 2 Chapter 1: What’s it all about? •Data mining and machine learning •Simple examples: the weather problem and others •Fielded applications •The data mining process •Machine learning and statistics •Generalization as search •Data mining and ethics
  • 3. 3 Information is crucial •Example 1: in vitro fertilization • Given: embryos described by 60 features • Problem: selection of embryos that will survive • Data: historical records of embryos and outcome •Example 2: cow culling • Given: cows described by 700 features • Problem: selection of cows that should be culled • Data: historical records and farmers’ decisions
  • 4. 4 From data to information •Society produces huge amounts of data • Sources: business, science, medicine, economics, geography, environment, sports, … •This data is a potentially valuable resource •Raw data is useless: need techniques to automatically extract information from it • Data: recorded facts • Information: patterns underlying the data • We are concerned with machine learning techniques for automatically finding patterns in data • Patterns that are found may be represented as structural descriptions or as black-box models
  • 5. 5 Structural descriptions • Example: if-then rules … … … … … Hard Normal Yes Myope Presbyopic None Reduced No Hypermetrope Pre-presbyopic Soft Normal No Hypermetrope Young None Reduced No Myope Young Recommended lenses Tear production rate Astigmatism Spectacle prescription Age If tear production rate = reduced then recommendation = none Otherwise, if age = young and astigmatic = no then recommendation = soft
  • 6. 6 Machine learning •Definitions of “learning” from dictionary: To get knowledge of by study, experience, or being taught To become aware by information or from observation To commit to memory To be informed of, ascertain; to receive instruction Difficult to measure Trivial for computers Things learn when they change their behavior in a way that makes them perform better in the future. • Operational definition: Does a slipper learn? • Does learning imply intention?
  • 7. 7 Data mining •Finding patterns in data that provide insight or enable fast and accurate decision making •Strong, accurate patterns are needed to make decisions • Problem 1: most patterns are not interesting • Problem 2: patterns may be inexact (or spurious) • Problem 3: data may be garbled or missing • Machine learning techniques identify patterns in data and provide many tools for data mining • Of primary interest are machine learning techniques that provide structural descriptions
  • 8. 8 The weather problem • Conditions for playing a certain game … … … … … Yes False Normal Mild Rainy Yes False High Hot Overcast No True High Hot Sunny No False High Hot Sunny Play Windy Humidity Temperature Outlook If outlook = sunny and humidity = high then play = no If outlook = rainy and windy = true then play = no If outlook = overcast then play = yes If humidity = normal then play = yes If none of the above then play = yes
  • 9. 9 Classification vs. association rules •Classification rule: predicts value of a given attribute (the classification of an example) •Association rule: predicts value of arbitrary attribute (or combination) If outlook = sunny and humidity = high then play = no If temperature = cool then humidity = normal If humidity = normal and windy = false then play = yes If outlook = sunny and play = no then humidity = high If windy = false and play = no then outlook = sunny and humidity = high
  • 10. 10 Weather data with mixed attributes • Some attributes have numeric values … … … … … Yes False 80 75 Rainy Yes False 86 83 Overcast No True 90 80 Sunny No False 85 85 Sunny Play Windy Humidity Temperature Outlook If outlook = sunny and humidity > 83 then play = no If outlook = rainy and windy = true then play = no If outlook = overcast then play = yes If humidity < 85 then play = yes If none of the above then play = yes
  • 11. 11 The contact lenses data None Reduced Yes Hypermetrope Pre-presbyopic None Normal Yes Hypermetrope Pre-presbyopic None Reduced No Myope Presbyopic None Normal No Myope Presbyopic None Reduced Yes Myope Presbyopic Hard Normal Yes Myope Presbyopic None Reduced No Hypermetrope Presbyopic Soft Normal No Hypermetrope Presbyopic None Reduced Yes Hypermetrope Presbyopic None Normal Yes Hypermetrope Presbyopic Soft Normal No Hypermetrope Pre-presbyopic None Reduced No Hypermetrope Pre-presbyopic Hard Normal Yes Myope Pre-presbyopic None Reduced Yes Myope Pre-presbyopic Soft Normal No Myope Pre-presbyopic None Reduced No Myope Pre-presbyopic hard Normal Yes Hypermetrope Young None Reduced Yes Hypermetrope Young Soft Normal No Hypermetrope Young None Reduced No Hypermetrope Young Hard Normal Yes Myope Young None Reduced Yes Myope Young Soft Normal No Myope Young None Reduced No Myope Young Recommended lenses Tear production rate Astigmatism Spectacle prescription Age
  • 12. 12 A complete and correct rule set If tear production rate = reduced then recommendation = none If age = young and astigmatic = no and tear production rate = normal then recommendation = soft If age = pre-presbyopic and astigmatic = no and tear production rate = normal then recommendation = soft If age = presbyopic and spectacle prescription = myope and astigmatic = no then recommendation = none If spectacle prescription = hypermetrope and astigmatic = no and tear production rate = normal then recommendation = soft If spectacle prescription = myope and astigmatic = yes and tear production rate = normal then recommendation = hard If age young and astigmatic = yes and tear production rate = normal then recommendation = hard If age = pre-presbyopic and spectacle prescription = hypermetrope and astigmatic = yes then recommendation = none If age = presbyopic and spectacle prescription = hypermetrope and astigmatic = yes then recommendation = none
  • 13. 13 A decision tree for this problem
  • 14. 14 Classifying iris flowers … … … Iris virginica 1.9 5.1 2.7 5.8 102 101 52 51 2 1 Iris virginica 2.5 6.0 3.3 6.3 Iris versicolor 1.5 4.5 3.2 6.4 Iris versicolor 1.4 4.7 3.2 7.0 Iris setosa 0.2 1.4 3.0 4.9 Iris setosa 0.2 1.4 3.5 5.1 Type Petal width Petal length Sepal width Sepal length If petal length < 2.45 then Iris setosa If sepal width < 2.10 then Iris versicolor ...
  • 15. 15 • Example: 209 different computer configurations • Linear regression function Predicting CPU performance 0 0 32 128 CHMAX 0 0 8 16 CHMIN Channels Performance Cache (Kb) Main memory (Kb) Cycle time (ns) 45 0 4000 1000 480 209 67 32 8000 512 480 208 … 269 32 32000 8000 29 2 198 256 6000 256 125 1 PRP CACH MMAX MMIN MYCT PRP = -55.9 + 0.0489 MYCT + 0.0153 MMIN + 0.0056 MMAX + 0.6410 CACH - 0.2700 CHMIN + 1.480 CHMAX
  • 16. 16 Data from labor negotiations good good good bad {good,bad} Acceptability of contract half full ? none {none,half,full} Health plan contribution yes ? ? no {yes,no} Bereavement assistance full full ? none {none,half,full} Dental plan contribution yes ? ? no {yes,no} Long-term disability assistance avg gen gen avg {below-avg,avg,gen} Vacation 12 12 15 11 (Number of days) Statutory holidays ? ? ? yes {yes,no} Education allowance Shift-work supplement Standby pay Pension Working hours per week Cost of living adjustment Wage increase third year Wage increase second year Wage increase first year Duration Attribute 4 4% 5% ? Percentage ? ? 13% ? Percentage ? ? ? none {none,ret-allw, empl-cntr} 40 38 35 28 (Number of hours) none ? tcf none {none,tcf,tc} ? ? ? ? Percentage 4.0 4.4% 5% ? Percentage 4.5 4.3% 4% 2% Percentage 2 3 2 1 (Number of years) 40 … 3 2 1 Type
  • 17. 17 Decision trees for the labor data
  • 18. 18 Soybean classification Diaporthe stem canker 19 Diagnosis Normal 3 Condition Root … Yes 2 Stem lodging Abnormal 2 Condition Stem … ? 3 Leaf spot size Abnormal 2 Condition Leaf ? 5 Fruit spots Normal 4 Condition of fruit pods Fruit … Absent 2 Mold growth Normal 2 Condition Seed … Above normal 3 Precipitation July 7 Time of occurrence Environment Sample value Number of values Attribute
  • 19. 19 The role of domain knowledge But in this domain, “leaf condition is normal” implies “leaf malformation is absent”! If leaf condition is normal and stem condition is abnormal and stem cankers is below soil line and canker lesion color is brown then diagnosis is rhizoctonia root rot If leaf malformation is absent and stem condition is abnormal and stem cankers is below soil line and canker lesion color is brown then diagnosis is rhizoctonia root rot
  • 20. 20 Fielded applications •The result of learning—or the learning method itself—is deployed in practical applications • Processing loan applications • Screening images for oil slicks • Electricity supply forecasting • Diagnosis of machine faults • Marketing and sales • Separating crude oil and natural gas • Reducing banding in rotogravure printing • Finding appropriate technicians for telephone faults • Scientific applications: biology, astronomy, chemistry • Automatic selection of TV programs • Monitoring intensive care patients
  • 21. 21 Processing loan applications (American Express) •Given: questionnaire with financial and personal information •Question: should money be lent? •Simple statistical method covers 90% of cases •Borderline cases referred to loan officers •But: 50% of accepted borderline cases defaulted! •Solution: reject all borderline cases? • No! Borderline cases are most active customers
  • 22. 22 Enter machine learning •1000 training examples of borderline cases •20 attributes: • age • years with current employer • years at current address • years with the bank • other credit cards possessed,… •Learned rules: correct on 70% of cases • human experts only 50% •Rules could be used to explain decisions to customers
  • 23. 23 Screening images •Given: radar satellite images of coastal waters •Problem: detect oil slicks in those images •Oil slicks appear as dark regions with changing size and shape •Not easy: lookalike dark regions can be caused by weather conditions (e.g. high wind) •Expensive process requiring highly trained personnel
  • 24. 24 Enter machine learning •Extract dark regions from normalized image •Attributes: • size of region • shape, area • intensity • sharpness and jaggedness of boundaries • proximity of other regions • info about background •Constraints: • Few training examples—oil slicks are rare! • Unbalanced data: most dark regions aren’t slicks • Regions from same image form a batch • Requirement: adjustable false-alarm rate
  • 25. 25 Load forecasting •Electricity supply companies need forecast of future demand for power •Forecasts of min/max load for each hour => significant savings •Given: manually constructed load model that assumes “normal” climatic conditions •Problem: adjust for weather conditions •Static model consist of: • base load for the year • load periodicity over the year • effect of holidays
  • 26. 26 Enter machine learning •Prediction corrected using “most similar” days •Attributes: • temperature • humidity • wind speed • cloud cover readings • plus difference between actual load and predicted load •Average difference among three “most similar” days added to static model •Linear regression coefficients form attribute weights in similarity function
  • 27. 27 Diagnosis of machine faults •Diagnosis: classical domain of expert systems •Given: Fourier analysis of vibrations measured at various points of a device’s mounting •Question: which fault is present? •Preventative maintenance of electromechanical motors and generators •Information very noisy •So far: diagnosis by expert/hand-crafted rules
  • 28. 28 Enter machine learning •Available: 600 faults with expert’s diagnosis •~300 unsatisfactory, rest used for training •Attributes augmented by intermediate concepts that embodied causal domain knowledge •Expert not satisfied with initial rules because they did not relate to his domain knowledge •Further background knowledge resulted in more complex rules that were satisfactory •Learned rules outperformed hand-crafted ones
  • 29. 29 Marketing and sales I •Companies precisely record massive amounts of marketing and sales data •Applications: • Customer loyalty: identifying customers that are likely to defect by detecting changes in their behavior (e.g. banks/phone companies) • Special offers: identifying profitable customers (e.g. reliable owners of credit cards that need extra money during the holiday season)
  • 30. 30 Marketing and sales II •Market basket analysis • Association techniques find groups of items that tend to occur together in a transaction (used to analyze checkout data) •Historical analysis of purchasing patterns •Identifying prospective customers • Focusing promotional mailouts (targeted campaigns are cheaper than mass-marketed ones)
  • 32. 32 Machine learning and statistics •Historical difference (grossly oversimplified): • Statistics: testing hypotheses • Machine learning: finding the right hypothesis •But: huge overlap • Decision trees (C4.5 and CART) • Nearest-neighbor methods •Today: perspectives have converged • Most machine learning algorithms employ statistical techniques
  • 33. 33 Generalization as search •Inductive learning: find a concept description that fits the data •Example: rule sets as description language • Enormous, but finite, search space •Simple solution: • enumerate the concept space • eliminate descriptions that do not fit examples • surviving descriptions contain target concept
  • 34. 34 Enumerating the concept space •Search space for weather problem • 4 x 4 x 3 x 3 x 2 = 288 possible combinations • With 14 rules => 2.7x1034 possible rule sets •Other practical problems: • More than one description may survive • No description may survive • Language is unable to describe target concept • or data contains noise • Another view of generalization as search: hill-climbing in description space according to pre-specified matching criterion • Many practical algorithms use heuristic search that cannot guarantee to find the optimum solution
  • 35. 35 Bias •Important decisions in learning systems: • Concept description language • Order in which the space is searched • Way that overfitting to the particular training data is avoided •These form the “bias” of the search: • Language bias • Search bias • Overfitting-avoidance bias
  • 36. 36 Language bias •Important question: • is language universal or does it restrict what can be learned? •Universal language can express arbitrary subsets of examples •If language includes logical or (“disjunction”), it is universal •Example: rule sets •Domain knowledge can be used to exclude some concept descriptions a priori from the search
  • 37. 37 Search bias •Search heuristic • “Greedy” search: performing the best single step • “Beam search”: keeping several alternatives • … •Direction of search • General-to-specific • E.g. specializing a rule by adding conditions • Specific-to-general • E.g. generalizing an individual instance into a rule
  • 38. 38 Overfitting-avoidance bias •Can be seen as a form of search bias •Modified evaluation criterion • E.g., balancing simplicity and number of errors •Modified search strategy • E.g., pruning (simplifying a description) • Pre-pruning: stops at a simple description before search proceeds to an overly complex one • Post-pruning: generates a complex description first and simplifies it afterwards
  • 39. 39 Data mining and ethics I •Ethical issues arise in practical applications •Anonymizing data is difficult •85% of Americans can be identified from just zip code, birth date and sex •Data mining often used to discriminate • E.g., loan applications: using some information (e.g., sex, religion, race) is unethical •Ethical situation depends on application • E.g., same information ok in medical application •Attributes may contain problematic information • E.g., area code may correlate with race
  • 40. 40 Data mining and ethics II •Important questions: • Who is permitted access to the data? • For what purpose was the data collected? • What kind of conclusions can be legitimately drawn from it? •Caveats must be attached to results •Purely statistical arguments are never sufficient! •Are resources put to good use?