SlideShare a Scribd company logo
1 of 55
Download to read offline
EXAMPLE-DEPENDENT COST-SENSITIVE
CLASSIFICATION
applications in financial risk modeling
and marketing analytics
September 15, 2015
Alejandro Correa Bahnsen
with
Djamila Aouada, SnT
Björn Ottersten, SnT
Motivation
2
• Classification: predicting the class of
a set of examples given their
features.
• Standard classification methods aim
at minimizing the errors
• Such a traditional framework
assumes that all misclassification
errors carry the same cost
• This is not the case in many real-world applications: Credit card
fraud detection, churn modeling, credit scoring, direct marketing.
x1
x2
Motivation
3
• Credit card fraud detection, failing to detect a fraudulent
transaction may have an economical impact from a few to
thousands of Euros, depending on the particular transaction and
card holder.
• Credit scoring, accepting loans from bad customers does not have
the same economical loss, since customers have different credit
lines, therefore, different profit.
• Churn modeling, misidentifying a profitable or unprofitable churner
has a significant different economic result.
• Direct marketing, wrongly predicting that a customer will not
accept an offer when in fact he will, may have different financial
impact, as not all customers generate the same profit.
• Motivation
• Cost-sensitive classification
Background
• Real-world cost-sensitive applications
Credit card fraud detection, churn modeling, credit scoring, direct marketing
• Proposed cost-sensitive algorithms
Bayes minimum risk, cost-sensitive logistic regression, cost-sensitive decision trees,
ensembles of cost-sensitive decision trees
• Experiments
Experimental setup, results
• Conclusions
Contributions, future work
Agenda
4
predict the class of set of examples given their features
𝑓: 𝑆 → 0,1
Where each element of 𝑆 is composed by 𝑋𝑖 = 𝑥𝑖
1
, 𝑥𝑖
2
, … , 𝑥𝑖
𝑘
It is usually evaluated using a traditional misclassification measures such as
Accuracy, F1Score, AUC, among others.
However, these measures assume that different misclassification errors
carry the same cost
Background - Binary classification
5
We define a cost measure based on the cost matrix [Elkan 2001]
From which we calculate the 𝑪𝒐𝒔𝒕 of applying a classifier to a given set
𝐶𝑜𝑠𝑡 𝑓 𝑆 =
𝑖=1
𝑁
𝑦𝑖 𝑐𝑖 𝐶 𝑇𝑃 𝑖
+ 1 − 𝑐𝑖 𝐶 𝐹𝑁 𝑖
+ 1 − 𝑦𝑖 𝑐𝑖 𝐶 𝐹𝑃 𝑖
+ 1 − 𝑐𝑖 𝐶 𝑇𝑁 𝑖
Background - Cost-sensitive evaluation
6
Actual Positive
𝒚𝒊 = 𝟏
Actual Negative
𝒚𝒊 = 𝟎
Predicted Positive
𝒄𝒊 = 𝟏
𝐶 𝑇𝑃 𝑖
𝐶 𝐹𝑃 𝑖
Predicted Negative
𝒄𝒊 = 𝟎
𝐶 𝐹𝑁 𝑖
𝐶 𝑇𝑁 𝑖
However, the total cost may not be easy to interpret. Therefore, we propose
a 𝑺𝒂𝒗𝒊𝒏𝒈𝒔 measure as the cost vs. the cost of using no algorithm at all
𝑆𝑎𝑣𝑖𝑛𝑔𝑠 𝑓 𝑆 =
𝐶𝑜𝑠𝑡𝑙 𝑓 𝑆 − 𝐶𝑜𝑠𝑡 𝑓 𝑆
𝐶𝑜𝑠𝑡𝑙 𝑓 𝑆
Where 𝑪𝒐𝒔𝒕𝒍 𝒇 𝑺 is the cost of predicting the costless class
𝐶𝑜𝑠𝑡𝑙 𝑓 𝑆 = min 𝐶𝑜𝑠𝑡 𝑓0 𝑆 , 𝐶𝑜𝑠𝑡 𝑓1 𝑆
Background - Cost-sensitive evaluation
7
Research in example-dependent cost-sensitive classification has been
narrow, mostly because of the lack of publicly available datasets [Aodha
and Brostow 2013].
Standard approaches consist in re-weighting the training examples based
on their costs:
• Cost-proportionate rejection sampling [Zadrozny et al. 2003]
• Cost-proportionate oversampling [Elkan 2001]
Background - State-of-the-art methods
8
• Motivation
• Cost-sensitive classification
Background
• Real-world cost-sensitive applications
Credit card fraud detection, churn modeling, credit scoring, direct marketing
• Proposed cost-sensitive algorithms
Bayes minimum risk, cost-sensitive logistic regression, cost-sensitive decision trees,
ensembles of cost-sensitive decision trees
• Experiments
Experimental setup, results
• Conclusions
Contributions, future work
Agenda
9
Estimate the probability of a transaction being fraud based on analyzing
customer patterns and recent fraudulent behavior
Issues when constructing a fraud detection system [Bolton et al., 2002]:
• Skewness of the data
• Cost-sensitivity
• Short time response of the system
• Dimensionality of the search space
• Feature preprocessing
Credit card fraud detection
10
Credit card fraud detection is a cost-sensitive problem. As the cost due to a
false positive is different than the cost of a false negative.
• False positives: When predicting a transaction as fraudulent, when in
fact it is not a fraud, there is an administrative cost that is incurred by
the financial institution.
• False negatives: Failing to detect a fraud, the amount of that transaction
is lost.
Moreover, it is not enough to assume a constant cost difference between
false positives and false negatives, as the amount of the transactions varies
quite significantly.
Credit card fraud detection
11
Cost matrix
A. Correa Bahnsen, A. Stojanovic, D. Aouada, and B. Ottersten, “Cost Sensitive Credit Card Fraud Detection
Using Bayes Minimum Risk,” in 2013 12th International Conference on Machine Learning and Applications.
Miami, USA: IEEE, Dec. 2013, pp. 333–338.
Credit card fraud detection
12
Actual Positive
𝒚𝒊 = 𝟏
Actual Negative
𝒚𝒊 = 𝟎
Predicted Positive
𝒄𝒊 = 𝟏
𝐶 𝑇𝑃 𝑖
= 𝐶 𝑎 𝐶 𝐹𝑃 𝑖
= 𝐶 𝑎
Predicted Negative
𝒄𝒊 = 𝟎
𝐶 𝐹𝑁 𝑖
= 𝐴𝑚𝑡𝑖 𝐶 𝑇𝑁 𝑖
= 0
Raw features
Credit card fraud detection
13
Attribute name Description
Transaction ID Transaction identification number
Time Date and time of the transaction
Account number Identification number of the customer
Card number Identification of the credit card
Transaction type ie. Internet, ATM, POS, ...
Entry mode ie. Chip and pin, magnetic stripe, ...
Amount Amount of the transaction in Euros
Merchant code Identification of the merchant type
Merchant group Merchant group identification
Country Country of trx
Country 2 Country of residence
Type of card ie. Visa debit, Mastercard, American Express...
Gender Gender of the card holder
Age Card holder age
Bank Issuer bank of the card
Transaction aggregation strategy [Whitrow, 2008]
Credit card fraud detection
14
Raw Features
TrxId Time Type Country Amt
1 1/1 18:20 POS Lux 250
2 1/1 20:35 POS Lux 400
3 1/1 22:30 ATM Lux 250
4 2/1 00:50 POS Ger 50
5 2/1 19:18 POS Ger 100
6 2/1 23:45 POS Ger 150
7 3/1 06:00 POS Lux 10
Aggregated Features
No Trx
last 24h
Amt last
24h
No Trx
last 24h
same
type and
country
Amt last
24h same
type and
country
0 0 0 0
1 250 1 250
2 650 0 0
3 900 0 0
3 700 1 50
2 150 2 150
3 400 0 0
Proposed periodic features
When is a customer expected to make a new transaction?
Considering a von Mises distribution with a period of 24 hours such that
𝑃(𝑡𝑖𝑚𝑒) ~ 𝑣𝑜𝑛𝑚𝑖𝑠𝑒𝑠 𝜇, 𝜎 =
𝑒 𝜎𝑐𝑜𝑠(𝑡𝑖𝑚𝑒−𝜇)
2𝜋𝐼0 𝜎
where 𝝁 is the mean, 𝝈 is the standard deviation, and 𝑰 𝟎 is the Bessel function
Credit card fraud detection
15
Proposed periodic features
A. Correa Bahnsen, A. Stojanovic, D. Aouada, and B. Ottersten, “Feature Engineering Strategies for
Credit Card Fraud Detection” submitted to Expert Systems with Applications.
Credit card fraud detection
16
Classify which potential customers are likely to default a contracted
financial obligation based on the customer’s past financial experience.
It is a cost-sensitive problem as the cost associated with approving a bad
customer, i.e., false negative, is quite different from the cost associated
with declining a good customer, i.e., false positive. Furthermore, the costs
are not constant among customers. This is because loans have different
credit line amounts, terms, and even interest rates.
Credit scoring
17
Cost matrix
A. Correa Bahnsen, D. Aouada, and B. Ottersten, “Example-Dependent Cost-Sensitive Logistic Regression for
Credit Scoring,” in 2014 13th International Conference on Machine Learning and Applications. Detroit, USA:
IEEE, 2014, pp. 263–269.
Credit scoring
18
Actual Positive
𝒚𝒊 = 𝟏
Actual Negative
𝒚𝒊 = 𝟎
Predicted Positive
𝒄𝒊 = 𝟏
𝐶 𝑇𝑃 𝑖
= 0 𝐶 𝐹𝑃 𝑖
= 𝑟𝑖 + 𝐶 𝐹𝑃
𝑎
Predicted Negative
𝒄𝒊 = 𝟎
𝐶 𝐹𝑁𝑖
= 𝐶𝑙𝑖 ∗ 𝐿 𝑔𝑑 𝐶 𝑇𝑁 𝑖
= 0
Predict the probability of a customer defecting using historical, behavioral
and socioeconomical information.
This tool is of great benefit to subscription based companies allowing them
to maximize the results of retention campaigns.
Churn modeling
19
Churn management campaign [Verbraken, 2013]
Churn modeling
20
Inflow
New
Customers
Customer
Base
Active
Customers
Predicted Churners
Predicted Non-Churners
TP: Actual Churners
FP: Actual Non-Churners
FN: Actual Churners
TN: Actual Non-Churners
Outflow
Effective
Churners
Churn Model Prediction
1
1
𝟏 − 𝜸𝜸
1
Proposed financial evaluation of a churn campaign
A. Correa Bahnsen, A. Stojanovic, D. Aouada, and B. Ottersten, “A novel cost-sensitive
framework for customer churn predictive modeling,” Decision Analytics, vol. 2:5, 2015.
Churn modeling
21
Inflow
New
Customers
Customer
Base
Active
Customers
Predicted Churners
Predicted Non-Churners
TP: Actual Churners
FP: Actual Non-Churners
FN: Actual Churners
TN: Actual Non-Churners
Outflow
Effective
Churners
Churn Model Prediction
𝟎
𝑪𝑳𝑽
𝑪𝑳𝑽 + 𝑪 𝒂𝑪 𝒐 + 𝑪 𝒂
𝑪 𝒐 + 𝑪 𝒂
Cost matrix
A. Correa Bahnsen, A. Stojanovic, D. Aouada, and B. Ottersten, “A novel cost-sensitive
framework for customer churn predictive modeling,” Decision Analytics, vol. 2:5, 2015.
Churn modeling
22
Actual Positive
𝒚𝒊 = 𝟏
Actual Negative
𝒚𝒊 = 𝟎
Predicted Positive
𝒄𝒊 = 𝟏
𝐶 𝑇𝑃 𝑖
= 𝛾𝑖 𝐶 𝑜 𝑖
+
1 − 𝛾𝑖 𝐶𝐿𝑉𝑖 + 𝐶 𝑎
𝐶 𝐹𝑃 𝑖
= 𝐶 𝑜 𝑖
+ 𝐶 𝑎
Predicted Negative
𝒄𝒊 = 𝟎
𝐶 𝐹𝑁𝑖
= 𝐶𝐿𝑉𝑖 𝐶 𝑇𝑁 𝑖
= 0
Classify those customers who are more likely to have a certain response to a
marketing campaign.
This problem is example-dependent cost sensitive, as the false positives
have the cost of contacting the client, and false negatives have the cost due
to the loss of income by failing to making the an offer to the right customer.
Direct marketing
23
Cost matrix
A. Correa Bahnsen, A. Stojanovic, D. Aouada, and B. Ottersten, “Improving Credit Card Fraud Detection with
Calibrated Probabilities,” in Proceedings of the fourteenth SIAM International Conference on Data Mining,
Philadelphia, USA, 2014, pp. 677 – 685.
Direct marketing
24
Actual Positive
𝒚𝒊 = 𝟏
Actual Negative
𝒚𝒊 = 𝟎
Predicted Positive
𝒄𝒊 = 𝟏
𝐶 𝑇𝑃 𝑖
= 𝐶 𝑎 𝐶 𝐹𝑃 𝑖
= 𝐶 𝑎
Predicted Negative
𝒄𝒊 = 𝟎
𝐶 𝐹𝑁 𝑖
= 𝐼𝑛𝑡𝑖 𝐶 𝑇𝑁 𝑖
= 0
• Motivation
• Cost-sensitive classification
Background
• Real-world cost-sensitive applications
Credit card fraud detection, churn modeling, credit scoring, direct marketing
• Proposed cost-sensitive algorithms
Bayes minimum risk, cost-sensitive logistic regression, cost-sensitive decision trees,
ensembles of cost-sensitive decision trees
• Experiments
Experimental setup, results
• Conclusions
Contributions, future work
Agenda
25
• Bayes minimum risk (BMR)
A. Correa Bahnsen, A. Stojanovic, D. Aouada, and B. Ottersten, “Cost Sensitive Credit Card Fraud Detection
Using Bayes Minimum Risk,” in 2013 12th International Conference on Machine Learning and Applications.
Miami, USA: IEEE, Dec. 2013, pp. 333–338.
A. Correa Bahnsen, Aouada, and B. Ottersten, “Improving Credit Card Fraud Detection with Calibrated
Probabilities,” in Proceedings of the fourteenth SIAM International Conference on Data Mining, Philadelphia,
USA, 2014, pp. 677 – 685.
• Cost-sensitive logistic regression (CSLR)
A. Correa Bahnsen, D. Aouada, and B. Ottersten, “Example-Dependent Cost-Sensitive Logistic Regression for
Credit Scoring,” in 2014 13th International Conference on Machine Learning and Applications. Detroit, USA:
IEEE, 2014, pp. 263–269.
• Cost-sensitive decision trees (CSDT)
A. Correa Bahnsen, D. Aouada, and B. Ottersten, “Example-Dependent Cost-Sensitive Decision Trees,” Expert
Systems with Applications, vol. 42:19, 2015.
• Ensembles of cost-sensitive decision trees (ECSDT)
A. Correa Bahnsen, D. Aouada, and B. Ottersten, “Ensemble of Example-Dependent Cost-Sensitive Decision
Trees,” IEEE Transactions on Knowledge and Data Engineering, vol. under review, 2015.
Proposed cost-sensitive algorithms
26
Decision model based on quantifying tradeoffs between various decisions
using probabilities and the costs that accompany such decisions
Risk of classification
𝑅 𝑐𝑖 = 0|𝑥𝑖 = 𝐶 𝑇𝑁 𝑖 1 − 𝑝𝑖 + 𝐶 𝐹𝑁 𝑖 ∙ 𝑝𝑖
𝑅 𝑐𝑖 = 1|𝑥𝑖 = 𝐶 𝐹𝑃 𝑖 1 − 𝑝𝑖 + 𝐶 𝑇𝑃 𝑖 ∙ 𝑝𝑖
Using the different risks the prediction is made based on the following
condition:
𝑐𝑖 =
0 𝑅 𝑐𝑖 = 0|𝑥𝑖 ≤ 𝑅 𝑐𝑖 = 1|𝑥𝑖
1 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Bayes Minimum Risk
27
Cost-Sensitive Logistic Regression
28
• Logistic Regression Model
𝑝𝑖 = 𝑃 𝑦𝑖 = 0|𝑥𝑖 = ℎ 𝜃 𝑥𝑖 = 𝑔
𝑗=1
𝑘
𝜃𝑗 𝑥𝑖
𝑗
• Cost Function
𝐽𝑖 𝜃 = −𝑦𝑖 log ℎ 𝜃 𝑥𝑖 − 1 − 𝑦𝑖 log 1 − ℎ 𝜃 𝑥𝑖
• Cost Analysis
𝐽𝑖 𝜃 ≈
0 𝑖𝑓 𝑦𝑖 ≈ ℎ 𝜃 𝑥𝑖
𝑖𝑛𝑓 𝑖𝑓 𝑦𝑖 ≈ 1 − ℎ 𝜃 𝑥𝑖
𝐶 𝑇𝑃 𝑖 = 𝐶 𝑇𝑁 𝑖 ≈ 0
𝐶 𝐹𝑃 𝑖 = 𝐶 𝐹𝑁 𝑖 ≈ ∞
Cost-Sensitive Logistic Regression
29
• Actual Costs
𝐽 𝑐 𝜃 =
𝐶 𝑇𝑃 𝑖
𝑖𝑓 𝑦𝑖 = 1 𝑎𝑛𝑑 ℎ 𝜃 𝑥𝑖 ≈ 1
𝐶 𝑇𝑁 𝑖
𝑖𝑓 𝑦𝑖 = 0 𝑎𝑛𝑑 ℎ 𝜃 𝑥𝑖 ≈ 0
𝐶 𝐹𝑃 𝑖
𝑖𝑓 𝑦𝑖 = 0 𝑎𝑛𝑑 ℎ 𝜃 𝑥𝑖 ≈ 1
𝐶 𝐹𝑁 𝑖
𝑖𝑓 𝑦𝑖 = 1 𝑎𝑛𝑑 ℎ 𝜃 𝑥𝑖 ≈ 0
• Proposed Cost-Sensitive Function
𝐽 𝑐 𝜃 =
1
𝑁
𝑖=1
𝑁
𝑦𝑖 ℎ 𝜃 𝑥𝑖 𝐶 𝑇𝑃 𝑖
+ 1 − ℎ 𝜃 𝑥𝑖 𝐶 𝐹𝑁 𝑖
+
1 − 𝑦𝑖 ℎ 𝜃 𝑥𝑖 𝐶 𝐹𝑃 𝑖
+ 1 − ℎ 𝜃 𝑥𝑖 𝐶 𝑇𝑁 𝑖
• A decision tree is a classification model that iteratively creates binary
decision rules 𝑥 𝑗, 𝑙 𝑚
𝑗
that maximize certain criteria (gain, entropy, …).
Where 𝑥 𝑗, 𝑙 𝑚
𝑗
refers to making a rule using feature j on value m
• Maximize the accuracy is different than maximizing the cost.
• To solve this, some studies had been proposed method that aim to
introduce the cost-sensitivity into the algorithms [Lomax 2013].
However, research have been focused on class-dependent methods
• We proposed:
• Example-dependent cost based impurity measure
• Example-dependent cost based pruning criteria
Cost-Sensitive Decision trees
30
Cost-Sensitive Decision trees
31
Proposed Cost based impurity measure
𝑆 𝑙 = 𝑥|𝑥𝑖 ∈ 𝑆 ∧ 𝑥𝑖
𝑗
≤ 𝑙 𝑚
𝑗
𝑆 𝑟 = 𝑥|𝑥𝑖 ∈ 𝑆 ∧ 𝑥𝑖
𝑗
> 𝑙 𝑚
𝑗
• The impurity of each leaf is calculated using:
𝐼𝑐 𝑆 = min 𝐶𝑜𝑠𝑡 𝑓0 𝑆 , 𝐶𝑜𝑠𝑡 𝑓1 𝑆
𝑓 𝑆 =
0 𝑖𝑓 𝐶𝑜𝑠𝑡 𝑓0 𝑆 ≤ 𝐶𝑜𝑠𝑡 𝑓1 𝑆
1 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
• Afterwards the gain of applying a given rule to the set 𝑆 is:
𝐺𝑎𝑖𝑛 𝑐 𝑥 𝑗, 𝑙 𝑚
𝑗
= 𝐼𝑐 𝜋1 − 𝐼𝑐 𝜋1
𝑙
+ 𝐼𝑐 𝜋1
𝑟
S
S S
𝑥 𝑗, 𝑙 𝑚
𝑗
Cost-Sensitive Decision trees
32
Decision trees construction
• The rule that maximizes the gain is selected
𝑏𝑒𝑠𝑡 𝑥, 𝑏𝑒𝑠𝑡𝑙 = 𝑎𝑟𝑔 max
𝑗,𝑚
𝐺𝑎𝑖𝑛 𝑥 𝑗, 𝑙 𝑚
𝑗
S
S S
S S S S
S S S S
• The process is repeated until a stopping criteria is met:
Cost-Sensitive Decision trees
33
Proposed cost-sensitive pruning criteria
• Calculation of the Tree savings and pruned Tree savings
S
S S
S S S S
S S S S
𝑃𝐶𝑐 =
𝐶𝑜𝑠𝑡 𝑓 𝑆, 𝑇𝑟𝑒𝑒 − 𝐶𝑜𝑠𝑡 𝑓 𝑆, 𝐸𝐵 𝑇𝑟𝑒𝑒, 𝑏𝑟𝑎𝑛𝑐ℎ
𝑇𝑟𝑒𝑒 − 𝐸𝐵 𝑇𝑟𝑒𝑒, 𝑏𝑟𝑎𝑛𝑐ℎ
• After calculating the pruning criteria for all possible trees. The maximum
improvement is selected and the Tree is pruned.
• Later the process is repeated until there is no further improvement.
S
S S
S S S S
S S
S
S S
S S
Typical ensemble is made by combining T different base classifiers. Each
base classifiers is trained by applying algorithm M in a random subset
Ensembles of Cost-Sensitive Decision trees
34
𝑀𝑗 ← 𝑀 𝑆𝑗 ∀𝑗 ∈ 1, … , 𝑇
The core principle in ensemble learning, is to induce random perturbations
into the learning procedure in order to produce several different base
classifiers from a single training set, then combining the base classifiers in
order to make the final prediction.
Ensembles of Cost-Sensitive Decision trees
35
Ensembles of Cost-Sensitive Decision trees
36
1
2
3
4
5
6
7
8
8
6
2
5
2
1
3
6
7
1
2
3
8
1
5
8
1
4
4
2
1
9
4
6
1
1
5
8
1
4
4
2
1
1
5
8
1
4
4
2
1
1
5
8
1
4
4
2
1
Bagging Pasting Random forest Random patches
Training set
After the base classifiers are constructed they are typically combined using
one of the following methods:
• Majority voting
𝐻 𝑆 = 𝑓𝑚𝑣 𝑆, 𝑀 = 𝑎𝑟𝑔 max
𝑐∈ 0,1
𝑗=1
𝑇
1 𝑐 𝑀𝑗 𝑆
• Proposed cost-sensitive weighted voting
𝐻 𝑆 = 𝑓𝑤𝑣 𝑆, 𝑀, 𝛼 = 𝑎𝑟𝑔 max
𝑐∈ 0,1
𝑗=1
𝑇
𝛼𝑗1 𝑐 𝑀𝑗 𝑆
𝛼𝑗 =
1−𝜀 𝑀 𝑗 𝑆 𝑗
𝑜𝑜𝑏
𝑗1=1
𝑇
1−𝜀 𝑀 𝑗1 𝑆 𝑗1
𝑜𝑜𝑏
𝛼𝑗 =
𝑆𝑎𝑣𝑖𝑛𝑔𝑠 𝑀 𝑗 𝑆 𝑗
𝑜𝑜𝑏
𝑗1=1
𝑇
𝑆𝑎𝑣𝑖𝑛𝑔𝑠 𝑀 𝑗1 𝑆 𝑗1
𝑜𝑜𝑏
Ensembles of Cost-Sensitive Decision trees
37
• Proposed cost-sensitive stacking
𝐻 𝑆 = 𝑓𝑠 𝑆, 𝑀, 𝛽 =
1
1 + 𝑒
− 𝑗=1
𝑇
𝛽 𝑗 𝑀 𝑗 𝑆
Using the cost-sensitive logistic regression [Correa et. al, 2014] model:
𝐽 𝑆, 𝑀, 𝛽 =
𝑖=1
𝑁
𝑦𝑖 𝑓𝑠 𝑆, 𝑀, 𝛽 𝐶 𝑇𝑃 𝑖
− 𝐶 𝐹𝑁𝑖
+ 𝐶 𝐹𝑁 𝑖
+
1 − 𝑦𝑖 𝑓𝑠 𝑆, 𝑀, 𝛽 𝐶 𝐹𝑃 𝑖
− 𝐶 𝑇𝑁 𝑖
+ 𝐶 𝑇𝑁 𝑖
Then the weights are estimated using
𝛽 = 𝑎𝑟𝑔 min
𝛽
𝐽 𝑆, 𝑀, 𝛽
Ensembles of Cost-Sensitive Decision trees
38
• Motivation
• Cost-sensitive classification
Background
• Real-world cost-sensitive applications
Credit card fraud detection, churn modeling, credit scoring, direct marketing
• Proposed cost-sensitive algorithms
Bayes minimum risk, cost-sensitive logistic regression, cost-sensitive decision trees,
ensembles of cost-sensitive decision trees
• Experiments
Experimental setup, results
• Conclusions
Contributions, future work
Agenda
39
Experimental setup - Datasets
40
Database # Examples % Positives Cost (Euros)
Fraud 1,638,772 0.21% 860,448
Churn 9,410 4.83% 580,884
Kaggle Credit 112,915 6.74% 8,740,181
PAKDD09 Credit 38,969 19.88% 3,117,960
Direct Marketing 37,931 12.62% 59,507
• Cost-insensitive (CI):
• Decision trees (DT)
• Logistic regression (LR)
• Random forest (RF)
• Under-sampling (u)
• Cost-proportionate sampling (CPS):
• Cost-proportionate rejection-sampling (r)
• Cost-proportionate over-sampling (o)
• Bayes minimum risk (BMR)
• Cost-sensitive training (CST):
• Cost-sensitive logistic regression (CSLR)
• Cost-sensitive decision trees (CSDT)
Experimental setup - Methods
41
• Ensemble cost-sensitive decision trees (ECSDT):
Random inducers:
• Bagging (CSB)
• Pasting (CSP)
• Random forest (CSRF)
• Random patches (CSRP)
Combination:
• Majority voting (mv)
• Cost-sensitive weighted voting (wv)
• Cost-sensitive staking (s)
Experimental setup - Methods
42
• Each experiment was carried out 50 times
• For the parameters of the algorithms a grid search was made
• Results are measured by savings and F1Score
• Then the Friedman ranking is calculated for each method
Experimental setup
43
Results
44
Percentage of the highest savings
Database Algorithm Savings
Savings
(Euros)
Fraud CSRP-wv-t 0.73 628,127
Churn CSRP-s-t 0.17 98,750
Credit1 CSRP-mv-t 0.52 4,544,894
Credit2 LR-t-BMR 0.31 966,568
Marketing LR-t-BMR 0.51 30,349
% Pos.
0.21
4.83
6.74
19.88
12.62
Results
45
Results of the Friedman rank of the savings (1=best, 28=worst)
Family Algorithm Rank
ECSDT CSRP-wv-t 2.6
ECSDT CSRP-s-t 3.4
ECSDT CSRP-mv-t 4
ECSDT CSB-wv-t 5.6
ECSDT CSP-wv-t 7.4
ECSDT CSB-mv-t 8.2
ECSDT CSRF-wv-t 9.4
BMR RF-t-BMR 9.4
ECSDT CSP-s-t 9.6
ECSDT CSP-mv-t 10.2
ECSDT CSB-s-t 10.2
BMR LR-t-BMR 11.2
CPS RF-r 11.6
CST CSDT-t 12.6
Family Algorithm Rank
CST CSLR-t 14.4
ECSDT CSRF-mv-t 15.2
ECSDT CSRF-s-t 16
CI RF-u 17.2
CPS LR-r 19
BMR DT-t-BMR 19
CPS LR-o 21
CPS DT-r 22.6
CI LR-u 22.8
CPS RF-o 22.8
CI DT-u 24.4
CPS DT-o 25
CI DT-t 26
CI RF-t 26.2
Results
46
Results of the Friedman rank of the savings organized by family
Results within the ECSDT family
47
By combination methodBy random inducer
Results
48
Comparison of the Friedman ranking of the savings and F1Score sorted by
F1Score ranking
• Motivation
• Cost-sensitive classification
Background
• Real-world cost-sensitive applications
Credit card fraud detection, churn modeling, credit scoring, direct marketing
• Proposed cost-sensitive algorithms
Bayes minimum risk, cost-sensitive logistic regression, cost-sensitive decision trees,
ensembles of cost-sensitive decision trees
• Experiments
Experimental setup, results
• Conclusions
Contributions, future work
Agenda
49
• New framework of example dependent cost-sensitive classification
• Using five databases, from four real-world applications: credit card fraud
detection, churn modeling, credit scoring and direct marketing, we show
that the proposed algorithms significantly outperforms the state-of-
the-art cost-insensitive and example-dependent cost-sensitive
algorithms
• Highlight the importance of using the real example-dependent financial
costs associated with the real-world applications
Conclusions
50
• Multi-class example-dependent cost-sensitive classification
• Cost-sensitive calibration
• Staking cost-sensitive decision trees
• Example-dependent cost-sensitive boosting
• Online example-dependent cost-sensitive classification
Future research directions
51
Contributions - Papers
Date Name Conference / Journal Status
July
2013
Cost Sensitive Credit Card Fraud Detection
using Bayes Minimum Risk
IEEE International Conference on
Machine Learning and Applications
Published
October
2013
Improving Credit Card Fraud Detection with
Calibrated Probabilities
SIAM International Conference on
Data Mining
Published
June
2014
Credit Scoring using
Cost-Sensitive Logistic Regression
IEEE International Conference on
Machine Learning and Applications
Published
October
2014
Example-Dependent Cost-Sensitive Decision
Trees
Expert Systems with Applications Published
January
2015
A novel cost-sensitive framework for customer
churn predictive modeling
Decision Analytics Published
March
2015
Ensemble of Example-Dependent Cost-
Sensitive Decision Trees
IEEE Transactions on Knowledge
and Data Engineering
Under
review
March
2015
Feature Engineering Strategies for Credit Card
Fraud Detection
Expert Systems with Applications
Under
review
June
2015
Detecting Credit Card Fraud using Periodic
Features
IEEE International Conference on
Machine Learning and Applications
In Press
52
Contributions - Costcla
costcla is a Python module for cost-
sensitive classification built on top of
Scikit-Learn, SciPy and distributed under
the 3-Clause BSD license.
In particular, it provides:
• A set of example-dependent cost-
sensitive algorithms
• Different real-world example-
dependent cost-sensitive datasets.
Installation
pip install costcla
Documentation:
https://pythonhosted.org/costcla/
53
Thank You!!
Alejandro Correa Bahnsen
Contact information
Alejandro Correa Bahnsen
University of Luxembourg
albahnsen.com
al.bahnsen@gmail.com
http://www.linkedin.com/in/albahnsen
https://github.com/albahnsen/CostSensitiveClassification

