# Predictive Modeling of Manufacturing Defects using Machine Learning: A Comparative Performance Study in a Manufacturing SME

Nkemakonam Chidiebube Igbokwe, Charles Onyeka Nwamekwe, Patrick Sunday Aguh

<figure><img src="image_1.png" /></figure>

## To cite this version:

Nkemakonam Chidiebube Igbokwe, Charles Onyeka Nwamekwe, Patrick Sunday Aguh. Predictive Modeling of Manufacturing Defects using Machine Learning: A Comparative Performance Study in a Manufacturing SME. African Journal of Advances in Engineering and Technology (AJAET), 2025, 01 (02), pp.93-115. 10.31920/2978-3224/2025/v1n2a5. hal-05377373

HAL Id: hal-05377373

https://hal.science/hal-05377373v1

Submitted on 6 Jan 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>
# Predictive Modeling of Manufacturing Defects using Machine Learning: A Comparative Performance Study in a Manufacturing SME

DOI: https://doi.org/10.31920/2978-3224/2025/v1n2a5

Nkemakonam Chidiebube Igbokwe, Charles Onyeka Nwamekwe and Patrick Sunday Aguh

Department of Industrial and Production Engineering, Nnamdi Azikiwe University, Awka, Nigeria Corresponding Author: ps.aguh@unizik.edu.ng

## Abstract

In modern manufacturing, preventing defects is essential for cost reduction, quality assurance, and operational efficiency. Traditional quality control methods like Statistical Process Control (SPC) are largely reactive, detecting defects after they occur. With Industry 4.0 and the availability of production data, machine learning (ML) enables predictive quality management. This study compares seven supervised ML algorithms Logistic Regression, Decision Tree, Random Forest, Support Vector Machine, Gradient Boosting Machines, Artificial Neural Network, and k-Nearest Neighbors for defect prediction in a Small and Medium Enterprise (SME). Using a dataset of 3,240 production instances and 17 operational variables, data pre-processing involved normalization, class balancing, and stratified sampling. Models were trained and validated using 10-fold cross-validation and hyper parameter tuning. Evaluation metrics included Accuracy, Precision, Recall, F1-score, ROC-AUC, and confusion matrices. Results showed that ensemble models, particularly Random Forest and Gradient Boosting, outperformed others, achieving high accuracy and balanced error rates, making them ideal for resource-limited SMEs. Decision Tree and Logistic Regression provided interpret-able results with moderate performance, while SVM and ANN achieved high recall but excessive
false positives, unsuitable for SMEs with limited inspection capacity. k-NN performed weakest due to instability in high-dimensional data. Overall, ensemble methods offered the best trade-off between predictive accuracy, interpret-ability, and operational efficiency, providing SMEs with a practical framework for proactive defect prevention. The study demonstrates ML's potential to enhance manufacturing quality control and recommends future exploration of hybrid and IoT-integrated predictive models for real-time quality monitoring.

**Keywords:** *Machine Learning, Manufacturing Defects, Predictive Quality Analytics, Random Forest, Gradient Boosting, SMEs, Industry 4.0*

**Introduction**

In today's highly competitive manufacturing landscape, product quality and process efficiency are critical determinants of organizational success (Navarro & Naranjo, 2025). Manufacturing defects not only increase production costs due to rework and scrap but also lead to customer dissatisfaction, warranty claims, and reputational damage (Handoyo et al., 2023). Traditionally, quality control in manufacturing has relied heavily on statistical process control (SPC), inspection-based methods, and expert-driven root-cause analysis (Kausik et al., 2025). While these approaches have been instrumental in improving quality, they are often reactive in nature, detecting defects after they occur rather than preventing them.

Advancements in digital technologies, the Internet of Things (IoT), and Industry 4.0 have enabled the collection of massive amounts of process and product data across the manufacturing value chain (N. Igbokwe et al., 2024). This availability of high-dimensional, real-time data provides an opportunity to shift from traditional quality monitoring toward predictive quality analytics. Machine Learning (ML), a subset of Artificial Intelligence, has emerged as a powerful tool for uncovering complex, nonlinear relationships within large datasets (N. Igbokwe, Nwamekwe, Aguh, et al., 2025). Using historical production data, ML models can identify hidden patterns, learn from past defect occurrences, and accurately predict the likelihood of future defects. Such predictive capabilities enable manufacturers to optimize process parameters, reduce waste, improve yield, and enhance customer satisfaction.

Despite the promise of ML in defect prediction, challenges remain in identifying the most effective algorithms for specific manufacturing contexts (Kausik et al., 2025). Different ML techniques vary in their
capacity to handle imbalanced datasets, noise, feature interactions, and
computational demands. Studies have applied algorithms such as
Decision Trees, Random Forests, Support Vector Machines, Gradient
Boosting, and Neural Networks to manufacturing defect prediction, but
their comparative performance often varies depending on the dataset
characteristics, feature selection methods, and evaluation metrics
employed (Kausik et al., 2025). Consequently, there is no universally
accepted best-performing model across different manufacturing settings.

Small and Medium Enterprises (SMEs) play a critical role in ensuring economic development (N. Igbokwe & Mba, 2019). However, these enterprises often face significant challenges in optimizing production efficiency due to constraints such as limited resources, inconsistent equipment performance, and inadequate maintenance strategies (Chidiebube et al., 2025; Chukwutoo & Nkemakonam, 2018; Igbokwe, Nwamekwe, Godwin, et al., 2025).

