Development of two smart acoustic yam quality detection devices using a machine learning approach

Quality detection has been a major problem in the agriculture and food industries. This operation is mostly done by a subjective sensory method which is prone to high error and food destruction. Therefore, there is a need to apply artificial intelligence using a machine learning approach. This study developed two intelligent acoustic yam quality detection and classification devices using two sound-generating techniques. The software (multi-wave frequency generator) sound-generating technique generated sound from a laptop to a speaker inside a detecting chamber. This sound passes through the yam and was received on the opposite side by a microphone, into another laptop for analysis using visual analyzer software. The impact sound-generating technique used sound generated from a gentle impact of the yam on a flat surface placed inside the detection chamber. The sound produced was picked up by a microphone into a laptop for analysis. Acoustic properties considered were amplitude, frequency, sound velocity, wavelength, period and sound intensity. Discriminant analysis algorithm only was used in this first stage of the study to prove the applicability of machine learning. Three qualities (good, diseased damaged and insect-damaged) of two yam varieties (white and yellow yam) were tested. The device's performance of white yam was 79% and 68.7%, yellow yam was 82.3% and 68.7% for the software sound generation-technique and surface impact sound-generating technique, respectively. The study shows that the software sound-generating technique performed better in terms of overall yam quality detection and also proves the applicability of machine learning.


Introduction
Yam tuber cultivated in South America, Oceania, the Caribbean, Asia, and West Africa belongs to a family called Dioscoreaceae [1]. [2] reported that there are about 800 species documented. Archeological pieces of evidence had shown that the origins of different species of yam had been traced to Africa, Asia and America [2][3][4]. [1] stated that it contains varying amounts (percentages) of carbohydrates, proteins and vitamins [2]. reported that a tube was estimated to contain an average of about 494 kJ (118 kcal) of energy. Currently, it is reported to be cultivated in about 61 countries with a global production of about 73 million metric tonnes [3,4]. This high production will impact world trade. [5] reported that the United States, India, Belgium, Japan and Jamaica in 2019 were the global major exporters of yam. These countries exported a total of 50,593.4 tonnes valued at $ 81,321,244 million. The world's largest producer of yam was reported to be Nigeria, accounting for over 70 to 76% of the world's production (Yam Market Report. 2022). According to Yam Market Report (2022), despite this high production. The developing countries do not have a significant export record. This is due to capital-intensive involvement in procuring mechanical processing equipment by processors [4]. This necessitates the need for this study to develop a cheap and nondestructive and intelligent technique to determine yam quality.
One of the fastest ways to detect quality in an industry setting is by employing the knowledge of artificial intelligence through machine learning [6]. According to Ref. [7]; the ability to make any machine behave and think like a human to achieve or solve a particular task is known as artificial intelligence. To achieve this intelligence in a machine, then the machine needs to be trained. Machine learning is a process of manipulating computers through programming with mathematical algorithms from data to imitate the way human reasons and make decisions [8][9][10][11]. In this study, an intelligent device was developed using a machine-learning algorithm to detect the quality of two species of yam using its acoustic properties. Though, only one machine learning algorithm was used in this study. The goal of this first stage of the project was to prove the applicability of the machine learning algorithm. After this initial study, more machine-learning algorithms will be used to evaluate the devices further. The use of acoustic properties of a material to detect material changes has been in existence since the 1800s.
According to Refs. [12,13]; the use of acoustic properties of materials in research starts in the US in the 1830s. Though, these researches were not on food materials. Ref. [13] stated that research on the acoustic properties of food begins in the 1920s. Many researchers had used the acoustic properties of crops to successfully detect moisture, defects, insect infestations and other activities affecting harvested crops [14]. This study reviewed the general application of acoustic properties within the audible frequency, which had been applied to biomaterials to detect changes in their quality. This was done due to little or scarcity of information on the application of audible sound range being used in detecting post-harvest qualities of yam tubers. So, this review was done based on studies of different researchers on different crops [15]. used sound pressure levels of dropped wheat grains to detect their moisture contents with an accuracy of 90% [16][17][18][19]. and [38], used the acoustic properties of apples to automatically detect their quality with an accuracy range of 80-100% [20]. carried out a study to detect the quality of apples and tomatoes and achieved an accuracy of 80% [21,22]. used the acoustic properties of wheat grains to automatically detect their quality and achieved an accuracy range of 92-95% [23,24]. used audible sound properties to detect the quality of coconut fruits and achieved an accuracy range of 83-97% [25]. use sound to detect beans pod and seeds qualities and achieved an accuracy range of 80-90% [26]. detects the crispness of a carrot with its acoustic properties at audible range frequency and achieved an accuracy of 70%. Refs. [27,28] used the acoustic vibration properties of pear to automatically detect its quality and achieved an accuracy of 85-93%, respectively. Ref. [29] developed an intelligent monitoring system using CO 2 bust sound produced by white grubs (larvae of scarab beetles) that attach maize and soybeans seeds. Detection results are transmitted with GSM (Global System for mobiles) and GPS (Global positioning system) to the farmer's phone. Refs. [30,31] used audible sound frequency range to detect the ripeness and texture of watermelon and strawberry and achieved an accuracy of 92 and 99%, respectively. The acoustic properties of yam tubers have never been used to detect their quality. Therefore, this study is aimed at finding if the acoustic property can be used to correctly detect yam quality using machine learning. Hence, the objective of this study is to develop two smart devices that employed two different sound-detecting techniques using the acoustic properties of yam tubers to detect their quality.