More Related Content

What's hot

Convolutional Neural Network
Convolutional Neural NetworkConvolutional Neural Network
Convolutional Neural NetworkJunho Cho
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Gaurav Mittal
 
You only look once: Unified, real-time object detection (UPC Reading Group)
You only look once: Unified, real-time object detection (UPC Reading Group)You only look once: Unified, real-time object detection (UPC Reading Group)
You only look once: Unified, real-time object detection (UPC Reading Group)Universitat Politècnica de Catalunya
 
Introduction to Machine Learning
Introduction to Machine Learning   Introduction to Machine Learning
Introduction to Machine Learning snehal_152
 
Optic flow estimation with deep learning
Optic flow estimation with deep learningOptic flow estimation with deep learning
Optic flow estimation with deep learningYu Huang
 
Credit card fraud detection using machine learning Algorithms
Credit card fraud detection using machine learning AlgorithmsCredit card fraud detection using machine learning Algorithms
Credit card fraud detection using machine learning Algorithmsankit panigrahy
 
You only look once (YOLO) : unified real time object detection
You only look once (YOLO) : unified real time object detectionYou only look once (YOLO) : unified real time object detection
You only look once (YOLO) : unified real time object detectionEntrepreneur / Startup
 
ML_Unit_2_Part_A
ML_Unit_2_Part_AML_Unit_2_Part_A
ML_Unit_2_Part_ASrimatre K
 