Although machine learning models like Random Forest, Gradient Boosting, and Neural Networks have been applied to defect prediction, few studies have compared their performance within Small and Medium Enterprises (SMEs). Most prior research focuses on large, automated industries, overlooking the constraints of SMEs in developing economies. This study fills that gap by bench-marking seven supervised learning models on real SME production data, evaluating trade-offs between accuracy, interpret-ability, and computational cost. Its originality lies in creating an evidence-based framework to help SME managers select suitable models based on available resources, data conditions, and operational requirements for predictive quality management.

## 2.0 Literature Review

The prediction and prevention of manufacturing defects have been a
central theme in quality management research for decades. Early
approaches were dominated by Statistical Process Control (SPC),
regression-based analysis, and Six Sigma methodologies, which
emphasized monitoring process variations and detecting deviations from
control limits. With the advent of Industry 4.0, advances in sensing,
automation, and Internet of Things (IoT) technologies have enabled the
collection of massive amounts of high-frequency and high-dimensional
manufacturing data (Chidiebube et al., 2024). This has shifted research
attention toward data-driven quality analytics, where Machine Learning
(ML) algorithms can model complex, nonlinear relationships that
traditional statistical approaches struggle to capture (Igbokwe, Christiana, Nwankwo, et al., 2025). Several ML techniques have been explored for defect prediction. Logistic Regression (LR) remains a common baseline model due to its interpret-ability and computational efficiency, though it struggles with highly nonlinear relationships (Albattah & Alzahrani, 2024). Decision Trees (DT) and their ensemble variants such as Random Forests (RF) have shown strong performance by handling feature interactions and providing transparency in classification rules (Khan et al., 2024). Random Forest has been particularly effective in addressing overfitting and improving generalization in manufacturing contexts (Salman et al., 2024).

Support Vector Machines (SVM) have also been widely applied, especially in high-dimensional feature spaces, where they demonstrate strong classification boundaries. However, they often require extensive parameter tuning and are computationally demanding for large datasets (Guido et al., 2024). Gradient Boosting Machines (GBM), including variants such as XGBoost and LightGBM, have gained prominence due to their superior predictive accuracy in defect classification tasks, as they iteratively minimize error through boosting weak learners (Arif Ali et al., 2023). In parallel, Artificial Neural Networks (ANNs) and Deep Learning models have been applied to manufacturing defect prediction, leveraging their capacity to learn complex hierarchical representations from large datasets (Roheen Qamar & Baqar Ali Zardari, 2023). Despite their promise, challenges such as interpret-ability, high computational demand, and risk of overfitting hinder their widespread adoption in small and medium-sized enterprises (SMEs) (Le Dinh et al., 2025; Nazia Fahad & Hamilton, 2024; Vajjhala, 2024). Similarly, k-Nearest Neighbors (k-NN) has been used in simpler defect prediction tasks, though it suffers from scalability issues and sensitivity to irrelevant features (Suyal & Goyal, 2022; Vijaya Lakshmi, 2025).

Additionally, the comparative effectiveness of different ML models in small and medium-sized enterprises (SMEs) has not been extensively studied, leaving a gap in identifying the most suitable techniques (Chidiebube et al., 2025). The knowledge gap lies in establishing context-specific benchmarks and offering actionable guidance for SMEs, particularly in emerging economies, where resources for advanced ML deployment may be limited. Thus present study addresses this gap by conducting a comparative evaluation of widely used ML algorithms, offering insights into their predictive accuracy, interpret-ability, and
operational suitability for defect prediction in a manufacturing SME
setting.

**3.0 Methodology**

**3.1 Research Design**

This study adopts a quantitative experimental research design aimed at evaluating the comparative performance of machine learning algorithms in predicting manufacturing defects. The design leverages supervised learning techniques, where a labeled dataset containing both predictor variables and a binary target variable (Defect Status) is utilized. The focus is on building, training, and validating predictive models that classify products into defect and non-defect categories.

**3.2 Sources of Data**