Design and construction of two acoustic yam quality detection devices
The two techniques used for developing the two yam quality devices were based on sound generation. These two sound generation techniques were: i. Software sound generation technique ii. Surface impact sound generation technique

Design of the yam detecting devices
The design information and calculations of the two intelligent yam quality detectors were displayed in Tables S1 and S2 displayed in the supplementary document provided. These design values were used for the construction of the two detecting devices.  [35] as shown in Fig. 1. The inside of the detection chamber was covered with a 12.5 mm thick Styrofoam for soundproofing. Attached inside the chamber was 25 W, 4 Ω subwoofer speaker to one end of the chamber. A multi-function Condenser Microphone having a 3.5 mm Jack for computer input was attached at the opposite end of the speaker in the chamber. A sample holder of dimension 192 mm × 140.5 mm was placed between the speaker and the microphone. The speaker was then connected to a Hp laptop installed with software called multi-wave frequency generator version 1.2 for sound generation. The microphone was then connected to a Focusrite Solo Soundcard which in turn was connected to a Vibes Cor VC AMP 12 BT Home Amplifier. The Amplifier was then connected to a Hp laptop installed with software called visual analyzer 2011 for sound analysis and collection of data.

Sample impact sound generation-technique device.
A 382.8 mm × 522 mm × 478.42 mm double-layer Mild density fiberboard (MDF) was used to construct the body of the detection chamber [35] as shown in Fig. 2. The inside of the detection chamber was covered with a 12.5 mm thick Styrofoam for soundproofing. The detecting chamber consists of a sliding panel with an impact surface directly opposite it. Above the impact surface, was attached a multi-function condenser microphone having a 3.5 mm Jack for the computer input. The microphone was then connected to a Focusrite Solo Soundcard which in turn was connected to a Vibes Cor VC AMP 12 BT Home Amplifier. The Amplifier was then connected to a Hp laptop installed with software called visual analyzer 2011 for sound analysis and collection of data.

Sample acquisition and preparation
Six hundred tubers consisting of 300 white yams (Dioscorea rotundata) and 300 yellow yams (Dioscorea cayanensis) were acquired from National Root Crops Research Institute, Umudike, Nigeria. These acquired tubers were taken to the agronomy laboratory at the federal university of Agriculture, Makurdi, Nigeria for inspection and verification. The quality of yam tubers acquired was one hundred (100) Good yams, one hundred (100) diseased yams and one hundred (100) insect-destroyed yams of white yams and yellow yams, respectively. Typical yam quality samples are displayed in Fig. 3.

Experimental procedures for acoustic data acquisition
2.2.2.1. Software sound generation-technique device. The Yam sample was placed on the sample holder and the detection chamber was closed, to make the chamber airtight. An audible sound wave of 200 Hz was generated using the multi-wave frequency generator version 1.2 installed on the laptop computer. This value (200 Hz) was used because it was recommended by the [37] to be within the safe hearing frequency range. This sound wave was passed into the detecting chamber through the speaker. The sound passes through the yam sample and is then collected by the microphone into the sound card. The sound card then passes the sound wave to the amplifier which in turn passes it into the laptop computer into the visual analyzer 2011 software. Typical screen displays of this sound-generating and analyzing software were shown in Fig. 4a and b, respectively. Then acoustic properties of the sound waves like amplitude, frequency, velocity, wavelength, period and intensity were recorded for each yam quality sample examined. Recorded data are taken for statistical analysis using a machine learning algorithm called multiple discriminant analysis. The reason for using only one machine learning algorithm and only six acoustic properties at this first stage of the project was, to prove the applicability of the machine learning approach, using acoustic properties of yam quality. When this approach has been proven, more machine-learning algorithms and acoustic properties will be used in a future evaluation study to improve detection and classification accuracy.

Sample impact sound generation-technique device.
The Yam sample was placed at the top of the sliding platform and then allows sliding until it hit the impact platform. Then, the sound wave produced by this impact was received by the microphone into the sound card. The sound card then passes the sound wave to the amplifier which in turn passes it into the laptop computer into the visual analyzer 2011 software. A typical reading display of this software was shown in Fig. 4b. Then acoustic properties of the sound waves like amplitude, frequency, velocity, wavelength, period and intensity were recorded for each yam quality sample examined. Recorded data are taken for statistical analysis using a machine learning algorithm called multiple discriminant analysis.

Data analysis
Acoustic data collected from the two detecting devices were analyzed using SPSS software version 23. A machine learning algorithm called multiple linear discriminant analysis was used to correctly classify yam quality categories. Leave-one-out cross-validation analysis was used to validate the classification results obtained.

Discriminate analysis
The formula used by the discriminant algorithm for classification was displayed as equation (1) [32,33], Where: P(C i |DSF) = Posterior probability that a case was in yam quality class i, given that it has a specific discriminant score DSF DSF = Discriminant Score for Function (Model) (DSF|C i ) = Conditional probability that a case has a discriminant score of DSF, given that it was in yam quality class i P(C i ) = prior probability that a case was in group i, which would be equal to (n i /N) N = Total number of samples n i = Number of cases correctly classified

