Spectral assessment
Figure 1 shows the Raw (A) and Savitzky-Golay pre-processed spectra (B) plot of yellow, red, and black Maca samples containing 0,10, 20, 30, 40, and 50% w/w soy and maize. . From spectral inspection, the extremities of the unprocessed spectra (Fig. 1A) were characterized by noise while the prominent peaks were observed at the wavelength ranges of 950–1500 nm, so this spectral range was selected and used for all subsequent analysis.

Raw (A) and Savitzky-Golay pre-processed and wavelength selected spectra (B) plot of yellow, red, and black Maca samples containing 0, 10, 20, 30, 40, and 50% w/w soy and maize.
The pre-treated spectra plot of the different forms of maca powder (red, yellow, and black) and the forms of adulterant all presented prominent peaks around 1210 nm and 1450 nm. Based on the absorption characteristics, the Near-infrared wavelength region is generally divided into two regions namely the long-wavelength NIR region (1300–2500 nm), where the absorptions are attributed to the combinations or the first overtones of the O–H (water, alcohol), C-H (fats, oil, hydrocarbons), and N–H (protein) vibrations23. The short-wavelength NIR region (700–1300 nm) with absorptions corresponds to the vibration of the second or third overtones which are not as strong and sharp as the former. Based on the two prominent peaks observed in the spectral band. The resultant peak observed at 1210 nm was due to C − H second overtone and O − H combination associated with C-H bonding, a characteristic group in lipids and proteins, also O − H, N − H stretch first overtone occurs at 1450 nm, which is a characteristic group of moisture24. Sample absorbance is one of the main topics of interest in spectroscopy, and according to Beer Lamber’s law, the absorbance is directly proportional to the molar absorptivity, sample concentration, and path length25. The spectra obtained from a sample will be nearly as linear with concentration as transmission spectra. The spectra belonging to the black Maca exhibited the highest absorbance and thus the most transmittance, although it had the least band. The second region which also recorded the most absorbance was the yellow Maca. The red Maca generated a wide band but recorded the least absorbance and thus less transmittance. All three forms of Maca were within the 0.1 to 0.18 absorbance region. The spectral lines of the Maca powder showed that there was a discerning difference among the various Maca types in terms of wavelength and absorbance. The differences obtained in the spectral lines generated by the NIR could be a result of the different particle sizes of the different forms of adulteration the Maca were subjected to26. In NIR spectra absorptions of overtones or combinations of fundamental stretching bands occur. The bands, usually caused by C, H, N, or O stretching are weak in intensity and very often overlap24. All pre-treated spectra of all three forms of Maca and adulterants have a similar shape (spectra) due to their almost similar chemical structure therefore, it is extremely difficult to distinguish these two compounds with the naked eye although all three forms depicted different bands, and absorbances based on adulterant concentrations. As a result, chemometric analysis is required to overcome such a problem27. The preprocessed spectra of yellow maca with soy (A), yellow maca with maize (B), Red maca with soy (C), Red maca with maize (D), Black maca with soy (E) and Black maca with maize (F) , at different concentrations can be found in Fig. 2

Preprocessed spectra of yellow Maca with soy (A), yellow Maca with maize (B), Red Maca with soy (C), Red Maca with maize (D), Black Maca with soy (E) and Black Maca with maize (F), at different concentrations.
Classification results
Classification of red, black, and yellow Maca types
Figure 3 shows the classification of only pure, Yellow, Red, and Black Maca (A), classification of Red, and Black containing soy and maize as adulterants (B), model performance parameters for the classification of only pure Yellow, Red, and Black maca (C) and model performance parameters of Yellow, Red, and Black maca containing soy and maize as adulterants (D).

Classification of only pure Yellow, Red, and Black Maca (A), classification of Red, and Black containing soy and maize as adulterants (B), model performance parameters for the classification of only pure Yellow, Red, and Black maca (C) and model performance parameters of Yellow, Red, and Black maca containing soy and maize as adulterants (D).
A more visible pattern of separation could be visualized in Fig. 3(A) than in Fig. 3(B); where it could be observed that there was some overlapping between red, black, and yellow Maca showing no clear distinction between the various Maca colors in Fig. 3(B). Pure red, black, and yellow Maca likely have distinct chemical compositions due to genetic differences etc.. These inherent differences can lead to more pronounced separation in Fig. 3(A) as compared to the adulterated Maca types in Fig. 3(B), which is a mixture of the different maca types and may exhibit intermediate characteristics. Also Adulterated Maca, being a mixture of different types, may exhibit greater variability in its chemical composition compared to pure Maca types. This increased variability can result in less distinct separation between clusters in Fig. 3(B), making it more challenging to discriminate as compared to the pure maca types in Fig. 3(A).This proves that the addition of maize and soy in Maca can lead to challenges of varietal discrimination.
When only pure yellow, red, and black Maca were discriminatedr, there was an average recognition accuracy of 96.38% and prediction accuracy of 94.12% (Fig. 3C). A lower average recognition of 74.10% and an average prediction of 65.53% were obtained for discriminating the different maca varieties containing adulterants (confusion matrices can be viewed in the supplementary sheet Table S2). This suggests that the addition of adulterants influenced not only their genotypic properties but also, their phenotypic property thus, making them less identifiable. Majority of the studies28,29,30 focused on discriminating Maca from different locations, based on their macamide presence and content, using chromatographic and magnetic resonance techniques. The high average prediction and recognition accuracies recorded also prove LDA as robust method in the classification of maca regardless of color, even when adulterants are introduced.
From Fig. 3(C), model performance parameters for the classification of pure maca cultivars were all higher than 0.8 (80%). Although model performance parameters were also higher than 0.5 (50%) when the cultivars were adulterated, it can be observed from Fig. 3(D) that all the performance parameters decreased with the introduction of adulterants. The most affected parameters were the sensitivity of the model for classifying black maca which decreased from 1 (the optimum value) to 0.5 and the precision of the model for classifying red maca. Sensitivity is an absolute quantity, the smallest absolute amount of change that can be detected by a measurement while precision describes the reproducibility of the measurement.
Classification of soy and maize in yellow Maca
From Fig. 4(A) and (B), all the different concentration levels were classified and well separated for the discrimination of 0, 10, 20, 30, 40, and 50% w/w soy (Fig. 4A) and 0, 10, 20, 30, 40, and 50% w/w maize (Fig. 4B) in yellow maca although slight overlaps could be observed. In all cases, pure yellow maca was distinctively separated from the adulterated maca samples.