The dataset used for this study was obtained from historical operational records of a manufacturing SME. It contains 3,240 production instances and 17 variables. Sixteen (16) independent variables represent production volume, supplier quality, cost, maintenance activities, inventory dynamics, energy consumption, and process parameters. The dependent variable is Defect Status, which denotes whether a defect occurred (1) or not (0). This dataset was specifically curated to mirror operational and quality conditions in modern manufacturing environments, making it appropriate for predictive modeling research. Table 1 shows the descriptive summary of the manufacturing defect dataset.
<table><caption>**Table 1: Descriptive Summary of the Manufacturing Defect Dataset**</caption><thead><tr><th>Variable</th><th>Description</th><th>Min</th><th>Max</th><th>Mean</th><th>Std Dev</th></tr></thead><tbody><tr><td>Production Volume</td><td>Total number of units produced in a cycle</td><td>100</td><td>999</td><td>548.52</td><td>262.4</td></tr><tr><td>Production Cost</td><td>Total production cost incurred</td><td>5000.175</td><td>19993.37</td><td>12423.02</td><td>4308.05</td></tr><tr><td>Supplier Quality</td><td>Measure of supplier quality (0–100 scale)</td><td>80.00482</td><td>99.98921</td><td>89.83</td><td>5.76</td></tr><tr><td>Delivery Delay</td><td>Number of days delayed in delivery</td><td>0</td><td>5</td><td>2.56</td><td>1.71</td></tr><tr><td>Defect Rate</td><td>Percentage of defective items in a cycle</td><td>0.50071</td><td>4.998529</td><td>2.75</td><td>1.31</td></tr><tr><td>Quality Score</td><td>Overall quality performance score (0–100 scale)</td><td>60.0101</td><td>99.99699</td><td>80.13</td><td>11.61</td></tr><tr><td>Maintenance Hours</td><td>Total hours of maintenance performed</td><td>0</td><td>23</td><td>11.48</td><td>6.87</td></tr><tr><td>Downtime Percentage</td><td>Percentage of downtime during operations</td><td>0.001665</td><td>4.997591</td><td>2.5</td><td>1.44</td></tr><tr><td>Inventory Turnover</td><td>Rate of inventory turnover</td><td>2.001611</td><td>9.998577</td><td>6.02</td><td>2.33</td></tr><tr><td>Stock out Rate</td><td>Percentage of stock outs in inventory</td><td>0.000002</td><td>0.099997</td><td>0.05</td><td>0.03</td></tr><tr><td>Worker Productivity</td><td>Worker productivity score (0–100 scale)</td><td>80.00496</td><td>99.99679</td><td>90.04</td><td>5.72</td></tr><tr><td>Safety Incidents</td><td>Number of recorded safety incidents</td><td>0</td><td>9</td><td>4.59</td><td>2.9</td></tr><tr><td>Energy Consumption</td><td>Total energy consumption (kWh)</td><td>1000.72</td><td>4997.075</td><td>2988.49</td><td>1153.42</td></tr><tr><td>Energy Efficiency</td><td>Energy efficiency index</td><td>0.100238</td><td>0.4995</td><td>0.3</td><td>0.12</td></tr><tr><td>Additive Process Time</td><td>Processing time for additive manufacturing (hours)</td><td>1.000151</td><td>9.999749</td><td>5.47</td><td>2.6</td></tr><tr><td>Additive Material Cost</td><td>Material cost in additive manufacturing</td><td>100.2111</td><td>499.9828</td><td>299.52</td><td>116.38</td></tr><tr><td>Defect Status</td><td>Binary outcome: 1 = Defective product, 0 = Non-defective product</td><td>0</td><td>1</td><td>0.84</td><td>0.37</td></tr></tbody></table>

The dataset captured multiple categories of production defects observed in the SME's assembly process. These included surface irregularities (scratches, dents, and rough finishes), dimensional inaccuracies (misalignment, thickness variations), material inconsistencies (impurities, hardness deviations), and assembly-related defects (loose fittings, incomplete joins). Defects were identified during final inspection through both manual visual checks and sensor-based quality monitoring systems.
Each defect instance was logged as a binary label under the *Defect Status* variable (1 = defective, 0 = non-defective). The frequency distribution showed that dimensional and surface-related defects accounted for the majority of defective items. By linking these defect categories to operational parameters such as energy consumption, additive process time, and maintenance hours, the dataset reflects realistic quality variations in SME manufacturing environments, providing a robust foundation for predictive modeling.

### 3.3 Data Collection Techniques

Data for this study was compiled from structured production records and quality monitoring indicators. Each record represents a production cycle, capturing information on operational efficiency (e.g., Worker Productivity, Downtime Percentage), quality indicators (Quality Score, Defect Rate), and process resource utilization (Energy Consumption, Additive Material Cost). Data collection followed a structured logging approach, ensuring uniformity in record formats and completeness across features. Given the inclusion of multiple operational domains, the dataset provides a comprehensive basis for defect prediction.

All experiments in this study were implemented using Python 3.11, with model development carried out in Scikit-learn, XGBoost, and TensorFlow/Keras libraries. Hyper parameter optimization was performed through grid search using a 10-fold cross-validation strategy. Models were trained and evaluated on a workstation with an Intel Core i9 processor, 32 GB RAM, and NVIDIA RTX 3080 GPU, ensuring computational reproducibility and consistency.

### 3.4 Data Preprocessing

The dataset underwent several preprocessing steps to enhance model performance. Data cleaning confirmed no missing values, and outliers were examined to prevent skewness. Since all predictors were numerical, no encoding was required. Variables with differing magnitudes were normalized using Min-Max scaling. Class imbalance in the target variable (Defect Status) was corrected using SMOTE or random under sampling. The dataset was split into training (70%) and testing (30%) subsets with stratified sampling to maintain class proportions. Finally, 10-fold cross-validation was applied during model training to reduce over fitting and
ensure robust, generalizable performance across all machine learning algorithms.

## 3.5 Machine Learning Models Selection

This study selected seven supervised machine learning algorithms: Logistic Regression (LR), Decision Tree (DT), Random Forest (RF), Support Vector Machine (SVM), Gradient Boosting Machines (GBM), Artificial Neural Network (ANN), and k-Nearest Neighbors (k-NN) based on their proven effectiveness in manufacturing defect prediction and their ability to address dataset-specific challenges such as non-linearity, class imbalance, and high-dimensional interactions.

Logistic Regression served as the baseline model due to its simplicity, interpret-ability, and suitability for binary classification, though its linear nature limits performance in nonlinear contexts. The Decision Tree was chosen for its transparency and ability to capture complex relationships, albeit with a tendency to overfit. Random Forest, an ensemble of Decision Trees, enhances generalization by averaging multiple weak learners, reducing variance, and improving predictive reliability. SVM was included for its capacity to construct optimal classification boundaries in high-dimensional spaces using kernel functions, though it requires careful parameter tuning. GBM, including implementations such as XGBoost and LightGBM, was selected for its superior accuracy and robustness, achieved through iterative boosting to minimize prediction errors. ANN was incorporated to explore deep learning's potential to model complex nonlinear patterns, though challenges of interpret-ability and computational cost remain. Lastly, k-NN, a non-parametric instance-based method, was included for comparison due to its simplicity but recognized limitations in scalability and sensitivity to irrelevant features.