Classification and validation
The classification was done using the confusion matrix table. There were no hold-out samples before classification. Leave one crossvalidation method was used to validate the developed classification models by reclassifying the samples by leaving one case out. To achieve cross-validation by predicting an output (Y) at point (X), given input data in matrix X 2 and output Y 2 , equation (2) was used [32,33]: Where: μ = overall mean, R = correlation matrix, μ = mean of samples under consideration, n = number of observations under consideration.
So, for leave-one-out predictions, the matrix X 2 will have all the design points except for the one we are predicting.

White yam (Discorea rotundata)
Results of the entire discriminant analysis for detection and evaluation of white yam, for the developed devices on software generation-technique and surface impact generation-technique, are displayed in Tables S3 and S4 (tables too large for manuscript) submitted as a supplementary document. These tables also show predictions for white yam quality by the discriminant software using the discriminant score functions (equations). These score functions (equations) were used to determine the probability that the predicted quality belongs to either quality class 1 (good), class 2 (diseased damaged), or class 3 (insect-damaged). Table 1 shows the mean and standard deviation of acoustic properties obtained during the evaluation analyses of white yam quality for the developed devices, using both the software and sound generation techniques. These results show that the acoustic properties of good white yams were higher in values for the software sound generation technique than for the surface impact sound generation technique. This phenomenon can be attributed to the sound generation frequency of the software sound generation technique being constant; while that of the surface impact sound generation technique was not fixed but depended on sample impact. Looking at the statistical behavior of the obtained results, the acoustic property having the highest deviation from the mean for both techniques is the intensity of the sound. This is because according to Ref. [14]; the intensity of the sound measured through solid material depends on the area of the sample that sound must travel through. So, since these white yam samples were not of the same size, the amount of sound going through them will defer notwithstanding the technique used. Also, similar behavior was observed with potatoes, by Ref. [34] using sound impact technique only, to detect and classify using discriminant analysis. The mean and standard deviation values of acoustic properties for diseased damaged white yams using the software and impact sound generation techniques show higher values for the software technique than for the impact technique. The same explanation given for good white yam can also be used to explain this phenomenon also. The acoustic property having the highest deviations from the mean for both techniques is the intensity of the sound. Again, the same explanation given for good white yams can also be used to explain this phenomenon in diseased damaged yams.
The insect-damaged result mean and standard deviation values of acoustic properties for software and impact sound generation techniques, also follow the same pattern. The same explanation given for white good yams is applicable here as well. The descriptive statistic alone can not give us an in-depth explanation of how these acoustic properties affect the choice for detecting these white yam qualities. So, we take a look at the test for equality of variance, group means and covariance matrices for the two acoustic techniques.
The test for equality of variance, group means and covariance matrices are statistical properties that show if the acoustic data obtained can be discriminated against using discriminant analysis. These tests are displayed in Table S5 submitted in the supplementary document. The first test on the table is the test of equality of yam quality groups means. This test is a univariate ANOVA test, using 'Wilks' Lambda' and 'Fisher (F)' values. Lower wilks' lambda and F values mean that the variable had effects on the detection classification. In the software sound generation technique, the test shows that among the five acoustic properties tested only amplitude and Intensity can be tested while the remaining variables (frequency, period, velocity and wavelength) can not be tested because they do not show any variation among its data sets. Now, between amplitude and intensity that were tested, only amplitude was found to have an effect while intensity does not have any effect on detecting white yam quality. This decision was taken because, the amplitude has a low wilks' lambda value of 0.363 and f value of 4.24E-66, while Intensity has a higher wilks' lambda value of 0.995 and f value of 4.49E-01. This means that in using the software sound generation technique only one acoustic property or variable (amplitude) is required. Therefore, this makes the software technique less expensive and an easy acoustic form of detecting yam quality.
In the surface impact sound generation technique, the test of equality shows that among the five acoustic properties tested, variables like amplitude, frequency, period, wavelength and Intensity can be tested; while only sound velocity can not be tested because velocity data do not have many variations. In this impact technique, it was found that: amplitude, frequency, intensity, period and wavelength were affecting the detection of white yam quality. The decision was taken because their wilks' lambda values were higher while their F values were lower. This means that the surface impact sound generation technique requires five acoustic properties (variables) to detect white yam quality, unlike the software sound generation technique that requires just one.
Another statistical test conducted was the box's tests of equality of covariance matrices. It tests the homogeneity of variances and covariances within the white yam quality groups. So, to show that the covariance matrices are the same for data of all-white yam quality groups the log determinant was found. The equal log determinant shows equal covariance matrices among the quality groups. Log determinants for good, diseased damage and insect damage in the software sound generation technique were not equal. Therefore, violating the assumption that the quality group covariance matrices must be equal. Nevertheless, 'Box M; value can still be calculated to see if it has an effect. Non-significant 'Box M; value with an unequal log determinant still proves that the quality group covariance matrices are equal, this situation always occurs when data are large. The 'Box M value calculated was 2956.271 with an F value of 487.918. This also violates the assumption that the quality group covariance matrices are equal but the analysis can continue because these can also occur when data are large. Log determinants for good, diseased damage and insect damage in the surface impact sound generation technique were also not equal. The calculated 'Box M value was 1244 with an F value of 40.497. This also violates the assumption that the quality group covariance matrices are equal but the analysis can continue because these can also occur when data are large. Despite the drawback of the 'Box M' test, the test of the discriminant score functions will give a better insight into the discriminant analysis.
A summary of canonical discriminant score functions of white yam for both acoustic techniques is shown in Table S6 (submitted in the supplementary document). The discriminant score functions are equations that will be used to determine the probability of a case belonging to a quality group. In this analysis, two discriminant score functions (equations) were developed for the software soundgeneration technique and another two for the surface impact sound-generating technique. In the software sound generation technique, the first discriminant score functions (equations) developed had a higher Eigenvalue, % of the variance, cumulative % and canonical correlation than the second function (equation). The eigenvalue is the ratio between and within quality groups sum of squares and a higher value makes a discriminant score function (equation) a better predictor. So, for the software sound generation technique, the first discriminant score function (equation (3)) was chosen because it has a higher eigenvalue and higher canonical correlation value than the second function (equation (4)). These equations (functions) are also displayed in Table S6 (submitted in the supplementary document). In the surface impact sound-generating technique the first discriminant score functions (equations) developed had higher Eigenvalue, % of the variance, cumulative % and canonical correlation than the second discriminant score functions (equations). So, for the impact sound-generating technique the first discriminant score function (equation (5)) was chosen because it has a higher eigenvalue and higher canonical correlation value than the second function (equation (6)). These equations (functions) are also displayed in Table S6 (submitted in the supplementary document).
Wilks' lambda test was also done to the discriminant score functions (equations) for both techniques. The test shows that for the software sound generation technique, the wilks' lambda value, chi-square value, degree of freedom and P-value for the first developed discriminant score functions (equations) were better than the second. The first discriminant score function (equation (3)) was again chosen over the second because it has a lower wilks' lambda value. Also, this same wilks' lambda test for the surface impact soundgenerating technique shows the wilks' lambda value, chi-square value, degree of freedom and P-value for the first developed discriminant score functions (equations) were better than the second. The first discriminant score function (equation (5)) was again chosen over the second (equation (6)) because it has a lower wilks' lambda value. Another test called the standardized discriminant score function coefficients test" was done for functions (equations) developed for both techniques. This test shows the importance of the coefficients to the developed functions (equations). In the software sound generation technique, only the amplitude and intensity of sound variables were considered. The choices of these two variables were the same as explained for the test of equality of variance. The importance of the values of the coefficients for amplitude (db) and intensity (db) was displaced in Table S6 (submitted in the supplementary document) for the first and second discriminant score functions (equations (3) and (4)) developed. These values show that only the coefficient of amplitude and intensity in the first developed function (equation (3)), was important to it. In the surface impact sound-generating technique only the amplitude, frequency, intensity, period and wavelength variables were considered. The choices of these five variables were the same as explained for the test of equality of variance Their importance of the values of the coefficients for amplitude (db), frequency (Hz), intensity (db), period (s) and wavelength (m) were displaced in Table S6 (submitted in the supplementary document) for the first and second discriminant score function (equations (4) and (5)) developed. These values show that for the first developed function (equation (5)), only the coefficient of the period has negative importance while in the second discriminant score function (equation (6)) developed, only the coefficient of frequency has negative importance (see Table S6 submitted in the supplementary document). These phenomena can be attributed to the difference in weights of the different yam samples used for the surface impact experiments. Also, a further statistical test was carried out on the functions (equations) developed. This further test was called the "structure matrix test" and was carried out for the function developed for both techniques. The structure matrix test tells the correction between the acoustic properties variable and the developed functions (equations). In the software sound generation technique, only the intensity and amplitude of sound variables were considered as explained by the equality of variance test, for the two developed functions (equations (3) and (4)). The values of intensity (db) and amplitude (db) for the test obtained were -were displaced in Table S6 (submitted in the supplementary document) for the two developed functions (equations). This again shows that the intensity of the sound did not contribute to the prediction of yam quality. This phenomenon was caused by using a constant frequency of sound. In the surface impact, the sound-generating technique only the amplitude, frequency, intensity, period and wavelength variables were considered as explained by the equality of variance test, for the two developed functions (equations (5) and (6)). The values of amplitude (db), frequency (Hz), intensity (db), period (s) and wavelength (m) for the test obtained were displaced in Table S6 (submitted in the supplementary document) for the two developed functions (equations (5) and (6)). This again shows the superiority of the first function (equation (5)) over the second function (equation (6)). The developed discriminant score functions (equations) for both techniques are displayed from equations (3)-(6) (also see Table S6 in the supplementary document) [23,24]. observed similar discriminant pattern in their study of coconut quality detection and classification.