Classification plot for the discrimination of 0, 10, 20, 30, 40, and 50% w/w soy (A) and 0, 10, 20, 30, 40, and 50% w/w maize (B) in yellow Maca and and model performance parameters for the classification of soy in yellow Maca (C).
From Fig. 4(C), model performance parameters for the classification of soy in yellow maca powder showed that sensitivity, specificity and precision were all 1 (100%, optimum) except for the classification of 30% adulterated samples which had a sensitivity of 0.67 and 40% adulterated which had a precision of 0.75. Sensitivity, specificity and precision were all 1 (100%, optimum) for the model developed to classify 0, 10, 20, 30, 40, and 50% w/w maize.
Overall, there was an average recognition accuracy of 100% and prediction accuracy of 96.33% for the discrimination of 0,10, 20, 30, 40, and 50% w/w soy in yellow Maca (Fig. 4A). Concentrations, 0, 10, 20, 30, 40, and 50% w/w soy could all be classified with 100% correct accuracy after cross-validation. Confusion matrices can be viewed in the supplementary sheet Table S3.
For the detection of maize adulteration in yellow Maca, there was an overall average recognition accuracy of 100% and prediction accuracy of 95.23% for the discrimination of 0, 10, 20, 30, 40, and 50% w/w maize in yellow Maca (Fig. 4B). All the different concentrations of Maca could be classified with 100% correct accuracy after cross-validation except concentration 40% w/w which was misclassified as concentration 50% w/w. Confusion matrices can be viewed in the supplementary sheet Table S4.
Generally, 0, 10, 20, 30, 40, and 50% w/w maize in yellow Maca could be classified with higher accuracy compared to 0, 10, 20, 30, 40, and 50% w/w soy in yellow Maca. The classification accuracies in the confusion matrixes confirmed the overlaps observed in the plot.
Red maca adulteration
From Fig. 5, some overlapping could be observed in both plots for the discrimination of 0, 10, 20, 30, 40, and 50% w/w soy (Fig. 5A) and 0, 10, 20, 30, 40, and 50% w/w maize (Fig. 5B) in red Maca. The overlapping was more pronounced in Fig. 5(B) than in Fig. 5(A). Similar chemical constituents between maize and red Maca compositions could lead to overlapping clusters in the PCA plot. If the chemical profiles of maize and red Maca are more similar compared to soy and red Maca, it can result in less distinct separation between the adulterated red Maca with maize concentrations. In all cases, however, pure red Maca was distinctly separated from the adulterated red Maca samples. From Figs. 5(C) and (D), sensitivity, specificity and precision were all above 0.67. Lower concentrations of 0, 10, and 20% w/w/ adulterants had optimum sensitivity, specificity and precision of 1.