This diverse selection ensures a comprehensive comparison of models balancing accuracy, interpret-ability, and computational efficiency critical factors for practical deployment of predictive analytics in resource-constrained manufacturing SMEs.

## 3.6 Model Training and Testing

Model training and testing followed a structured and reproducible pipeline. The dataset was divided into training (70%) and testing (30%) subsets, with stratification to maintain class balance. A 10-fold cross-validation approach was applied during training to enhance model
robustness and reduce bias. Hyper parameter tuning was performed using grid search or randomized search to optimize each algorithm's key parameters such as estimators, learning rates, and kernel types. Class weighting was applied in algorithms supporting it (e.g., Logistic Regression, SVM, Random Forest), while SMOTE was used for others to address class imbalance. Models were implemented using scikit-learn, with ensemble methods leveraging XGBoost and LightGBM, and neural networks built with TensorFlow/Keras. Training was executed on a high-performance computing workstation to ensure efficiency and reproducibility. This systematic approach ensured fair comparison, optimized learning performance, and reliable generalization of the models for defect prediction in manufacturing SMEs.

Each machine learning model was fine-tuned to ensure optimal predictive performance. The ANN architecture comprised an input layer with 17 neurons corresponding to the operational features, two hidden layers with 64 and 32 neurons respectively, and an output layer using a sigmoid activation function for binary classification. The ReLU activation was applied to hidden layers, optimized with the Adam optimizer and a learning rate of 0.001 over 200 epochs. Early stopping was employed to prevent over fitting. Ensemble models (Random Forest and Gradient Boosting) were trained with 300 estimators, maximum depth between 5-10, and learning rates between 0.05-0.1. SVM utilized the radial basis function (RBF) kernel, with regularization parameter C = 1.0. All models were evaluated using identical data partitions to ensure fairness and comparability across experiments.

## 3.7 Model Evaluation Metrics

Model performance was evaluated using multiple metrics to ensure balanced and reliable assessment, particularly for imbalanced datasets. Accuracy measured the overall proportion of correctly classified instances, while Precision indicated the proportion of true defect predictions among all predicted defects, reflecting false alarm control. Recall (Sensitivity) assessed the proportion of actual defects correctly identified, minimizing missed detections. The F1-score, a harmonic mean of Precision and Recall, provided a balanced measure when both false positives and negatives were critical. The ROC-AUC evaluated each model's discriminative ability across various thresholds, with higher values indicating stronger classification performance. Finally, the Confusion Matrix detailed true and false classifications, offering insight
into specific error patterns. Together, these metrics provided a comprehensive framework for comparing the predictive accuracy, reliability, and operational suitability of different machine learning models for manufacturing defect prediction in resource-constrained SME environments.

## 4.0 Results and Discussion

The dataset was successfully split into training (80%) and testing (20%) sets, with stratification to maintain the target variable's class distribution.

<table><caption>Table 2: Machine Learning Models Evaluation</caption><thead><tr><td>Models</td><td>Accuracy</td><td>Precision</td><td>Recall</td><td>F1-score</td><td>ROC-AUC</td></tr></thead><tbody><tr><td>Logistic Regression</td><td>0.870370</td><td>0.887395</td><td>0.968807</td><td>0.926316</td><td>0.795921</td></tr><tr><td>Decision Tree</td><td>0.899691</td><td>0.942804</td><td>0.937615</td><td>0.940202</td><td>0.818322</td></tr><tr><td>Random Forest</td><td>0.950617</td><td>0.950791</td><td>0.992661</td><td>0.971275</td><td>0.823996</td></tr><tr><td>Support Vector Machine</td><td>0.841049</td><td>0.841049</td><td>1.000000</td><td>0.913663</td><td>0.681304</td></tr><tr><td>Gradient Boosting Machines</td><td>0.944444</td><td>0.950442</td><td>0.985321</td><td>0.967568</td><td>0.836020</td></tr><tr><td>Artificial Neural Network</td><td>0.837963</td><td>0.840557</td><td>0.996330</td><td>0.911839</td><td>0.698753</td></tr><tr><td>k-Nearest Neighbors</td><td>0.830247</td><td>0.843602</td><td>0.979817</td><td>0.906621</td><td>0.576948</td></tr></tbody></table>

Table 2 presents a comparative evaluation of seven machine learning models Logistic Regression, Decision Tree, Random Forest, Support Vector Machine (SVM), Gradient Boosting Machines (GBM), Artificial Neural Network (ANN), and k-Nearest Neighbors (k-NN) using five standard performance metrics: Accuracy, Precision, Recall, F1-score, and ROC-AUC. The results highlight distinct trade-offs in the predictive capabilities of the models, which are critical for selecting the most suitable approach for defect prediction in manufacturing SMEs. Random Forest and Gradient Boosting Machines outperformed other models, achieving the highest accuracy (0.9506 and 0.9444, respectively) and F1-scores (0.9713 and 0.9676). Their superior performance is attributed to ensemble learning, where multiple weak learners are combined to reduce variance and bias, thereby enhancing robustness. These models also
maintained balanced Precision and Recall, demonstrating their ability to minimize both false positives and false negatives. Importantly, their ROC-AUC scores (0.8240 for Random Forest and 0.8360 for GBM) indicate strong discriminative ability across thresholds, making them reliable for operational deployment where both sensitivity and specificity are required.

