Machine learning-based classification of macadamia nut quality using physical features - Nilpanich, Sirikunya; Rukpakavong, Wilawan; Subsomboon, Kannikar (Journal of Asian Scientific Research, 2025)
Macadamia nuts in shell must be classified into excellent and faulty categories to maintain market value, optimize yield efficiency, and ensure consistent product quality. Although traditional methods such as wet floating and dry specific gravity (SG) remain widely used due to their simplicity and low cost, their accuracy and consistency are often limited in large-scale or automated operations. Machine learning offers a more advanced and efficient alternative, enabling higher levels of automation, precision, and reliability. This study evaluates and compares the performance of wet floating, dry SG at different threshold levels, and machine learning models using a dataset of 1,260 macadamia nuts collected during the peak harvest period from multiple orchards in Loei Province, Thailand. The wet floating method achieved an accuracy of 78.33% with high precision (90.00%) but relatively low recall (72.97%), indicating its tendency to misclassify a considerable portion of high-quality nuts. The dry SG method demonstrated the most balanced performance at the 0.9 threshold, with 89.50% accuracy, 90.00% precision, 89.11% recall, and an F1-score of 89.55%, while threshold variation revealed clear trade-offs between precision and recall. Machine learning outperformed the traditional methods, with the Random Forest model yielding the highest performance (accuracy 92.06%, precision 94.44%, recall 91.07%, and F1-score 91.07%). These findings highlight the potential of integrating machine learning–based classification to enhance accuracy, increase operational efficiency, strengthen product quality assurance, and support more sustainable and competitive agricultural value chains.