Software sound generation technique
Where. DSF1 is the discriminant score function (equation) for the first developed function (equation). DSF2 is the discriminant score function (equation) for the second developed function (equation). A = amplitude (db), F = frequency (Hz), I = intensity (db), T = period (s) and W = wavelength (m) The first discriminant score function (equations (3) and (5)) was chosen in either technique for white yam quality detection classification.
The detection classification or confusion matrix results for the discriminant analysis of white yam quality, for both acoustic techniques used in the study are displayed in Table 2. This table shows that two experimental classifications were carried out for both acoustic techniques used in the study. These detection classifications were called original classification and validated classification. In the software sound generation technique, the actual detection classification result shows that out of the 100 good white yams used for the detection. A total of 69% of them were correctly detected and classified as good yams, 31% were wrongly detected and classified as insect damage yams while no good yams were wrongly classified as diseased damaged yams. Still on the original classification, out of the 100 diseased damaged white yams used for the detection. 97% were correctly detected and classified as diseased damaged yams while 1% were wrongly detected and classified as good yams and 2% were wrongly detected and classified as insect-damaged yams. Again, still on the original classification, out of the 100 insect-damaged white yams used for the detection. A total of 73% were correctly detected and classified as insect-damaged yams. While 19% were wrongly detected and classified as good yams and 8% were wrongly detected and classified as diseased damaged yams. The overall original performance of correctly detecting the classification of all-white yam quality considered in this study using the software sound generation technique for the original detection classification experiment was 79.7%. A cross-validation detection classification experiment was done again to confirm the original result. In the cross-validation detection and classifications done, out of the 100 good white yams used for the detection and classifications. A total of 68% of them were correctly detected and classified as good yams, 31% were wrongly detected and classified as insect damage yams and 1% were wrongly classified as diseased damaged yams. Still on the validation classification, out of the 100 diseased damaged white yams used for the detection. A total of 97% were correctly detected and classified as diseased damaged yams. In comparison, 1% were wrongly detected and classified as good yams and 2% were wrongly detected and classified as insect-damaged yams. Again, still on the validation classification, out of the 100 insect-damaged white yams used for the detection. A total of 73% were correctly detected and classified as insect-damaged yams. In comparison, 19% were wrongly detected and classified as good yams and 9% were wrongly detected and classified as diseased damaged yams. The overall cross-validated performance of correctly detecting all-white yam quality considered in this study using the software sound generation technique was 79%. In the surface impact sound-generating technique, the actual detection classification result shows that out of the 100 good white yams used for the detection. A total of 37% of them were correctly detected and classified as good yams, 62% were wrongly detected and classified as insect damage yams and 1% were wrongly classified as diseased damaged yams. Still on the original classification, out of the 100 diseased damaged white yams used for the detection. A total of 100% was correctly detected and classified as diseased damaged yams while none was wrongly detected and classified as neither good yams nor insect-damaged yams. Again, still on the original classification, of the 100 insectdamaged white yams used for the detection. 74% were correctly detected and classified as insect-damaged yams while 26% were wrongly detected and classified as good yams and none were wrongly detected and classified as diseased damaged yams. The overall original performance classification of correct detections of all-white yam quality considered in this study using the surface impact sound-generating technique was 70.3%. Cross-validation detection was done again to confirm the original result. In the crossvalidation detection and classifications done, out of the 100 good white yams used for the detection and classifications. A total of 35% were correctly detected and classified as good yams, 64% were wrongly detected and classified as insect damage yams and 1% were wrongly classified as diseased damaged yams. Still on the cross-validation classification, out of the 100 diseased damaged white yams used for the detection. A total of 100% was correctly detected and classified as diseased damaged yams while none was wrongly detected and classified as neither good yams nor insect-damaged yams. Again, still on the cross-validation classification, out of the 100 insect-damaged white yams used for the detection. A total of 71% were correctly detected and classified as insect-damaged yams. In comparison, 29% were wrongly detected and classified as good yams and none were wrongly detected and classified as diseased damaged yams. The overall cross-validated performance of correct detections of all-white yam quality considered in this study using the surface impact sound-generating technique was 68.7%. Comparing both acoustic techniques, the software sound generation technique detected more good yams while the surface impact sound-generating technique detects more diseased damaged yams. Both acoustic techniques detect insect-damaged yams equally well. The reason for the high detection of good yams by the software sound generation technique could be due to the lack of interference with the transmission of a sound wave through the yam tubers. Also, the uniform texture of the sound transmission material can account for the high detection of good yams. The poor detection of diseased and insect damage in the sound generation technique could be due to differences in texture within the yam tubers. These differences in texture hinder the smooth transmission of sound through the yam tubers. The reason for the high detection of diseased yams than good yams in the surface impact sound-generating technique could be attributed to the difference in yam tuber tissue texture (deformation) as well. Tissue deformation could have softened the yam tubers; therefore, making them produce low-frequency sounds upon impact with any solid surface than good yam tubers. Though, the overall performance of white yam quality detection was higher in the software sound generation technique. The surface impact sound-generating technique is the best to use when the goal of the detection was to detect diseased damaged white yams. The acoustic detection of white yam tubers quality results achieved was better than those achieved by Ref. [26] for the detection of the crispness of a carrot. Also, the detection results obtained for white yam tubers fall within the ranges obtained by Refs. [23,24] for coconut quality detection, and below that obtained by Refs. [30,31] for the ripeness and texture of watermelon and strawberry.
White yam should be used as a game changer in the quest for global food security, due to its high calorific content per kg when compared to other crops. Therefore, there is a need to increase its export technological capability. This study developed a very cheap method to detect white yam quality for large export activity by just using its acoustic properties. These two developed techniques can be used to design different types of yam quality detection and separation equipment for yam exportation. The limitation of these developed techniques is that the user is expected to possess basic acoustic and computer knowledge..

