Research Article Differentiation of Organic Cocoa Beans and Conventional Ones by Using Handheld NIR Spectroscopy and Multivariate Classification Techniques Elliot K. Anyidoho , 1,2 Ernest Teye , 1,3 and Robert Agbemafle 4 1 University of Cape Coast, College of Agriculture and Natural Sciences, School of Agriculture, Department of Agricultural Engineering, Cape Coast, Ghana 2 Ghana Cocoa Board, Cocoa Health and Extension Division, Elubo, Ghana 3 University of Cape Coast, Africa Centre of Excellence for Food Fraud and Safety Food, AfriFoodinTegrity Centre, Cape Coast, Ghana 4 University of Cape Coast, College of Agriculture and Natural Sciences, School of Physical Sciences, Department of Laboratory Technology, Cape Coast, Ghana Correspondence should be addressed to Elliot K. Anyidoho; elliot.anyidoho@stu.ucc.edu.gh Received 30 July 2021; Revised 8 October 2021; Accepted 25 October 2021; Published 20 November 2021 Academic Editor: Diding Suhandy Copyright © 2021 Elliot K. Anyidoho et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. The global market for organic cocoa beans continues to show sturdy growth. A low-cost handheld NIR spectrometer (900- 1700 nm) combined with multivariate classication algorithms was used for rapid dierentiation analysis of organic cocoa beansintegrity. In this research, organic and conventionally cultivated cocoa beans were collected from dierent locations in Ghana and scanned nondestructively with a handheld spectrometer. Dierent preprocessing treatments were employed. Principal component analysis (PCA) and classication analysis, RF (random forest), KNN (K -nearest neighbours), LDA (linear discriminant analysis), and PLS-DA (partial least squares-discriminant analysis) were performed comparatively to build classication models. The performance of the models was evaluated by accuracy, specicity, sensitivity, and eciency. Second derivative preprocessing together with PLS-DA algorithm was superior to the rest of the algorithms with a classication accuracy of 100.00% in both the calibration set and prediction set. Second derivative algorithm was found to be the best preprocessing tool. The identication rates for the calibration set and prediction set were 96.15% and 98.08%, respectively, for RF, 91.35% and 92.31% for KNN, and 90.38% and 98.08% for LDA. Generally, the results showed that a handheld NIR spectrometer coupled with an appropriate multivariate algorithm could be used in situ for the dierentiation of organic cocoa beans from conventional ones to ensure food integrity along the cocoa bean value chain. 1. Introduction Several modern-day environmental challenges are rooted in agri-food schemes. These schemes are held partly account- able for the decrease in ecosystem destruction, water pollu- tion, global warming, and biodiversity. Hence, the greening of agri-food production, processing, and marketing can be an important contribution to quality, safety, and sustainabil- ity. The advent of post-Fordism has put environmental issues and quality matters at the heart of agri-food provi- sioning schemes [1, 2]. The enhancement of sustainability performance in the cocoa industry is developing as a strategy within universal product value chains. In making the global cocoa chain and network sustainable, both private and public players have introduced many initiatives at dierent levels. The main driver of this trend is the emerging consumer demand for socially fair and eco-friendly products. For instance, sales of organic chocolate reached USA $304 million in 2005, rep- resenting an increase of 75% in comparison to 2002 sales [3]. Much attention has to be shifted to West Africa because it produces more than 70% of all cocoa and is the location of Hindawi International Journal of Food Science Volume 2021, Article ID 1844675, 13 pages https://doi.org/10.1155/2021/1844675