Machine Learning and Data Mining: 10 Introduction to Classification
Machine Learning and Data Mining: 10 Introduction to ClassificationMachine Learning and Data Mining: 10 Introduction to Classification
Machine Learning and Data Mining: 10 Introduction to ClassificationPier Luca Lanzi
 
Machine learning of structured outputs
Machine learning of structured outputsMachine learning of structured outputs
Machine learning of structured outputszukun
 
Convolutional neural networks deepa
Convolutional neural networks deepaConvolutional neural networks deepa
Convolutional neural networks deepadeepa4466
 
Reinforcement learning
Reinforcement  learningReinforcement  learning
Reinforcement learningSKS
 
ML_ Unit 2_Part_B
ML_ Unit 2_Part_BML_ Unit 2_Part_B
ML_ Unit 2_Part_BSrimatre K
 
Squeeze and excitation networks
Squeeze and excitation networksSqueeze and excitation networks
Squeeze and excitation networks준영 박
 
Genetic algorithm for hyperparameter tuning
Genetic algorithm for hyperparameter tuningGenetic algorithm for hyperparameter tuning
Genetic algorithm for hyperparameter tuningDr. Jyoti Obia
 
Statistical classification: A review on some techniques
Statistical classification: A review on some techniquesStatistical classification: A review on some techniques
Statistical classification: A review on some techniquesGiorgos Bamparopoulos
 
