ValidMind for validation 3 — Developing a potential challenger

Learn how to use ValidMind for your end-to-end validation process with our series of four introductory notebooks. In this third notebook, develop a potential challenger and then pass your challenger and its predictions to ValidMind.

A challenger is an alternate record (model) that attempts to outperform the champion, ensuring that the best performing fit-for-purpose record is always considered for deployment. Challengers also help avoid over-reliance on a single record, and allow testing of new features, algorithms, or data sources without disrupting the production lifecycle.

Learn by doing

Our course tailor-made for validators new to ValidMind combines this series of notebooks with more a more in-depth introduction to the ValidMind Platform — Validator Fundamentals

Prerequisites

In order to develop potential challengers with this notebook, you'll need to first have:

Need help with the above steps?

Refer to the first two notebooks in this series:

Setting up

This section should be quite familiar to you — as we performed the same actions in the previous notebook, 2 — Start the validation process.

Initialize the ValidMind Library

As usual, let's first connect up the ValidMind Library to our model we previously registered in the ValidMind Platform:

  1. On the left sidebar that appears for your model, select Getting Started and select Validation from the Document drop-down menu.

  2. Click Copy snippet to clipboard.

  3. Next, load your model identifier credentials from an .env file or replace the placeholder with your own code snippet:

# Make sure the ValidMind Library is installed

%pip install -q validmind

# Load your model identifier credentials from an `.env` file

%load_ext dotenv
%dotenv .env

# Or replace with your code snippet

import validmind as vm

vm.init(
    # api_host="...",
    # api_key="...",
    # api_secret="...",
    # model="...",
    document="validation-report",
)
Note: you may need to restart the kernel to use updated packages.
2026-11-20 23:06:19,631 - INFO(validmind.api_client): 🎉 Connected to ValidMind!
📊 Model: [ValidMind Academy] Model validation (ID: cmalguc9y02ok199q2db381ib)
📁 Document Type: validation_report

Import the sample dataset

Next, we'll load in the sample Bank Customer Churn Prediction dataset used to develop the champion that we will independently preprocess:

# Load the sample dataset
from validmind.datasets.classification import customer_churn as demo_dataset

print(
    f"Loaded demo dataset with: \n\n\t• Target column: '{demo_dataset.target_column}' \n\t• Class labels: {demo_dataset.class_labels}"
)

raw_df = demo_dataset.load_data()
Loaded demo dataset with: 

    • Target column: 'Exited' 
    • Class labels: {'0': 'Did not exit', '1': 'Exited'}

Preprocess the dataset

We’ll apply a simple rebalancing technique to the dataset before continuing:

import pandas as pd

raw_copy_df = raw_df.sample(frac=1)  # Create a copy of the raw dataset

# Create a balanced dataset with the same number of exited and not exited customers
exited_df = raw_copy_df.loc[raw_copy_df["Exited"] == 1]
not_exited_df = raw_copy_df.loc[raw_copy_df["Exited"] == 0].sample(n=exited_df.shape[0])

balanced_raw_df = pd.concat([exited_df, not_exited_df])
balanced_raw_df = balanced_raw_df.sample(frac=1, random_state=42)

Let’s also quickly remove highly correlated features from the dataset using the output from a ValidMind test.

As you know, before we can run tests you’ll need to initialize a ValidMind dataset object with the init_dataset function:

# Register new data and now 'balanced_raw_dataset' is the new dataset object of interest
vm_balanced_raw_dataset = vm.init_dataset(
    dataset=balanced_raw_df,
    input_id="balanced_raw_dataset",
    target_column="Exited",
)

With our balanced dataset initialized, we can then run our test and utilize the output to help us identify the features we want to remove:

# Run HighPearsonCorrelation test with our balanced dataset as input and return a result object
corr_result = vm.tests.run_test(
    test_id="validmind.data_validation.HighPearsonCorrelation",
    params={"max_threshold": 0.3},
    inputs={"dataset": vm_balanced_raw_dataset},
)

❌ High Pearson Correlation

The High Pearson Correlation test evaluates pairwise linear relationships between features to identify potentially redundant variables or multicollinearity. The results table reports the top feature pairs ranked by Pearson correlation coefficient alongside a Pass/Fail assessment using a maximum threshold of 0.3 on the absolute correlation value. In this run, the reported coefficients range from -0.2082 to 0.3699, and only one pair exceeds the threshold. The remaining listed feature pairs are all below the threshold and are marked as passing.

Key insights:

  • One pair exceeds threshold: The pair (Age, Exited) has a Pearson correlation coefficient of 0.3699, which is above the configured threshold of 0.3 and is the only result marked Fail.
  • Most reported correlations are weak: The other nine reported pairs have absolute correlation values between 0.0323 and 0.2082, all below the threshold and marked Pass.
  • Largest negative relationship is modest: The strongest negative correlation in the reported results is (IsActiveMember, Exited) at -0.2082, which remains below the threshold.
  • Feature-to-target relationships vary in magnitude: Several listed pairs involve Exited, with coefficients ranging from -0.2082 for IsActiveMember to 0.3699 for Age, indicating differing levels of linear association across the reported variables.

The results show a largely low-correlation structure among the top reported feature pairs, with one exception. (Age, Exited) is the only pair whose absolute Pearson correlation exceeds the 0.3 threshold, while all other listed relationships remain below that level. Overall, the reported output indicates that the observed high-correlation flag is concentrated in a single pair rather than broadly distributed across the variables shown.

Parameters:

{
  "max_threshold": 0.3
}
            

Tables

Columns Coefficient Pass/Fail
(Age, Exited) 0.3699 Fail
(IsActiveMember, Exited) -0.2082 Pass
(Balance, NumOfProducts) -0.1882 Pass
(Balance, Exited) 0.1416 Pass
(NumOfProducts, Exited) -0.0457 Pass
(Age, Balance) 0.0426 Pass
(Tenure, Exited) -0.0418 Pass
(HasCrCard, Exited) -0.0382 Pass
(CreditScore, Exited) -0.0335 Pass
(Age, NumOfProducts) -0.0323 Pass
# From result object, extract table from `corr_result.tables`
features_df = corr_result.tables[0].data
features_df
Columns Coefficient Pass/Fail
0 (Age, Exited) 0.3699 Fail
1 (IsActiveMember, Exited) -0.2082 Pass
2 (Balance, NumOfProducts) -0.1882 Pass
3 (Balance, Exited) 0.1416 Pass
4 (NumOfProducts, Exited) -0.0457 Pass
5 (Age, Balance) 0.0426 Pass
6 (Tenure, Exited) -0.0418 Pass
7 (HasCrCard, Exited) -0.0382 Pass
8 (CreditScore, Exited) -0.0335 Pass
9 (Age, NumOfProducts) -0.0323 Pass
# Extract list of features that failed the test
high_correlation_features = features_df[features_df["Pass/Fail"] == "Fail"]["Columns"].tolist()
high_correlation_features
['(Age, Exited)']
# Extract feature names from the list of strings
high_correlation_features = [feature.split(",")[0].strip("()") for feature in high_correlation_features]
high_correlation_features
['Age']

We can then re-initialize the dataset with a different input_id and the highly correlated features removed and re-run the test for confirmation:

# Remove the highly correlated features from the dataset
balanced_raw_no_age_df = balanced_raw_df.drop(columns=high_correlation_features)

# Re-initialize the dataset object
vm_raw_dataset_preprocessed = vm.init_dataset(
    dataset=balanced_raw_no_age_df,
    input_id="raw_dataset_preprocessed",
    target_column="Exited",
)
# Re-run the test with the reduced feature set
corr_result = vm.tests.run_test(
    test_id="validmind.data_validation.HighPearsonCorrelation",
    params={"max_threshold": 0.3},
    inputs={"dataset": vm_raw_dataset_preprocessed},
)

✅ High Pearson Correlation

The High Pearson Correlation test evaluates pairwise linear relationships among features to identify potentially redundant or highly collinear variable pairs. The results table lists the top 10 strongest pairwise Pearson correlations after removing duplicate and self-correlations, together with their coefficients and Pass/Fail status under the configured threshold of 0.3. In this run, all reported correlations are below the threshold in absolute value and are marked as Pass. The observed coefficients range from -0.2082 to 0.1416 across the reported feature pairs.

Key insights:

  • No correlations exceeded threshold: All 10 reported feature pairs are classified as Pass under the 0.3 maximum threshold, indicating that none of the strongest observed linear relationships surpassed the configured cutoff.
  • Largest absolute correlation is modest: The strongest reported relationship is between IsActiveMember and Exited with a coefficient of -0.2082, which remains below the threshold by absolute value.
  • Reported relationships are weak overall: The full set of listed coefficients falls within a relatively narrow range, from -0.2082 to 0.1416, with both positive and negative associations represented.
  • Top correlations are concentrated near zero: Beyond the first three pairs, all remaining reported coefficients have absolute values below 0.05, including NumOfProducts and Exited (-0.0457), Tenure and Exited (-0.0418), and Tenure and IsActiveMember (-0.0271).

The reported correlation structure shows limited pairwise linear dependence among the top-ranked feature combinations under the configured Pearson correlation threshold. The strongest observed association, between IsActiveMember and Exited, is negative but remains below the test cutoff, and the remaining reported relationships are smaller in magnitude. Collectively, the results indicate that the top 10 pairwise correlations identified by this test do not display high linear association under the stated threshold.

