More Related Content Similar to 1505 shi using our laptop Similar to 1505 shi using our laptop (20) More from Rising Media, Inc. More from Rising Media, Inc. (20) 1505 shi using our laptop1. Improving Credit Scoring With
Hierarchical Bayesian Modeling
Predictive Analytics World
New York 2017
Wen Shi, Data Scientist
Dongyang Fu, Data Scientist
John Hughes, Supervisor
— Drive Decision Making Using the
Parameter Space
2. © Concord Advice LLC 2
Effective use of data is considered a key differentiator
Credit Scoring Model
Who is likely to default ?
Who is likely to default due to what reason ?
3. © Concord Advice LLC 3
Customer Underwriting
Predictive Analytics World 2017
Who is likely to default ?
Who is likely to default due to what reason ?
Customer OriginationCustomer Acquisition
Funding
Model Output — Score
Model Parameters — Coefficients
Credit Scoring Model
4. Goals With Presentation
© Concord Advice LLC 4
Introducing Hierarchical Bayesian to Logistic Modeling
Predictive Analytics World 2017
Explore the Extremes of Multivariate Distributions
Provide Insights into Actions of Decision Making
5. Why Hierarchical & Bayesian ?
© Concord Advice LLC 5
A simple dataset to be studied
𝑦 = 𝛽0 + 𝛽1 𝑥 + 𝜀
6. Why Hierarchical & Bayesian ?
© Concord Advice LLC 6
Fit a regression line with OLS
0
1
2
3
4
5
6
0 2 4 6 8 10 12
𝑦 = 𝛽0 + 𝛽1 𝑥 + 𝜀
𝛽1 = 0.46
𝛽0 = 0.41
7. Why Hierarchical & Bayesian ?
© Concord Advice LLC 7
Data in/out affects parameter values
0
1
2
3
4
5
6
0 2 4 6 8 10 12
𝛽1 = 0.40
𝛽0 = 0.58
𝑦 = 𝛽0 + 𝛽1 𝑥 + 𝜀
𝛽1 = 0.46
𝛽0 = 0.41
𝛽1 = 0.42
𝛽0 = 0.47
8. Why Hierarchical & Bayesian ?
© Concord Advice LLC 8
Getting multiple parameter values by resample
𝛽1 = 0.40
𝛽0 = 0.58
𝑦 = 𝛽0 + 𝛽1 𝑥 + 𝜀
𝛽1 = 0.46
𝛽0 = 0.41
𝛽1 = 0.42
𝛽0 = 0.47
𝛽1 = 0.49
𝛽0 = 0.35
𝛽1 = 0.43
𝛽0 = 0.40
𝛽1 = 0.41
𝛽0 = 0.39
9. Why Hierarchical & Bayesian ?
© Concord Advice LLC 9
Bayesian MCMC* fully describes parameter distribution
𝑦 = 𝛽0 + 𝛽1 𝑥 + 𝜀
0
1
2
3
4
5
6
0 2 4 6 8 10 12
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
𝛽1
OLS:0.46
Highest Frequent:0.445
*Markov Chain Monte Carlo simulation
10. Why Hierarchical & Bayesian ?
© Concord Advice LLC 10
Parameters can vary based on other factors
𝑦 = 𝛽0 + 𝛽1 𝑥 + 𝜀
𝛽1 = 0.73
𝛽0 = 5
7
9
11
13
15
17
19
21
5 10 15
11. Why Hierarchical & Bayesian ?
© Concord Advice LLC 11
Bayesian using MCMC can capture the characters of beta
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
𝛽1
7
9
11
13
15
17
19
21
5 10 15
OLS:0.73
Highest Frequent: 0.68 & 0.75
12. Why Hierarchical & Bayesian ?
© Concord Advice LLC 12
We want to avoid a mixture distribution for beta
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
𝛽1
Highest Frequent: 0.68 & 0.75
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
𝛽1
Highest Frequent: 0.68 & 0.75
13. Why Hierarchical & Bayesian ?
© Concord Advice LLC 13
Model in hierarchical form can extract the structures
𝛽~𝑁(𝑢1, σ1
2
)
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
𝛽1
0.68
𝛽~𝑁(𝑢2, σ2
2
)
𝑦 = 𝛽0 + 𝛽1 𝑥 + 𝜀
(𝐴, 𝐵)
0.75
𝛽~𝑁(𝑢𝑖, σ𝑖
2
)
… …
14. Why Hierarchical & Bayesian ?
© Concord Advice LLC 14
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
𝛽1
Family1 Lower Level 𝛽1 Family2 Lower Level 𝛽1
Model in hierarchical give beta a parametrized distribution
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.68 0.75
15. Case Study Dataset
© Concord Advice LLC 15
18,000 records of consumer loans
Divided into 10 groups
Using age, ratio 1 and ratio 2 as upper level parameters
Using consumer credit risk indicators 1 -31 as lower
variables predicting probability of default
17. Model Illustration
© Concord Advice LLC 17
Intercept Age Ratio1 Ratio2 Default%
X1 -1.58 -1.34 -0.96 -1.86 17%
X2 -0.41 -0.54 0.88 1.44 -5%
X3 0.33 2.03 0.84 1.75 4%
X4 -0.25 1.38 -1.31 0.03 -3%
X5 2.76 1.60 -2.83 -3.98 57%
X6 -0.47 2.51 -0.24 -3.76 -11%
X7 -0.61 1.93 -1.98 -0.15 -15%
X8 -0.65 0.57 0.31 -0.09 -15%
X9 -0.79 3.36 -0.39 2.09 -14%
X10 -0.41 0.32 -0.36 -0.16 -5%
X11 1.85 -21.83 1.33 1.18 33%
X12 4.20 -7.86 -1.23 -2.01 54%
X13 1.40 5.56 3.81 5.37 1%
Impact of upper level model on lower level parameters
𝛽 of X1= −1.58 − 1.34 ∗age-0.96*ratio1-1.86*ratio2
𝛽 of X2= −0.41 − 0.54 ∗age+0.88*ratio1+1.44*ratio2
𝛽 of X5 = 2.76 + 1.60 ∗age-2.83*ratio1-3.98*ratio2
Etc…
19. Model Illustration
© Concord Advice LLC 19
X4 X5 X6 X7 X8 X9 X10 X11 X12 X13
X2 -0.20 0.01 -0.25 -0.01 0.20 -0.10 -0.06 0.04 0.06 0.06
X3 0.23 0.03 -0.22 0.21 -0.02 0.19 -0.05 -0.11 -0.02 0.17
X4 0.07 0.17 0.34 0.00 0.20 0.09 -0.18 -0.03 0.04
X5 0.07 0.10 0.01 0.03 -0.06 0.01 -0.13 0.16 -0.12
X6 0.17 0.10 -0.05 -0.03 -0.09 0.18 -0.12 -0.02 -0.06
X7 0.34 0.01 -0.05 0.08 0.19 0.04 -0.13 -0.02 0.05
X8 0.00 0.03 -0.03 0.08 -0.08 -0.11 -0.05 0.00 -0.04
X9 0.20 -0.06 -0.09 0.19 -0.08 0.02 -0.21 -0.05 0.10
X10 0.09 0.01 0.18 0.04 -0.11 0.02 -0.01 -0.03 -0.02
X11 -0.18 -0.13 -0.12 -0.13 -0.05 -0.21 -0.01 0.11 -0.15
X12 -0.03 0.16 -0.02 -0.02 0.00 -0.05 -0.03 0.11 0.05
X13 0.04 -0.12 -0.06 0.05 -0.04 0.10 -0.02 -0.15 0.05
Bayesian approach provide insight on relationship of parameters
20. Model Illustration
© Concord Advice LLC 20
X4 X5 X6 X7 X8 X9 X10 X11 X12 X13
X2 -0.20 0.01 -0.25 -0.01 0.20 -0.10 -0.06 0.04 0.06 0.06
X3 0.23 0.03 -0.22 0.21 -0.02 0.19 -0.05 -0.11 -0.02 0.17
X4 0.07 0.17 0.34 0.00 0.20 0.09 -0.18 -0.03 0.04
X5 0.07 0.10 0.01 0.03 -0.06 0.01 -0.13 0.16 -0.12
X6 0.17 0.10 -0.05 -0.03 -0.09 0.18 -0.12 -0.02 -0.06
X7 0.34 0.01 -0.05 0.08 0.19 0.04 -0.13 -0.02 0.05
X8 0.00 0.03 -0.03 0.08 -0.08 -0.11 -0.05 0.00 -0.04
X9 0.20 -0.06 -0.09 0.19 -0.08 0.02 -0.21 -0.05 0.10
X10 0.09 0.01 0.18 0.04 -0.11 0.02 -0.01 -0.03 -0.02
X11 -0.18 -0.13 -0.12 -0.13 -0.05 -0.21 -0.01 0.11 -0.15
X12 -0.03 0.16 -0.02 -0.02 0.00 -0.05 -0.03 0.11 0.05
X13 0.04 -0.12 -0.06 0.05 -0.04 0.10 -0.02 -0.15 0.05
Bayesian approach provide insight on parameter relationships
22. Result Take Away
© Concord Advice LLC 22
HB provides rich information
Provide insight about group level characteristics
Explore full parameter space
Give user power to tweak attributes
23. Refernce
© Concord Advice LLC 23
Doing Baysiean Data Analysis-John K. Kruschke
Baysiean Statistics and Marketing-Peter Rossi
Greg Allenby
Robert Mcculloch