Overview Context Data Pipeline Feature Mining Clustering Results Reflections
SCGP  |  Manufacturing Intelligence  |  Penn State DAAN 862

Box Strength Predictive Model
Eliminating $2.7M/Year in Downtime

A full data mining pipeline developed for SCGP, a corrugated box manufacturer in Southeast Asia, to predict box compression test (BCT) results before physical testing takes place. The system integrates machine sensor data from 7 production units with supplier ECT lab data, applies frequent item mining, clustering, dimensionality reduction, and logistic regression to identify the optimal feed gap, printing cylinder gap, and machine speed for each product SKU, eliminating the need to halt production lines awaiting Quality Assurance Lab results.

124,857 production records analyzed 99.7%+ logistic regression accuracy $2.7M annual opportunity loss mitigated 7 machine data logging units deployed 5 cylinder-count sub-models Speed Link C# + ECT Link API built in-house
Python Logistic Regression K-Means Clustering Apriori / FP-Growth PCA / Kernel PCA t-SNE UMAP C# (Speed Link) SQL Pandas / NumPy Scikit-learn SCGP Dataset
Problem Statement

The $2.7M Production Downtime Challenge

$2.7M
Annual opportunity loss from strength test downtime (150 lots/day x 10 min x $5/min x 365 days)
150
Production lots per day halted for Quality Assurance Lab strength testing
10 min
Machine stop time per lot awaiting BCT result before production resumes
5
Cylinder count sub-models built (0 to 4 printing cylinders), each achieving 99%+ accuracy
Corrugated Box Production Process and Pain Point
AS-IS Raw Material ECT value measured Printing Machine 5 cylinders apply pressure ECT may reduce at each gap Strength Testing QA Lab: BCT1 to BCT5 BCT_Avg vs BCT_Spec PAIN POINT: machine stops here Final Product Pass: BCT_Avg ≥ BCT_Spec Fail: adjust parameters Predictive model bypasses QA wait Machine Opportunity Loss $2,737,500 / Year 150 lots/day x 10 min x $5/min x 365 days INPUT PROCESSING BOTTLENECK OUTPUT
Data Engineering

Proprietary Data Collection Infrastructure

Data Collection and Merging Pipeline
Machine Group 1 4 Mitsubishi EVOLs Speed, Feed Gap, Print Gaps Machine Data Logging #1 Machine Group 2 3 Isowa FALCONs Speed, Feed Gap, Print Gaps Machine Data Logging #2 Speed Link C# data logging software transforms controller formats writes to SQL database Supplier Quality Lab ECT strength measurements ECT Link API SQL Database Machine params + ECT 124,857 clean records (from 125,288 raw) Data Cleaning null removal, type casting binary cols, dummy encoding 34+ engineered features 5 Sub-Datasets Split by no. of printing cylinders used (0-4) per-SKU analysis 0 cylinders 1 cylinder 2 cylinders 3 cylinders 4 cylinders
Step 01
Dataset Integration and Null Cleaning
Two proprietary datasets from 7 machines across 2 groups (4 Mitsubishi EVOLs, 3 Isowa FALCONs) were merged into a single table. Rows with null BCT values caused by network interruptions during machine controller transfers were dropped using a targeted null filter (condition: Order_Number not null AND BCT1 is null). The dataset reduced from 125,288 to 124,857 records.
Step 02
Type Transformation and Feature Engineering
Raw material strength additive codes (G0 to G6) were mapped to float percentages (0.0% to 0.30%) using a custom strength_mapping dictionary. Four binary flag columns were engineered: Rejection_Result (BCT_Avg vs BCT_Spec with 3% tolerance), Finished_Product_Hig (box height 300-600), Machine_Speed (below 350), and ECT_Avg (above 1.98). Additionally, 30 dummy binary columns were generated for all categorical features.
Step 03
Frequent Item Mining (Apriori and FP-Growth)
Applied both Apriori and FP-Growth algorithms to the binary columns, filtering on Rejection_Result=1 to identify variable combinations that consistently co-occur with rejection. Minimum support varied between 0.3 and 0.5. For the 1-cylinder dataset, a significant number of rules achieved confidence=1.0, confirming that printing cylinder gap control is the strongest single predictor of strength failure.
Step 04
Data Clustering for Relationship Analysis
Applied K-Means, Ward Hierarchical, and Spectral Co-Clustering to each of the 5 sub-datasets. The Silhouette score method identified k=2 as optimal across all cylinder groups. K-Means scatter plots confirmed the ideal printing gap range is 0.0-0.2 for structural integrity. Hierarchical clustering heat maps showed that as BCT_Avg increases, feed roll gap increases proportionally, with higher-cylinder products requiring distributed pressure.
Step 05
Dimensionality Reduction
Standard PCA captured only 51-63% of total variance per dataset, indicating significant non-linearity. Kernel PCA with RBF, Sigmoid, and Polynomial kernels achieved approximately 99% explained variance, confirming the data contains strong non-linear structure that standard linear methods miss. t-SNE provided clear local cluster separation by BCT_Avg value. UMAP preserved both local and global structure, capturing BCT range groupings across all 5 cylinder datasets.
Step 06
Supervised Learning: Logistic Regression
Logistic regression was chosen over linear regression for its superior fit to the binary pass/fail target. Across all 5 cylinder datasets, the model achieved 99.7% to 100% accuracy and ROC-AUC scores of 0.999 to 1.0. The dominant features were BCT sub-measurement values (BCT1 to BCT5), ECT_Avg, and printing cylinder gap variables. The model produces a BCT pass/fail prediction before any physical test is performed, eliminating machine downtime from the strength testing step.
Data

