Introduction to Machine Learning Concepts
Introduction to Machine Learning Concepts
Introduction
Broad definition:
Automated discovery of patterns in data by a
computer.
Commercial
– Targeted marketing: understand purchasing
patterns of individuals or groups
web-based advertising
– Recommender systems: help people find
items they will like
– Fraud detection
Finance
IT
– Network intrusion detection
– Spam filtering
Robotics
Social media
Scientific
– Remote sensing networks:
atmosphere, ocean, fresh-water,
land-based, satellite
weather and climate modeling
environmental management
resource management
Interpretation /
evaluation
Knowledge
Knowledge
Machine
learning
Transformation Patterns
Preprocessing
Transformed
data
Selection Preprocessed
data
Data Target
data
Ranking
Anomaly detection
Jeff Howbert Introduction to Machine Learning Winter 2014 17
Classification definition
classes
Direct marketing
– Goal: Reduce cost of mailing by targeting a set of
customers likely to buy a new cell-phone product.
– Approach:
Use the data for a similar product introduced before.
We know which customers decided to buy and which
decided otherwise. This {buy, don’t buy} decision forms the
class label.
Collect various demographic, lifestyle, and company-
interaction related information about all such customers.
– Type of business, where they stay, how much they earn, etc.
Usethis information as input attributes to learn a classifier
model.
From [Berry & Linoff] Data Mining Techniques, 1997
Customer attrition:
– Goal: To predict whether a customer is likely
to be lost to a competitor.
– Approach:
Use detailed record of transactions with each of the
past and present customers, to find attributes.
– How often the customer calls, where he calls, what time-
of-the day he calls most, his financial status, marital
status, etc.
Label the customers as loyal or disloyal.
Find a model for loyalty.
From [Fayyad, [Link].] Advances in Knowledge Discovery and Data Mining, 1996
Late
Data size:
• 72 million stars, 20 million galaxies
• Object catalog: 9 GB
• Image database: 150 GB
Courtesy: [Link]
Jeff Howbert Introduction to Machine Learning Winter 2014 23
Classification application 5
C-Path: automated pathologic grading
of breast cancer specimens
3 No Small 70K No
4 Yes Medium 120K No
Induction
5 No Large 95K Yes
6 No Medium 60K No
Training Set
Apply
Tid Attrib1 Attrib2 Attrib3 Class Model
11 No Small 55K ?
15 No Large 67K ?
10
Test Set
Two classes
– Predicting tumor cells as benign or malignant
– Classifying credit card transactions
as legitimate or fraudulent
Multiple classes
– Classifying secondary structures of
protein as alpha-helix, beta-sheet,
or random coil
– Categorizing news stories as finance,
weather, entertainment, sports, etc
Decision trees
Rule-based methods
Logistic regression
Discriminant analysis
k-Nearest neighbor (instance-based learning)
Naïve Bayes
Neural networks
Support vector machines
Bayesian belief networks
nal nal s
i i
om om atio l as splitting nodes
n n r c
Tid Refund Marital Taxable
Status Income Cheat
classification nodes
nal nal
m
i
m
i
tio ass
no no r a cl MarSt Single,
Married Divorced
Tid Refund Marital Taxable
Status Income Cheat
NO Refund
1 Yes Single 125K No
Yes No
2 No Married 100K No
3 No Single 70K No NO TaxInc
4 Yes Married 120K No < 80K > 80K
5 No Divorced 95K Yes
NO YES
6 No Married 60K No
7 Yes Divorced 220K No
8 No Single 85K Yes
9 No Married 75K No There can be more than one tree
10 No Single 90K Yes that fits the same data!
10
Given:
– Set of data points
– Set of attributes on each data point
– A measure of similarity between data points
Find clusters such that:
– Data points within a cluster are more similar to one
another
– Data points in separate clusters are less similar to
one another
Similarity measures:
– Euclidean distance if attributes are continuous
– Other problem-specific measures
Partitional
– Data points divided into finite number of
partitions (non-overlapping subsets)
Hierarchical
– Data points arranged in tree structure that
expresses a continuum of similarities and
clustering
Intracluster
Intraclusterdistances
distances
are
areminimized
minimized
Assign to
clusters
Intercluster
Interclusterdistances
distances
are
aremaximized
maximized
Jeff Howbert Introduction to Machine Learning Winter 2014 32
Hierarchical clustering illustrated
Market segmentation
– Goal: subdivide a market into distinct subsets of
customers, such that each subset is conceivably a
submarket which can be reached with a customized
marketing mix.
– Approach:
Collect different attributes of customers based on their
geographical and lifestyle related information.
Find clusters of similar customers.
Measure the clustering quality by observing buying
patterns of customers in same cluster vs. those from
different clusters.
Document clustering
– Goal: Find groups of documents that are
similar to each other based on the important
terms appearing in them.
– Approach: Identify frequently occurring terms
in each document. Form a similarity measure
based on the frequencies of different terms.
Use it to cluster.
– Benefit: Information retrieval can utilize the
clusters to relate a new document or search
term to clustered documents.
Jeff Howbert Introduction to Machine Learning Winter 2014 35
Document clustering example
National 273 36
Genetic demography
Well-separated clusters
Center-based clusters
Contiguous clusters
Density-based clusters
Property or conceptual
Described by an objective function
Hierarchical clustering
Density-based clustering
Given:
– set of records each of which contain some number of
items from a given collection
Produce dependency rules which will predict occurrence
of an item based on occurrences of other items.
TID Items
1 Bread, Coke, Milk
Rules
RulesDiscovered:
Discovered:
2 Beer, Bread
{Milk}
{Milk}-->
-->{Coke}
{Coke}
3 Beer, Coke, Diaper, Milk {Diaper,
{Diaper,Milk}
Milk}-->
-->{Beer}
{Beer}
4 Beer, Bread, Diaper, Milk
5 Coke, Diaper, Milk
next to diapers!
Jeff Howbert Introduction to Machine Learning Winter 2014 42
Mining Association Rules in Large
Databases
44
Jeff Howbert Introduction to Machine Learning Winter 2014 44
What Is Association Mining?
Association rule mining:
– Finding frequent patterns, associations, correlations, or causal
structures among sets of items or objects in transaction
databases, relational databases, and other information
repositories.
– Frequent pattern: pattern (set of items, sequence, etc.) that
occurs frequently in a database [AIS93]
Motivation: finding regularities in data
– What products were often purchased together? — Beer and
diapers?!
– What are the subsequent purchases after buying a PC?
– What kinds of DNA are sensitive to this new drug?
– Can we automatically classify web documents?
45
46
CS590D
Jeff Howbert Introduction to Machine Learning Winter 2014 46
Basic Concepts: Association Rules
Given is a set of objects, with each object associated with its own timeline of events, find rules that predict strong sequential dependencies among
different events.
Rules are formed by first discovering patterns. Event occurrences in the patterns are governed by timing constraints.
(A B) (C) (D E)
(A B) (C) (D E)
<= xg >ng <= ws
<= ms
PROCESS:
1. users provide ratings on items they have
experienced
2. Take all < user, item, rating > data and build a
predictive model
3. For a user who hasn’t experienced a particular
item, use model to predict how well they will
like it (i.e. predict rating)
Jeff Howbert Introduction to Machine Learning Winter 2014 54
Recommender system application
1
Applications:
– Credit card fraud detection
– Network intrusion
detection
Typical network traffic at University level may reach over 100 million connections per
day
Jeff Howbert Introduction to Machine Learning Winter 2014 58
Anomaly detection
Natural variation
– tails on a Gaussian distribution
Point anomalies
Contextual anomalies
Collective anomalies
Network intrusion
Insurance / credit card fraud
Healthcare informatics / medical diagnostics
Industrial damage detection
Image processing / video surveillance
Novel topic detection in text mining
…
Statistical
Proximity-based
Density-based
Clustering-based