# AI-Driven Predictive Maintenance for Workforce and Service Optimization in the Automotive Sector
## 4 Methodology
### Model Training
#### 4.2.2 Probabilistic Inference and Label Assignment  
During testing, the trained models generated probabilistic outputs P \(\in\) [0,1] for each instance. These probabilities were binarized using a threshold value \(\tau\), as defined by the following rule:  
\[Label=\left\{ \begin{aligned} & 1,\text{ }if\text{ }P\text{ }\geq\text{ }\tau\\ & 0,\text{ }if\text{ }P<\tau\end{aligned} \right. \tag{6}\]  
For the maintenance prediction model, a label of 1 signifies that the customer is expected to visit the service center, and 0 denotes no visit. While a threshold of 0.50 was used as the default, the optimal value of \(\tau\) was determined empirically based on \begin{table}
\begin{tabular}{c c c} \hline \hline
**Model** & **Hyperparameter** & **Search Space** \\ \hline \multirow{6}{*}{DT} & max\_depth & [2, 4, 6, 8, 10, 12, 15, 20] \\ \cline{2-3}  & min\_samples\_split & [2, 5, 10, 20, 50] \\ \cline{2-3}  & min\_samples\_leaf & [1, 2, 5, 10, 20] \\ \cline{2-3}  & criterion & [“gini”, “entropy”] \\ \cline{2-3}  & class\_weight & [None, “balanced”, class imbalance ratio] \\ \hline \multirow{6}{*}{RF} & n\_estimators & [100, 250, 500, 750, 1000, 1250] \\ \cline{2-3}  & max\_depth & [4, 6, 8, 10, 12, 16, 20, 25] \\ \cline{2-3}  & max\_features & [“sqrt”, “log2”, 0.3, 0.5, 0.7] \\ \cline{2-3}  & min\_samples\_split & [2, 5, 10, 20] \\ \cline{2-3}  & min\_samples\_leaf & [1, 2, 5, 10] \\ \cline{2-3}  & bootstrap & [True, False] \\ \cline{2-3}  & class\_weight & [None, “balanced”, class imbalance ratio] \\ \hline \multirow{6}{*}{LightGBM} & n\_estimators & [100, 250, 500, 750, 1000, 1500] \\ \cline{2-3}  & max\_depth & [\(-1,\) 4, 6, 8, 10, 12, 16] \\ \cline{2-3}  & learning\_rate & [0.005, 0.01, 0.02, 0.05, 0.1] \\ \cline{2-3}  & min\_child\_samples & [5, 10, 20, 30, 50] \\ \cline{2-3}  & subsample & [0.5, 0.6, 0.7, 0.8, 0.9, 1.0] \\ \cline{2-3}  & subsample\_bytes & [0.5, 0.6, 0.7, 0.8, 0.9, 1.0] \\ \cline{2-3}  & scale\_pos\_weight & class imbalance ratio \\ \hline \multirow{6}{*}{XGBoost} & n\_estimators & [100, 300, 500, 750, 1000, 1500] \\ \cline{2-3}  & max\_depth & [3, 4, 6, 8, 10, 12, 16] \\ \cline{2-3}  & learning\_rate (eta) & [0.005, 0.01, 0.02, 0.05, 0.1] \\ \cline{2-3}  & min\_child\_weight & [1, 3, 5, 10] \\ \cline{2-3}  & subsample & [0.5, 0.6, 0.7, 0.8, 0.9, 1.0] \\ \cline{2-3}  & subsample\_bytes & [0.5, 0.6, 0.7, 0.8, 0.9, 1.0] \\ \cline{2-3}  & subsample\_bytes & [0.5, 0.6, 0.7, 0.8, 0.9, 1.0] \\ \cline{2-3}  & gamma & [0, 0.1, 0.5, 1.0] \\ \cline{2-3}  & scale\_pos\_weight & class imbalance ratio \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Extended hyperparameter search space for model optimization. performance metrics (e.g., maximizing the F1-score or minimizing false negatives), as discussed in Section 5. During testing, the trained models produced probability estimates \(P\in[0,1]\), which were binarized using a classification threshold \(\tau\). Although the default threshold \(\tau=0.50\) is commonly used, in this study, the threshold value was not selected arbitrarily. Instead, we systematically evaluated a range of candidate thresholds at 0.05 intervals from 0.10 to 0.90 (i.e., \(\tau\in[0.10,\,0.15,\,0.20,\,\ldots,0.90]\)). For each threshold, we computed performance metrics on the validation set, including AUC, F1-score, and the precision-recall trade-off. In addition, we assessed two domain-specific impact measures, the Missed Service Opportunity Rate (MSOR) and the Excess Capacity Allocation Rate (ECAR), which reflect the operational costs associated with false negatives and false positives, respectively. The evaluation revealed that a threshold of \(\tau=0.30\) achieved the best overall balance--it yielded the highest AUC while simultaneously minimizing MSOR and ECAR. This indicates that 0.30 is not merely a default setting but represents a data-driven, domain-informed decision that aligns both predictive accuracy and business efficiency.