Key Variables and Descriptive Statistics

Variable Influence Diagram: Factors Affecting BCT Average
BCT_Avg Final Product Strength Target Variable Raw Material ECT_Avg (mean 5.21) ECT1-ECT5 per lot Machine Parameters Feed_Roll_Gap (mean 1.79) Machine_Speed (bimodal) Box Design Length, Width, Height 300-600 height flag Raw_Mat_Strength_Type Raw_Mat_Strength_Additive (G0-G6) GL/CM/BL/BM/CL Weight (g) Machine_Speed Feed_Roll_Gap Printing_Cylinder_Gap_1-4 Printing_Cylinder1_Gap Printing_Cylinder2_Gap Printing_Cylinder3_Gap Printing_Cylinder4_Gap Number of printing cylinders per SKU depends on product printing design
Variable Mean Std Dev Min 25th Pctile Median 75th Pctile Max
BCT_Avg (target)299.43113.04112.10218.92269.17365.15786.65
ECT_Avg (raw material strength)5.211.592.394.044.826.2013.83
Feed_Roll_Gap1.790.710.091.341.752.184.40
New_Printing_Gap_10.470.280.000.230.460.711.00
New_Printing_Gap_21.560.850.040.951.352.005.55
New_Printing_Gap_32.080.920.101.401.912.565.75
Frequent Item Mining

Apriori and FP-Growth: Identifying Rejection Patterns

0.0 0.3 0.5 0.6 0.52 0.54 0.54 0.58 0.58 0.53 0.58 0.52 0.58 0.56 1 2 3 4 5 6 7 8 9 10 Itemsets

For the 0-printing-cylinder dataset, support values cluster between 0.5 and 0.6. The top itemsets near 0.6 represent combinations of conditions that most consistently co-occur with rejection, pointing to ECT_Avg range and machine speed as the dominant factors in that group. For the 1-cylinder dataset, many rules achieved confidence = 1.0, confirming that printing cylinder gap control is the single most critical parameter for strength outcomes in single-cylinder products.

ParameterRecommended RangeFIM SourceImpact on BCT_Avg
Printing_Cylinder_Gap (each unit)0.0 to 1.0FP-Growth + AprioriLow gap = high pressure = low BCT_Avg. Conversely high gap = high BCT_Avg
Average Printing Gap (all units)1.0 to 2.0FP-Growth + AprioriEnsures distributed pressure across all cylinders maintains structural integrity
Feed_Roll_Gap1.0 to 2.0FP-Growth + AprioriAs BCT_Avg increases, feed roll gap increases (confirmed by Ward Hierarchical clustering)
Raw_Mat_Strength_TypeType CFP-Growth associationType C material consistently associated with passing BCT in the 3-cylinder dataset
Raw_Mat_Strength_AdditiveG3 (15%)FP-Growth associationG3 additive (15% strength additive) produces most frequent passing combinations
ECT_Avg> 1.98Binary flag thresholdEdge Crush Test value above 1.98 is a necessary (though not sufficient) condition for passing BCT
Unsupervised Learning

