Checking that Pipeline.fit_predict delivers X_val in the same preprocessing space
A validation value can remain in its original units while training data is standardized, without an exception. Inspect the final estimator boundary.
Configuration does not establish delivered values
Verify that training and validation data share a feature space at the final estimator's actual input. A Pipeline can contain the same scaler while a different metadata path delivers untransformed validation values. The validation owner needs the delivered values and their relationship to the fitted preprocessor, not just a configuration screenshot. [1, 2, 3]
A report separating fit from fit_predict
scikit-learn issue 35031 demonstrates a Pipeline with metadata routing and X_val in transform_input where fit_predict leaves validation values unchanged. It compares fit using a custom model that records the X_val received at the final estimator. The source explicitly limits its demonstration to incorrect metadata delivery, not incorrect built-in-model predictions or a production incident. [1]
Do not fit a new scaler to the validation values
Record X_val at the final estimator and compare it with an independent transform using the fitted preprocessor. Fitting another scaler to validation data creates a different reference space, so that result is not the expected value. Retain the invoked method and fitted-preprocessor identity to establish comparison under the same object and feature order. [1, 3]
The mean maps to 0
Illustrative training values 0, 10, 20 and 30 have mean 15. A standardizer fitted to those data maps validation value 15 to expected 0. Receiving 0 at the final step satisfies the condition; receiving 15 delivers the original feature space and fails. This input permits a direct derivation of the expected result. General floating-point comparisons need separately defined precision and tolerances. [1, 3]
Reconcile the two paths with Truthound
ColumnPairValidator in Truthound Core 3.3.2 can compare columns containing delivered values and independent transform results aligned by row and feature. Check missingness separately. The validator does not alter Pipeline routing, and value correspondence does not establish evaluation-sample independence or absence of label leakage. After correcting the affected path, inspect the actual fit and fit_predict boundaries again. [1, 2, 3]
Application conditions
Prepare execution_method, validation_row_id, received_value and fitted_transform_value from raw inputs and approved references, preserving row identity.
Alternatives
Transform validation metadata through a supported path and compare boundary inputs for fit and fit_predict in regression checks.
Limitations
Metadata correspondence does not directly establish the quality of fitting, predictions or early stopping.
Evidence
- Event checked
- Subject checked
- Modified
