← 9. Prediction & machine learning

AdaBoost

An ensemble learning method that combines several weak classifiers in sequence, paying more attention to the cases the previous classifier got wrong.

BoostingSample weightsWeak classifiersClassification performance

Classifier 118 misclassifiedClassifier 211 misclassifiedClassifier 37 misclassifiedWeighted vote → predictionWrong call

If an insurer reviews a huge number of claims every day, which ones should it check first? Should every large claim automatically be suspect? What about a claim that isn’t large, but where similar claims keep recurring over a short period? Only by looking at several clues together can you separate normal claims from those that may be fraudulent.

AdaBoost (Adaptive Boosting) builds a final classifier by training a simple classifier several times, giving larger weights to the cases misclassified at earlier steps. Even if each individual model’s judgment is somewhat inaccurate, the idea is to improve classification performance by combining them in sequence.

Whereas a random forest trains many trees independently and pools their results, AdaBoost feeds the errors of the previous model into the training of the next. So which cases a new classifier focuses on depends on the results of the classifiers before it. Care is needed, though, because it can end up concentrating on mislabeled answers and outliers as well.

AdaBoost can be used for insurance claim review, financial transaction classification, quality inspection and more. In this lesson we’ll use an example of potentially fraudulent insurance claims to look at how it works, sample weights, key settings, interpreting classification results, how it differs from other ensemble methods and what to check when applying it in practice.

SECTION 1

What is AdaBoost?

It trains weak classifiers in sequence while adjusting the weights on misclassified cases.

AdaBoost belongs to ensemble learning. Instead of using a single complex model, it trains a relatively simple base estimator many times to reach a final decision. Typical binary-classification AdaBoost uses shallow decision trees, especially decision stumps that split on a single condition.

Cases the first classifier gets wrong are given larger sample weights, and cases it gets right relatively smaller ones. The next classifier is trained taking the changed weights into account. At the end, the classifiers’ judgments aren’t treated equally; they are combined with weights that reflect each classifier’s performance.

SECTION 2

Why do we need AdaBoost?

It can use several stages of judgment to handle cases that are hard to separate with a single simple rule.

For insurance claims, it’s hard to judge fraud from the claim amount alone. There are legitimate claims for expensive treatment, and there are suspicious transactions that are small but repeated. You need to look at several features together, such as claim frequency, type of incident and previous claim history.

AdaBoost first classifies the patterns that are easy to spot, then increases the weight of the cases that weren’t separated and learns new patterns. In this process several simple rules combine to form more varied classification boundaries than any single rule. That doesn’t mean, however, that it outperforms a single model in every situation.

SECTION 3

How does AdaBoost work?

The errors of the previous model set the direction of the next model’s training.

Training classifiers in sequence, focusing on misjudged claimsHow AdaBoost works · the decision tree at each step is a simplified illustrationClassifier 118 misclassifiedThe first classifier makes errorsClassifier 211 misclassifiedMore weight on the previous errorsClassifier 37 misclassifiedTrained on re-adjusted weightsFinal prediction: the step-by-step classifiers’ judgments are combined with learned weights.
A mock-up of the AdaBoost training flow. Dot size represents sample weight conceptually, and the error counts are not actually calculated values.

① Start by giving every claim the same weight

If the training data contain 1,600 claims, the typical approach gives each claim the same initial weight. Here the weight isn’t the claim amount; it indicates how much importance that observation gets during training.

② Train the first weak classifier

A simple decision tree predicts normal or classifies possible fraud based on, say, the claim amount or past claim frequency. Its results are compared with the true labels to compute the weighted misclassification rate.

③ Raise the importance of misclassified cases

In the next step, misclassified observations get relatively larger weights and correctly classified ones get lower weights. The weights are then renormalized. So the next classifier is more influenced by the cases the previous classifier couldn’t separate well.

④ Combine the judgments of several classifiers