Airbnb Business analytics case study presentation deck
Airbnb Business analytics case study presentation deck Airbnb Business analytics case study presentation deck
Airbnb Business analytics case study presentation deck sandygcabanes
 

What's hot (20)

Convolutional Neural Network
Convolutional Neural NetworkConvolutional Neural Network
Convolutional Neural Network
 
Cnn
CnnCnn
Cnn
 
Borderline Smote
Borderline SmoteBorderline Smote
Borderline Smote
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)
 
You only look once: Unified, real-time object detection (UPC Reading Group)
You only look once: Unified, real-time object detection (UPC Reading Group)You only look once: Unified, real-time object detection (UPC Reading Group)
You only look once: Unified, real-time object detection (UPC Reading Group)
 
Introduction to Machine Learning
Introduction to Machine Learning   Introduction to Machine Learning
Introduction to Machine Learning
 
Optic flow estimation with deep learning
Optic flow estimation with deep learningOptic flow estimation with deep learning
Optic flow estimation with deep learning
 
Credit card fraud detection using machine learning Algorithms
Credit card fraud detection using machine learning AlgorithmsCredit card fraud detection using machine learning Algorithms
Credit card fraud detection using machine learning Algorithms
 
You only look once (YOLO) : unified real time object detection
You only look once (YOLO) : unified real time object detectionYou only look once (YOLO) : unified real time object detection
You only look once (YOLO) : unified real time object detection
 
ML_Unit_2_Part_A
ML_Unit_2_Part_AML_Unit_2_Part_A
ML_Unit_2_Part_A
 
Machine Learning and Data Mining: 10 Introduction to Classification
Machine Learning and Data Mining: 10 Introduction to ClassificationMachine Learning and Data Mining: 10 Introduction to Classification
Machine Learning and Data Mining: 10 Introduction to Classification
 
LeNet-5
LeNet-5LeNet-5
LeNet-5
 
Machine learning of structured outputs
Machine learning of structured outputsMachine learning of structured outputs
Machine learning of structured outputs
 
Convolutional neural networks deepa
Convolutional neural networks deepaConvolutional neural networks deepa
Convolutional neural networks deepa
 
Reinforcement learning
Reinforcement  learningReinforcement  learning
Reinforcement learning
 
ML_ Unit 2_Part_B
ML_ Unit 2_Part_BML_ Unit 2_Part_B
ML_ Unit 2_Part_B
 
Squeeze and excitation networks
Squeeze and excitation networksSqueeze and excitation networks
Squeeze and excitation networks
 
Genetic algorithm for hyperparameter tuning
Genetic algorithm for hyperparameter tuningGenetic algorithm for hyperparameter tuning
Genetic algorithm for hyperparameter tuning
 
Statistical classification: A review on some techniques
Statistical classification: A review on some techniquesStatistical classification: A review on some techniques
Statistical classification: A review on some techniques
 
Airbnb Business analytics case study presentation deck
Airbnb Business analytics case study presentation deck Airbnb Business analytics case study presentation deck
Airbnb Business analytics case study presentation deck
 

Viewers also liked

Fraud analytics detección y prevención de fraudes en la era del big data sl...
Fraud analytics detección y prevención de fraudes en la era del big data   sl...Fraud analytics detección y prevención de fraudes en la era del big data   sl...
Fraud analytics detección y prevención de fraudes en la era del big data sl...Alejandro Correa Bahnsen, PhD
 
Classifying Phishing URLs Using Recurrent Neural Networks
Classifying Phishing URLs Using Recurrent Neural NetworksClassifying Phishing URLs Using Recurrent Neural Networks
Classifying Phishing URLs Using Recurrent Neural NetworksAlejandro Correa Bahnsen, PhD
 
2013 credit card fraud detection why theory dosent adjust to practice
2013 credit card fraud detection why theory dosent adjust to practice2013 credit card fraud detection why theory dosent adjust to practice
2013 credit card fraud detection why theory dosent adjust to practiceAlejandro Correa Bahnsen, PhD
 
Maximizing a churn campaign’s profitability with cost sensitive predictive an...
Maximizing a churn campaign’s profitability with cost sensitive predictive an...Maximizing a churn campaign’s profitability with cost sensitive predictive an...
Maximizing a churn campaign’s profitability with cost sensitive predictive an...Alejandro Correa Bahnsen, PhD
 
Maximizing a churn campaigns profitability with cost sensitive machine learning
Maximizing a churn campaigns profitability with cost sensitive machine learningMaximizing a churn campaigns profitability with cost sensitive machine learning
Maximizing a churn campaigns profitability with cost sensitive machine learningAlejandro Correa Bahnsen, PhD
 
Fraud Detection with Cost-Sensitive Predictive Analytics
Fraud Detection with Cost-Sensitive Predictive AnalyticsFraud Detection with Cost-Sensitive Predictive Analytics
Fraud Detection with Cost-Sensitive Predictive AnalyticsAlejandro Correa Bahnsen, PhD
 
Example-Dependent Cost-Sensitive Credit Card Fraud Detection
Example-Dependent Cost-Sensitive Credit Card Fraud DetectionExample-Dependent Cost-Sensitive Credit Card Fraud Detection
Example-Dependent Cost-Sensitive Credit Card Fraud DetectionAlejandro Correa Bahnsen, PhD
 
Ensembles of example dependent cost-sensitive decision trees slides
Ensembles of example dependent cost-sensitive decision trees slidesEnsembles of example dependent cost-sensitive decision trees slides
Ensembles of example dependent cost-sensitive decision trees slidesAlejandro Correa Bahnsen, PhD
 

Viewers also liked (13)

Fraud analytics detección y prevención de fraudes en la era del big data sl...
Fraud analytics detección y prevención de fraudes en la era del big data   sl...Fraud analytics detección y prevención de fraudes en la era del big data   sl...
Fraud analytics detección y prevención de fraudes en la era del big data sl...
 
Classifying Phishing URLs Using Recurrent Neural Networks
Classifying Phishing URLs Using Recurrent Neural NetworksClassifying Phishing URLs Using Recurrent Neural Networks
Classifying Phishing URLs Using Recurrent Neural Networks
 
2013 credit card fraud detection why theory dosent adjust to practice
2013 credit card fraud detection why theory dosent adjust to practice2013 credit card fraud detection why theory dosent adjust to practice
2013 credit card fraud detection why theory dosent adjust to practice
 
Maximizing a churn campaign’s profitability with cost sensitive predictive an...
Maximizing a churn campaign’s profitability with cost sensitive predictive an...Maximizing a churn campaign’s profitability with cost sensitive predictive an...
Maximizing a churn campaign’s profitability with cost sensitive predictive an...
 
1609 Fraud Data Science
1609 Fraud Data Science1609 Fraud Data Science
1609 Fraud Data Science
 
Maximizing a churn campaigns profitability with cost sensitive machine learning
Maximizing a churn campaigns profitability with cost sensitive machine learningMaximizing a churn campaigns profitability with cost sensitive machine learning
Maximizing a churn campaigns profitability with cost sensitive machine learning
 
2011 advanced analytics through the credit cycle
2011 advanced analytics through the credit cycle2011 advanced analytics through the credit cycle
2011 advanced analytics through the credit cycle
 
Modern Data Science
Modern Data ScienceModern Data Science
Modern Data Science
 
Fraud Detection with Cost-Sensitive Predictive Analytics
Fraud Detection with Cost-Sensitive Predictive AnalyticsFraud Detection with Cost-Sensitive Predictive Analytics
Fraud Detection with Cost-Sensitive Predictive Analytics
 
Analytics - compitiendo en la era de la informacion
Analytics - compitiendo en la era de la informacionAnalytics - compitiendo en la era de la informacion
Analytics - compitiendo en la era de la informacion
 