Clustering and Dimensionality Reduction Results

Silhouette Score vs Number of Clusters
0.20 0.27 0.34 k=2 optimal 2 3 4 5 6 7 8 9 Number of Clusters Silhouette Score 1-Cylinder Dataset (K-Means)
PCA Explained Variance by Cylinder Count
0% 20% 40% 65% 0 cyl 1 cyl 2 cyl 3 cyl 4 cyl PC1 Variance PC2 Variance Standard PCA (max 63% total) Kernel PCA captures 99% variance

Standard PCA captured only 51-63% of total variance across all five cylinder datasets, indicating that the corrugated production data contains significant non-linear structure. Kernel PCA (RBF kernel) improved this to approximately 99% explained variance, making it the appropriate dimensionality reduction technique. The Sigmoid kernel produced the clearest BCT_Avg cluster separation in 2D projections. The Polynomial kernel showed the most distinction between BCT ranges but had higher sensitivity to outliers in the 2-cylinder dataset.

Supervised Learning

Logistic Regression Model Performance

Cylinder Dataset Logistic Accuracy ROC-AUC McFadden Pseudo R² True Negatives True Positives False Pos / False Neg Linear R² (comparison)
0 Printing Cylinders 100% 1.000 0.9999 9,3738250 / 0 0.884
1 Printing Cylinder 99.7% 0.9995 0.9975 1,1851373 FP / 1 FN 0.420
2 Printing Cylinders 99.8% 0.9987 0.9985 1,1862013 FP / 0 FN 0.487
3 Printing Cylinders 99.9% 0.9997 0.9997 1,1525131 FP / 0 FN 0.502
4 Printing Cylinders 99.9% 0.9996 0.9996 7706663 FP / 0 FN 0.712
Logistic Regression: Perfect Classification (0 Cylinders)
Predicted: 0 Predicted: 1 Actual: 0 Actual: 1 9,373 True Negative 0 False Positive 0 False Negative 825 True Positive
Key Feature Coefficients: Logistic vs Linear (2-Cyl Dataset)
0 positive negative BCT_Avg New_Printing_Gap_1 New_Printing_Gap_2 ECT_Avg Speed_Act_bin Feed_Roll_Gap Logistic Linear

Logistic regression involves a broader range of variables than linear regression, contributing to its higher accuracy. The dominant features influencing the logistic model are BCT sub-measurement values (BCT1 to BCT5) and ECT_Avg, while the linear regression model is primarily driven by printing cylinder gap features. This confirms that logistic regression captures the complex interaction between raw material strength and cylinder pressure effects on final product quality.

Outcomes and Insights

Design Decisions and Key Takeaways

Non-Linearity Matters
Standard PCA consistently captured under 63% of variance across all five cylinder datasets. Switching to Kernel PCA with an RBF kernel pushed this to 99%, confirming that the relationship between machine parameters (feed gap, printing gap) and BCT output is fundamentally non-linear. Any purely linear approach would miss a significant portion of the signal driving box rejection.
Logistic Over Linear for Pass/Fail
Linear regression R-squared values ranged from 0.42 to 0.88 across datasets, meaning it explained only a fraction of the variance in the binary reject flag. Logistic regression achieved 99.7% to 100% accuracy and near-perfect McFadden pseudo R-squared on all five datasets. The S-curve logistic decision boundary is the correct tool for a binary QA pass/fail label.
Cylinder Count Drives Architecture
A single unified model across all production types was not viable. Splitting into 5 sub-datasets by printing cylinder count allowed each model to learn the pressure distribution rules specific to that SKU family. 3 and 4-cylinder datasets had the most complex rejection patterns (highest support diversity in FIM), requiring the full Kernel PCA plus logistic regression pipeline to achieve near-perfect accuracy.
Production Value: Real Downtime Elimination
The model directly addresses the $2.7M/year opportunity cost by predicting BCT pass/fail in software before any physical test takes place. With near-zero false negatives across all datasets, the system can safely replace the mandatory QA Lab hold, allowing production to continue without interruption. Operators receive parameter guidance (optimal feed gap and cylinder pressure ranges) per SKU, replacing experience-based guesswork with data-driven control.
Source Code

Full pipeline code: data cleaning, frequent item mining, clustering, PCA, Kernel PCA, t-SNE, UMAP, and logistic regression across all 5 datasets available on GitHub at github.com/vrahulrvce/Box_model