The fifteen slides open with the decision and the money and cover the charter, the data and the leakage audit, the tournament and its tuning, the cost table, the Deutsche Marks on the holdout, the profit lift, the live scoring moment in AI Studio, the monitoring plan, the responsible ML assessment and the limits.

A worked final project from the book, case 23.2 German Credit: whom should the bank lend to? Credit officers accept or reject every application by judgment. On the book's prices, a logistic regression that ranks the applicants is planned at 14,250 DM per 1,000 from AI Studio's cross validation. On held out data it earns 14,500 DM in the Python fit and 28,000 DM in AI Studio, where accepting everyone loses 80,000 DM. German Credit, a CSBU 5420 worked example from the book, on The Project Shelf 1 / 15

1. The decision
A credit officer accepts or rejects every
application, today by judgment
The book puts a price on the decision. A loan to a good credit earns 100 DM, and a
loan to a bad credit loses 500 DM.
1,000
past applicants, 30 attributes
70%
good credits
German Credit, a CSBU 5420 worked example from the book, on The Project Shelf 2 / 15
1. The charter
Two rules were fixed before any model was
scored
• The cutoff comes from the book's cost table.
• A model harder to explain than a logistic equation must earn 5,000 DM per 1,000 applicants
more in cross validation to replace it, because a declined applicant is owed the principal
reasons.
The charter named three risks. The labels are the bank's past judgments, the file meets the
course's minimum of 1,000 records exactly, and four attributes cannot lawfully be a basis for
credit.
German Credit, a CSBU 5420 worked example from the book, on The Project Shelf 3 / 15
2 to 4. Data, cleaning, partition The audit sets four attributes aside Sex, marital status and foreign worker status cannot be a basis for credit. They leave the model and stay for the fairness check. The partition keeps 800 records for modeling with five fold cross validation and holds 200 out for the final evaluation. German Credit, a CSBU 5420 worked example from the book, on The Project Shelf 4 / 15

2 to 4. The leakage audit
Four leakage threats were checked before
any model was scored
• No attribute is recorded after the decision.
• The observation number carries no signal (AUC 0.478) and is set aside all the same.
• Normalization and the naive Bayes bins are fitted inside each training fold.
• The cutoff comes from the cost table, the settings from cross validation, and the holdout was
scored once, after the choice.
German Credit, a CSBU 5420 worked example from the book, on The Project Shelf 5 / 15
5 and 6. The tournament Seven families ran on the same five folds Model AUC DM per 1,000 Random forest 0.793 16,875 Naive Bayes 0.776 16,250 Logistic regression 0.795 15,750 Neural network 0.765 15,750 Gradient boosted trees 0.791 15,000 k-nearest neighbors 0.776 13,750 Decision tree 0.713 7,500 German Credit, a CSBU 5420 worked example from the book, on The Project Shelf 6 / 15

5 and 6. Tuning and the network
All seven families were
tuned in Python, and AI Studio, setting kept DM per 1,000
again in AI Studio Network, 50 cycles at 0.001 16,625
Boosting, 0.03 at depth 3 15,875
The Python sweeps kept C = 0.01, n_neighbors = 61,
max_depth = 3 and a network of 16 units at a learning Logistic, lambda 0.03 14,250
rate of 0.01. At 0.001 most networks stopped early and Forest, Gini, depth 20, leaves of 1 13,500
accepted almost nobody. Naive Bayes, 5 bins 12,750
AI Studio's learners differ, so every family was swept k-NN, k = 61 9,125
there too. Tree, depth 5 6,625
The network leads by 2,375 DM, under the 5,000 DM
price of a readable equation.
German Credit, a CSBU 5420 worked example from the book, on The Project Shelf 7 / 15
7. Evaluation The cost table puts the cutoff at 0.833 An applicant is accepted when the probability of good credit is 0.833 (500/600; entered as 0.8333 in the AI Studio Threshold operator) or higher. A cutoff of 0.5 accepts most applicants and loses money. Out of fold, profit peaks at 0.75 with 16,000 DM per 1,000, against 15,750 at 0.833. One loan changing sides on 800 records would close the gap, so the cutoff stays where the cost table puts it. German Credit, a CSBU 5420 worked example from the book, on The Project Shelf 8 / 15