The Decision Tree model performed moderately well, with Accuracy of 0.8997 and F1-score of 0.9402. While it demonstrated high interpretability an advantage in industrial contexts its performance lagged slightly behind ensemble models, likely due to its susceptibility to overfitting. Nevertheless, its relatively high Precision (0.943) makes it suitable where minimizing false alarms is prioritized, albeit at the expense of slightly lower generalization power. Logistic Regression yielded competitive Recall (0.9688) and respectable Precision (0.8874), but its ROC-AUC (0.796) was comparatively weaker, indicating limited capability in separating defective from non-defective cases across thresholds. While the model remains attractive due to its simplicity, interpret-ability, and lower computational cost, it may struggle with the complex, nonlinear feature interactions typical of manufacturing defect data.

On the other hand, Support Vector Machine and Artificial Neural Network models displayed extreme behavior. Both achieved near-perfect Recall (1.000 and 0.9963, respectively), meaning they correctly identified nearly all defective cases. However, this came at the cost of lower Precision (0.841), reflecting a high incidence of false positives. This imbalance suggests a bias toward predicting the defective class, which may burden manufacturers with unnecessary inspections or interventions. Their ROC-AUC values (0.681 for SVM and 0.699 for ANN) further confirm weaker discriminative ability relative to ensemble methods. Such outcomes are problematic in industrial settings, where excessive false alarms can undermine efficiency and decision-making. The k-Nearest Neighbors model delivered the weakest overall performance, with Accuracy of 0.8302 and ROC-AUC of 0.577. Its relatively good Recall (0.9798) did not translate into balanced performance, as low Precision (0.844) and poor ROC-AUC indicate instability and poor generalization. This may be linked to its sensitivity to irrelevant features and distance-based limitations in high-dimensional manufacturing datasets.

The findings in table 2 underscore that ensemble models (Random Forest and Gradient Boosting Machines) provide the most reliable and balanced performance, effectively managing the trade-off between
Precision and Recall while achieving high discriminative power. Equally, SVM and ANN, though strong in detecting defective cases (high Recall), introduce operational inefficiencies through excessive false positives. Logistic Regression and Decision Tree serve as interpretable yet moderately accurate alternatives, while k-NN is unsuitable for this defect prediction task. These insights are vital for SMEs, where balancing detection accuracy with operational efficiency is critical for quality control and resource optimization.

<figure><img src="image_3.png" /><figcaption>Figure 1: Confusion Matrix Component by Model</figcaption></figure>
<table><caption>Table 3: Confusion Matrix Results of Machine Learning Models</caption><thead><tr><th>Model</th><th>True Negatives (TN)</th><th>False Positives (FP)</th><th>False Negatives (FN)</th><th>True Positives (TP)</th><th>Key Implication for SMEs</th></tr></thead><tbody><tr><td>Logistic Regression</td><td>36</td><td>67</td><td>17</td><td>528</td><td>High Recall ensures most defects are caught, but many false positives increase inspection workload and slow production.</td></tr><tr><td>Decision Tree</td><td>72</td><td>31</td><td>34</td><td>511</td><td>Fewer false positives reduce inspection burden, but more false negatives risk defective items reaching customers. Strong balance, very few missed defects and low false alarms; highly suitable for SMEs needing efficiency and reliability.</td></tr><tr><td>Random Forest</td><td>75</td><td>28</td><td>4</td><td>541</td><td>Perfect defect detection but excessive false positives overwhelm resources, impractical for SMEs with limited capacity.</td></tr><tr><td>Support Vector Machine</td><td>0</td><td>103</td><td>0</td><td>545</td><td>Excellent balance similar to Random Forest; slightly more missed defects but still efficient for SME deployment. Nearly all defects detected, but excessive false positives make it resource-intensive and unsuitable for SMEs.</td></tr><tr><td>Gradient Boosting (GBM)</td><td>75</td><td>28</td><td>8</td><td>537</td><td>generally prone to instability and poor scalability</td></tr><tr><td>Artificial Neural Network</td><td>0</td><td>103</td><td>2</td><td>543</td><td></td></tr><tr><td>k-Nearest Neighbors</td><td>4</td><td>99</td><td>11</td><td>534</td><td></td></tr></tbody></table>

The confusion matrices presented in Figure 1 and Table 3 provide deeper insights into the classification behaviors of the evaluated models,
complementing the performance metrics in Table 2. While metrics such as Accuracy, Precision, Recall, and F1-score quantify predictive capability, the confusion matrices reveal the distribution of errors (false positives and false negatives) that carry direct cost and efficiency implications for manufacturing SMEs. Random Forest and Gradient Boosting Machines (GBM) demonstrated the most balanced error distribution. Random Forest misclassified only 4 defective products as non-defective (false negatives) and 28 non-defective products as defective (false positives), while GBM recorded slightly more false negatives (8) but still maintained low error rates overall. In practice, this balance is critical: very few defective products escape detection (reducing quality risks and customer dissatisfaction), while false positives remain low enough to avoid significant inspection overhead. These models therefore minimize both warranty costs (due to missed defects) and productivity losses (due to unnecessary checks). The Decision Tree model showed a higher number of false negatives (34), resulting in lower Recall (0.938). For SMEs, this means that more defective products could slip through quality control, potentially leading to customer complaints, rework costs, or reputational damage. However, its lower false positives (31) indicate fewer wasted inspections, which may be beneficial in highly resource-constrained operations. This model therefore favors operational efficiency but at the expense of defect detection reliability.