Parameters:

{
  "max_threshold": 0.3
}
            

Tables

Columns Coefficient Pass/Fail
(IsActiveMember, Exited) -0.2082 Pass
(Balance, NumOfProducts) -0.1882 Pass
(Balance, Exited) 0.1416 Pass
(NumOfProducts, Exited) -0.0457 Pass
(Tenure, Exited) -0.0418 Pass
(HasCrCard, Exited) -0.0382 Pass
(CreditScore, Exited) -0.0335 Pass
(CreditScore, IsActiveMember) 0.0309 Pass
(Tenure, HasCrCard) 0.0276 Pass
(Tenure, IsActiveMember) -0.0271 Pass

Split the preprocessed dataset

With our raw dataset rebalanced with highly correlated features removed, let's now spilt our dataset into train and test in preparation for model evaluation testing:

# Encode categorical features in the dataset
balanced_raw_no_age_df = pd.get_dummies(
    balanced_raw_no_age_df, columns=["Geography", "Gender"], drop_first=True
)
balanced_raw_no_age_df.head()
CreditScore Tenure Balance NumOfProducts HasCrCard IsActiveMember EstimatedSalary Exited Geography_Germany Geography_Spain Gender_Male
2252 679 8 0.00 2 1 1 51380.90 0 False False True
4166 521 2 136555.01 2 1 1 129353.21 0 False False False
2733 465 9 117221.15 1 1 0 168280.95 0 False False True
7965 795 9 104552.72 1 1 1 120853.83 1 True False False
489 612 8 140745.33 1 1 0 193437.89 1 True False False
from sklearn.model_selection import train_test_split

# Split the dataset into train and test
train_df, test_df = train_test_split(balanced_raw_no_age_df, test_size=0.20)

X_train = train_df.drop("Exited", axis=1)
y_train = train_df["Exited"]
X_test = test_df.drop("Exited", axis=1)
y_test = test_df["Exited"]
# Initialize the split datasets
vm_train_ds = vm.init_dataset(
    input_id="train_dataset_final",
    dataset=train_df,
    target_column="Exited",
)

vm_test_ds = vm.init_dataset(
    input_id="test_dataset_final",
    dataset=test_df,
    target_column="Exited",
)

Import the champion model

With our raw dataset assessed and preprocessed, let's go ahead and import the champion submitted by the development team in the format of a .pkl file: lr_model_champion.pkl

# Import the champion model
import pickle as pkl

with open("lr_model_champion.pkl", "rb") as f:
    log_reg = pkl.load(f)
/opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages/sklearn/base.py:442: InconsistentVersionWarning: Trying to unpickle estimator LogisticRegression from version 1.3.2 when using version 1.7.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
  warnings.warn(

Training a potential challenger model

We're curious how an alternate model compares to our champion, so let's train a challenger as a basis for our testing.

Our champion logistic regression model is a simpler, parametric model that assumes a linear relationship between the independent variables and the log-odds of the outcome. While logistic regression may not capture complex patterns as effectively, it offers a high degree of interpretability and is easier to explain to stakeholders. However, risk is not calculated in isolation from a single factor, but rather in consideration with trade-offs in predictive performance, ease of interpretability, and overall alignment with business objectives.

Random forest classification model

A random forest classification model is an ensemble machine learning algorithm that uses multiple decision trees to classify data. In ensemble learning, multiple models are combined to improve prediction accuracy and robustness.

Random forest classification models generally have higher accuracy because they capture complex, non-linear relationships, but as a result they lack transparency in their predictions.

# Import the Random Forest Classification model
from sklearn.ensemble import RandomForestClassifier

# Create the model instance with 50 decision trees
rf_model = RandomForestClassifier(
    n_estimators=50,
    random_state=42,
)

# Train the model
rf_model.fit(X_train, y_train)
RandomForestClassifier(n_estimators=50, random_state=42)
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.

Initialize the ValidMind models

In addition to the initialized datasets, you'll also need to initialize a ValidMind model object (vm_model) that can be passed to other functions for analysis and tests on the data for each of our two models.

  • Despite the naming convention, ValidMind model objects can be any type of record you want to test, document, validate, or monitor with the ValidMind Library.
  • From classical statistical and machine learning models, to generative and agentic AI systems and more, the ValidMind model object provides a consistent wrapper around your record so it can be passed as a unified input to any ValidMind test or test suite, with results sent directly to the ValidMind Platform.

Initialize your model objects with vm.init_model():

# Initialize the champion logistic regression model
vm_log_model = vm.init_model(
    log_reg,
    input_id="log_model_champion",
)

# Initialize the challenger random forest classification model
vm_rf_model = vm.init_model(
    rf_model,
    input_id="rf_model",
)

Assign predictions

With our models registered, we'll move on to assigning both the predictive probabilities coming directly from each model's predictions, and the binary prediction after applying the cutoff threshold described in the Compute binary predictions step above.

  • The assign_predictions() method from the Dataset object can link existing predictions to any number of models.
  • This method links the model's class prediction values and probabilities to our vm_train_ds and vm_test_ds datasets.

If no prediction values are passed, the method will compute predictions automatically:

# Champion — Logistic regression model
vm_train_ds.assign_predictions(model=vm_log_model)
vm_test_ds.assign_predictions(model=vm_log_model)

# Challenger — Random forest classification model
vm_train_ds.assign_predictions(model=vm_rf_model)
vm_test_ds.assign_predictions(model=vm_rf_model)
2026-11-20 23:06:33,012 - INFO(validmind.vm_models.dataset.utils): Running predict_proba()... This may take a while
2026-11-20 23:06:33,014 - INFO(validmind.vm_models.dataset.utils): Done running predict_proba()
2026-11-20 23:06:33,014 - INFO(validmind.vm_models.dataset.utils): Running predict()... This may take a while
2026-11-20 23:06:33,016 - INFO(validmind.vm_models.dataset.utils): Done running predict()
2026-11-20 23:06:33,017 - INFO(validmind.vm_models.dataset.utils): Running predict_proba()... This may take a while
2026-11-20 23:06:33,018 - INFO(validmind.vm_models.dataset.utils): Done running predict_proba()
2026-11-20 23:06:33,018 - INFO(validmind.vm_models.dataset.utils): Running predict()... This may take a while
2026-11-20 23:06:33,019 - INFO(validmind.vm_models.dataset.utils): Done running predict()
2026-11-20 23:06:33,020 - INFO(validmind.vm_models.dataset.utils): Running predict_proba()... This may take a while
2026-11-20 23:06:33,034 - INFO(validmind.vm_models.dataset.utils): Done running predict_proba()
2026-11-20 23:06:33,035 - INFO(validmind.vm_models.dataset.utils): Running predict()... This may take a while
2026-11-20 23:06:33,048 - INFO(validmind.vm_models.dataset.utils): Done running predict()
2026-11-20 23:06:33,050 - INFO(validmind.vm_models.dataset.utils): Running predict_proba()... This may take a while
2026-11-20 23:06:33,056 - INFO(validmind.vm_models.dataset.utils): Done running predict_proba()
2026-11-20 23:06:33,056 - INFO(validmind.vm_models.dataset.utils): Running predict()... This may take a while
2026-11-20 23:06:33,061 - INFO(validmind.vm_models.dataset.utils): Done running predict()

Running model evaluation tests

With our setup complete, let's run the rest of our validation tests. Since we have already verified the data quality of the dataset used to train our champion, we will now focus on comprehensive performance evaluations of both the champion and challenger models.

Run model performance tests

Let's run some performance tests, beginning with independent testing of our champion logistic regression model, then moving on to our potential challenger model.

Use vm.tests.list_tests() to identify all the model performance tests for classification:


vm.tests.list_tests(tags=["model_performance"], task="classification")
ID Name Description Has Figure Has Table Required Inputs Params Tags Tasks
validmind.model_validation.sklearn.CalibrationCurve Calibration Curve Evaluates the calibration of probability estimates by comparing predicted probabilities against observed... True False ['model', 'dataset'] {'n_bins': {'type': 'int', 'default': 10}} ['sklearn', 'model_performance', 'classification'] ['classification']
validmind.model_validation.sklearn.ClassifierPerformance Classifier Performance Evaluates performance of binary or multiclass classification models using precision, recall, F1-Score, accuracy,... False True ['dataset', 'model'] {'average': {'type': 'str', 'default': 'macro'}} ['sklearn', 'binary_classification', 'multiclass_classification', 'model_performance'] ['classification', 'text_classification']
validmind.model_validation.sklearn.ConfusionMatrix Confusion Matrix Evaluates and visually represents the classification ML model's predictive performance using a Confusion Matrix... True False ['dataset', 'model'] {'threshold': {'type': 'float', 'default': 0.5}} ['sklearn', 'binary_classification', 'multiclass_classification', 'model_performance', 'visualization'] ['classification', 'text_classification']
validmind.model_validation.sklearn.HyperParametersTuning Hyper Parameters Tuning Performs exhaustive grid search over specified parameter ranges to find optimal model configurations... False True ['model', 'dataset'] {'param_grid': {'type': 'dict', 'default': None}, 'scoring': {'type': 'Union', 'default': None}, 'thresholds': {'type': 'Union', 'default': None}, 'fit_params': {'type': 'dict', 'default': None}} ['sklearn', 'model_performance'] ['clustering', 'classification']
validmind.model_validation.sklearn.MinimumAccuracy Minimum Accuracy Checks if the model's prediction accuracy meets or surpasses a specified threshold.... False True ['dataset', 'model'] {'min_threshold': {'type': 'float', 'default': 0.7}} ['sklearn', 'binary_classification', 'multiclass_classification', 'model_performance'] ['classification', 'text_classification']
validmind.model_validation.sklearn.MinimumF1Score Minimum F1 Score Assesses if the model's F1 score on the validation set meets a predefined minimum threshold, ensuring balanced... False True ['dataset', 'model'] {'min_threshold': {'type': 'float', 'default': 0.5}} ['sklearn', 'binary_classification', 'multiclass_classification', 'model_performance'] ['classification', 'text_classification']
validmind.model_validation.sklearn.MinimumROCAUCScore Minimum ROCAUC Score Validates model by checking if the ROC AUC score meets or surpasses a specified threshold.... False True ['dataset', 'model'] {'min_threshold': {'type': 'float', 'default': 0.5}} ['sklearn', 'binary_classification', 'multiclass_classification', 'model_performance'] ['classification', 'text_classification']
validmind.model_validation.sklearn.ModelsPerformanceComparison Models Performance Comparison Evaluates and compares the performance of multiple Machine Learning models using various metrics like accuracy,... False True ['dataset', 'models'] {} ['sklearn', 'binary_classification', 'multiclass_classification', 'model_performance', 'model_comparison'] ['classification', 'text_classification']
validmind.model_validation.sklearn.PopulationStabilityIndex Population Stability Index Assesses the Population Stability Index (PSI) to quantify the stability of an ML model's predictions across... True True ['datasets', 'model'] {'num_bins': {'type': 'int', 'default': 10}, 'mode': {'type': 'str', 'default': 'fixed'}} ['sklearn', 'binary_classification', 'multiclass_classification', 'model_performance'] ['classification', 'text_classification']
validmind.model_validation.sklearn.PrecisionRecallCurve Precision Recall Curve Evaluates the precision-recall trade-off for binary classification models and visualizes the Precision-Recall curve.... True False ['model', 'dataset'] {} ['sklearn', 'binary_classification', 'multiclass_classification', 'model_performance', 'visualization'] ['classification', 'text_classification']
validmind.model_validation.sklearn.ROCCurve ROC Curve Evaluates classification model performance by generating and plotting the Receiver Operating Characteristic... True False ['model', 'dataset'] {} ['sklearn', 'binary_classification', 'multiclass_classification', 'model_performance', 'visualization'] ['classification', 'text_classification']
validmind.model_validation.sklearn.RegressionErrors Regression Errors Assesses the performance and error distribution of a regression model using various error metrics.... False True ['model', 'dataset'] {} ['sklearn', 'model_performance'] ['regression', 'classification']
validmind.model_validation.sklearn.TrainingTestDegradation Training Test Degradation Tests if model performance degradation between training and test datasets exceeds a predefined threshold.... False True ['datasets', 'model'] {'max_threshold': {'type': 'float', 'default': 0.1}} ['sklearn', 'binary_classification', 'multiclass_classification', 'model_performance', 'visualization'] ['classification', 'text_classification']
validmind.model_validation.statsmodels.GINITable GINI Table Evaluates classification model performance using AUC, GINI, and KS metrics for training and test datasets.... False True ['dataset', 'model'] {} ['model_performance'] ['classification']
validmind.ongoing_monitoring.CalibrationCurveDrift Calibration Curve Drift Evaluates changes in probability calibration between reference and monitoring datasets.... True True ['datasets', 'model'] {'n_bins': {'type': 'int', 'default': 10}, 'drift_pct_threshold': {'type': 'float', 'default': 20}} ['sklearn', 'binary_classification', 'model_performance', 'visualization'] ['classification', 'text_classification']
validmind.ongoing_monitoring.ClassDiscriminationDrift Class Discrimination Drift Compares classification discrimination metrics between reference and monitoring datasets.... False True ['datasets', 'model'] {'drift_pct_threshold': {'type': '_empty', 'default': 20}} ['sklearn', 'binary_classification', 'multiclass_classification', 'model_performance'] ['classification', 'text_classification']
validmind.ongoing_monitoring.ClassificationAccuracyDrift Classification Accuracy Drift Compares classification accuracy metrics between reference and monitoring datasets.... False True ['datasets', 'model'] {'drift_pct_threshold': {'type': '_empty', 'default': 20}} ['sklearn', 'binary_classification', 'multiclass_classification', 'model_performance'] ['classification', 'text_classification']
validmind.ongoing_monitoring.ConfusionMatrixDrift Confusion Matrix Drift Compares confusion matrix metrics between reference and monitoring datasets.... False True ['datasets', 'model'] {'drift_pct_threshold': {'type': '_empty', 'default': 20}} ['sklearn', 'binary_classification', 'multiclass_classification', 'model_performance'] ['classification', 'text_classification']
validmind.ongoing_monitoring.ROCCurveDrift ROC Curve Drift Compares ROC curves between reference and monitoring datasets.... True False ['datasets', 'model'] {} ['sklearn', 'binary_classification', 'model_performance', 'visualization'] ['classification', 'text_classification']

We'll isolate the specific tests we want to run in mpt:

  • model_validation.sklearn.ClassifierPerformance
  • model_validation.sklearn.ConfusionMatrix
  • model_validation.sklearn.MinimumAccuracy
  • model_validation.sklearn.MinimumF1Score
  • model_validation.sklearn.ROCCurve

As we learned in the previous notebook 2 — Start the model validation process, you can use a custom result_id to tag the individual result with a unique identifier by appending this result_id to the test_id with a : separator. We'll append an identifier for our champion model here:

mpt = [
    "validmind.model_validation.sklearn.ClassifierPerformance:logreg_champion",
    "validmind.model_validation.sklearn.ConfusionMatrix:logreg_champion",
    "validmind.model_validation.sklearn.MinimumAccuracy:logreg_champion",
    "validmind.model_validation.sklearn.MinimumF1Score:logreg_champion",
    "validmind.model_validation.sklearn.ROCCurve:logreg_champion"
]

Evaluate performance of the champion model

Now, let's run and log our batch of model performance tests using our testing dataset (vm_test_ds) for our champion model:

  • The test set serves as a proxy for real-world data, providing an unbiased estimate of model performance since it was not used during training or tuning.
  • The test set also acts as protection against selection bias and model tweaking, giving a final, more unbiased checkpoint.
for test in mpt:
    vm.tests.run_test(
        test,
        inputs={
            "dataset": vm_test_ds, "model" : vm_log_model,
        },
    ).log()

Classifier Performance Logreg Champion

The Classifier Performance test evaluates classification model performance using precision, recall, F1-score, accuracy, and ROC AUC. The reported results for logreg_champion show class-level precision, recall, and F1-score for classes 0 and 1, along with weighted and macro averages across classes. Class 0 records precision 0.6431, recall 0.6687, and F1 0.6556, while class 1 records precision 0.6494, recall 0.6231, and F1 0.6359. Overall performance is summarized by weighted-average precision 0.6462, recall 0.6461, F1 0.6459, accuracy 0.6461, and ROC AUC 0.6895.

Key insights:

  • Overall metrics are closely aligned: Weighted-average precision, recall, and F1-score are 0.6462, 0.6461, and 0.6459 respectively, with macro averages at 0.6462, 0.6459, and 0.6458. These values indicate very limited dispersion between aggregate performance measures.
  • Class performance is relatively balanced: Precision is similar across the two classes, at 0.6431 for class 0 and 0.6494 for class 1. F1-scores are also close, at 0.6556 for class 0 and 0.6359 for class 1.
  • Recall differs modestly by class: Recall is higher for class 0 at 0.6687 than for class 1 at 0.6231, a difference of 0.0456. This indicates stronger identification of class 0 relative to class 1 within the evaluated sample.
  • ROC AUC exceeds accuracy: The model’s ROC AUC is 0.6895 compared with accuracy of 0.6461. This shows that the ranking-based discrimination measure is higher than the point classification accuracy reported at the selected threshold.

The results indicate consistent aggregate classification performance, with weighted and macro averages nearly identical across precision, recall, and F1-score. Performance is broadly similar across the two classes, although recall is higher for class 0 than for class 1, leading to a somewhat stronger F1-score for class 0. Accuracy is 0.6461 and ROC AUC is 0.6895, providing both threshold-dependent and threshold-independent views of model discrimination.

Tables

Precision, Recall, and F1

Class Precision Recall F1
0 0.6431 0.6687 0.6556
1 0.6494 0.6231 0.6359
Weighted Average 0.6462 0.6461 0.6459
Macro Average 0.6462 0.6459 0.6458

Accuracy and ROC AUC

Metric Value
Accuracy 0.6461
ROC AUC 0.6895
2026-11-20 23:06:43,277 - INFO(validmind.vm_models.result.result): Test driven block with result_id validmind.model_validation.sklearn.ClassifierPerformance:logreg_champion does not exist in model's document

Confusion Matrix Logreg Champion

The Confusion Matrix test evaluates the classification model’s predictive performance by comparing predicted labels with observed labels and summarizing outcomes as true positives, true negatives, false positives, and false negatives. The heatmap shows 200 true positives, 218 true negatives, 108 false positives, and 121 false negatives. These results describe how predictions are distributed across correct and incorrect classifications for the two classes shown in the matrix.

Key insights:

  • Correct classifications exceed errors: The model records 418 correct classifications in total, consisting of 200 true positives and 218 true negatives, compared with 229 incorrect classifications from 108 false positives and 121 false negatives.
  • Negative class is identified slightly better: True negatives total 218 versus 200 true positives, and false positives total 108 versus 121 false negatives. This indicates somewhat stronger classification performance for the negative class than for the positive class.
  • Both error types remain material: Misclassifications are present in both directions, with 108 false positives and 121 false negatives. The difference between the two error counts is modest, showing that errors are not concentrated in only one type of incorrect prediction.
  • Observed classes are relatively balanced: For the observed labels, class 0 totals 326 cases (218 true negatives + 108 false positives) and class 1 totals 321 cases (200 true positives + 121 false negatives). The confusion matrix therefore reflects performance on a dataset with similar class counts.

The confusion matrix shows that the model produces more correct than incorrect classifications overall, with comparable performance across the two classes. Classification of the negative class is marginally stronger than classification of the positive class, based on the slightly higher true negative count and slightly lower false positive count relative to the corresponding positive-class results. At the same time, both false positives and false negatives occur in meaningful numbers, indicating that prediction errors are present on both sides of the decision boundary.

Figures

ValidMind Figure validmind.model_validation.sklearn.ConfusionMatrix:logreg_champion:0267
2026-11-20 23:06:51,422 - INFO(validmind.vm_models.result.result): Test driven block with result_id validmind.model_validation.sklearn.ConfusionMatrix:logreg_champion does not exist in model's document

❌ Minimum Accuracy Logreg Champion

The Minimum Accuracy test evaluates whether the model’s prediction accuracy meets or exceeds a predefined threshold on the evaluated dataset. The result table reports an accuracy score of 0.6461 against a threshold of 0.7000, along with the associated pass/fail status. The recorded outcome for this run is Fail.

Key insights:

  • Accuracy below threshold: The observed accuracy score is 0.6461, which is lower than the minimum threshold of 0.7000 used in this test.
  • Test returned a fail result: The pass/fail field is reported as Fail, reflecting that the measured accuracy did not meet the defined minimum criterion.
  • Gap to minimum criterion: The difference between the observed score and the threshold is 0.0539, indicating the extent to which the result falls short of the required level in this test.

The result shows that the evaluated model instance did not satisfy the minimum accuracy criterion for this test run. The measured accuracy of 0.6461 remained below the 0.7000 threshold, and the test output therefore registered a Fail status.

Tables

Score Threshold Pass/Fail
0.6461 0.7 Fail
2026-11-20 23:06:56,142 - INFO(validmind.vm_models.result.result): Test driven block with result_id validmind.model_validation.sklearn.MinimumAccuracy:logreg_champion does not exist in model's document

✅ Minimum F1 Score Logreg Champion

The MinimumF1Score test evaluates whether the model’s F1 score on the validation dataset meets a predefined minimum threshold. The result table reports a validation F1 score of 0.6359 alongside a threshold of 0.5, with the test outcome recorded as Pass. This result provides a direct comparison between the observed classification performance and the minimum acceptance criterion defined for the test.

Key insights:

  • F1 score exceeds threshold: The observed validation F1 score is 0.6359 versus a minimum threshold of 0.5, placing the result 0.1359 above the defined cutoff.
  • Test outcome is pass: The recorded test status is Pass, indicating the validation-set F1 score satisfied the configured minimum performance criterion.
  • Measured on validation data: The reported result reflects model performance on the validation dataset, consistent with the test design for assessing the balance between precision and recall outside the training sample.

The test result shows that the model’s validation F1 score exceeded the predefined minimum threshold and therefore passed the assessment. The margin above the threshold indicates that the observed balance between precision and recall, as captured by this metric, met the configured acceptance level in this test.

Tables

Score Threshold Pass/Fail
0.6359 0.5 Pass
2026-11-20 23:07:00,522 - INFO(validmind.vm_models.result.result): Test driven block with result_id validmind.model_validation.sklearn.MinimumF1Score:logreg_champion does not exist in model's document

ROC Curve Logreg Champion

The ROC Curve test evaluates the classification model’s ability to distinguish between classes across threshold levels by plotting the relationship between true positive rate and false positive rate and calculating the AUC. The result for logreg_champion on test_dataset_final shows a single binary ROC curve together with the random-classification reference line. The plotted curve remains above the diagonal reference line across the threshold range, and the reported AUC is 0.69.

Key insights:

  • AUC exceeds random baseline: The model records an AUC of 0.69, compared with the random benchmark of 0.50 shown on the chart.
  • ROC curve stays above diagonal: The ROC curve lies above the randomness line throughout the plotted range, indicating better-than-random rank ordering of positive and negative cases.
  • Discrimination is moderate: The observed AUC and curve shape indicate separation between classes, though the curve does not approach the upper-left corner closely over most of the range.

The ROC result indicates that logreg_champion demonstrates measurable discriminatory power on test_dataset_final, with performance above the random baseline as reflected by an AUC of 0.69. The curve’s consistent position above the diagonal confirms positive classification signal across thresholds. At the same time, the curve’s distance from the upper-left corner indicates that class separation is not strong across the full operating range.

Figures

ValidMind Figure validmind.model_validation.sklearn.ROCCurve:logreg_champion:ca45
2026-11-20 23:07:07,004 - INFO(validmind.vm_models.result.result): Test driven block with result_id validmind.model_validation.sklearn.ROCCurve:logreg_champion does not exist in model's document
Note the output returned indicating that a test-driven block doesn't currently exist in your documentation for some test IDs.

That's expected, as when we run validations tests the results logged need to be manually added to your report as part of your compliance assessment process within the ValidMind Platform.

Log an artifact

As we can observe from the output above, our champion doesn't pass the MinimumAccuracy based on the default thresholds of the out-of-the-box test, so let's log an artifact (finding) in the ValidMind Platform (Learn more: Add and manage artifacts):

  1. From the Inventory in the ValidMind Platform, go to the model you connected to earlier.

  2. In the left sidebar that appears for your model, click Validation under Documents.

  3. Click on 2.2.2. Model Performance to expand that section.

  4. Under the Model Performance Metrics guideline, click to expand the Artifacts panel.

  5. Click Link Artifact and select Validation Issue as the type of artifact.

  6. Click + Add Validation Issue and enter in the details for your validation issue, for example:

    • Title — Champion Logistic Regression Model Fails Minimum Accuracy Threshold
    • Risk Area — Model Performance
    • Documentation Section — 3.2. Model Evaluation
    • Description — The logistic regression champion model was subjected to a Minimum Accuracy test to determine whether its predictive accuracy meets the predefined performance threshold of 0.7. The model achieved an accuracy score of 0.6136, which falls below the required minimum. As a result, the test produced a Fail outcome.
  7. Click Add Validation Issue to submit the validation issue.

  8. Select the validation issue you just added to link to your validation report.

  9. Click Update Linked Artifacts to insert your validation issue.

  10. Confirm that the validation issue you inserted has been correctly inserted into section 2.2.2. Model Performance of the report.

  11. Click on the validation issue to expand the issue, where you can adjust details such as severity, owner, due date, status, etc. as well as include proposed remediation plans or supporting documentation as attachments.

Evaluate performance of challenger model

We've now conducted similar tests as the development team for our champion, with the aim of verifying their test results.

Next, let's see how our challengers compare. We'll use the same batch of tests here as we did in mpt, but append a different result_id to indicate that these results should be associated with our challenger:

mpt_chall = [
    "validmind.model_validation.sklearn.ClassifierPerformance:champion_vs_challenger",
    "validmind.model_validation.sklearn.ConfusionMatrix:champion_vs_challenger",
    "validmind.model_validation.sklearn.MinimumAccuracy:champion_vs_challenger",
    "validmind.model_validation.sklearn.MinimumF1Score:champion_vs_challenger",
    "validmind.model_validation.sklearn.ROCCurve:champion_vs_challenger"
]

We'll run each test once for each model with the same vm_test_ds dataset to compare them:

for test in mpt_chall:
    vm.tests.run_test(
        test,
        input_grid={
            "dataset": [vm_test_ds], "model" : [vm_log_model,vm_rf_model]
        }
    ).log()

Classifier Performance Champion Vs Challenger

The Classifier Performance test evaluates classification model performance using precision, recall, F1-score, accuracy, and ROC AUC. The reported results compare log_model_champion and rf_model across class-level metrics for classes 0 and 1, along with macro and weighted averages. Separate summary metrics are also provided for overall accuracy and ROC AUC, allowing direct comparison of aggregate classification performance between the two models.

Key insights:

  • Random forest outperforms champion model: rf_model records higher overall metrics than log_model_champion, with accuracy of 0.7141 versus 0.6461, weighted-average F1 of 0.7141 versus 0.6459, and ROC AUC of 0.7925 versus 0.6895.

  • Class performance is more balanced in rf_model: For rf_model, class-level precision, recall, and F1 are closely aligned across both classes, with F1 scores of 0.7132 for class 0 and 0.7149 for class 1. In log_model_champion, class 0 F1 is 0.6556 and class 1 F1 is 0.6359, indicating lower and slightly less even class performance.

  • Champion model shows lower discrimination strength: The ROC AUC for log_model_champion is 0.6895, compared with 0.7925 for rf_model. This gap indicates materially stronger rank-order separation in the random forest model under this test.

  • Average metrics are internally consistent: For both models, macro-average and weighted-average precision, recall, and F1 are nearly identical. log_model_champion shows weighted and macro F1 of 0.6459 and 0.6458, while rf_model shows 0.7141 for both, indicating little divergence between class-aggregated views in the reported results.

The results show a consistent performance advantage for rf_model over log_model_champion across all reported aggregate measures, including accuracy, F1, and ROC AUC. Class-level results for the random forest are both stronger and more even across classes 0 and 1, while the logistic champion model exhibits uniformly lower precision, recall, and F1. The close alignment between macro and weighted averages for both models indicates that the aggregate comparison is consistent across the reported averaging methods.

Tables

model Class Precision Recall F1
log_model_champion 0 0.6431 0.6687 0.6556
log_model_champion 1 0.6494 0.6231 0.6359
log_model_champion Weighted Average 0.6462 0.6461 0.6459
log_model_champion Macro Average 0.6462 0.6459 0.6458
rf_model 0 0.7210 0.7055 0.7132
rf_model 1 0.7073 0.7227 0.7149
rf_model Weighted Average 0.7142 0.7141 0.7141
rf_model Macro Average 0.7142 0.7141 0.7141
model Metric Value
log_model_champion Accuracy 0.6461
log_model_champion ROC AUC 0.6895
rf_model Accuracy 0.7141
rf_model ROC AUC 0.7925
2026-11-20 23:07:14,319 - INFO(validmind.vm_models.result.result): Test driven block with result_id validmind.model_validation.sklearn.ClassifierPerformance:champion_vs_challenger does not exist in model's document

Confusion Matrix Champion Vs Challenger

The ConfusionMatrix:champion_vs_challenger test evaluates classification performance by comparing predicted class labels with observed class labels and summarizing the results as counts of true positives, true negatives, false positives, and false negatives. The result includes confusion matrices for two models: log_model_champion and rf_model. For log_model_champion, the matrix shows 200 true positives, 218 true negatives, 108 false positives, and 121 false negatives. For rf_model, the matrix shows 232 true positives, 230 true negatives, 96 false positives, and 89 false negatives.

Key insights:

  • Challenger records more correct classifications: rf_model shows higher counts in both correct prediction cells, with 232 true positives versus 200 for log_model_champion, and 230 true negatives versus 218.

  • Challenger reduces both error types: rf_model has fewer false negatives and false positives than log_model_champion, with false negatives decreasing from 121 to 89 and false positives decreasing from 108 to 96.

  • Positive-class detection is stronger in challenger: The increase in true positives together with the reduction in false negatives indicates that rf_model identifies more actual positive cases than log_model_champion.

  • Negative-class identification also improves: rf_model shows a higher true negative count and a lower false positive count, indicating improved separation for observed negative cases relative to log_model_champion.

The confusion matrix comparison shows that rf_model produces stronger classification outcomes than log_model_champion across all four confusion matrix components. Correct classifications increase for both positive and negative classes, while both false negatives and false positives decrease. Collectively, the observed results indicate more effective class separation in the challenger model on this test sample.

Figures

ValidMind Figure validmind.model_validation.sklearn.ConfusionMatrix:champion_vs_challenger:3f9e
ValidMind Figure validmind.model_validation.sklearn.ConfusionMatrix:champion_vs_challenger:9467
2026-11-20 23:07:23,225 - INFO(validmind.vm_models.result.result): Test driven block with result_id validmind.model_validation.sklearn.ConfusionMatrix:champion_vs_challenger does not exist in model's document

❌ Minimum Accuracy Champion Vs Challenger

The Minimum Accuracy test evaluates whether a model’s prediction accuracy meets or exceeds a defined minimum threshold. The results table compares each model’s observed accuracy score against the threshold of 0.7 and records the corresponding pass/fail outcome. Two models are shown: log_model_champion with a score of 0.6461 and rf_model with a score of 0.7141.

Key insights:

  • Only one model passed: rf_model achieved an accuracy score of 0.7141 against the 0.7 threshold and is marked as Pass, while log_model_champion is marked as Fail.
  • Champion model fell below threshold: log_model_champion recorded an accuracy of 0.6461, which is 0.0539 below the minimum threshold.
  • Challenger exceeded threshold narrowly: rf_model exceeded the threshold by 0.0141, indicating a pass with limited margin above the minimum requirement.
  • Observed accuracy gap between models: The difference in accuracy between rf_model and log_model_champion is 0.0680 based on the reported scores.

The test results show differing threshold outcomes across the two evaluated models. rf_model met the minimum accuracy criterion, while log_model_champion did not. The reported scores indicate that the challenger outperformed the champion on this test by 0.0680, with the challenger passing slightly above the threshold and the champion remaining below it.

Tables

model Score Threshold Pass/Fail
log_model_champion 0.6461 0.7 Fail
rf_model 0.7141 0.7 Pass
2026-11-20 23:07:28,376 - INFO(validmind.vm_models.result.result): Test driven block with result_id validmind.model_validation.sklearn.MinimumAccuracy:champion_vs_challenger does not exist in model's document

✅ Minimum F1 Score Champion Vs Challenger

The MinimumF1Score test evaluates whether each model’s validation-set F1 score meets a predefined minimum threshold. The results table reports the observed F1 score, the threshold value, and the pass/fail outcome for each evaluated model. Two models are included in this test: log_model_champion with an F1 score of 0.6359 and rf_model with an F1 score of 0.7149, and both are assessed against the same threshold of 0.5.

Key insights:

  • Both models pass the threshold: log_model_champion and rf_model both exceed the minimum F1 score threshold of 0.5, resulting in a pass outcome for each model.
  • Random forest has the higher F1 score: rf_model records an F1 score of 0.7149 compared with 0.6359 for log_model_champion, a difference of 0.0790.
  • Positive margin over threshold: log_model_champion exceeds the threshold by 0.1359, while rf_model exceeds it by 0.2149, indicating both models are above the minimum acceptance level by measurable margins.

The test results show that both evaluated models satisfy the minimum validation F1 score requirement. Among the two, rf_model demonstrates the stronger F1 performance and the larger margin above the threshold, while log_model_champion also remains above the defined cutoff with a passing result.

Tables

model Score Threshold Pass/Fail
log_model_champion 0.6359 0.5 Pass
rf_model 0.7149 0.5 Pass
2026-11-20 23:07:33,359 - INFO(validmind.vm_models.result.result): Test driven block with result_id validmind.model_validation.sklearn.MinimumF1Score:champion_vs_challenger does not exist in model's document

ROC Curve Champion Vs Challenger

The ROCCurve test evaluates classification performance by plotting the receiver operating characteristic curve and calculating the area under the curve (AUC) for each model. The results show ROC curves for two binary classifiers on test_dataset_final: log_model_champion and rf_model. Each plot compares the model-specific ROC curve against the random-classification baseline, with reported AUC values of 0.69 for log_model_champion and 0.79 for rf_model.

Key insights:

  • Random forest has higher AUC: rf_model achieves an AUC of 0.79, compared with 0.69 for log_model_champion. This indicates stronger class discrimination by the random forest on the evaluated test dataset.
  • Both models outperform randomness: Both ROC curves remain above the random baseline and both AUC values exceed 0.5. The plotted results show discriminative ability for each model on the binary classification task.
  • Separation is stronger at lower false-positive rates for rf_model: The rf_model ROC curve rises more steeply in the early portion of the plot, reaching higher true positive rates at comparatively low false positive rates than log_model_champion.
  • Champion model shows moderate discrimination: The log_model_champion ROC curve is consistently above the diagonal baseline, but with a flatter profile than rf_model, corresponding to its lower AUC of 0.69.

Overall, the ROC results show that both evaluated models distinguish between classes better than random classification on test_dataset_final. The most material difference is the higher AUC and steeper ROC trajectory of rf_model, which indicates stronger ranking performance than log_model_champion across classification thresholds. The log_model_champion result remains positive relative to the random baseline but reflects weaker separation than the challenger model.

Figures

ValidMind Figure validmind.model_validation.sklearn.ROCCurve:champion_vs_challenger:6734
ValidMind Figure validmind.model_validation.sklearn.ROCCurve:champion_vs_challenger:0024
2026-11-20 23:07:42,855 - INFO(validmind.vm_models.result.result): Test driven block with result_id validmind.model_validation.sklearn.ROCCurve:champion_vs_challenger does not exist in model's document
Based on the performance metrics, our challenger random forest classification model passes the MinimumAccuracy where our champion did not.

In your validation report, support your recommendation in your validation issue's Proposed Remediation Plan to investigate the usage of our challenger by inserting the performance tests we logged with this notebook into the appropriate section.

Run diagnostic tests

Next, we want to inspect the robustness and stability testing comparison between our champion and challenger.

Use list_tests() to list all available diagnosis tests applicable to classification tasks:

vm.tests.list_tests(tags=["model_diagnosis"], task="classification")
ID Name Description Has Figure Has Table Required Inputs Params Tags Tasks
validmind.model_validation.sklearn.OverfitDiagnosis Overfit Diagnosis Assesses potential overfitting in a model's predictions, identifying regions where performance between training and... True True ['model', 'datasets'] {'metric': {'type': 'str', 'default': None}, 'cut_off_threshold': {'type': 'float', 'default': 0.04}} ['sklearn', 'binary_classification', 'multiclass_classification', 'linear_regression', 'model_diagnosis'] ['classification', 'regression']
validmind.model_validation.sklearn.RobustnessDiagnosis Robustness Diagnosis Assesses the robustness of a machine learning model by evaluating performance decay under noisy conditions.... True True ['datasets', 'model'] {'metric': {'type': 'str', 'default': None}, 'scaling_factor_std_dev_list': {'type': 'List', 'default': [0.1, 0.2, 0.3, 0.4, 0.5]}, 'performance_decay_threshold': {'type': 'float', 'default': 0.05}} ['sklearn', 'model_diagnosis', 'visualization'] ['classification', 'regression']
validmind.model_validation.sklearn.WeakspotsDiagnosis Weakspots Diagnosis Identifies and visualizes weak spots in a machine learning model's performance across various sections of the... True True ['datasets', 'model'] {'features_columns': {'type': 'Optional', 'default': None}, 'metrics': {'type': 'Optional', 'default': None}, 'thresholds': {'type': 'Optional', 'default': None}} ['sklearn', 'binary_classification', 'multiclass_classification', 'model_diagnosis', 'visualization'] ['classification', 'text_classification']

Let’s now assess the models for potential signs of overfitting and identify any sub-segments where performance may inconsistent with the model_validation.sklearn.OverfitDiagnosis test.

Overfitting occurs when a model learns the training data too well, capturing not only the true pattern but noise and random fluctuations resulting in excellent performance on the training dataset but poor generalization to new, unseen data:

  • Since the training dataset (vm_train_ds) was used to fit the model, we use this set to establish a baseline performance for how well the model performs on data it has already seen.
  • The testing dataset (vm_test_ds) was never seen during training, and here simulates real-world generalization, or how well the model performs on new, unseen data.
vm.tests.run_test(
    test_id="validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger",
    input_grid={
        "datasets": [[vm_train_ds,vm_test_ds]],
        "model" : [vm_log_model,vm_rf_model]
    }
).log()

Overfit Diagnosis Champion Vs Challenger

The Overfit Diagnosis test evaluates whether model performance differs materially between training and test data within feature-level segments, using AUC gap thresholds to identify localized overfitting. The reported results compare the champion logistic model (log_model_champion) and challenger random forest model (rf_model) across binned slices of features including CreditScore, Tenure, Balance, EstimatedSalary, geography indicators, and binary account attributes. The output provides training and test AUC values, record counts, and segment-level gaps, with the default cutoff threshold set at 0.04. The figures visualize those gaps for each feature and show where individual slices exceed the threshold.

Key insights:

  • Challenger shows broader gap inflation: The rf_model exceeds the 0.04 threshold in every reported segment, with training AUC fixed at 1.0 across all listed slices and test AUC gaps ranging from 0.1268 to 0.4797.
  • Champion gaps are more localized: The log_model_champion shows threshold exceedances in selected slices rather than uniformly across all features. Reported gaps range from 0.0437 to 0.9127 in flagged segments, while several plotted slices are below threshold or negative.
  • Largest champion gap occurs in Balance: For log_model_champion, the largest reported gap is in Balance slice (23838.756, 47677.512], where training AUC is 0.9127 and test AUC is 0.0, producing a gap of 0.9127 with 23 training and 5 test records. Another large Balance gap appears in (190710.048, 214548.804] with a gap of 0.5794 based on 23 training and 7 test records.
  • Random forest overfit pattern is consistent across core features: For rf_model, all CreditScore slices from (400.0, 450.0] through (800.0, 850.0] are flagged, with gaps between 0.1567 and 0.3077. All Tenure slices are also flagged, with the largest gap at (9.0, 10.0] equal to 0.3487.
  • NumOfProducts is especially elevated for the challenger: In rf_model, NumOfProducts gaps are 0.2911 for (0.997, 1.3], 0.2689 for (1.9, 2.2], and 0.4797 for (2.8, 3.1], making this feature one of the most pronounced challenger overfit regions.
  • Champion overfit concentration includes low credit score and selected salary/geography slices: For log_model_champion, the largest CreditScore gaps occur in (400.0, 450.0] and (450.0, 500.0] at 0.2347 and 0.2316. Additional flagged slices include EstimatedSalary (119921.56, 139893.195] at 0.1000, Geography_Germany (0.9, 1.0] at 0.0520, and Geography_Spain (0.9, 1.0] at 0.0552.
  • Several champion slices show negative plotted gaps: The champion plots include negative gap regions for some slices of CreditScore, Tenure, Balance, NumOfProducts, HasCrCard, IsActiveMember, EstimatedSalary, and Gender_Male, indicating segments where test AUC exceeds training AUC in the plotted output.

Taken together, the results show a clear difference in overfit profile between the two models. The challenger random forest exhibits uniformly elevated train-test AUC gaps across all reported feature segments, whereas the champion logistic model displays a more limited set of flagged regions concentrated in specific Balance, CreditScore, Tenure, EstimatedSalary, and geography slices. The largest individual gaps occur in small-sample Balance segments for the champion and in NumOfProducts, Balance, and Tenure segments for the challenger.

Tables

model Feature Slice Number of Training Records Number of Test Records Training AUC Test AUC Gap
log_model_champion CreditScore (400.0, 450.0] 48 8 0.6722 0.4375 0.2347
log_model_champion CreditScore (450.0, 500.0] 128 26 0.6932 0.4615 0.2316
log_model_champion CreditScore (650.0, 700.0] 508 126 0.7178 0.6700 0.0478
log_model_champion CreditScore (700.0, 750.0] 379 106 0.7043 0.6219 0.0824
log_model_champion Tenure (4.0, 5.0] 254 74 0.7193 0.5780 0.1413
log_model_champion Tenure (9.0, 10.0] 142 31 0.6840 0.6404 0.0437
log_model_champion Balance (23838.756, 47677.512] 23 5 0.9127 0.0000 0.9127
log_model_champion Balance (47677.512, 71516.268] 71 22 0.6508 0.4554 0.1954
log_model_champion Balance (143032.536, 166871.292] 252 73 0.6941 0.6041 0.0900
log_model_champion Balance (190710.048, 214548.804] 23 7 0.5794 0.0000 0.5794
log_model_champion EstimatedSalary (60006.655, 79978.29] 257 77 0.7094 0.6467 0.0627
log_model_champion EstimatedSalary (119921.56, 139893.195] 256 68 0.7148 0.6147 0.1000
log_model_champion EstimatedSalary (159864.83, 179836.465] 289 63 0.7155 0.6481 0.0674
log_model_champion Geography_Germany (0.9, 1.0] 793 202 0.6751 0.6231 0.0520
log_model_champion Geography_Spain (0.9, 1.0] 589 150 0.6889 0.6336 0.0552
rf_model CreditScore (400.0, 450.0] 48 8 1.0000 0.7500 0.2500
rf_model CreditScore (450.0, 500.0] 128 26 1.0000 0.6923 0.3077
rf_model CreditScore (500.0, 550.0] 269 64 1.0000 0.8433 0.1567
rf_model CreditScore (550.0, 600.0] 363 89 1.0000 0.7171 0.2829
rf_model CreditScore (600.0, 650.0] 472 131 1.0000 0.8190 0.1810
rf_model CreditScore (650.0, 700.0] 508 126 1.0000 0.8186 0.1814
rf_model CreditScore (700.0, 750.0] 379 106 1.0000 0.8033 0.1967
rf_model CreditScore (750.0, 800.0] 249 50 1.0000 0.7681 0.2319
rf_model CreditScore (800.0, 850.0] 158 44 1.0000 0.8280 0.1720
rf_model Tenure (-0.01, 1.0] 372 86 1.0000 0.8379 0.1621
rf_model Tenure (1.0, 2.0] 261 60 1.0000 0.8348 0.1652
rf_model Tenure (2.0, 3.0] 259 79 1.0000 0.7696 0.2304
rf_model Tenure (3.0, 4.0] 267 52 1.0000 0.6830 0.3170
rf_model Tenure (4.0, 5.0] 254 74 1.0000 0.7271 0.2729
rf_model Tenure (5.0, 6.0] 241 65 1.0000 0.8281 0.1719
rf_model Tenure (6.0, 7.0] 253 62 1.0000 0.8464 0.1536
rf_model Tenure (7.0, 8.0] 266 74 1.0000 0.8304 0.1696
rf_model Tenure (8.0, 9.0] 270 64 1.0000 0.8365 0.1635
rf_model Tenure (9.0, 10.0] 142 31 1.0000 0.6513 0.3487
rf_model Balance (-238.388, 23838.756] 841 187 1.0000 0.8604 0.1396
rf_model Balance (47677.512, 71516.268] 71 22 1.0000 0.5491 0.4509
rf_model Balance (71516.268, 95355.024] 233 48 1.0000 0.7674 0.2326
rf_model Balance (95355.024, 119193.78] 520 147 1.0000 0.8003 0.1997
rf_model Balance (119193.78, 143032.536] 534 135 1.0000 0.7149 0.2851
rf_model Balance (143032.536, 166871.292] 252 73 1.0000 0.6825 0.3175
rf_model Balance (166871.292, 190710.048] 86 21 1.0000 0.7163 0.2837
rf_model Balance (190710.048, 214548.804] 23 7 1.0000 0.8333 0.1667
rf_model NumOfProducts (0.997, 1.3] 1509 377 1.0000 0.7089 0.2911
rf_model NumOfProducts (1.9, 2.2] 898 213 1.0000 0.7311 0.2689
rf_model NumOfProducts (2.8, 3.1] 147 44 1.0000 0.5203 0.4797
rf_model HasCrCard (-0.001, 0.1] 749 183 1.0000 0.7908 0.2092
rf_model HasCrCard (0.9, 1.0] 1836 464 1.0000 0.7922 0.2078
rf_model IsActiveMember (-0.001, 0.1] 1374 328 1.0000 0.7484 0.2516
rf_model IsActiveMember (0.9, 1.0] 1211 319 1.0000 0.8056 0.1944
rf_model EstimatedSalary (-107.966, 20063.385] 236 59 1.0000 0.8732 0.1268
rf_model EstimatedSalary (20063.385, 40035.02] 255 58 1.0000 0.8251 0.1749
rf_model EstimatedSalary (40035.02, 60006.655] 262 72 1.0000 0.7811 0.2189
rf_model EstimatedSalary (60006.655, 79978.29] 257 77 1.0000 0.7590 0.2410
rf_model EstimatedSalary (79978.29, 99949.925] 263 65 1.0000 0.8105 0.1895
rf_model EstimatedSalary (99949.925, 119921.56] 242 77 1.0000 0.8424 0.1576
rf_model EstimatedSalary (119921.56, 139893.195] 256 68 1.0000 0.7190 0.2810
rf_model EstimatedSalary (139893.195, 159864.83] 274 53 1.0000 0.7571 0.2429
rf_model EstimatedSalary (159864.83, 179836.465] 289 63 1.0000 0.7685 0.2315
rf_model EstimatedSalary (179836.465, 199808.1] 251 55 1.0000 0.8118 0.1882
rf_model Geography_Germany (-0.001, 0.1] 1792 445 1.0000 0.7821 0.2179
rf_model Geography_Germany (0.9, 1.0] 793 202 1.0000 0.7358 0.2642
rf_model Geography_Spain (-0.001, 0.1] 1996 497 1.0000 0.7871 0.2129
rf_model Geography_Spain (0.9, 1.0] 589 150 1.0000 0.8004 0.1996
rf_model Gender_Male (-0.001, 0.1] 1268 306 1.0000 0.7906 0.2094
rf_model Gender_Male (0.9, 1.0] 1317 341 1.0000 0.7963 0.2037

Figures

ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:009d
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:c023
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:4754
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:2ce3
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:8516
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:53c6
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:2b1e
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:d39c
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:6c8d
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:df8d
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:77a6
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:8ac6
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:90a1
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:40ad
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:3f88
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:dba0
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:d657
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:ec71
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:67e5
ValidMind Figure validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger:9ba5
2026-11-20 23:07:57,864 - INFO(validmind.vm_models.result.result): Test driven block with result_id validmind.model_validation.sklearn.OverfitDiagnosis:champion_vs_challenger does not exist in model's document

Let's also conduct robustness and stability testing of the two models with the model_validation.sklearn.RobustnessDiagnosis test.

Robustness refers to a model's ability to maintain consistent performance, and stability refers to a model's ability to produce consistent outputs over time across different data subsets.

Again, we'll use both the training and testing datasets to establish baseline performance and to simulate real-world generalization:

vm.tests.run_test(
    test_id="validmind.model_validation.sklearn.RobustnessDiagnosis:Champion_vs_LogRegression",
    input_grid={
        "datasets": [[vm_train_ds,vm_test_ds]],
        "model" : [vm_log_model,vm_rf_model]
    },
).log()

❌ Robustness Diagnosis Champion Vs Log Regression

The Robustness Diagnosis:Champion_vs_LogRegression test evaluates model resilience by measuring AUC changes after adding Gaussian noise to input features at increasing perturbation sizes. Results are reported for log_model_champion and rf_model on both train_dataset_final and test_dataset_final, with perturbation sizes from baseline through 0.5 and associated performance decay and pass/fail outcomes. The tables and plots show how each model’s AUC changes across noise levels, allowing comparison of decay patterns between training and test data for both models.

Key insights:

  • Logistic model shows limited decay: log_model_champion starts at AUC 0.6916 on train and 0.6895 on test, and declines to 0.6700 and 0.6572, respectively, at perturbation size 0.5. Performance decay remains between 0.0004 and 0.0216 on train and between 0.0015 and 0.0324 on test across non-baseline perturbations, with all observations marked as passed.

  • Random forest has higher baseline AUC: rf_model begins with AUC 1.0000 on train and 0.7925 on test at baseline, exceeding the corresponding baseline AUC values of log_model_champion on both datasets. This higher starting point is accompanied by a wider separation between train and test AUC at baseline.

  • Random forest train performance declines sharply: For rf_model, train AUC decreases from 1.0000 at baseline to 0.7989 at perturbation size 0.5, with performance decay increasing from 0.0145 at 0.1 to 0.2011 at 0.5. Train results fail from perturbation size 0.2 onward.

  • Random forest test behavior is less monotonic: On test_dataset_final, rf_model AUC changes from 0.7925 at baseline to 0.8002 at 0.1, then to 0.7921, 0.7794, 0.7359, and 0.7509 as perturbation increases. This produces a negative performance decay at 0.1 (-0.0078), a failed result at 0.4 with decay 0.0566, and passed results at the other test perturbation levels.

  • Pass/fail outcomes differ materially by model: All log_model_champion train and test evaluations are marked as passed across perturbation sizes 0.0 through 0.5. In contrast, rf_model records multiple failures, specifically on train at 0.2, 0.3, 0.4, and 0.5, and on test at 0.4.

The results show two distinct robustness profiles under Gaussian noise. log_model_champion exhibits gradual AUC reduction with consistently small performance decay and passes across all evaluated perturbation levels on both train and test datasets. rf_model maintains higher baseline AUC, but its training performance deteriorates substantially as perturbation increases, with repeated failures from 0.2 onward, while test performance varies more irregularly and includes both a slight improvement at 0.1 and a failure at 0.4.

Tables

model Perturbation Size Dataset Row Count AUC Performance Decay Passed
log_model_champion Baseline (0.0) train_dataset_final 2585 0.6916 0.0000 True
log_model_champion Baseline (0.0) test_dataset_final 647 0.6895 0.0000 True
log_model_champion 0.1 train_dataset_final 2585 0.6912 0.0004 True
log_model_champion 0.1 test_dataset_final 647 0.6877 0.0019 True
log_model_champion 0.2 train_dataset_final 2585 0.6873 0.0043 True
log_model_champion 0.2 test_dataset_final 647 0.6880 0.0015 True
log_model_champion 0.3 train_dataset_final 2585 0.6850 0.0066 True
log_model_champion 0.3 test_dataset_final 647 0.6859 0.0036 True
log_model_champion 0.4 train_dataset_final 2585 0.6833 0.0083 True
log_model_champion 0.4 test_dataset_final 647 0.6825 0.0071 True
log_model_champion 0.5 train_dataset_final 2585 0.6700 0.0216 True
log_model_champion 0.5 test_dataset_final 647 0.6572 0.0324 True
rf_model Baseline (0.0) train_dataset_final 2585 1.0000 0.0000 True
rf_model Baseline (0.0) test_dataset_final 647 0.7925 0.0000 True
rf_model 0.1 train_dataset_final 2585 0.9855 0.0145 True
rf_model 0.1 test_dataset_final 647 0.8002 -0.0078 True
rf_model 0.2 train_dataset_final 2585 0.9433 0.0567 False
rf_model 0.2 test_dataset_final 647 0.7921 0.0003 True
rf_model 0.3 train_dataset_final 2585 0.8949 0.1051 False
rf_model 0.3 test_dataset_final 647 0.7794 0.0130 True
rf_model 0.4 train_dataset_final 2585 0.8515 0.1485 False
rf_model 0.4 test_dataset_final 647 0.7359 0.0566 False
rf_model 0.5 train_dataset_final 2585 0.7989 0.2011 False
rf_model 0.5 test_dataset_final 647 0.7509 0.0415 True

Figures

ValidMind Figure validmind.model_validation.sklearn.RobustnessDiagnosis:Champion_vs_LogRegression:6666
ValidMind Figure validmind.model_validation.sklearn.RobustnessDiagnosis:Champion_vs_LogRegression:ef47
2026-11-20 23:08:11,881 - INFO(validmind.vm_models.result.result): Test driven block with result_id validmind.model_validation.sklearn.RobustnessDiagnosis:Champion_vs_LogRegression does not exist in model's document

Run feature importance tests

We also want to verify the relative influence of different input features on our models' predictions, as well as inspect the differences between our champion and challenger to see if a certain model offers more understandable or logical importance scores for features.

Use list_tests() to identify all the feature importance tests for classification:

# Store the feature importance tests
FI = vm.tests.list_tests(tags=["feature_importance"], task="classification",pretty=False)
FI
['validmind.model_validation.FeaturesAUC',
 'validmind.model_validation.sklearn.PermutationFeatureImportance',
 'validmind.model_validation.sklearn.SHAPGlobalImportance']

We'll only use our testing dataset (vm_test_ds) here, to provide a realistic, unseen sample that mimic future or production data, as the training dataset has already influenced our model during learning:

# Run and log our feature importance tests for both models for the testing dataset
for test in FI:
    vm.tests.run_test(
        "".join((test,':champion_vs_challenger')),
        input_grid={
            "dataset": [vm_test_ds], "model" : [vm_log_model,vm_rf_model]
        },
    ).log()

Features Champion Vs Challenger

The FeaturesAUC test evaluates the univariate discriminatory power of each feature by calculating an AUC score for that feature alone against the binary target. The chart for test_dataset_final ranks features by their individual AUC values, showing a spread from approximately 0.40 to 0.63. Geography_Germany has the highest observed AUC, followed by Balance, while IsActiveMember has the lowest observed AUC. Most remaining features cluster in a comparatively narrow band between roughly 0.45 and 0.51.

Key insights:

  • Geography_Germany leads all features: Geography_Germany has the highest individual AUC at approximately 0.63, making it the strongest univariate discriminator in the displayed ranking.

  • Balance is the second strongest feature: Balance follows with an AUC of approximately 0.58, separating from the main cluster of features that remain closer to 0.50.

  • Most features are tightly clustered: EstimatedSalary, Tenure, Gender_Male, CreditScore, HasCrCard, Geography_Spain, and NumOfProducts fall within a relatively narrow range of about 0.45 to 0.51, indicating similar standalone discrimination levels across this group.

  • IsActiveMember is the lowest-ranked feature: IsActiveMember records the lowest AUC at approximately 0.40, placing it below all other displayed features in standalone discriminatory performance.

The results show that individual feature-level discrimination is uneven across the tested variables, with Geography_Germany and Balance standing apart from the rest of the feature set. Most other features exhibit broadly similar univariate AUC values near 0.50, while IsActiveMember occupies the lower end of the ranking. Overall, the feature ranking indicates that standalone discriminatory strength is concentrated in a small number of variables rather than distributed evenly across the set.

Figures

ValidMind Figure validmind.model_validation.FeaturesAUC:champion_vs_challenger:87d2
ValidMind Figure validmind.model_validation.FeaturesAUC:champion_vs_challenger:5fc5
2026-11-20 23:08:22,165 - INFO(validmind.vm_models.result.result): Test driven block with result_id validmind.model_validation.FeaturesAUC:champion_vs_challenger does not exist in model's document

Permutation Feature Importance Champion Vs Challenger

The Permutation Feature Importance test evaluates the significance of each input feature by measuring the change in model performance after randomly permuting that feature. The results are presented separately for the champion logistic model and the challenger random forest model, with larger positive values indicating greater dependence on the corresponding feature. The two plots show a ranked importance profile for the shared feature set, allowing direct comparison of which variables drive each model’s predictions most strongly.

Key insights:

  • Champion model is led by Geography_Germany: In the champion model, Geography_Germany is the largest contributor, with permutation importance around 0.07, followed by IsActiveMember at approximately 0.06. These two features are visibly separated from the remaining variables.

  • Challenger model is led by NumOfProducts: In the challenger model, NumOfProducts has the highest importance at roughly 0.14, substantially above all other features. Geography_Germany and Balance form a second tier at approximately 0.07 and 0.06 respectively.

  • Feature rankings differ materially across models: NumOfProducts is near zero in the champion model but is the dominant feature in the challenger model. Conversely, IsActiveMember is one of the strongest features in the champion model but is notably lower in the challenger model, at roughly 0.025.

  • Several features have near-zero or negative importance: In the champion model, HasCrCard, Geography_Spain, Tenure, and EstimatedSalary appear negative, while NumOfProducts is close to zero. In the challenger model, EstimatedSalary, CreditScore, and HasCrCard are negative, and Gender_Male is approximately zero.

  • Champion importance is more concentrated: The champion model’s importance profile is concentrated in two leading variables, after which values decline sharply. The challenger model distributes importance across a broader set of variables, including NumOfProducts, Geography_Germany, Balance, Tenure, and IsActiveMember.

The permutation importance results show that the champion and challenger models rely on different subsets of the same input features. The champion model is primarily driven by Geography_Germany and IsActiveMember, whereas the challenger model depends most strongly on NumOfProducts, with additional contribution from Geography_Germany and Balance. Both models also include several features with minimal or negative permutation importance, indicating limited contribution under this test.

Figures

ValidMind Figure validmind.model_validation.sklearn.PermutationFeatureImportance:champion_vs_challenger:0347
ValidMind Figure validmind.model_validation.sklearn.PermutationFeatureImportance:champion_vs_challenger:91a6
2026-11-20 23:08:37,413 - INFO(validmind.vm_models.result.result): Test driven block with result_id validmind.model_validation.sklearn.PermutationFeatureImportance:champion_vs_challenger does not exist in model's document

SHAP Global Importance Champion Vs Challenger

The SHAPGlobalImportance test evaluates global feature importance using SHAP values to characterize how individual predictors contribute to model output. The results are shown for both the champion model (log_model_champion) and the challenger model (rf_model) through normalized mean absolute SHAP importance plots and SHAP summary plots. The importance plots rank features by relative contribution, while the summary plots show the direction, spread, and concentration of SHAP values for each feature across observations. Together, these visuals provide a side-by-side view of which variables drive each model most strongly and how their impacts vary.

Key insights:

  • Different leading drivers across models: The champion model is led by IsActiveMember, followed by Geography_Germany and Gender_Male, whereas the challenger model is led by NumOfProducts, followed by IsActiveMember, Geography_Germany, and Gender_Male. This indicates a materially different feature reliance structure between the two models.

  • Challenger shows strongest concentration in one feature: In the challenger model, NumOfProducts has the highest normalized SHAP importance at the top of the scale and stands well above the remaining features. In the champion model, the top three features are more closely grouped, with IsActiveMember highest and Geography_Germany and Gender_Male also contributing strongly.

  • Champion importance is concentrated in categorical indicators: The champion model’s highest-ranked features are IsActiveMember, Geography_Germany, and Gender_Male, all of which appear above continuous variables such as Balance, CreditScore, and EstimatedSalary. Balance is the highest-ranked continuous variable in the champion model but remains notably below the top three indicators.

  • Directionality is visible for several binary features: In the champion summary plot, higher values for IsActiveMember, Geography_Germany, and Gender_Male align with positive SHAP values, while lower values align with negative SHAP values. A similar directional separation is visible in the challenger summary plot for NumOfProducts, IsActiveMember, Geography_Germany, and Gender_Male.

  • Balance behaves differently across models: In the champion model, Balance has a wider positive SHAP spread and ranks fourth in global importance. In the challenger model, Balance ranks below Gender_Male and shows a more compact distribution around zero relative to the challenger’s top-ranked features.

  • Lower-ranked features remain consistently limited: Geography_Spain is the lowest-ranked feature in both models, with SHAP values tightly clustered near zero in the summary plots. HasCrCard also remains in the lower-importance group in both models.

The SHAP results show that the champion and challenger models rely on different primary drivers despite sharing several important variables. The champion model places its greatest emphasis on IsActiveMember and other indicator variables, while the challenger model is dominated by NumOfProducts with IsActiveMember as a secondary driver. Across both models, lower-ranked features such as Geography_Spain and HasCrCard contribute comparatively little, and the summary plots show that the magnitude and directional spread of feature effects differ meaningfully between the two model structures.

Figures

ValidMind Figure validmind.model_validation.sklearn.SHAPGlobalImportance:champion_vs_challenger:b931
ValidMind Figure validmind.model_validation.sklearn.SHAPGlobalImportance:champion_vs_challenger:8fbd
ValidMind Figure validmind.model_validation.sklearn.SHAPGlobalImportance:champion_vs_challenger:f184
ValidMind Figure validmind.model_validation.sklearn.SHAPGlobalImportance:champion_vs_challenger:cceb
2026-11-20 23:08:50,195 - INFO(validmind.vm_models.result.result): Test driven block with result_id validmind.model_validation.sklearn.SHAPGlobalImportance:champion_vs_challenger does not exist in model's document

In summary

In this third notebook, you learned how to:

Next steps

Finalize validation and reporting

Now that you're familiar with the basics of using the ValidMind Library to run and log validation tests, let's learn how to implement some custom tests and wrap up our validation: 4 — Finalize validation and reporting


Copyright © 2023-2026 ValidMind Inc. All rights reserved.
Refer to LICENSE for details.
SPDX-License-Identifier: AGPL-3.0 AND ValidMind Commercial