Overweight Prediction Using Weighted Hard and Soft Voting Ensemble Machine Learning Classifiers
摘要
This study aims to address the class imbalance in a dataset of shape (671, 32) pertaining to overweight prediction, employing oversampling techniques and feature selection methods to enhance model performance. Furthermore, it investigates the effectiveness of ensemble methods, particularly voting classifiers, in improving predictive accuracy and precision. Initially, the dataset, free of null values and duplicates, was preprocessed by encoding features. Recognizing the class imbalance issue, SMOTE oversampling was applied to balance the target feature, followed by recursive feature elimination (RFE) to reduce dimensionality. The dataset underwent independent scaling using Standard Scaler before being split into train and test sets. Two sets of models were experimented with, including tree-based models. Evaluation was conducted to determine the top-performing model across various metrics, with SVM identified as the most effective, while linear discriminant analysis (LDA) showed comparatively lower performance. Models were then integrated into a voting classifier, with weights based on precision scores. Both hard and soft voting strategies were employed and evaluated using sensitivity and specificity calculations from confusion matrices. Further analysis involved an alternative set of models, including CatBoost, LightGBM, XGBoost, gradient boosting, and decision tree. CatBoost consistently outperformed others, leading to its integration into a weighted voting classifier, with a focus on precision enhancement. The soft voting approach demonstrated superior precision, particularly when compared to individual models. The soft voting classifier exhibited improvements across various metrics, highlighting its efficacy in enhancing precision and overall performance beyond individual models’ capabilities. Specifically, the hard voting classifier excelled in precision and specificity for the first set of models, while the soft voting classifier outperformed in F1 score, Cohen’s kappa, balanced accuracy, MCC, and sensitivity for the second set of models.