The process repeats, and the final classification is decided by reflecting each classifier’s performance. Note the distinction: what gets a high weight here is not a claim that is likely fraudulent but a claim the existing classifiers got wrong.

Key idea

In typical binary AdaBoost, the lower a classifier’s weighted misclassification rate, the larger its say in the final vote. The exact math for the individual classifier weights and the sample weights can differ depending on the AdaBoost variant and implementation used.

SECTION 4

Worked example: predicting potentially fraudulent insurance claims

We’ll use hypothetical insurance claim data in which the vast majority of claims are legitimate.

Suppose we analyze 2,000 hypothetical claims received by an insurer. 1,800 claims were confirmed as legitimate, and 200 were confirmed as fraudulent after investigation. We use 1,600 for training and set the remaining 400 aside until the final evaluation. Each set was made up of 90% legitimate and 10% fraudulent claims.

ItemExample valueRole in the analysis
Claim amountAmount of one claimInput variable
Claims in the last 12 monthsFrequency of recent claimsInput variable
Incident typeCar accident · injury, etc.Categorical input variable
Confirmed investigation outcomeLegitimate / fraudulentTarget variable
Training data1,600 claims (1,440 legitimate / 160 fraudulent)Model training and validation
Final evaluation data400 claims (360 legitimate / 40 fraudulent)Independent performance evaluation

Here we assume that fraudulent claims are not merely ones the insurer suspected but cases confirmed by the investigation criteria. The figures in the tables and graphs that follow are hypothetical results constructed to aid learning, not results from actually training a model.

SECTION 5

What should you check before the analysis?

The reliability of the labels and how the data are split have a big effect on model performance.

Item to checkWhat to examineWhy it matters
Label definitionCriteria for judging fraud and whether investigations are completeReliability of training labels
Repeat claims by the same customerWhether customer information appears in both training and evaluation dataPreventing information leakage
Time of evaluationWhether investigation results unknown at decision time were entered as inputsPreventing leakage of future information
Class imbalanceShare of fraudulent claims and differences in costChoice of evaluation metric
Missing values and categoriesEncoding missing amounts and incident typesInput quality
Sensitive informationUnneeded personal data and fairness risksSafe and appropriate use
Don’t put fraud investigation results in as input variables.

If results that can only be known after an incident investigation, or information about payments later cancelled, are entered at prediction time, the model can look far more accurate than it really is. Fit data processing on the training data only, and use the final evaluation data just once, at the end.

SECTION 6

In what order does an AdaBoost analysis proceed?

It runs from data preparation through choosing the base classifier to the final evaluation.

① Prepare the claim history and confirmed labels

Organize the features available at prediction time, such as incident type, claim amount and claim frequency, along with the labels confirmed by investigation. If the data contain repeat records for the same customer or span consecutive periods, split them by group or by time as appropriate.

② Do preprocessing and validation within the training data

Missing-value imputation, encoding of categorical variables and any feature selection should happen inside the training data. When using cross-validation, fit the preprocessing only on the training part of each fold.

③ Choose the weak classifier and AdaBoost settings

Use shallow decision trees as the base classifier and compare the number of classifiers, learning rate and tree depth. If fraudulent cases are few, validate with a focus on precision and recall, not just accuracy.

④ Train sequentially while updating the weights

At each step, adjust the weights of the misclassified claims and train a new weak classifier. Through this repetition, the rules for separating fraudulent from legitimate claims are refined.

⑤ Check final performance on the sealed evaluation data

After training is finished, compute the confusion matrix, precision, recall, F1, PR-AUC and so on for the evaluation data kept aside. If you change the settings again after seeing the final evaluation figures, the independent evaluation loses its meaning.

SECTION 7

What are the key settings in AdaBoost?

The number of classifiers, learning rate and complexity affect how the model behaves.

