Optimized ensemble learning for non-destructive avocado ripeness classification - Panudech Tipauksorn; Prasert Luekhong; Minoru Okada; Jutturit Thongpron; Chokemongkol Nadee; Krisda Yingkayun (Smart Agricultural Technology, 2025)
Classifying avocado ripeness accurately is crucial for enhancing post-harvest management and minimizing waste in agricultural supply chains. This study focuses on creating a strong ensemble classification model using spectral data from 120 kilogrammes of Buccaneer avocados obtained from the Royal Project in Chiang Mai, Thailand. We analyzed the avocados with near-infrared (NIR) spectroscopy at 18 wavelengths. Five machine learning models Random Forest, Decision Tree, XGBoost, Gradient Boosting, and Gaussian Mixture Model were trained separately and then merged into an ensemble. Four algorithms were used to optimize the model weight distribution: Bayesian Optimisation, Differential Evolution, Particle Swarm Optimisation, and Grid Search. We assessed performance through accuracy, precision, recall, F1-score, confusion matrices, and ROC curves. Grid Search achieved the best classification performance, reaching an accuracy of 82.5% and an F1-score of 85.3%, highlighting the benefits of weight-optimized ensemble learning compared to single classifiers. This study offers a scalable and clear method for non-destructive ripeness detection. The findings, despite some limitations like overfitting and reliance on spectral data quality, support future real-time deployment in agriculture.