liveBook · Manning

Target drift

As explained in Financial AI in Practice

Target drift is a change over time in the distribution or proportion of a model’s target variable.

A credit model may keep receiving similar-looking applications while the proportion of borrowers who default changes. Target drift is a change in the distribution of the outcome being predicted. For a binary default target, the practical check is whether the share of records with target = 1 differs between reference and current data. A higher default rate may signal a riskier population and prompt review of the model’s decisions. section 6.2.2 section 6.2

Check target drift alongside feature drift:

  • Prepare reference and current DataFrames with both features and observed target values; identify the target column in Evidently’s ColumnMapping. section 6.2.1
  • Run a Report with TargetDriftPreset for the default-rate comparison and DataDriftPreset for feature distributions, then save the HTML report for review. section 6.2.1
  • Inspect the target panel’s reference and current rates and Jensen–Shannon divergence (JSD) score. Keep this distinct from per-feature drift scores and their thresholds. section 6.2.2
Listing 6.9 Creating and saving the Evidently drift report
from evidently import ColumnMapping
from evidently.report import Report
from evidently.metric_preset import DataDriftPreset, TargetDriftPreset

df_train = X_train.copy()    #1
df_train["target"] = y_train.values

df_test = X_test.copy()    #2
df_test["target"] = y_test.values                               

col_map = ColumnMapping(    #3
    target="target",
    numerical_features=X_train.select_dtypes(include="number").columns.tolist(),
    categorical_features=X_train.select_dtypes(exclude="number").columns.tolist()
)

combined_report = Report(     #4
    metrics=[
        DataDriftPreset(),
        TargetDriftPreset()
    ]
)

combined_report.run(      #5
    reference_data=df_train,
    current_data=df_test,
    column_mapping=col_map
)

combined_report.save_html("combined_drift_report.html")    #6
print("Drift report saved to 'combined_drift_report.html'")

The Python listing assembles both datasets, maps the target and feature types, runs the combined Evidently report, and saves it as HTML. section 6.2.1

Reading a change in default rate

Nearly identical reference and current default rates can produce a JSD near zero, such as 0.0006, with no target drift detected. A rise from 26% to 31% instead suggests a riskier population; investigate whether retraining or recalibrating decision thresholds is warranted. Do not treat feature drift alone as proof that the default rate changed: features can be flagged while the target remains stable. section 6.2.2

Figure 6.11 Target drift panel in Evidently. The bar chart displays the default = 0 and default = 1 rates in the reference set versus the current set. Here, “no drift detected” indicates minimal changes in the proportion of defaults.
figure

The target panel compares the proportions of default = 0 and default = 1 in reference and current data; its example shows minimal change. section 6.2.2

Keep dated HTML reports for periodic risk and compliance review. If drift is severe and sustained, a challenger model can be evaluated alongside the current model rather than treating a dashboard alert as an automatic replacement decision. section 6.2.2

How Financial AI in Practice covers it

How deep it goes
Works through Evidently report setup and dashboard interpretation, but does not derive Jensen–Shannon divergence or prescribe a target-drift cutoff.
Examples
Uses a credit-default target, an Evidently HTML report, near-zero JSD, and a default-rate rise from 26% to 31%.
What it assumes
Assumes reference and current feature datasets with observed default labels; shows how to attach labels and map columns for the report.
What you can do after
Apply it via Evidently to compare observed default rates and flag changes for risk-team review.
How it connects
Connects target drift to data drift, model monitoring, decision-threshold recalibration, and champion–challenger evaluation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Financial AI in Practice. The section links point to the parts of the book it draws on.