SettingMeaningWhat to check
Base classifierModel trained at each stepStart with a simple decision tree
Number of classifiers (n_estimators)Maximum number of boosting roundsMore doesn’t always mean better
Learning rate (learning_rate)Scales each step’s contributionValidate together with the number of classifiers
Tree depth (max_depth)Expressive power of the base classifierDeep trees can overlearn noise
Decision thresholdTurns the score into a fraud / not-fraud decisionChosen during validation to fit review costs

Adding classifiers lets the model handle more error patterns, but it can also focus too much on mislabeled or unusual claims. Lowering the learning rate shrinks each classifier’s influence, so more rounds may be needed. It makes sense to validate the two values together.

Adding more classifiers doesn’t keep improving validation performanceHypothetical cross-validated F1 score · an illustrative graph, not actual training results0.20.40.60.81050100150200250Number of weak classifiers
An example of how performance changes with the number of rounds. The score curves were constructed to explain the concept and are not actual evaluation results.
SECTION 8

How do you interpret the classification results?

Look at how many fraudulent claims were caught together with how many legitimate claims were wrongly flagged.

Suppose the hypothetical final evaluation data of 400 claims gave the following results. Rows of the table are the true labels and columns are the model’s predictions.

Actual \ PredictedLegitimateFraudulentTotal
Legitimate3519360
Fraudulent192140
Total37030400
Fraud detection results: confusion matrix400 evaluation claims · the figures below are hypothetical results for illustrationPredicted legitimatePredicted fraudulentActually legitimate3519Actually fraudulent1921
A hypothetical result in which 21 fraudulent claims were caught and 9 legitimate claims were wrongly classified as fraudulent.

Accuracy is 93.0% (372/400), fraud precision is 70.0% (21/30), recall is 52.5% (21/40) and the F1 score is 60.0%. Because 19 of the 40 actual fraudulent claims were missed, you can’t conclude from accuracy alone that detection performance is good.

SECTION 9

How do you read prediction scores and importance?

Distinguish the fraud-likelihood score from the importance of the clues.

AdaBoost can provide a score for classifying each claim and, in some implementations, an estimated probability. But a high score alone doesn’t confirm actual fraud. Nor should probability outputs be read as real probabilities of occurrence without a separate calibration check.

ResultWhat does it mean?Caution
Classification resultPredicted legitimate / fraudulentNot a confirmed investigation outcome
Prediction scoreModel output used to decide which class to assignDon’t treat as a true probability without calibration
Variable importanceClue to the relative contribution of features used in the model’s decisionsNot a causal effect
Precision · recallRates of false alarms and missed claimsDepends on the threshold
PR-AUCSummary of precision and recall across thresholds for imbalanced dataComparing models under the same conditions

For instance, even if claim amount turns out to be an important variable, that doesn’t mean raising the amount causes fraud. It may also be better to use the model’s alerts to set priorities for further review rather than to reject claims automatically.

SECTION 10

Things to watch out for in an AdaBoost analysis

Because it focuses on errors, it can be sensitive to label errors and outliers.

What happens if labels are wrong?

If a claim that is actually legitimate was wrongly labeled as fraudulent, AdaBoost may keep treating it as a hard case. Check the quality of the investigation results so that the focus of repeated training doesn’t drift toward wrong labels.

If legitimate claims vastly outnumber the others, won’t accuracy come out high?

In this example 90% of claims are legitimate. Predicting every claim as legitimate would already give 90% accuracy, so the figure of 93% alone doesn’t show that fraud detection is adequate. Review recall, precision and the actual cost of investigations together.

How should past claims by the same customer be handled?

If similar claims from the same person or incident are mixed across training and evaluation, the ability to predict future claims can be overestimated. Consider time-based splits or customer-level splits that match how the system will actually be operated.

Could the model be overly suspicious of certain groups?

It can pick up the investigation practices or existing biases in the training data as they are. For important decisions, put in place checks on error differences across groups, explainability, an appeals process and review by a staff member.

SECTION 11

How does it differ from other methods?

