Precise categorization of avocado ripeness plays a vital role in strengthening post-harvest operations and curbing waste throughout agricultural supply networks. The present study centers on constructing a resilient ensemble classification framework employing spectral readings from 120 kilograms of Buccaneer avocados procured from the Royal Project in Chiang Mai, Thailand. The specimens were assessed via near-infrared (NIR) spectroscopy at 18 wavelengths. Five distinct machine learning models—Random Forest, Decision Tree, XGBoost, Gradient Boosting, and Gaussian Mixture Model—were separately trained and subsequently fused into a unified ensemble. Four distinct algorithms were deployed to fine-tune the weighting of each model: Bayesian optimisation, differential evolution, particle swarm optimisation, and grid search. Evaluation metrics covering accuracy, precision, recall, F1-score, confusion matrices, and ROC curves were applied. Grid Search yielded the strongest classification outcomes, securing an accuracy of 82.5% alongside an F1-score of 85.3%, emphasizing the value of weight-refined ensemble learning relative to standalone classifiers. This investigation delivers a scalable and transparent pipeline for non-destructive ripeness identification. The outcomes, notwithstanding constraints related to overfitting and dependency on spectral data integrity, pave the way for eventual real-time field deployment in agriculture.
Machine learning is increasingly applied across agri-food systems to support prediction, classification, optimisation, monitoring, and decision-making. These applications now extend from farm-level production to processing, logistics, consumption, and food-waste management. As data-intensive agriculture expands, machine learning is often presented as an enabling technology for sustainable agri-food transitions. Despite this promise, the sustainability evidence base remains fragmented. Many studies report improvements in model accuracy, prediction performance, or operational decision support, but they do not always specify how these technical gains translate into environmental, economic, or social outcomes. This creates uncertainty about whether machine learning contributes to sustainability transitions directly, indirectly, or only under particular implementation conditions. This systematic review examines how machine learning contributes to sustainable agri-food transitions through environmental, economic, and social impact pathways. It focuses on the relationship between machine learning methods, agri-food applications, and sustainability-relevant outcomes rather than treating model performance as an end in itself. The review asks where evidence is strongest, where it remains indirect, and how different pathways vary across production, processing, distribution, consumption, waste reduction, and governance. The review finds that environmental and economic pathways are more developed than social and equity pathways. Evidence is strongest where machine learning supports precision input management, yield forecasting, irrigation decision support, operational efficiency, supply-chain analytics, and food-waste reduction. However, stronger longitudinal evaluation, causal assessment, life-cycle integration, participatory design, and equity-sensitive governance are needed before machine learning can be judged as a reliable driver of sustainable agri-food transitions.