A stalled DC assessment, blocked by missing data
A major industrial distributor needed accurate product dimensions across their full SKU catalog to support a distribution center assessment — including storage-mode assignment, slotting design, and capacity planning. The problem: over half their products had no recorded item dimensions, and a substantial share also lacked box-level (case) dimensions. Without this data, the downstream analyses couldn't proceed.
Rather than manually measure thousands of SKUs or discard incomplete records, the decision was made to build a machine learning imputation model that could infer missing dimensions from the product attributes that were known — buyline ID, vendor, category, item weight, inner quantity, and derived density features.
How the pipeline works
The model was built in Python using XGBRegressor — an ensemble method that trains decision trees sequentially, each correcting the residual errors of the last. Four separate models were trained, one for each target: item length, item width, item height, and item cube. The pipeline then duplicated this approach for box-level (case) dimensions.
Data ingestion & feature engineering
Imported and cleaned product records. Computed cube and density features from available numeric data. Defined categorical inputs (buyline, vendor, category) and numeric inputs (weight, inner qty, density) as the feature set X.
Train / missing split
Partitioned records into a training subset (products with verified dimensions) and a prediction subset (products with missing values). The training subset was further split into train and held-out test sets to enable unbiased evaluation.
Model training & tuning
Trained four XGBRegressor models — one per target dimension. Tuned hyperparameters and evaluated on the held-out test set using MAE, RMSE, and MAPE to measure both average error and relative accuracy.
Bias correction
Applied cube-size bin corrections (Small, Medium, Large, XL) to adjust for systematic under- or over-prediction at different size scales — a key step that improved practical reliability of the outputs.
Confidence interval generation & output
Calculated 85% and 95% confidence intervals for every predicted dimension. Results — actual values, predictions, and intervals — were exported to Excel for immediate use by the project team in downstream DC analyses.
Evaluation results on held-out test data
The models were evaluated on a held-out test set that the algorithm never saw during training. Performance was measured across two dimensions: prediction accuracy (how close estimates are to true values) and confidence interval calibration (how reliably the stated ranges capture the truth).
| Dimension | Level | Interval Width | Actual Coverage | Result |
|---|---|---|---|---|
| Item Height | 85% | ~1.6 in | ~85% | On target |
| Item Height | 90% | ~2.3 in | ~93% | Exceeded |
| Item Cube | 85–90% | variable | 85–91% | On target |
| Box Height | 85% | ~3.1 in | ~83% | Near target |
| Box Height | 90% | ~4.2 in | ~91% | On target |
| Box Cube | 85–90% | 550–750 cu in | 83–91% | On target |
- Predicted cube class distributions closely mirrored actuals across all major product categories, with the overall share of "Small" items remaining nearly identical (Actual 90% vs Predicted 89%).
- Category-level mean and median cube sizes remained consistent after imputation, while variances narrowed slightly — indicating the model produces more stable, less extreme estimates rather than amplifying outliers.
- Expected size hierarchies between product lines were preserved: Fittings smaller than Fixtures smaller than Valves, at the correct relative scale.
- Box-level predictions showed 30–50% narrower variance across categories, confirming fewer extreme outliers while maintaining distributional shape.
From blocked to unblocked
The imputation model directly unblocked a stalled DC assessment. With predicted dimensions now available for the full SKU catalog, the project team could proceed with storage-mode assignment, slotting design, and capacity planning — analyses that had been waiting on this data.