They differ in the order in which the ensemble is built and in how errors are handled.

MethodCore principleDifference from AdaBoost
AdaBoostTrains sequentially while updating the weights of misclassified samplesFocuses on the previous classifier’s errors
Random forestTrains trees in parallel with resampling and random feature selectionEmphasizes independence and diversity among classifiers
Gradient boostingAdds new models in the direction of the loss function’s gradientOptimizes the error in a different way
BaggingTrains models separately on resampled dataSequential weight updating isn’t the core
Single decision treeLearns rules with one treeSimple to interpret but may be limited in expressive power

AdaBoost is also a boosting method, but not every boosting model uses the same computation. In particular, it differs from gradient boosting in its optimization perspective and how it handles error, so you shouldn’t treat them as the same model just because the names are similar.

SECTION 12

How do you report AdaBoost results?

Record the training settings and the independent evaluation results together.

The report should describe the numbers of legitimate and fraudulent cases, the labeling criteria, the splitting scheme, input variables, the structure of the base classifier, the number of classifiers and learning rate, and the cross-validation procedure. Performance should be presented on independent evaluation data where possible, and the types of error should be reported as well.

Example report text

An AdaBoost classifier was applied to predict the likelihood that insurance claims were fraudulent. Of 2,000 hypothetical claims, the model was trained on 1,600, and performance was evaluated on 400 held out separately. On the evaluation data, accuracy was 93.0% (372/400), fraud precision 70.0% (21/30), recall 52.5% (21/40) and the F1 score 60.0%. Nine legitimate claims were wrongly classified as fraudulent, and 19 actual fraudulent claims went undetected. The figures presented are hypothetical examples for explaining the method.

In actual research it’s good to add the final chosen hyperparameter values, the label definition, the time of evaluation, the classification threshold, and confidence intervals or results from repeated validation. You should also report, separately, whether suspected-fraud flags actually led to investigations.

SECTION 13

Where can AdaBoost be used?

It’s worth considering for problems that combine weak classification rules across several variables.

FieldWhat is predictedExample input data
Insurance reviewSuspected fraudulent claimsClaim amount · frequency · incident type
Financial transactionsAnomalous transactionsAmount · time of day · past history
Manufacturing qualityProduct defectsProcess sensor values · inspection records
Customer managementChurnUsage frequency · contract history
Service operationsType of problem reportStructured features extracted from report text

A classifier’s performance depends on the input features, label quality, the degree of imbalance and the evaluation design. So when applying AdaBoost, it is sensible to compare it with a baseline model and other ensemble methods under the same data-splitting conditions.

✓ Wrap-up

AdaBoost combines many weak classifiers into one by focusing on the cases that earlier ones got wrong.

In practice, which claims you miss and which you wrongly suspect can matter more than classification accuracy.


AdaBoost learns better classification rules by feeding each classifier’s errors into the next step. In the insurance example, it combines clues from claim amount, frequency and incident type in sequence to separate legitimate claims from potentially fraudulent ones. But because it repeatedly focuses on cases the earlier models got wrong, it can learn spurious patterns when investigation labels are wrong or unusual observations are mixed in. The base classifier, number of rounds and learning rate should be chosen by validation within the training data.

Accuracy in the example was 93.0%, yet 47.5% of actual fraudulent claims were missed. So rather than judging the results by accuracy alone, check fraud recall together with false alarms on legitimate claims. Classification results are best used not as a ruling that confirms fraud but to prioritize cases needing further review. In operation, re-evaluate performance on newer data over time and keep checking for fairness and data leakage.

KEY TAKEAWAY

AdaBoost is a sequential ensemble method that trains the next weak classifier after raising the weights of the observations the previous classifier got wrong. Because the number of classifiers, the learning rate, the complexity of the base model and label errors all affect performance, validation within the training data is needed. When predicting rare events such as fraudulent claims, check precision, recall and the real cost of misclassification, not just accuracy.