Logistic Regression struck a moderate balance, with 17 false negatives and 67 false positives. This explains its high Recall (0.969) but reduced Precision (0.887). In an SME setting, this translates into catching most defects but at the cost of inspecting a large number of non-defective items. While this approach ensures fewer defective products reach customers, it risks slowing down production throughput and inflating inspection costs, which can strain lean manufacturing systems. Support Vector Machine (SVM) and Artificial Neural Network (ANN) displayed extreme sensitivity. SVM achieved perfect Recall (1.000) and ANN nearly matched it (0.996), meaning virtually no defective item went undetected. However, this came at the expense of excessive false positives, every non-defective item was flagged as defective in SVM and nearly all in ANN. In an SME environment, such outcomes would overwhelm quality control units with unnecessary rechecks, increase cycle times, and divert labor from value-adding tasks. While ideal for scenarios where missing a single defect is catastrophic (e.g., aerospace or medical manufacturing), these models may be impractical for resource-limited SMEs producing consumer goods. The k-Nearest Neighbors (k-
NN) model recorded both numerous false positives and a moderate number of false negatives, resulting in poor overall balance. This inefficiency makes k-NN unsuitable for SMEs, where maintaining both quality standards and resource efficiency is essential.

The confusion matrix interpretation highlights the trade-off between false negatives (missed defects, leading to customer dissatisfaction and rework costs) and false positives (unnecessary inspections, leading to wasted labor and production delays). Ensemble models such as Random Forest and GBM offer the most pragmatic solution for SMEs, providing robust defect detection while controlling inspection overhead. Simpler models like Logistic Regression and Decision Tree may still be used where interpretability and lower computational costs are prioritized, but they involve higher trade-offs. Models like SVM and ANN, though highly sensitive, may only be viable in industries where missing defects is unacceptable regardless of inspection costs.

<figure><img src="image_4.png" /><figcaption>Fig 2: Precision vs Accuracy</figcaption></figure>

Figure 2 illustrates the trade-off between Precision and Accuracy across the evaluated models. Ensemble models (Random Forest and Gradient Boosting Machines) are positioned in the top-right quadrant, reflecting both high Accuracy (>0.94) and strong Precision (>0.95). This validates their ability to consistently predict defects while minimizing false alarms, making them ideal for SME environments where both product quality and resource efficiency are critical. The Decision Tree also performs competitively, showing moderate Precision and Accuracy. In contrast,
Logistic Regression demonstrates high Accuracy but lower Precision, suggesting that while it identifies defects reliably, it produces more false positives. Support Vector Machine (SVM) and Artificial Neural Network (ANN), despite high Recall values (see Figures 2 and 3), are located lower on Precision, reflecting excessive false positives that diminish operational efficiency. k-Nearest Neighbors (k-NN) sits lowest on the chart, confirming its poor discriminative power in this context.

<figure><img src="image_5.png" /><figcaption>Fig 3: Recall vs Precision</figcaption></figure>

Figure 3 highlights the balance or imbalance between Recall and Precision. SVM and ANN dominate the Recall axis, nearly reaching perfect sensitivity (≥0.996), meaning virtually all defective products are detected. However, their corresponding Precision scores (~0.84) are considerably lower, confirming that these models over-classify defects, producing excessive false positives. While this guarantees that defects do not escape detection (a strength in high-stakes industries), the trade-off is impractical for SMEs due to the inspection overhead. Conversely, Random Forest and GBM achieve strong Recall (>0.98) while maintaining high Precision (>0.95), reflecting their balanced detection capabilities. Logistic Regression offers high Recall (0.969) but at the cost of reduced Precision, while Decision Tree tilts toward higher Precision at the expense of Recall, underscoring its conservative detection approach.
<figure><img src="image_6.png" /><figcaption>Figure 4: F1-Score vs Recall</figcaption></figure>

Figure 4 underscores the harmonization of Recall and Precision through the F1-score. Random Forest and GBM lead the group with the highest F1-scores (0.971 and 0.968, respectively), demonstrating that they optimize both sensitivity and specificity simultaneously. Their clustering near the top of the graph reflects their superior suitability for defect prediction tasks. SVM and ANN, despite perfect or near-perfect Recall, exhibit lower F1-scores (~0.912), highlighting that their inflated false positives undermine overall balance. Logistic Regression maintains a strong F1-score (0.926), showing it is still viable, though less robust than ensemble methods. Decision Tree (0.940) performs well, with its slightly lower Recall balanced by higher Precision. k-NN's relatively weaker F1-score (0.907) again demonstrates its instability in high-dimensional datasets.
<figure><img src="image_7.png" /><figcaption>Fig 5: ROC-AUC vs F1-score</figcaption></figure>