Classification plot for the discrimination of 0, 10, 20, 30, 40, and 50% w/w soy (A) and 0, 10, 20, 30, 40, and 50% w/w maize (B) in red Maca, model performance parameters for the classification of soy (C) and maize (D) in red maca.
Overall, there was an average recognition accuracy of 93.52% and prediction accuracy of 88.94% for the discrimination of 0, 10, 20, 30, 40, and 50% w/w soy in red Maca (Table S5). Only pure red Maca (0% w/w) and 10% w/w soy in red Maca could be classified with 100% correct accuracy after cross-validation. All the other maca concentrations showed misclassifications. Confusion matrices can be viewed in the supplementary sheet Table S5.
For the detection of maize adulteration in red Maca, there was an overall average recognition accuracy of 96.30% and a prediction accuracy of 88.94% for the discrimination of 0, 10, 20, 30, 40, and 50% w/w maize in yellow Maca (Fig. 5B). Thus in average, 88.94% of the instances belonging to each class of concentrations were correctly classified.Only pure red Maca (0% w/w) and 20, 40, and 50% w/w soy in red maca could be classified with 100% correct accuracy after cross-validation. All the other Maca concentrations showed misclassifications. Confusion matrices can be viewed in the supplementary sheet Table S6.
Generally, 0, 10, 20, 30, 40, and 50% w/w maize in red maca could be classified with higher accuracy compared to 0, 10, 20, 30, 40, and 50% w/w soy in red Maca. The misclassification accuracies in the confusion matrixes confirmed the overlapping observed in the plot. And this could be due to the much distinct similarity in the chemical composition of the various Maca types. The high accuracy suggests that the LDA model was effective in distinguishing between the different concentrations of adulterated Maca varieties and making correct predictions.
Black maca adulteration
From Fig. 6(A), all the different concentrations of 0, 10, 20, 30, 40, and 50% w/w soy in black Maca could be distinctively visualized. Some overlapping could, however, be observed in Fig. 6(B) for 0, 10, 20, 30, 40, and 50% w/w maize in black Maca. Overlapping was more pronounced in Fig. 6(B) than in Fig. 6(A). In all cases, however, pure red Maca was distinctly separated from the adulterated red Maca samples. From Fig. 6(C) and (D), sensitivity, specificity and precision were all above 0.67. Better model parameters were achieved for the model developed to classify maize in black than the one developed to classify soy.

Classification plot for the discrimination of 0, 10, 20, 30, 40, and 50% w/w soy (A) and 0, 10, 20, 30, 40, and 50% w/w maize (B) in black Maca and model performance parameters for the classification of soy (C) and maize (D) in black maca.
Overall, there was an average recognition accuracy of 99.08% and prediction accuracy of 94.44% for the discrimination of 0,10, 20, 30, 40, and 50% w/w soy in red Maca (Fig. 6A). Only pure red Maca (0% w/w) and 10, 40, and 50% w/w soy in red maca could be classified with 100% correct accuracy after cross-validation. Concentrations 20 and 30%w/w soy showed some misclassification. Confusion matrices can be viewed in the supplementary sheet Table S7.
For the detection of maize adulteration in black Maca, there was an overall average recognition accuracy of accuracy of 100% and prediction accuracy of 98.16%. For the discrimination of 0, 10, 20, 30, 40, and 50% w/w maize in yellow Maca (Fig. 6B). Pure black Maca (0% w/w) and all the other concentrations could be classified with 100% correct accuracy after cross-validation except for concentration 40% w/w soy in black Maca. Confusion matrices can be viewed in the supplementary sheet Table S8.
Generally, 0, 10, 20, 30, 40, and 50% w/w maize in black Maca could be classified with higher accuracy compared to 0, 10, 20, 30, 40, and 50% w/w soy in black Maca.
All LDA classification results with adulterants (maize, soybean), regardless of Maca color, show a similar pattern with work by31, who coupled NIRS with chemometric techniques in the detection of radish and turnip powder adulteration in Maca. When discriminant analysis was performed, a 100% classification accuracy was achieved in this study. Though the color of the adulterated Maca was not specified, the classification accuracies obtained conferred on NIRS-LDA as very accurate in discriminating pure Maca from adulterated.
PLSR results of NIRS analysis
PLSR results of NIRS analysis on pure maca
Table 1 shows the best pretreatment results which were obtained from the different pretreatment combinations on the raw spectra for the prediction of pure Maca.
After all the tested 18 pretreatments, Savitzky-Golay smoothing with filters 17 and 19 yielded the best accuracy for predicting pure Maca with an R2CV of 0.9528 respectively and RMSECV of 6.81 w/w pure Maca powder respectively (Fig. 7).

Optimized (Savitzky-Golay smoothing with filter) PLSR plot for predicting soy and maize adulteration in red, yellow, and black Maca powder.
The R2 value is a ratio, which represents the coefficient of determination of the calibration model32, and is always preferred to be close to 1, which indicates that a good model is produced. The farther it is away from one indicates that is a poor model or not robust. This applies to both the training and cross-validation data sets. RMSE represents the root mean square errors that occur during data processing. The lower the RMSE, the better the model because it indicates the stability of the training and cross-validation model. Higher RMSEs indicate that many errors occurred during data processing and hence the formation of a bad model33. RDP represents the ratio of deviation of performance of the model. RDP presents a good model when values are close to 3 or greater34. RPDs for all the models in our study were greater than 3. The preferred model was chosen depending on these three main parameters, choosing the pretreatment method that provided the lowest RMSE for both training and cross-validation data while at the same time giving the highest R2 value. The model built for predicting and cross-validating Maca adulteration with soy recorded higher precision of R2CV and lower RMSEC than that for predicting and cross-validating Maca adulteration with maize. From the different pre-treatments liaised with PLSR, it was easier to detect, predict, and cross-validate adulteration of soy in the various forms of Maca than detecting maize in the three forms of Maca. Overall, the best model which produced the least RMSEC, RMSECV, and RPD while producing the highest R2 and R2CV was taken into consideration. This was the model achieved with Savitzky-Golay smoothing pretreatment (filters 17 and 19).
