Algorithm A1: Machine learning pipeline for model-type and aging-type classification | ||||
Input: LSR dataset , EPDM dataset Output: Final accuracy , classification report, and confusion matrix 1 Load datasets and from CSV files; 2 Concatenate features: ; 3 Concatenate model-type labels: ; 4 Encode model-type labels: ; 5 Normalize features: ; 6 Concatenate features: ; 7 Concatenate aging-type labels: ; 8 Encode aging-type labels: ; 9 Normalize features: ; 10 Split and into 80–20 training and testing sets; Input: Model M, training and testing sets for model-type or aging-type classification task Output: Performance metrics: accuracy A, classification report, and confusion matrix C 11 Train model M on training data to minimize the loss function L;
12
Predict test labels on :;
13
Calculate accuracy A:;
14
Output classification report and confusion matrix C;
15 Define and initialize models for both classification tasks as follows:
Input: Stacked model , Parameter grid G Output: Optimal parameters and best model 16 Perform a randomized search on with grid G; 17 for each parameter configuration do 18 Evaluate on the training set and compute accuracy ; 19 Set and update best model ; Input: Optimized stacked model , testing set Output: Final accuracy , classification report, and confusion matrix 20 Use to predict labels on test data:;
21
Calculate and output final accuracy , classification report, and confusion matrix ; 22 return |