Figure 5 provides insight into each model's ability to discriminate between classes across thresholds (ROC-AUC) in relation to overall predictive balance (F1-score). Ensemble models again dominate: GBM (ROC-AUC = 0.836, F1 = 0.968) and Random Forest (ROC-AUC = 0.824, F1 = 0.971) clearly outperform others, confirming their strong classification boundaries and balanced predictions. Decision Tree and Logistic Regression fall in the mid-range, with moderate ROC-AUC values (0.818 and 0.796) but solid F1-scores, showing acceptable but less discriminative power. In stark contrast, SVM and ANN, despite strong Recall and F1, show much lower ROC-AUC values (0.681 and 0.699), meaning they fail to reliably separate defective from non-defective items across decision thresholds. This explains their tendency to over-classify defects, producing operational inefficiencies in SME contexts. K-NN performs worst (ROC-AUC = 0.577), confirming its limited ability to generalize in this application.
<table><caption>Table 4: Ranking of Machine Learning Models for SME Suitability</caption><thead><tr><td>Rank</td><td>Model</td><td>Rationale for Ranking</td></tr></thead><tbody><tr><td>1</td><td>Random Forest</td><td>Best overall balance; very low false negatives, low false positives, high Accuracy and F1-score; highly reliable and efficient for SMEs.</td></tr><tr><td>2</td><td>Gradient Boosting (GBM)</td><td>Close to Random Forest; excellent Accuracy and Recall with slightly higher false negatives; still efficient and robust for SME use.</td></tr><tr><td>3</td><td>Decision Tree</td><td>Interpretable, fewer false positives reduce inspection costs, but higher false negatives risk defects slipping through.</td></tr><tr><td>4</td><td>Logistic Regression</td><td>High Recall ensures defect detection, but high false positives increase inspection burden; simple and interpretable.</td></tr><tr><td>5</td><td>Artificial Neural Network (ANN)</td><td>Very high Recall but excessive false positives make it impractical for SMEs with limited resources.</td></tr><tr><td>6</td><td>Support Vector Machine (SVM)</td><td>Perfect Recall but overwhelming false positives (flags all items as defective); unsuitable for SMEs despite sensitivity.</td></tr><tr><td>7</td><td>k-Nearest Neighbors (k-NN)</td><td>Weakest ROC-AUC and unstable performance; unsuitable for high-dimensional manufacturing defect data.</td></tr></tbody></table>

Table 4 presents a comparative ranking of machine learning models based on both statistical performance and operational suitability for predicting manufacturing defects in Small and Medium Enterprises (SMEs). The ranking integrates performance metrics and confusion matrix outcomes, emphasizing how false positives (unnecessary inspections) and false negatives (missed defects) affect resource-limited production environments.

The Random Forest model ranks highest, achieving the best overall accuracy (0.951) and F1-score (0.971) with minimal misclassifications (4 false negatives and 28 false positives). This makes it highly efficient for SMEs, ensuring few undetected defects while minimizing wasted inspection efforts. Gradient Boosting Machines (GBM) follow closely, maintaining strong detection performance with only slightly higher false negatives (8). Both ensemble models handle nonlinear, complex data effectively, offering the most reliable and balanced options for real-world SME deployment.

The Decision Tree model ranks third, offering transparent decision rules and fewer false positives than Logistic Regression, which reduces inspection costs. However, its higher false negatives (34) pose a risk of missed defects. Logistic Regression, though simple and interpretable, records more false positives (67) but ensures high recall (0.969), capturing nearly all defects at the expense of inspection efficiency.

Lower in the ranking, Artificial Neural Network (ANN) and Support Vector Machine (SVM) achieve extremely high recall (≥0.996) but
generate excessive false positives, rendering them impractical for SMEs due to operational overload. k-Nearest Neighbors (k-NN) performs worst, showing poor accuracy (0.830) and instability in high-dimensional data.

Overall, ensemble models (Random Forest and GBM) offer the optimal trade-off between defect detection and resource efficiency. Decision Tree and Logistic Regression remain suitable for SMEs prioritizing interpretability, while SVM, ANN, and k-NN are unsuited for cost-sensitive manufacturing. This ranking provides SME managers with a clear, evidence-based framework for selecting models that balance predictive accuracy with operational practicality.

## 5.0 Conclusion

This study evaluated seven supervised machine learning models: Logistic Regression, Decision Tree, Random Forest, Support Vector Machine, Gradient Boosting, Artificial Neural Network, and k-Nearest Neighbors for predicting manufacturing defects in a Small and Medium Enterprise (SME) environment. The results revealed that ensemble models (Random Forest and Gradient Boosting) achieved the best balance of accuracy, recall, and precision, making them highly suitable for SMEs requiring reliable yet resource-efficient defect detection. Their ability to capture nonlinear relationships and reduce over fitting ensures robust performance across diverse defect categories. Decision Tree and Logistic Regression performed moderately well, offering interpretability and low computational cost, making them viable when transparency is prioritized over maximum accuracy. Conversely, SVM and ANN, though achieving near-perfect recall, produced excessive false positives that could overwhelm SME inspection capacities, while k-NN demonstrated weak and unstable performance. The findings underscore the trade-off between false negatives (missed defects) and false positives (unnecessary inspections), emphasizing the importance of balanced models for operational efficiency. Overall, the study establishes ensemble methods as the most effective for SME deployment and provides a benchmark for future research exploring hybrid models, real-time prediction, and IoT-integrated quality monitoring to enhance predictive quality analytics in resource-limited manufacturing contexts.
## References

Albattah, W., & Alzahrani, M. (2024). Software Defect Prediction Based on Machine Learning and Deep Learning Techniques: An Empirical Approach. *AI*, 5(4), 1743-1758. https://doi.org/10.3390/ai5040086

Arif Ali, Z., H. Abduljabbar, Z., A. Tahir, H., Bibo Sallow, A., & Almufti, S. M. (2023). eXtreme Gradient Boosting Algorithm with Machine Learning: A Review. *Academic Journal of Nawroz University*, 12(2), 320-334. https://doi.org/10.25007/ajnu.v12n2a1612

Chidiebube, I. N., Chikwendu, O. C., & Obiuto, C. (2024). Industry 4.0 Implementation: A Paradigm Shift in Manufacturing. *Journal of Inventive Engineering and Technology (JIET)*, 6(1), 20-26.