Yellow yam (Dioscorea cayanensis)
Results of discriminant analysis for detection evaluation of yellow yam for the developed devices for software generation-technique and surface impact generation-technique are displayed in Tables S7 and S8 (tables too large for manuscript) submitted as a supplementary document. These tables also show predicted yellow yam quality by the discriminant software using either the first or second discriminant score function (equation). The discriminant score function then was used to determine the probability that the predicted quality belongs to either quality class 1 (good), class 2 (diseased damaged), or class 3 (insect-damaged). Table 3 shows the mean and standard deviation of acoustic properties obtained during the evaluation of yellow yam for the developed devices. These results show that the acoustic properties of good yellow yams were higher in values for the software sound generation-technique than for the surface impact sound generation technique. This phenomenon can be attributed to the sound generation frequency of the software sound generation-technique being fixed; while that of the surface impact sound generation-technique was not fixed but was based on sample impact. The acoustic property having the highest deviations from the mean for both techniques is the intensity of the sound. This is because the intensity of the sound measured depends on the area of the sample. So, since these yellow yam samples were not of the same size, the amount of sound going through them will defer notwithstanding the technique used. Also, similar behavior was observed with potatoes, by Ref. [34] using sound impact technique only, to detect and classify using discriminant analysis.
The mean and standard deviation values of acoustic properties like amplitude (db), frequency (Hz), velocity (m/s), wavelength (m), period (s), and intensity (db) were displayed in Table 3 for diseased damaged yams using the software sound generation technique. Similarly displayed were values obtained for diseased damaged yams using the surface impact sound generation technique. These results show that the acoustic properties of diseased damaged yellow yams were higher for the software sound generation technique than for the surface impact sound generation technique. The same explanation given for good yellow yam can also be used to explain this phenomenon. The acoustic property having the highest deviations from the mean for both techniques was the intensity of the sound for diseased damaged yellow yams. Again, the same explanation given for good yellow yam can also be used to explain this phenomenon. The mean and standard deviation values of acoustic properties like amplitude (db), frequency (Hz), velocity (m/s), wavelength (m), period (s), and intensity (db) were also, given in Table 3 for insect-damaged yellow yams using the software sound generation technique. Similarly displayed were values obtained for insect-damaged yellow yams using the surface impact sound generation technique. The same explanation given for good yellow yams is applicable here. The descriptive statistic can not give us an in-depth explanation of how these acoustic properties affect the choice for detecting these yellow yam qualities. So, we take a look at the test for equality of variance, group means and covariance matrices for the two acoustic techniques. The test for equality of variance, group means and covariance matrices are statistical properties that show if the acoustic data obtained can be discriminated against using discriminant analysis. These tests are displayed in Table S9 for yellow yam (table too large for manuscript) submitted as a supplementary document. The first test on the table is the test of equality of yam quality groups' means of yellow yam. This test is a univariate ANOVA test, using 'Wilks' Lambda' and 'Fisher (F)' values. Lower wilks' lambda value and F value means that the variable is affecting the detection. In the software sound generation technique for yellow yam, the test shows that all six acoustic properties can be tested, unlike the white yam test. So, for all the six acoustic properties tested frequency, intensity, period and wavelength were found to be affecting the detection with low wilks' lambda values. This means that only these four acoustic properties were used to decide the quality of yellow yam. This phenomenon occurs because unlike the white yam the frequency of the sound generated was not constant but varied slightly. This variation was responsible for more sound properties being involved in the determination of yellow quality. Acoustic properties like amplitude and velocity were found to not have any effect on the detection with high wilks' lambda values. So, these two acoustic properties do not play any part in deciding the quality properties of yellow yam. In the surface impact sound generation technique, the test shows that among the six acoustic properties tested, variables like amplitude, frequency, intensity and wavelength were found to be affecting the detection with low wilks' lambda values; while velocity and period were found to not affect the detection with high wilks' lambda values. This means that only acoustic properties like amplitude, frequency, intensity and wavelength are important in deciding the quality of yellow yam using the surface impact sound generation technique while velocity and period were not. This could be attributed to the low sound produced by the yam impacts on the surface. The box's tests of equality of covariance matrices test the homogeneity of variances and covariances within the yellow yam quality groups. So, to show that the covariance matrices are the same for data of all yellow yam quality groups the log determinant was found. The equal log determinant shows equal covariance matrices among the quality groups. Log determinants for good, diseased damage and insect-damaged in the software sound generation technique were 90.789, 86.235 and 86.494. These values are not equal therefore violating the assumption that the quality group covariance matrices must be equal. Nevertheless, 'Box M; value can still be calculated to see if it has an effect. A non-significant 'Box M; value with an unequal log determinant still proves that the quality group covariance matrices are equal, this situation always occurs when data are large. 'Box M value was 3425 with an F value of 111.43. This also violates the assumption that the quality group covariance matrices are equal but the analysis can continue because these can also occur when data are large. Log determinant values for good, diseased damage and insect damage in the surface impact sound generation technique with its 'Box M and F value; also violates the assumption that the quality group covariance matrices are equal but the analysis can continue because these can also occur when data are large. Despite this drawback with the 'Box M' test, the test of the discriminant score functions will give a better insight into the discriminant analysis.
A summary of canonical discriminant score functions of yellow yam for both acoustic techniques is shown in Table S10 (table too  large for manuscript) and submitted as a supplementary document. The discriminant score functions (equations) are equations that will be used to determine the probability of a case belonging to a quality group. In this analysis, two discriminant score functions (equations) were developed for the software sound-generation technique and another two for the surface impact sound-generating technique. In the software sound generation technique, the first and the second discriminant score functions (equations) developed had Eigenvalue, % of the variance, cumulative % and canonical correlation values displayed in Table S10 (submitted as a supplementary document). The eigenvalue is the ratio between and within quality groups sum of squares and a higher value makes a discriminant score function (equation) a better predictor. So, for the software sound generation technique first, the discriminant score function (equation) was chosen because it has a higher eigenvalue and higher canonical correlation value than the second function (equation). These equations (functions) are displayed in Table S10. In the surface impact sound-generating technique the first and the second discriminant score functions (equations) developed had Eigenvalue, % of the variance, cumulative % and canonical correlation values displayed in Table S10 (submitted as a supplementary document). So, for the impact sound-generating technique the first discriminant score function (equation) was chosen because it has a higher eigenvalue and higher canonical correlation value than the second function (equation). These equations (functions) are also displayed in Table S10 (table too large for manuscript) submitted as a supplementary document. Wilks' lambda test was also done to the discriminant score functions (equations) for both techniques. This test shows that for the software sound generation technique the wilks' lambda value, chi-square value, degree of freedom and P-value for the two developed discriminant score functions (equations) were displayed in Table S10 (submitted as a supplementary document). The first discriminant score function (equation) was chosen over the second because it has a lower wilks' lambda value and is affect the detection. Also, this test for the surface impact sound-generating technique shows the wilks' lambda value, chi-square value, degree of freedom and P-value for the two developed discriminant score functions (equations) displayed in Table S10 (submitted as a supplementary document). The first discriminant score function (equation) was chosen over the second because it has a lower wilks' lambda value and is affecting the detection classification. The standardized discriminant score function coefficients test was done for functions (equations) developed for both techniques. This test shows the importance of the coefficients to the developed functions (equations). In the software sound generation-technique five acoustic properties, amplitude, frequency, velocity, wavelength and intensity were considered. The importance of the values of the coefficients was displayed in Table S10 (submitted as a supplementary document) for the first and second discriminant score function (equation) developed. These values show that only five of the coefficients of all-acoustic properties studied in the first developed function (equation) were important to it. In the surface impact, sound-generating techniques all six acoustic properties studied which were amplitude (db), frequency (Hz)), velocity (m/s), wavelength (m), intensity (db) and period (s) were considered. These coefficient values were displayed in Table S10 (submitted as a supplementary document) for the first and second discriminant score function (equation) developed respectively. These values show that for the first developed function (equation) some of the values of the coefficients have negative importance while in the second discriminant score function (equation) developed only the coefficient of wavelength has negative importance (Table S10) (tables too large for manuscript) submitted as a supplementary document. These phenomena can be attributed to the difference in weights of the different yam samples used for the surface impact experiments. A structure matrix test was also carried out for the function developed for both techniques. The structure matrix test tells the correction between the acoustic properties variable and the developed functions (equations). In the software sound generation technique, only five of the six acoustic properties were important to the two functions (equations) developed. In the surface impact sound-generating technique, all six acoustic properties were important to the two functions (equations) developed. The developed discriminant score functions (equations) for both techniques are displayed in equations (7)-(10) (see Table S10 in the supplementary document) [23,24]. observed similar discriminant pattern in their study of coconut quality detection and classification.