Example-Dependent Cost-Sensitive Credit Card Fraud Detection
Example-Dependent Cost-Sensitive Credit Card Fraud DetectionExample-Dependent Cost-Sensitive Credit Card Fraud Detection
Example-Dependent Cost-Sensitive Credit Card Fraud Detection
 
Demystifying machine learning using lime
Demystifying machine learning using limeDemystifying machine learning using lime
Demystifying machine learning using lime
 
Ensembles of example dependent cost-sensitive decision trees slides
Ensembles of example dependent cost-sensitive decision trees slidesEnsembles of example dependent cost-sensitive decision trees slides
Ensembles of example dependent cost-sensitive decision trees slides
 

Similar to PhD Defense - Example-Dependent Cost-Sensitive Classification

How a Predictive Analytics-based Framework Helps Reduce Bad Debts in Utilities
How a Predictive Analytics-based Framework Helps Reduce Bad Debts in Utilities How a Predictive Analytics-based Framework Helps Reduce Bad Debts in Utilities
How a Predictive Analytics-based Framework Helps Reduce Bad Debts in Utilities WNS Global Services
 
Retail Banking 6 Steps to Improving the Collections Experience.pptx
Retail Banking 6 Steps to Improving the Collections Experience.pptxRetail Banking 6 Steps to Improving the Collections Experience.pptx
Retail Banking 6 Steps to Improving the Collections Experience.pptxMaveric Systems
 
Retail Banking 6 Steps to Improving the Collections Experience.pdf
Retail Banking 6 Steps to Improving the Collections Experience.pdfRetail Banking 6 Steps to Improving the Collections Experience.pdf
Retail Banking 6 Steps to Improving the Collections Experience.pdfMaveric Systems
 
Retail Banking 6 Steps to Improving the Collections Experience.pdf
Retail Banking 6 Steps to Improving the Collections Experience.pdfRetail Banking 6 Steps to Improving the Collections Experience.pdf
Retail Banking 6 Steps to Improving the Collections Experience.pdfMaveric Systems
 
Consumer credit-risk3440
Consumer credit-risk3440Consumer credit-risk3440
Consumer credit-risk3440stone55
 
Analytics in banking services
Analytics in banking servicesAnalytics in banking services
Analytics in banking servicesMariyageorge
 
Project crm submission sonali
Project crm submission sonaliProject crm submission sonali
Project crm submission sonaliSonali Gupta
 
Transaction_Scoring - WVK MasterCard
Transaction_Scoring - WVK MasterCardTransaction_Scoring - WVK MasterCard
Transaction_Scoring - WVK MasterCardWestley Koenen
 
Consumer Credit Scoring Using Logistic Regression and Random Forest
Consumer Credit Scoring Using Logistic Regression and Random ForestConsumer Credit Scoring Using Logistic Regression and Random Forest
Consumer Credit Scoring Using Logistic Regression and Random ForestHirak Sen Roy
 
AI powered decision making in banks
AI powered decision making in banksAI powered decision making in banks
AI powered decision making in banksPankaj Baid
 
Blog-Embryonic Opportunities For Predictive Analytics In Australia
Blog-Embryonic Opportunities For Predictive Analytics In AustraliaBlog-Embryonic Opportunities For Predictive Analytics In Australia
Blog-Embryonic Opportunities For Predictive Analytics In AustraliaArup Das
 
Uses of analytics in the field of Banking
Uses of analytics in the field of BankingUses of analytics in the field of Banking
Uses of analytics in the field of BankingNiveditasri N
 
Barclays - Case Study Competition | ISB | National Finalist
Barclays - Case Study Competition | ISB | National FinalistBarclays - Case Study Competition | ISB | National Finalist
Barclays - Case Study Competition | ISB | National FinalistNaveen Kumar
 
IRJET- Prediction of Credit Risks in Lending Bank Loans
IRJET- Prediction of Credit Risks in Lending Bank LoansIRJET- Prediction of Credit Risks in Lending Bank Loans
IRJET- Prediction of Credit Risks in Lending Bank LoansIRJET Journal
 

Similar to PhD Defense - Example-Dependent Cost-Sensitive Classification (20)

Credit iconip
Credit iconipCredit iconip
Credit iconip
 
How a Predictive Analytics-based Framework Helps Reduce Bad Debts in Utilities
How a Predictive Analytics-based Framework Helps Reduce Bad Debts in Utilities How a Predictive Analytics-based Framework Helps Reduce Bad Debts in Utilities
How a Predictive Analytics-based Framework Helps Reduce Bad Debts in Utilities
 
Retail Banking 6 Steps to Improving the Collections Experience.pptx
Retail Banking 6 Steps to Improving the Collections Experience.pptxRetail Banking 6 Steps to Improving the Collections Experience.pptx
Retail Banking 6 Steps to Improving the Collections Experience.pptx
 
Retail Banking 6 Steps to Improving the Collections Experience.pdf
Retail Banking 6 Steps to Improving the Collections Experience.pdfRetail Banking 6 Steps to Improving the Collections Experience.pdf
Retail Banking 6 Steps to Improving the Collections Experience.pdf
 
Retail Banking 6 Steps to Improving the Collections Experience.pdf
Retail Banking 6 Steps to Improving the Collections Experience.pdfRetail Banking 6 Steps to Improving the Collections Experience.pdf
Retail Banking 6 Steps to Improving the Collections Experience.pdf
 
Consumer credit-risk3440
Consumer credit-risk3440Consumer credit-risk3440
Consumer credit-risk3440
 
Analytics in banking services
Analytics in banking servicesAnalytics in banking services
Analytics in banking services
 
Project crm submission sonali
Project crm submission sonaliProject crm submission sonali
Project crm submission sonali
 
Transaction_Scoring - WVK MasterCard
Transaction_Scoring - WVK MasterCardTransaction_Scoring - WVK MasterCard
Transaction_Scoring - WVK MasterCard
 
Credit iconip
Credit iconipCredit iconip
Credit iconip
 
Credit iconip
Credit iconipCredit iconip
Credit iconip
 
Consumer Credit Scoring Using Logistic Regression and Random Forest
Consumer Credit Scoring Using Logistic Regression and Random ForestConsumer Credit Scoring Using Logistic Regression and Random Forest
Consumer Credit Scoring Using Logistic Regression and Random Forest
 
AI powered decision making in banks
AI powered decision making in banksAI powered decision making in banks
AI powered decision making in banks
 
K-MODEL PPT.pptx
K-MODEL PPT.pptxK-MODEL PPT.pptx
K-MODEL PPT.pptx
 
Credit Scoring Capstone Project- Pallavi Mohanty.pptx
Credit Scoring Capstone Project- Pallavi Mohanty.pptxCredit Scoring Capstone Project- Pallavi Mohanty.pptx
Credit Scoring Capstone Project- Pallavi Mohanty.pptx
 
Blog-Embryonic Opportunities For Predictive Analytics In Australia
Blog-Embryonic Opportunities For Predictive Analytics In AustraliaBlog-Embryonic Opportunities For Predictive Analytics In Australia
Blog-Embryonic Opportunities For Predictive Analytics In Australia
 
Uses of analytics in the field of Banking
Uses of analytics in the field of BankingUses of analytics in the field of Banking
Uses of analytics in the field of Banking
 
Credit Card Business Plan
Credit Card Business PlanCredit Card Business Plan
Credit Card Business Plan
 
Barclays - Case Study Competition | ISB | National Finalist
Barclays - Case Study Competition | ISB | National FinalistBarclays - Case Study Competition | ISB | National Finalist
Barclays - Case Study Competition | ISB | National Finalist
 
IRJET- Prediction of Credit Risks in Lending Bank Loans
IRJET- Prediction of Credit Risks in Lending Bank LoansIRJET- Prediction of Credit Risks in Lending Bank Loans
IRJET- Prediction of Credit Risks in Lending Bank Loans
 

More from Alejandro Correa Bahnsen, PhD

More from Alejandro Correa Bahnsen, PhD (6)

black hat deephish
black hat deephishblack hat deephish
black hat deephish
 
DeepPhish: Simulating malicious AI
DeepPhish: Simulating malicious AIDeepPhish: Simulating malicious AI
DeepPhish: Simulating malicious AI
 
AI vs. AI: Can Predictive Models Stop the Tide of Hacker AI?
AI vs. AI: Can Predictive Models Stop the Tide of Hacker AI?AI vs. AI: Can Predictive Models Stop the Tide of Hacker AI?
AI vs. AI: Can Predictive Models Stop the Tide of Hacker AI?
 
How I Learned to Stop Worrying and Love Building Data Products
How I Learned to Stop Worrying and Love Building Data ProductsHow I Learned to Stop Worrying and Love Building Data Products
How I Learned to Stop Worrying and Love Building Data Products
 
Fraud Detection by Stacking Cost-Sensitive Decision Trees
Fraud Detection by Stacking Cost-Sensitive Decision TreesFraud Detection by Stacking Cost-Sensitive Decision Trees
Fraud Detection by Stacking Cost-Sensitive Decision Trees
 
2012 predictive clusters
2012 predictive clusters2012 predictive clusters
2012 predictive clusters
 

Recently uploaded

RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxronsairoathenadugay
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...gajnagarg
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...HyderabadDolls
 
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowVadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowgargpaaro
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
Vastral Call Girls Book Now 7737669865 Top Class Escort Service Available
Vastral Call Girls Book Now 7737669865 Top Class Escort Service AvailableVastral Call Girls Book Now 7737669865 Top Class Escort Service Available
Vastral Call Girls Book Now 7737669865 Top Class Escort Service Availablegargpaaro
 
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
Introduction to Statistics Presentation.pptx
Introduction to Statistics Presentation.pptxIntroduction to Statistics Presentation.pptx
Introduction to Statistics Presentation.pptxAniqa Zai
 
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...ThinkInnovation
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...HyderabadDolls
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubaikojalkojal131
 
Statistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbersStatistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numberssuginr1
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...HyderabadDolls
 
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...kumargunjan9515
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabiaahmedjiabur940
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraGovindSinghDasila
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...Elaine Werffeli
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 

Recently uploaded (20)

RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
 
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowVadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
 
Vastral Call Girls Book Now 7737669865 Top Class Escort Service Available
Vastral Call Girls Book Now 7737669865 Top Class Escort Service AvailableVastral Call Girls Book Now 7737669865 Top Class Escort Service Available
Vastral Call Girls Book Now 7737669865 Top Class Escort Service Available
 
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
 
