Sub topic 5
Weighting and combining factor scores
This chapter assumes you know what the four risk factor categories are (customer, geography, product, channel) and that each factor already has a score from 1 (low risk) to 5 (high risk). It also assumes you can read short Python functions. Here you combine those factor scores into one number.
Why weights exist
Factor scores rarely matter equally. A firm that sells mostly domestic retail accounts may find that geography and customer type say more about risk than channel does. Weights record that judgment. Each weight is a share of the total, and the weights sum to 1.0 (100%).
The most common method is a weighted average. Multiply each factor score by its weight, then add the results.
A worked example
Take a customer scored customer = 2, geography = 4, product = 3 and channel = 2.
| Factor | Score | Weight | Contribution |
|---|---|---|---|
| Customer | 2 | 0.30 | 0.60 |
| Geography | 4 | 0.30 | 1.20 |
| Product | 3 | 0.25 | 0.75 |
| Channel | 2 | 0.15 | 0.30 |
| Total | 1.00 | 2.85 |
The composite score is 2.85. Because the weights sum to 1.0, the result stays on the same 1 to 5 scale as the inputs. That keeps the number easy to read and to map to a band later.
The same calculation in code
WEIGHTS = {"customer": 0.30, "geography": 0.30, "product": 0.25, "channel": 0.15}
def weighted_score(factors):
"""factors maps each factor name to a score from 1 (low risk) to 5 (high risk)."""
return sum(WEIGHTS[name] * factors[name] for name in WEIGHTS)
def band(score):
if score < 2.5:
return "Low"
if score < 3.5:
return "Medium"
return "High"
factors = {"customer": 2, "geography": 4, "product": 3, "channel": 2}
score = weighted_score(factors)
print(round(score, 2), band(score)) # 2.85 MediumThe function loops over WEIGHTS, not over factors. If a factor is missing from the input, the code raises a KeyError instead of quietly scoring the customer as lower risk. Failing loudly is the safer behavior when data is incomplete. The band thresholds here are illustrative. Mapping scores to bands is covered in a later chapter.
Choosing weights
Weights should come from documented reasoning, not from whatever produces a pleasing distribution. Common inputs include:
- The firm's own risk assessment, which shows where it is most exposed.
- Typologies and regulator guidance on which factors best indicate laundering.
- Past cases, such as which factors were present in suspicious activity reports.
- Expert review, followed by testing against real customer data.
Record who chose the weights, when, and why. Later reviewers will ask.
Common errors
- Weights that do not sum to 1.0. The composite then drifts off the 1 to 5 scale and the bands stop meaning what they should. Add a check that raises an error when the sum differs from 1.0.
- Averaging hides a single severe factor. A customer with a 5 in geography but 1 elsewhere can still land in Medium. This is the main weakness of a weighted average, and it is why override rules exist (a later chapter).
- Double counting. If "customer" already includes country of residence and "geography" also scores it, that risk is weighted twice. Keep factor definitions separate.
- False precision. A result of 2.85 does not mean the customer is meaningfully safer than one at 2.9. Scores near a threshold deserve extra attention when you tune the model.
- Unexamined equal weights. Giving every factor 0.25 is easy but is still a choice. Justify it or replace it.
Checking weights in code
A small guard keeps a configuration change from breaking the scale.
import math
WEIGHTS = {"customer": 0.30, "geography": 0.30, "product": 0.25, "channel": 0.15}
def validate_weights(weights):
total = sum(weights.values())
if not math.isclose(total, 1.0, abs_tol=1e-9):
raise ValueError(f"Weights sum to {total}, expected 1.0")
validate_weights(WEIGHTS)
print("Weights OK")The code uses math.isclose because floating-point sums such as 0.30 + 0.30 + 0.25 + 0.15 can differ from 1.0 by a tiny rounding error.
Exercise
A customer scores customer = 3, geography = 5, product = 2 and channel = 1, using the weights in this chapter. What is the composite score, and which band does it fall in with the thresholds above? Why might a reviewer still want to look at this customer closely?
Show answer
Composite = 0.303 + 0.305 + 0.252 + 0.151 = 0.90 + 1.50 + 0.50 + 0.15 = 3.05, which is Medium (2.5 to below 3.5). The geography score of 5 is offset by low scores elsewhere, so the average hides a severe factor. A reviewer may want an override rule or manual review for any factor at the maximum score.