7. Holdout results, Python fit
The model earns 14,500 DM
per 1,000 applicants,
against a loss of 80,000 DM
for accepting everyone
26.5% 92%
of applicants of accepted loans
0.779
AUC on the
accepted are good credits holdout
The random forest led cross validation by 1,125 DM per
1,000, under the charter's 5,000 DM rule for a readable
equation, so logistic regression is deployed.
German Credit, a CSBU 5420 worked example from the book, on The Project Shelf 9 / 15
7. Profit lift and break even
Profit peaks after the
best three deciles Decile Good Bad Cumulative DM
1 18 2 800
Sorted by the model's score, cumulative profit on
2 20 0 2,800
the holdout peaks at decile 3, 3,600 DM on 200
applicants, and turns negative below decile 6. 3 18 2 3,600
4 15 5 2,600
The recommendation holds unless a bad loan
5 16 4 2,200
costs less than about 1.6 or more than about 12
times what a good loan earns. The book's five to 6 16 4 1,800
one sits inside. 7 12 8 -1,000
8 10 10 -5,000
9 9 11 -9,600
10 6 14 -16,000
German Credit, a CSBU 5420 worked example from the book, on The Project Shelf 10 / 15
8. Deploy and monitor
The Python fit scores
one applicant twice The reasons for 0.724, rejected
Term
Log odds against
the average
Odds
multiplier
The applicant is 35, a skilled employee asking for Checking account = 0 to 200 DM -0.21 0.81
Credit history = Existing credits paid back so far -0.13 0.88
3,000 DM over 24 months, with a small checking
Duration, months = 24 (average 20.95) -0.05 0.95
balance and a history paid so far. Has other installment credit = no +0.05 1.05
Owns the residence = yes +0.04 1.04
0.724 Present employment since = 4 to 6 years
The reasons for 0.941, accepted
+0.03 1.03
This is below 0.833, so the model rejects the
Log odds against Odds
application and routes it to the credit officer's queue. Term
the average multiplier
Checking account = No checking account +0.50 1.65
The same applicant with no checking account, no Savings = Unknown or no savings account +0.42 1.52
savings account, a critical history and a 12 month Credit history = Critical account +0.34 1.41
Duration, months = 12 (average 20.95) +0.15 1.16
term scores higher.
Has other installment credit = no +0.05 1.05
0.941
Owns the residence = yes +0.04 1.04
This is above 0.833, so the application is accepted.
German Credit, a CSBU 5420 worked example from the book, on The Project Shelf 11 / 15
8. The live scoring moment, in AI Studio Process 07 scores the applicant at 0.761, and the application is rejected AI Studio's logistic regression carries its own penalty, so its score differs from the Python figure of 0.724. Both are below the cutoff. At 0.761 the expected gain on the loan is 76.1 DM and the expected loss 119.5 DM, so the loan is worth about -43 DM. German Credit, a CSBU 5420 worked example from the book, on The Project Shelf 12 / 15

8. Deploy and monitor
The monitoring plan has five parts
• The metric watched is the bad credit rate among accepted loans, quarter by quarter.
• The drift signal is the mix of new applications, in checking account codes, amounts and durations,
moving away from the modeling records.
• The bank accepts a random share of applications scored just below the cutoff. If those loans repay
above break even after a year, the cutoff moves to 0.75.
• The model is retrained yearly, or at once if the bad rate goes above 15 percent.
• The owner is the head of consumer credit risk.
German Credit, a CSBU 5420 worked example from the book, on The Project Shelf 13 / 15
8. Responsible ML Older applicants are not scored down Age band Good, % Accepted, % The out of fold decisions were compared by age band, under 25 56 9 foreign worker status and the sex and marital status flags. 25 to 39 71 20 The model sees age but none of the flags. 40 to 59 75 34 Leaving the protected attributes out costs 1,625 DM per 60 and over 75 43 1,000 applicants, about three bad loans' losses (500 DM each) per 1,000. Every declined applicant receives the principal reasons from the equation. The bank should accept a small random share of applications scored just below the cutoff, so the model keeps seeing how they repay. German Credit, a CSBU 5420 worked example from the book, on The Project Shelf 14 / 15

Limits, and the questions a reviewer asks
The limits are stated, and the answers are in
the report
• One thousand records is the minimum, so a handful of loans moves the holdout profit by thousands of
Deutsche Marks.
• The data describe one bank three decades ago, so the model would be rebuilt on the bank's current
book before use.
• The forest does not deploy because its lead is under the price of a readable equation.
• The cutoff stays at 0.833 because one loan changing sides would close the gap to the peak at 0.75.
• The two tools score differently because each fits its own penalty, and both reject this applicant and both
choose logistic regression.
German Credit, a CSBU 5420 worked example from the book, on The Project Shelf 15 / 15