Introduction to Statistics Presentation.pptx
Introduction to Statistics Presentation.pptxIntroduction to Statistics Presentation.pptx
Introduction to Statistics Presentation.pptx
 
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 
Statistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbersStatistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbers
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - Almora
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 

PhD Defense - Example-Dependent Cost-Sensitive Classification

  • 1. EXAMPLE-DEPENDENT COST-SENSITIVE CLASSIFICATION applications in financial risk modeling and marketing analytics September 15, 2015 Alejandro Correa Bahnsen with Djamila Aouada, SnT Björn Ottersten, SnT
  • 2. Motivation 2 • Classification: predicting the class of a set of examples given their features. • Standard classification methods aim at minimizing the errors • Such a traditional framework assumes that all misclassification errors carry the same cost • This is not the case in many real-world applications: Credit card fraud detection, churn modeling, credit scoring, direct marketing. x1 x2
  • 3. Motivation 3 • Credit card fraud detection, failing to detect a fraudulent transaction may have an economical impact from a few to thousands of Euros, depending on the particular transaction and card holder. • Credit scoring, accepting loans from bad customers does not have the same economical loss, since customers have different credit lines, therefore, different profit. • Churn modeling, misidentifying a profitable or unprofitable churner has a significant different economic result. • Direct marketing, wrongly predicting that a customer will not accept an offer when in fact he will, may have different financial impact, as not all customers generate the same profit.
  • 4. • Motivation • Cost-sensitive classification Background • Real-world cost-sensitive applications Credit card fraud detection, churn modeling, credit scoring, direct marketing • Proposed cost-sensitive algorithms Bayes minimum risk, cost-sensitive logistic regression, cost-sensitive decision trees, ensembles of cost-sensitive decision trees • Experiments Experimental setup, results • Conclusions Contributions, future work Agenda 4
  • 5. predict the class of set of examples given their features 𝑓: 𝑆 → 0,1 Where each element of 𝑆 is composed by 𝑋𝑖 = 𝑥𝑖 1 , 𝑥𝑖 2 , … , 𝑥𝑖 𝑘 It is usually evaluated using a traditional misclassification measures such as Accuracy, F1Score, AUC, among others. However, these measures assume that different misclassification errors carry the same cost Background - Binary classification 5
  • 6. We define a cost measure based on the cost matrix [Elkan 2001] From which we calculate the 𝑪𝒐𝒔𝒕 of applying a classifier to a given set 𝐶𝑜𝑠𝑡 𝑓 𝑆 = 𝑖=1 𝑁 𝑦𝑖 𝑐𝑖 𝐶 𝑇𝑃 𝑖 + 1 − 𝑐𝑖 𝐶 𝐹𝑁 𝑖 + 1 − 𝑦𝑖 𝑐𝑖 𝐶 𝐹𝑃 𝑖 + 1 − 𝑐𝑖 𝐶 𝑇𝑁 𝑖 Background - Cost-sensitive evaluation 6 Actual Positive 𝒚𝒊 = 𝟏 Actual Negative 𝒚𝒊 = 𝟎 Predicted Positive 𝒄𝒊 = 𝟏 𝐶 𝑇𝑃 𝑖 𝐶 𝐹𝑃 𝑖 Predicted Negative 𝒄𝒊 = 𝟎 𝐶 𝐹𝑁 𝑖 𝐶 𝑇𝑁 𝑖
  • 7. However, the total cost may not be easy to interpret. Therefore, we propose a 𝑺𝒂𝒗𝒊𝒏𝒈𝒔 measure as the cost vs. the cost of using no algorithm at all 𝑆𝑎𝑣𝑖𝑛𝑔𝑠 𝑓 𝑆 = 𝐶𝑜𝑠𝑡𝑙 𝑓 𝑆 − 𝐶𝑜𝑠𝑡 𝑓 𝑆 𝐶𝑜𝑠𝑡𝑙 𝑓 𝑆 Where 𝑪𝒐𝒔𝒕𝒍 𝒇 𝑺 is the cost of predicting the costless class 𝐶𝑜𝑠𝑡𝑙 𝑓 𝑆 = min 𝐶𝑜𝑠𝑡 𝑓0 𝑆 , 𝐶𝑜𝑠𝑡 𝑓1 𝑆 Background - Cost-sensitive evaluation 7
  • 8. Research in example-dependent cost-sensitive classification has been narrow, mostly because of the lack of publicly available datasets [Aodha and Brostow 2013]. Standard approaches consist in re-weighting the training examples based on their costs: • Cost-proportionate rejection sampling [Zadrozny et al. 2003] • Cost-proportionate oversampling [Elkan 2001] Background - State-of-the-art methods 8
  • 9. • Motivation • Cost-sensitive classification Background • Real-world cost-sensitive applications Credit card fraud detection, churn modeling, credit scoring, direct marketing • Proposed cost-sensitive algorithms Bayes minimum risk, cost-sensitive logistic regression, cost-sensitive decision trees, ensembles of cost-sensitive decision trees • Experiments Experimental setup, results • Conclusions Contributions, future work Agenda 9
  • 10. Estimate the probability of a transaction being fraud based on analyzing customer patterns and recent fraudulent behavior Issues when constructing a fraud detection system [Bolton et al., 2002]: • Skewness of the data • Cost-sensitivity • Short time response of the system • Dimensionality of the search space • Feature preprocessing Credit card fraud detection 10
  • 11. Credit card fraud detection is a cost-sensitive problem. As the cost due to a false positive is different than the cost of a false negative. • False positives: When predicting a transaction as fraudulent, when in fact it is not a fraud, there is an administrative cost that is incurred by the financial institution. • False negatives: Failing to detect a fraud, the amount of that transaction is lost. Moreover, it is not enough to assume a constant cost difference between false positives and false negatives, as the amount of the transactions varies quite significantly. Credit card fraud detection 11
  • 12. Cost matrix A. Correa Bahnsen, A. Stojanovic, D. Aouada, and B. Ottersten, “Cost Sensitive Credit Card Fraud Detection Using Bayes Minimum Risk,” in 2013 12th International Conference on Machine Learning and Applications. Miami, USA: IEEE, Dec. 2013, pp. 333–338. Credit card fraud detection 12 Actual Positive 𝒚𝒊 = 𝟏 Actual Negative 𝒚𝒊 = 𝟎 Predicted Positive 𝒄𝒊 = 𝟏 𝐶 𝑇𝑃 𝑖 = 𝐶 𝑎 𝐶 𝐹𝑃 𝑖 = 𝐶 𝑎 Predicted Negative 𝒄𝒊 = 𝟎 𝐶 𝐹𝑁 𝑖 = 𝐴𝑚𝑡𝑖 𝐶 𝑇𝑁 𝑖 = 0
  • 13. Raw features Credit card fraud detection 13 Attribute name Description Transaction ID Transaction identification number Time Date and time of the transaction Account number Identification number of the customer Card number Identification of the credit card Transaction type ie. Internet, ATM, POS, ... Entry mode ie. Chip and pin, magnetic stripe, ... Amount Amount of the transaction in Euros Merchant code Identification of the merchant type Merchant group Merchant group identification Country Country of trx Country 2 Country of residence Type of card ie. Visa debit, Mastercard, American Express... Gender Gender of the card holder Age Card holder age Bank Issuer bank of the card
  • 14. Transaction aggregation strategy [Whitrow, 2008] Credit card fraud detection 14 Raw Features TrxId Time Type Country Amt 1 1/1 18:20 POS Lux 250 2 1/1 20:35 POS Lux 400 3 1/1 22:30 ATM Lux 250 4 2/1 00:50 POS Ger 50 5 2/1 19:18 POS Ger 100 6 2/1 23:45 POS Ger 150 7 3/1 06:00 POS Lux 10 Aggregated Features No Trx last 24h Amt last 24h No Trx last 24h same type and country Amt last 24h same type and country 0 0 0 0 1 250 1 250 2 650 0 0 3 900 0 0 3 700 1 50 2 150 2 150 3 400 0 0
  • 15. Proposed periodic features When is a customer expected to make a new transaction? Considering a von Mises distribution with a period of 24 hours such that 𝑃(𝑡𝑖𝑚𝑒) ~ 𝑣𝑜𝑛𝑚𝑖𝑠𝑒𝑠 𝜇, 𝜎 = 𝑒 𝜎𝑐𝑜𝑠(𝑡𝑖𝑚𝑒−𝜇) 2𝜋𝐼0 𝜎 where 𝝁 is the mean, 𝝈 is the standard deviation, and 𝑰 𝟎 is the Bessel function Credit card fraud detection 15
  • 16. Proposed periodic features A. Correa Bahnsen, A. Stojanovic, D. Aouada, and B. Ottersten, “Feature Engineering Strategies for Credit Card Fraud Detection” submitted to Expert Systems with Applications. Credit card fraud detection 16
  • 17. Classify which potential customers are likely to default a contracted financial obligation based on the customer’s past financial experience. It is a cost-sensitive problem as the cost associated with approving a bad customer, i.e., false negative, is quite different from the cost associated with declining a good customer, i.e., false positive. Furthermore, the costs are not constant among customers. This is because loans have different credit line amounts, terms, and even interest rates. Credit scoring 17
  • 18. Cost matrix A. Correa Bahnsen, D. Aouada, and B. Ottersten, “Example-Dependent Cost-Sensitive Logistic Regression for Credit Scoring,” in 2014 13th International Conference on Machine Learning and Applications. Detroit, USA: IEEE, 2014, pp. 263–269. Credit scoring 18 Actual Positive 𝒚𝒊 = 𝟏 Actual Negative 𝒚𝒊 = 𝟎 Predicted Positive 𝒄𝒊 = 𝟏 𝐶 𝑇𝑃 𝑖 = 0 𝐶 𝐹𝑃 𝑖 = 𝑟𝑖 + 𝐶 𝐹𝑃 𝑎 Predicted Negative 𝒄𝒊 = 𝟎 𝐶 𝐹𝑁𝑖 = 𝐶𝑙𝑖 ∗ 𝐿 𝑔𝑑 𝐶 𝑇𝑁 𝑖 = 0
  • 19. Predict the probability of a customer defecting using historical, behavioral and socioeconomical information. This tool is of great benefit to subscription based companies allowing them to maximize the results of retention campaigns. Churn modeling 19
  • 20. Churn management campaign [Verbraken, 2013] Churn modeling 20 Inflow New Customers Customer Base Active Customers Predicted Churners Predicted Non-Churners TP: Actual Churners FP: Actual Non-Churners FN: Actual Churners TN: Actual Non-Churners Outflow Effective Churners Churn Model Prediction 1 1 𝟏 − 𝜸𝜸 1
  • 21. Proposed financial evaluation of a churn campaign A. Correa Bahnsen, A. Stojanovic, D. Aouada, and B. Ottersten, “A novel cost-sensitive framework for customer churn predictive modeling,” Decision Analytics, vol. 2:5, 2015. Churn modeling 21 Inflow New Customers Customer Base Active Customers Predicted Churners Predicted Non-Churners TP: Actual Churners FP: Actual Non-Churners FN: Actual Churners TN: Actual Non-Churners Outflow Effective Churners Churn Model Prediction 𝟎 𝑪𝑳𝑽 𝑪𝑳𝑽 + 𝑪 𝒂𝑪 𝒐 + 𝑪 𝒂 𝑪 𝒐 + 𝑪 𝒂
  • 22. Cost matrix A. Correa Bahnsen, A. Stojanovic, D. Aouada, and B. Ottersten, “A novel cost-sensitive framework for customer churn predictive modeling,” Decision Analytics, vol. 2:5, 2015. Churn modeling 22 Actual Positive 𝒚𝒊 = 𝟏 Actual Negative 𝒚𝒊 = 𝟎 Predicted Positive 𝒄𝒊 = 𝟏 𝐶 𝑇𝑃 𝑖 = 𝛾𝑖 𝐶 𝑜 𝑖 + 1 − 𝛾𝑖 𝐶𝐿𝑉𝑖 + 𝐶 𝑎 𝐶 𝐹𝑃 𝑖 = 𝐶 𝑜 𝑖 + 𝐶 𝑎 Predicted Negative 𝒄𝒊 = 𝟎 𝐶 𝐹𝑁𝑖 = 𝐶𝐿𝑉𝑖 𝐶 𝑇𝑁 𝑖 = 0
  • 23. Classify those customers who are more likely to have a certain response to a marketing campaign. This problem is example-dependent cost sensitive, as the false positives have the cost of contacting the client, and false negatives have the cost due to the loss of income by failing to making the an offer to the right customer. Direct marketing 23
  • 24. Cost matrix A. Correa Bahnsen, A. Stojanovic, D. Aouada, and B. Ottersten, “Improving Credit Card Fraud Detection with Calibrated Probabilities,” in Proceedings of the fourteenth SIAM International Conference on Data Mining, Philadelphia, USA, 2014, pp. 677 – 685. Direct marketing 24 Actual Positive 𝒚𝒊 = 𝟏 Actual Negative 𝒚𝒊 = 𝟎 Predicted Positive 𝒄𝒊 = 𝟏 𝐶 𝑇𝑃 𝑖 = 𝐶 𝑎 𝐶 𝐹𝑃 𝑖 = 𝐶 𝑎 Predicted Negative 𝒄𝒊 = 𝟎 𝐶 𝐹𝑁 𝑖 = 𝐼𝑛𝑡𝑖 𝐶 𝑇𝑁 𝑖 = 0
  • 25. • Motivation • Cost-sensitive classification Background • Real-world cost-sensitive applications Credit card fraud detection, churn modeling, credit scoring, direct marketing • Proposed cost-sensitive algorithms Bayes minimum risk, cost-sensitive logistic regression, cost-sensitive decision trees, ensembles of cost-sensitive decision trees • Experiments Experimental setup, results • Conclusions Contributions, future work Agenda 25
  • 26. • Bayes minimum risk (BMR) A. Correa Bahnsen, A. Stojanovic, D. Aouada, and B. Ottersten, “Cost Sensitive Credit Card Fraud Detection Using Bayes Minimum Risk,” in 2013 12th International Conference on Machine Learning and Applications. Miami, USA: IEEE, Dec. 2013, pp. 333–338. A. Correa Bahnsen, Aouada, and B. Ottersten, “Improving Credit Card Fraud Detection with Calibrated Probabilities,” in Proceedings of the fourteenth SIAM International Conference on Data Mining, Philadelphia, USA, 2014, pp. 677 – 685. • Cost-sensitive logistic regression (CSLR) A. Correa Bahnsen, D. Aouada, and B. Ottersten, “Example-Dependent Cost-Sensitive Logistic Regression for Credit Scoring,” in 2014 13th International Conference on Machine Learning and Applications. Detroit, USA: IEEE, 2014, pp. 263–269. • Cost-sensitive decision trees (CSDT) A. Correa Bahnsen, D. Aouada, and B. Ottersten, “Example-Dependent Cost-Sensitive Decision Trees,” Expert Systems with Applications, vol. 42:19, 2015. • Ensembles of cost-sensitive decision trees (ECSDT) A. Correa Bahnsen, D. Aouada, and B. Ottersten, “Ensemble of Example-Dependent Cost-Sensitive Decision Trees,” IEEE Transactions on Knowledge and Data Engineering, vol. under review, 2015. Proposed cost-sensitive algorithms 26
  • 27. Decision model based on quantifying tradeoffs between various decisions using probabilities and the costs that accompany such decisions Risk of classification 𝑅 𝑐𝑖 = 0|𝑥𝑖 = 𝐶 𝑇𝑁 𝑖 1 − 𝑝𝑖 + 𝐶 𝐹𝑁 𝑖 ∙ 𝑝𝑖 𝑅 𝑐𝑖 = 1|𝑥𝑖 = 𝐶 𝐹𝑃 𝑖 1 − 𝑝𝑖 + 𝐶 𝑇𝑃 𝑖 ∙ 𝑝𝑖 Using the different risks the prediction is made based on the following condition: 𝑐𝑖 = 0 𝑅 𝑐𝑖 = 0|𝑥𝑖 ≤ 𝑅 𝑐𝑖 = 1|𝑥𝑖 1 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 Bayes Minimum Risk 27
  • 28. Cost-Sensitive Logistic Regression 28 • Logistic Regression Model 𝑝𝑖 = 𝑃 𝑦𝑖 = 0|𝑥𝑖 = ℎ 𝜃 𝑥𝑖 = 𝑔 𝑗=1 𝑘 𝜃𝑗 𝑥𝑖 𝑗 • Cost Function 𝐽𝑖 𝜃 = −𝑦𝑖 log ℎ 𝜃 𝑥𝑖 − 1 − 𝑦𝑖 log 1 − ℎ 𝜃 𝑥𝑖 • Cost Analysis 𝐽𝑖 𝜃 ≈ 0 𝑖𝑓 𝑦𝑖 ≈ ℎ 𝜃 𝑥𝑖 𝑖𝑛𝑓 𝑖𝑓 𝑦𝑖 ≈ 1 − ℎ 𝜃 𝑥𝑖 𝐶 𝑇𝑃 𝑖 = 𝐶 𝑇𝑁 𝑖 ≈ 0 𝐶 𝐹𝑃 𝑖 = 𝐶 𝐹𝑁 𝑖 ≈ ∞
  • 29. Cost-Sensitive Logistic Regression 29 • Actual Costs 𝐽 𝑐 𝜃 = 𝐶 𝑇𝑃 𝑖 𝑖𝑓 𝑦𝑖 = 1 𝑎𝑛𝑑 ℎ 𝜃 𝑥𝑖 ≈ 1 𝐶 𝑇𝑁 𝑖 𝑖𝑓 𝑦𝑖 = 0 𝑎𝑛𝑑 ℎ 𝜃 𝑥𝑖 ≈ 0 𝐶 𝐹𝑃 𝑖 𝑖𝑓 𝑦𝑖 = 0 𝑎𝑛𝑑 ℎ 𝜃 𝑥𝑖 ≈ 1 𝐶 𝐹𝑁 𝑖 𝑖𝑓 𝑦𝑖 = 1 𝑎𝑛𝑑 ℎ 𝜃 𝑥𝑖 ≈ 0 • Proposed Cost-Sensitive Function 𝐽 𝑐 𝜃 = 1 𝑁 𝑖=1 𝑁 𝑦𝑖 ℎ 𝜃 𝑥𝑖 𝐶 𝑇𝑃 𝑖 + 1 − ℎ 𝜃 𝑥𝑖 𝐶 𝐹𝑁 𝑖 + 1 − 𝑦𝑖 ℎ 𝜃 𝑥𝑖 𝐶 𝐹𝑃 𝑖 + 1 − ℎ 𝜃 𝑥𝑖 𝐶 𝑇𝑁 𝑖
  • 30. • A decision tree is a classification model that iteratively creates binary decision rules 𝑥 𝑗, 𝑙 𝑚 𝑗 that maximize certain criteria (gain, entropy, …). Where 𝑥 𝑗, 𝑙 𝑚 𝑗 refers to making a rule using feature j on value m • Maximize the accuracy is different than maximizing the cost. • To solve this, some studies had been proposed method that aim to introduce the cost-sensitivity into the algorithms [Lomax 2013]. However, research have been focused on class-dependent methods • We proposed: • Example-dependent cost based impurity measure • Example-dependent cost based pruning criteria Cost-Sensitive Decision trees 30
  • 31. Cost-Sensitive Decision trees 31 Proposed Cost based impurity measure 𝑆 𝑙 = 𝑥|𝑥𝑖 ∈ 𝑆 ∧ 𝑥𝑖 𝑗 ≤ 𝑙 𝑚 𝑗 𝑆 𝑟 = 𝑥|𝑥𝑖 ∈ 𝑆 ∧ 𝑥𝑖 𝑗 > 𝑙 𝑚 𝑗 • The impurity of each leaf is calculated using: 𝐼𝑐 𝑆 = min 𝐶𝑜𝑠𝑡 𝑓0 𝑆 , 𝐶𝑜𝑠𝑡 𝑓1 𝑆 𝑓 𝑆 = 0 𝑖𝑓 𝐶𝑜𝑠𝑡 𝑓0 𝑆 ≤ 𝐶𝑜𝑠𝑡 𝑓1 𝑆 1 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 • Afterwards the gain of applying a given rule to the set 𝑆 is: 𝐺𝑎𝑖𝑛 𝑐 𝑥 𝑗, 𝑙 𝑚 𝑗 = 𝐼𝑐 𝜋1 − 𝐼𝑐 𝜋1 𝑙 + 𝐼𝑐 𝜋1 𝑟 S S S 𝑥 𝑗, 𝑙 𝑚 𝑗
  • 32. Cost-Sensitive Decision trees 32 Decision trees construction • The rule that maximizes the gain is selected 𝑏𝑒𝑠𝑡 𝑥, 𝑏𝑒𝑠𝑡𝑙 = 𝑎𝑟𝑔 max 𝑗,𝑚 𝐺𝑎𝑖𝑛 𝑥 𝑗, 𝑙 𝑚 𝑗 S S S S S S S S S S S • The process is repeated until a stopping criteria is met:
  • 33. Cost-Sensitive Decision trees 33 Proposed cost-sensitive pruning criteria • Calculation of the Tree savings and pruned Tree savings S S S S S S S S S S S 𝑃𝐶𝑐 = 𝐶𝑜𝑠𝑡 𝑓 𝑆, 𝑇𝑟𝑒𝑒 − 𝐶𝑜𝑠𝑡 𝑓 𝑆, 𝐸𝐵 𝑇𝑟𝑒𝑒, 𝑏𝑟𝑎𝑛𝑐ℎ 𝑇𝑟𝑒𝑒 − 𝐸𝐵 𝑇𝑟𝑒𝑒, 𝑏𝑟𝑎𝑛𝑐ℎ • After calculating the pruning criteria for all possible trees. The maximum improvement is selected and the Tree is pruned. • Later the process is repeated until there is no further improvement. S S S S S S S S S S S S S S
  • 34. Typical ensemble is made by combining T different base classifiers. Each base classifiers is trained by applying algorithm M in a random subset Ensembles of Cost-Sensitive Decision trees 34 𝑀𝑗 ← 𝑀 𝑆𝑗 ∀𝑗 ∈ 1, … , 𝑇
  • 35. The core principle in ensemble learning, is to induce random perturbations into the learning procedure in order to produce several different base classifiers from a single training set, then combining the base classifiers in order to make the final prediction. Ensembles of Cost-Sensitive Decision trees 35
  • 36. Ensembles of Cost-Sensitive Decision trees 36 1 2 3 4 5 6 7 8 8 6 2 5 2 1 3 6 7 1 2 3 8 1 5 8 1 4 4 2 1 9 4 6 1 1 5 8 1 4 4 2 1 1 5 8 1 4 4 2 1 1 5 8 1 4 4 2 1 Bagging Pasting Random forest Random patches Training set
  • 37. After the base classifiers are constructed they are typically combined using one of the following methods: • Majority voting 𝐻 𝑆 = 𝑓𝑚𝑣 𝑆, 𝑀 = 𝑎𝑟𝑔 max 𝑐∈ 0,1 𝑗=1 𝑇 1 𝑐 𝑀𝑗 𝑆 • Proposed cost-sensitive weighted voting 𝐻 𝑆 = 𝑓𝑤𝑣 𝑆, 𝑀, 𝛼 = 𝑎𝑟𝑔 max 𝑐∈ 0,1 𝑗=1 𝑇 𝛼𝑗1 𝑐 𝑀𝑗 𝑆 𝛼𝑗 = 1−𝜀 𝑀 𝑗 𝑆 𝑗 𝑜𝑜𝑏 𝑗1=1 𝑇 1−𝜀 𝑀 𝑗1 𝑆 𝑗1 𝑜𝑜𝑏 𝛼𝑗 = 𝑆𝑎𝑣𝑖𝑛𝑔𝑠 𝑀 𝑗 𝑆 𝑗 𝑜𝑜𝑏 𝑗1=1 𝑇 𝑆𝑎𝑣𝑖𝑛𝑔𝑠 𝑀 𝑗1 𝑆 𝑗1 𝑜𝑜𝑏 Ensembles of Cost-Sensitive Decision trees 37
  • 38. • Proposed cost-sensitive stacking 𝐻 𝑆 = 𝑓𝑠 𝑆, 𝑀, 𝛽 = 1 1 + 𝑒 − 𝑗=1 𝑇 𝛽 𝑗 𝑀 𝑗 𝑆 Using the cost-sensitive logistic regression [Correa et. al, 2014] model: 𝐽 𝑆, 𝑀, 𝛽 = 𝑖=1 𝑁 𝑦𝑖 𝑓𝑠 𝑆, 𝑀, 𝛽 𝐶 𝑇𝑃 𝑖 − 𝐶 𝐹𝑁𝑖 + 𝐶 𝐹𝑁 𝑖 + 1 − 𝑦𝑖 𝑓𝑠 𝑆, 𝑀, 𝛽 𝐶 𝐹𝑃 𝑖 − 𝐶 𝑇𝑁 𝑖 + 𝐶 𝑇𝑁 𝑖 Then the weights are estimated using 𝛽 = 𝑎𝑟𝑔 min 𝛽 𝐽 𝑆, 𝑀, 𝛽 Ensembles of Cost-Sensitive Decision trees 38
  • 39. • Motivation • Cost-sensitive classification Background • Real-world cost-sensitive applications Credit card fraud detection, churn modeling, credit scoring, direct marketing • Proposed cost-sensitive algorithms Bayes minimum risk, cost-sensitive logistic regression, cost-sensitive decision trees, ensembles of cost-sensitive decision trees • Experiments Experimental setup, results • Conclusions Contributions, future work Agenda 39
  • 40. Experimental setup - Datasets 40 Database # Examples % Positives Cost (Euros) Fraud 1,638,772 0.21% 860,448 Churn 9,410 4.83% 580,884 Kaggle Credit 112,915 6.74% 8,740,181 PAKDD09 Credit 38,969 19.88% 3,117,960 Direct Marketing 37,931 12.62% 59,507
  • 41. • Cost-insensitive (CI): • Decision trees (DT) • Logistic regression (LR) • Random forest (RF) • Under-sampling (u) • Cost-proportionate sampling (CPS): • Cost-proportionate rejection-sampling (r) • Cost-proportionate over-sampling (o) • Bayes minimum risk (BMR) • Cost-sensitive training (CST): • Cost-sensitive logistic regression (CSLR) • Cost-sensitive decision trees (CSDT) Experimental setup - Methods 41
  • 42. • Ensemble cost-sensitive decision trees (ECSDT): Random inducers: • Bagging (CSB) • Pasting (CSP) • Random forest (CSRF) • Random patches (CSRP) Combination: • Majority voting (mv) • Cost-sensitive weighted voting (wv) • Cost-sensitive staking (s) Experimental setup - Methods 42
  • 43. • Each experiment was carried out 50 times • For the parameters of the algorithms a grid search was made • Results are measured by savings and F1Score • Then the Friedman ranking is calculated for each method Experimental setup 43
  • 44. Results 44 Percentage of the highest savings Database Algorithm Savings Savings (Euros) Fraud CSRP-wv-t 0.73 628,127 Churn CSRP-s-t 0.17 98,750 Credit1 CSRP-mv-t 0.52 4,544,894 Credit2 LR-t-BMR 0.31 966,568 Marketing LR-t-BMR 0.51 30,349 % Pos. 0.21 4.83 6.74 19.88 12.62
  • 45. Results 45 Results of the Friedman rank of the savings (1=best, 28=worst) Family Algorithm Rank ECSDT CSRP-wv-t 2.6 ECSDT CSRP-s-t 3.4 ECSDT CSRP-mv-t 4 ECSDT CSB-wv-t 5.6 ECSDT CSP-wv-t 7.4 ECSDT CSB-mv-t 8.2 ECSDT CSRF-wv-t 9.4 BMR RF-t-BMR 9.4 ECSDT CSP-s-t 9.6 ECSDT CSP-mv-t 10.2 ECSDT CSB-s-t 10.2 BMR LR-t-BMR 11.2 CPS RF-r 11.6 CST CSDT-t 12.6 Family Algorithm Rank CST CSLR-t 14.4 ECSDT CSRF-mv-t 15.2 ECSDT CSRF-s-t 16 CI RF-u 17.2 CPS LR-r 19 BMR DT-t-BMR 19 CPS LR-o 21 CPS DT-r 22.6 CI LR-u 22.8 CPS RF-o 22.8 CI DT-u 24.4 CPS DT-o 25 CI DT-t 26 CI RF-t 26.2
  • 46. Results 46 Results of the Friedman rank of the savings organized by family
  • 47. Results within the ECSDT family 47 By combination methodBy random inducer
  • 48. Results 48 Comparison of the Friedman ranking of the savings and F1Score sorted by F1Score ranking
  • 49. • Motivation • Cost-sensitive classification Background • Real-world cost-sensitive applications Credit card fraud detection, churn modeling, credit scoring, direct marketing • Proposed cost-sensitive algorithms Bayes minimum risk, cost-sensitive logistic regression, cost-sensitive decision trees, ensembles of cost-sensitive decision trees • Experiments Experimental setup, results • Conclusions Contributions, future work Agenda 49
  • 50. • New framework of example dependent cost-sensitive classification • Using five databases, from four real-world applications: credit card fraud detection, churn modeling, credit scoring and direct marketing, we show that the proposed algorithms significantly outperforms the state-of- the-art cost-insensitive and example-dependent cost-sensitive algorithms • Highlight the importance of using the real example-dependent financial costs associated with the real-world applications Conclusions 50
  • 51. • Multi-class example-dependent cost-sensitive classification • Cost-sensitive calibration • Staking cost-sensitive decision trees • Example-dependent cost-sensitive boosting • Online example-dependent cost-sensitive classification Future research directions 51
  • 52. Contributions - Papers Date Name Conference / Journal Status July 2013 Cost Sensitive Credit Card Fraud Detection using Bayes Minimum Risk IEEE International Conference on Machine Learning and Applications Published October 2013 Improving Credit Card Fraud Detection with Calibrated Probabilities SIAM International Conference on Data Mining Published June 2014 Credit Scoring using Cost-Sensitive Logistic Regression IEEE International Conference on Machine Learning and Applications Published October 2014 Example-Dependent Cost-Sensitive Decision Trees Expert Systems with Applications Published January 2015 A novel cost-sensitive framework for customer churn predictive modeling Decision Analytics Published March 2015 Ensemble of Example-Dependent Cost- Sensitive Decision Trees IEEE Transactions on Knowledge and Data Engineering Under review March 2015 Feature Engineering Strategies for Credit Card Fraud Detection Expert Systems with Applications Under review June 2015 Detecting Credit Card Fraud using Periodic Features IEEE International Conference on Machine Learning and Applications In Press 52
  • 53. Contributions - Costcla costcla is a Python module for cost- sensitive classification built on top of Scikit-Learn, SciPy and distributed under the 3-Clause BSD license. In particular, it provides: • A set of example-dependent cost- sensitive algorithms • Different real-world example- dependent cost-sensitive datasets. Installation pip install costcla Documentation: https://pythonhosted.org/costcla/ 53
  • 55. Contact information Alejandro Correa Bahnsen University of Luxembourg albahnsen.com al.bahnsen@gmail.com http://www.linkedin.com/in/albahnsen https://github.com/albahnsen/CostSensitiveClassification