Chidiebube, I. N., Uzochukwu, M. G., Nwamekwe, O., & Sunday, A. P. (2025). Evaluating Machine Learning Models for Optimizing Overall Equipment Effectiveness in Food Manufacturing SMEs. *Jurnal Inovasi Teknologi Dan Edukasi Teknik*, 5(2), 1-12. https://hal.science/hal-05149408/

Chukwutoo, C., & Nkemakonam, C. (2018). Total Productive Maintenance (TPM) as a Business Strategy in Manufacturing Small and Medium Enterprises in Nigeria. *Advances in Research*, 15(5), 1-9. https://doi.org/10.9734/AIR/2018/41330

Guido, R., Ferrisi, S., Lofaro, D., & Conforti, D. (2024). An Overview on the Advancements of Support Vector Machine Models in Healthcare Applications: A Review. *Information*, 15(4), 235. https://doi.org/10.3390/info15040235

Handoyo, S., Suharman, H., Ghani, E. K., & Soedarsono, S. (2023). A Business Strategy, Operational Efficiency, Ownership Structure, and Manufacturing Performance: The Moderating Role of Market Uncertainty and Competition Intensity and its Implication on Open Innovation. *Journal of Open Innovation: Technology, Market, and Complexity*, 9(2), 100039. https://doi.org/10.1016/j.joitmc.2023.100039

Igbokwe, N. C., Christiana, C., Nwankwo, C. O., & Onyeka, C. (2025). Data-Driven Solutions for Shuttle Bus Travel Time Prediction: Machine Learning Model Evaluation at Nnamdi Azikiwe University. *African Journal of Computing, Data Science and Informatics*, 1(1), 31-55. https://journals.co.za/doi/pdf/10.31920/2978-3240/2025/v1n1a2

Igbokwe, N., & Mba, W. (2019). Assessing the Nature of Risk Management Implementation in Manufacturing Small Medium
Enterprises in Nigeria. *Archives of Current Research International*, 16(4), 1–10. https://hal.science/hal-03585049/

Igbokwe, N., Nwamekwe, C., Aguh, P., & Ezeanyim, O. (2025). A Comparative Analysis Of Machine Learning Models For Inventory Demand Forecasting In A Food Manufacturing Sme. *Indonesian Journal of Innovation Science and Knowledge*, 2(3), 35–48. https://knowledge.web.id/index.php/ijisk/article/view/177

Igbokwe, N., Nwamekwe, C., Godwin, H., & Mba, W. (2025). Optimization Of Overall Equipment Effectiveness Factors In A Food Manufacturing Small And Medium Enterprise. *Journal of Research in Engineering and Applied Sciences*, 10(1), 836–845. https://hal.science/hal-04999684/

Igbokwe, N., Okpala, C., & Nwamekwe, C. (2024). The Implementation of Internet of Things in the Manufacturing Industry: An Appraisal. *International Journal Of Engineering Research And Development*, 20(7), 510–516. https://hal.science/hal-04669400/

Kausik, A. K., Rashid, A. B., Baki, R. F., & Jannat Maktum, M. M. (2025). Machine Learning Algorithms For Manufacturing Quality Assurance: A Systematic Review Of Performance Metrics And Applications. *Array*, 26, 100393. https://doi.org/10.1016/j.array.2025.100393

Khan, A. A., Chaudhari, O., & Chandra, R. (2024). A Review Of Ensemble Learning and Data Augmentation Models for Class Imbalanced Problems: Combination, Implementation and Evaluation. *Expert Systems with Applications*, 244, 122778. https://doi.org/10.1016/j.eswa.2023.122778

Le Dinh, T., Vu, M.-C., & Tran, G. T. C. (2025). Artificial Intelligence in SMEs: Enhancing Business Functions Through Technologies and Applications. *Information*, 16(5), 415. https://doi.org/10.3390/info16050415

Navarro, G., & Naranjo, G. (2025). Quality Culture, Quality Management, and Organizational Performance: A Structural Model for the Manufacturing Sector. *Sustainability*, 17(9), 3934. https://doi.org/10.3390/su17093934

Nazia Fahad, & Hamilton, J. (2024). *Advanced AI and Machine Learning Applications in SMEs: Enhancing Operational Efficiency and Reducing Risks*. Unpublished. https://doi.org/10.13140/RG.2.2.19240.69122

Roheen Qamar & Baqar Ali Zardari. (2023). Artificial Neural Networks: An Overview. *Mesopotamian Journal of Computer Science*, 2023, 124–133. https://doi.org/10.58496/MJCSC/2023/015
Salman, H. A., Kalakech, A., & Steiti, A. (2024). Random Forest Algorithm Overview. *Babylonian Journal of Machine Learning*, 2024, 69–79. https://doi.org/10.58496/BJML/2024/007

Suyal, M., & Goyal, P. (2022). A Review on Analysis of K-Nearest Neighbor Classification Machine Learning Algorithms based on Supervised Learning. *International Journal of Engineering Trends and Technology*, 70(7), 43–48. https://doi.org/10.14445/22315381/IJETT-V70I7P205

Vajjhala, N. R. (2024). Exploratory Review of Applications of Machine Learning for Small- and Medium-Sized Enterprises (SMEs). In S. Bhattacharyya, J. S. Banerjee, & M. Köppen (Eds.), *Human-Centric Smart Computing* (Vol. 376, pp. 261–270). Springer Nature Singapore. https://doi.org/10.1007/978-981-99-7711-6_21

Vijaya Lakshmi. (2025). A Review on K nearest Neighbour Classification Technique in Machine Learning. *International Journal of Scientific Research in Science, Engineering and Technology*, 12(1), 257–260. https://doi.org/10.32628/IJSRSET25121168