Surface impact sound generation technique
Where DSF1 is the discriminant score function (equation) for the first developed function (equation). DSF2 is the discriminant score function (equation) for the second developed function (equation). A = amplitude, F = frequency, I = intensity, T = period and W = wavelength, V = velocity. The first discriminant score function (equation) was chosen in either technique for yellow yam quality detection classification. The detection classification or confusion matrix result for the discriminant analysis detection of yellow yam quality, for both acoustic techniques used in this study is displayed in Table 4. This table shows that two experimental classifications were carried out for both acoustic techniques used in this study. These detection classifications were called original classification and validated classification. In the software sound generation technique, the actual detection classification result shows that of the 100 good yellow yams used for the detection. 87% of them were correctly detected and classified as yellow good yams, 10% were wrongly detected and classified as diseased damaged yellow yams and 3% were wrongly classified as insect-damaged yellow yams. Still on the original classification, of the 100 diseased damaged yellow yams used for the detection. 75% were correctly detected and classified as diseased damaged yellow yams. In comparison, none was wrongly detected and classified as good yellow yam and 25% were wrongly detected and classified as insect-damaged yellow yams. Again, still on the original classification, of the 100 insect-damaged yellow yams used for the detection. 87% were correctly detected and classified as insect-damaged yellow yams while 2% were wrongly detected and classified as good yellow yams and 11% were wrongly detected and classified as diseased damaged yams. The overall original classification performance of correct detections of all yellow yam quality considered in this study using the software sound generation technique for the original detection classification experiment was 83%. A validation detection experiment classification was done again to confirm the original result. In the validation detection and classifications experiment, of the 100 good yellow yams used for the detection and classifications. 86% were correctly detected and classified as good yellow yams, 11% were wrongly detected and classified as diseased damaged yellow yams and 3% were wrongly classified as insect-damaged yellow yams. Still on the validation classification, of the 100 diseased damaged yellow yams used for the detection. 74% were correctly detected and classified as diseased damaged yellow yams. In comparison, 1% were wrongly detected and classified as good yellow yams and 25% were wrongly detected and classified as insect-damaged yellow yams. Again, still on the validation classification, of the 100 insect-damaged yellow yams used for the detection. 87% were correctly detected and classified as insect-damaged yellow yams. In comparison, 2% were wrongly detected and classified as good yellow yams and 11% were wrongly detected and classified as diseased damaged yellow yams. The overall validated performance of correct detections and classification of all yellow yam quality considered in this study using the software sound generation technique was 82.3%. In the surface impact sound-generating technique, the actual detection classification result shows that of the 100 good yellow yams used for the detection. 47% of them were correctly detected and classified as good yellow yams, 48% were wrongly detected and classified as diseased damaged yellow yams and 5% were wrongly classified as insectdamaged yams. Still on the original classification, of the 100 diseased damaged yellow yams used for the detection. 61% were correctly detected and classified as diseased damaged yellow yams, 31% were wrongly detected and classified as good yellow yams and 8% were wrongly classified as insect-damaged yams. Again, still on the original classification, of the 100 insect-damaged yellow yams used for the detection. 100% were correctly detected and classified as insect-damaged yams while none were wrongly detected and classified as neither good yams nor diseased damaged yellow yams. The overall original performance classification of correct detections of all yellow yam quality considered in this study using the surface impact sound-generating technique was 69.3%. A validation detection experiment was done again to confirm the original result. In the validation detection and classifications experiment, of the 100 good yellow yams used for the detection and classifications. 47% were correctly detected and classified as good yellow yams, 48% were wrongly detected and classified as diseased damaged yellow yams and 5% were wrongly classified as insect-damaged yams. Still on the validation classification, of the 100 diseased damaged yellow yams used for the detection. 61% were correctly detected and classified as diseased damaged yellow yams, 31% were wrongly detected and classified as good yellow yams and 8% were wrongly classified as insect-damaged yams. Again, still on the validation classification, of the 100 insect-damaged yellow yams used for the detection. 98% were correctly detected and classified as insect-damaged yams while 1% were wrongly detected and classified as good yellow yams and 1% were wrongly detected and classified as diseased damaged yellow yams. The overall validated performance of classification of correct detections of all yellow yam quality considered in this study using the surface impact sound-generating technique was 68.7%. Comparing both acoustic techniques, the software sound generation-technique detected better yellow yams while the surface impact sound-generating technique detects more insect-damaged yellow yams. Both acoustic techniques detect diseased damaged yams equally well. Though, the overall performance of yellow yam quality detection was higher in the software sound generation technique. The surface impact sound-generating technique is the best to use when the goal of the detection was to detect insect damage to yellow yams. The acoustic detection of yellow yam tubers quality results achieved falls within the ranges obtained by Ref. [26] for the detection of the crispness of a carrot [23,24], for coconut quality detection, and below that obtained by Refs. [30,31] for the ripeness and texture of watermelon and strawberry.
Yellow yam should also be used as a game changer in the quest for global food security, due to its high calorific content per kg when compared to other crops. Therefore, there is a need to increase its export technological capability. This study developed a very cheap method to detect yellow yam quality for large export activity by just using its acoustic properties. These two developed techniques can be used to design different types of yam quality detection and separation equipment for yam exportation. The limitation of these developed techniques is that the user is expected to possess basic acoustic and computer knowledge.

Conclusions
This study developed two intelligent acoustic yam quality detection and classification devices. One uses a software soundgeneration technique and the other uses a surface impact sound-generating technique. The machine learning algorithm used in the study called multiply discriminant analysis shows that fewer acoustic (sound) properties are needed for detecting yam quality in the software sound generation technique than in the surface impact sound-generating technique. Three qualities (good, diseased damaged and insect-damaged) of two yam varieties (white and yellow yam) were tested. The Overall validated detection and classification performance of white yam were 79% and 68.7% for the software sound generation technique and surface impact sound-generating technique respectively. The overall validated detection and classification performance of yellow yam was 82.3% and 68.7% for the software sound generation technique and surface impact sound-generating technique respectively. The study shows that the software sound-generation technique performed better than the surface impact sound-generating technique in terms of overall yam quality detection and classification. Nevertheless, the surface impact sound-generating technique detects and classified damaged yams better while the software sound-generation technique detected and classifies good quality yams better. Therefore, the choice of the technique to be recommended for yam quality detection will depend on the goal or final expected outcome of the yam processor. This study has shown that the acoustic properties of yam can be used to detect its quality and this acoustic was used to develop two smart devices.