Robust Near Infrared Spectroscopy for Rapid and Simultaneous Determination of Fermented Cocoa Pod Husk Feed Quality Attributes

In this study, we attempted to develop a robust and accurate near infrared spectroscopic model for nutrient content analysis in fermented Cocoa Pod Husk (CPH), a viable but underexploited byproduct in cocoa production with great potential for use in animal feed. Recognizing the necessity for sustainable feed options, precise nutrient profiling of CPH is critical for balanced diets and effective feed formulation. To achieve this, specific spectral pre-processing techniques, namely multiplicative scatter correction (MSC), Savitzky-Golay smoothing (SGs), and the first derivative (1st D) were purposefully chosen for their individual and combined abilities to correct for scattering effects, smooth out noise, and enhance spectral resolution, respectively. These methods significantly contribute to the model's superior performance by improving the quality of the spectral data input. Furthermore, Partial Least Squares Regression (PLSR) was selected over other multivariate algorithms due to its robustness in handling collinear and noisy data, making it well-suited for complex biological matrices such as fermented CPH. Employing the Unscrambler X 10.4 software, the PLSR model was rigorously assessed using a range of statistical tools to ensure validity, with notable precision in predicting key nutritional components. The findings not only confirm the model's excellence but also hold promising implications for the agriculture industry, particularly in the development of cost-effective, nutrient-rich animal feed solutions. By capitalizing on the compositional richness of CPH and refining NIRS modeling for its analysis, this study contributes to the enhanced utilization of agricultural byproducts and the sustainability of animal nutrition practices.


INTRODUCTION
As the world's third largest cocoa (Theobroma cacao L.) producer, Indonesia has enormous potential for by-products such as fruit shells (pod husk).The use of cocoa pod husk is a strategic step toward increasing the availability of feed ingredients and reducing environmental pollution caused by improper cocoa pod shell disposal [1].Cocoa pod husk, a byproduct of the plantations, can be used as animal feed.Cocoa pod husk is the by-product with the highest proportion produced.Each pod contains 67-76% shells, and every ton of the dry beans will yield 10 tons of wet cocoa husk [2].The husk contains several nutrients that can be used as feed ingredients for poultry and ruminants [3], Typically, these husks are left to accumulate in the plantation areas, which can cause ecological imbalances by attracting pests, promoting disease, and affecting soil quality due to the slow decomposition of the fibrous material from the pod husk.Moreover, the traditional burning of husks, practiced in some areas, releases significant amounts of carbon dioxide and pollutants, exacerbating air quality issues and contributing to global warming.This environmental challenge coexists with the potential for husks to serve as a valuable feed resource, containing 5.9-9.1%,22.6-35.7%,and 1.2-10% crude protein, fiber, fat, and minerals [4].
The cocoa pod husk has a high nutritional value, but it also includes chemicals that may reduce the body's ability to absorb nutrients.According to Laconi and Jayanegara [5], the cocoa pod husk fiber fraction has a dry (DM) and organic matter (OM) digestibility level of about 40% and is made up of Neutral Detergent Fiber (NDF), Acid Detergent Fiber (ADF), hemicellulose, cellulose, and lignin at 80.7%, 74.6%, 6.0%, 35.3%, and 38.8%.
Theobromine is also found in the husk of cocoa pods, where it can inhibit the growth of rumen microbes, reducing fiber digestion and causing diarrhea [6].Considering the potential, nutrient composition, and limiting elements, processing is necessary to enhance the quality of a feed ingredient.This aims to increase nutritional content and digestibility while decreasing anti-nutritional compounds and extending shelf life.Furthermore, fermentation is one of the biological processing methods that can improve the nutritional quality and usability of agricultural by-product feed ingredients [7].Hidayat et al. [8] reported that the fermentation process on cocoa pod husk using lingzhi mushrooms (Ganoderma lucidum) at different concentrations and times can increase the protein content and digestibility of DM and OM.
Fermentation represents a notable bio-processing avenue capable of enhancing the digestibility and nutritional value of agricultural by-products, including cocoa pod husks [7,8].Another prevalent method, chemical treatment, has also been explored for its potential to alleviate the impact of antinutritional factors and enhance feed ingredient quality.For instance, alkaline treatment has demonstrated effectiveness in reducing fiber content and improving protein digestibility in various agro-industrial by-products.Similarly, chemical treatments using alkalis or acids have been investigated in improving the digestibility and palatability of several feed resources.However, these processes often entail additional costs and can introduce certain environmental concerns related to waste disposal of chemical by-products.
Mechanical processing, such as grinding or particle size reduction, can also play a role in enhancing the utilization of agro-industrial by-products by improving their handling properties, but its impact on nutrient bioavailability is limited in comparison to biological or chemical methods.
While fermentation, either with chemical or mechanical treatments each have unique advantages and drawbacks, the emphasis in this study remains on the potential of fermentation as a biological processing method to enhance the nutritional value and usability of cocoa pod husk.The multifaceted nature of agricultural by-products necessitates the exploration of varied processing methods to ensure their effective contribution as valuable feed resources while addressing associated environmental and economic considerations.
In the preparation of livestock rations, the nutritional content and digestibility of feed ingredients, including cocoa pod husk, should be considered.Laboratory testing is commonly used to determine the nutritional content of animal feed ingredients.Although most of these methods are reliable and frequently used to measure feed ingredient parameters, this technique takes a long time, making it less time-efficient [7].Therefore, it is necessary to develop fast, non-destructive, and chemical-free methods to predict better feed ingredients' qualitative and quantitative parameters or at least be as accurate as conventional methods.
Near Infrared Reflectance Spectroscopy has evolved into a non-destructive method for analysis in various fields, including animal feed.NIRS can analyze quickly with easy sample preparation, an analytical technique that employs nearinfrared radiation from the electromagnetic spectrum [9].The interaction of NIR rays with biological objects causes changes in the vibrational energy of each organic molecule, which are visible as a fingerprint or spectral pattern.It provides information about the object's organic molecular bonds and chemical composition [10].The main influence of each spectral pattern is determined by the object's chemical composition, cell structure, and physical properties.Meanwhile, the NIR spectrum captured from biological objects represents the C-O, C-H, O-H, and N-H molecular bond responses [11].The main information gathered from the interaction of near-infrared radiation with biological objects are materials' physical, optical, and chemical properties [11].
In practice, the NIRS method's analysis of the nutritional quality of feed ingredients is conducted based on a model built from the initial calibration and validation results and the chemical analysis before being used continuously.The resulting spectrum has a significant impact on the development of NIRS models.Before applying advanced chemometric methods, noise in NIRS data modeling should be removed early.The presence of noise in the raw spectrum data affects the prediction accuracy and robustness of the model [12].
In chemometrics, noise correction techniques are often chosen based on the best results.However, a specific correction can lead to non-optimal modeling because data previously processed with different correction techniques, that can carry complementary information.Spectrum correction in combination or hybrid mode allows for the most accurate NIRS model performance.According to the findings by Mishra et al. [13], combining different techniques could improve the performance of the NIRS model for predicting the moisture, fat, and protein content of meat.Therefore, this study aims to investigate the use of hybrid spectrum pretreatment method combined with the Partial Least Squares Regression (PLSR) algorithm as a reliable analytical method for measuring the nutritional quality parameters.

Cocoa pod husk sample
A total of 48 samples of cocoa pod husk feed ingredients fermented with different fungi were used.Furthermore, 30 samples were fermented using 3% white rot fungi (Phanerochaete chrysosporium) at 0, 7, 14, 21, and 28 days of fermentation, while others were fermented with 7% and 15% of lingzhi mushrooms (Ganoderma lucidum) at 15, 30, and 45 days [8].Fermentation conditions, can significantly impact the growth of fungi and the overall fermentation process.Understanding these factors is essential for comprehensively evaluating the outcomes of the fermentation process and its influence on the nutritional characteristics of the cocoa pod husk samples.
Specifically, temperature and humidity play a pivotal role in facilitating the growth of fungi and other microorganisms during the fermentation process.These parameters can influence the rate of fungal proliferation, metabolic activity, and subsequent biochemical changes within the substrate.Additionally, details regarding the substrate used for fermentation would offer insights into the nutritional and structural alterations that might occur during the process.

Proximate analysis of nutritional contents
The proximate results are useful reference data for calibration and validation in developing the NIRS model.Proximate analysis determines the quality of fermented cocoa pod feed ingredients, and the analysis testing begins with drying the sample at 60℃ for 24 hours.The sample was then mashed using cutter mills to 1 mm in size.The proximate analysis performed included Dry Matter (DM), Crude Protein (CP), Extract Ether (EE), Crude Fiber (CF), ash, and Nitrogen-Free Extract (NFE).Tests for DM, CP, EE, CF, and ash were conducted according to AOAC International procedures [14].Meanwhile, BETN is calculated using the following equation: NFE = 100%-(CP+EE+CF+ash).

NIR spectra data acquisition
The remaining proximate test sample (15 grams) was then used for NIRS testing, and the spectra data were acquired using a bench-top Nicolet-Antaris Method Development Sampling (MDS) system controlled remotely through an integrated software configuration (Thermo Fisher Scientific Inc., Madison, WI, USA).A workflow is set up to configure the tool to acquire the spectrum in a formatted diffuse reflectance (Log (1/R)) 32 times, and save the results in "*.CSV" format.The wavelength ranges from 1000 to 2500 nm (10000 to 4000 cm -1 ) with an interval of about 0.02 nm, and the spectra were collected around 29-31℃.

Calibration and validation models
Calibration is a model that shows the level of correlation between the NIR spectra (X-variable) and chemical data (Yvariable) in a collection of datasets.Before modeling, the features of the absorbance spectrum are examined by visualizing in graphical form.Projection Principal Component Analysis (PCA) combined with Hotelling's T2 ellipse to visualize the data structure and identify patterns, trends, outliers in the spectrum, and other dominant features in the sample [10].
The collected NIR spectra contain sample component and interference information such as light scattering, baseline drift, and background noise, which can reduce the accuracy and stability of the model.Before developing the calibration model, several pretreatment methods, both specific and hybrid, were used, including Multiplicative Scatter Correction (MSC), Savitsky-Golay smoothing (SGs), first derivative (1st D), MSC+SGs, MSC+1st D, SGs+1st D, and MSC+SGs.Moreover, the spectrum pretreatment and development of the calibration model were conducted using The Unscrambler ® X 10.4 software (CAMO, Oslo, Norway).
The PLSR algorithm was used to develop a model for the quantification analysis of the nutrient attributes of the fermented cocoa pod husk samples.To ensure the accuracy of the calibration model, it is necessary to carry out validation tests.The accuracy of the predictions from the calibration regression with the chemical composition was tested using the cross-validation method.Meanwhile, eight full crossvalidations with six random data segments are used to assess model performance and avoid data overfitting.Each of these random data segments is excluded from the calibration model but is used to test and measure the model during the crossvalidation.
Several statistical parameters are used to evaluate the performance of the NIRS model, including the correlation coefficient (r), coefficient of determination (R 2 ), Root-Mean-Square Error (RMSE), and Residual Predictive Deviation Index (RPD).RPD is the ratio of SD to RMSE, and the index Range Error Ratio (RER) denotes the relationship between the composition.Finally, the number of Latent Variables (LV) is directly proportional to the estimation results [15,16].

NIR spectral features of cocoa pod husk
The absorbance features of the NIR spectrum of a fermented cocoa pod husk sample in the wavelength range of 1000-2500 nm is shown in Figure 1.The NIR spectrum shows very complex information due to the vibration of the atomic bonds, such as C-H (aliphatic), C-H (aromatic), C-O (carboxyl), O-H (hydroxyl), and N-H (amines and amides) in the organic compounds, in response to the frequency of the radiation.
The NIR spectral features of cocoa pod husk samples reflect their chemical composition and physical properties.When subjected to NIR spectroscopy, these samples exhibit unique absorption patterns and spectral characteristics across the NIR range typically 1000-2500 nm, providing valuable insights into their molecular composition.
The NIR spectrum of cocoa pod husk samples displays key absorption bands that correspond to various chemical components, including but not limited to organic compounds, moisture content, protein, fiber, and fat.The interaction of NIR radiation with the molecular bonds within the samples results in distinctive absorption peaks, reflecting the presence and relative abundance of different chemical constituents.The C-H, O-H, and N-H molecular bonds present in organic compounds generate characteristic absorption features within the NIR spectrum, contributing to the overall spectral pattern.These features can be analyzed to determine the levels of specific nutrients, assess the sample's structural properties, and provide information regarding its overall chemical composition.
Furthermore, using PCA loading, it is possible to extract the wavelength characteristics.The highest or lowest peaks of the loading curve are considered significant variations in the data.In detail, Figure 2 shows the PCA loading curve of the raw NIR spectrum of the three principal components, namely, PC1, PC2, and PC3.

Figure 2. The PCA loading curve of NIR raw spectrum
As seen in Figure 2, there are peaks and valleys in the regions of 1216, 1400, 1731, 1930, 2200, and 2308 nm.Meanwhile, the absorbance peaks around 1216 and 1731 nm are related to fat content.The peaks at 1216 nm and 1731 nm were the stretching vibration of the C-H bond in aliphatic hydrocarbon compounds and -CH2-bond in a group of fatty acids [17].The absorption bands at 1400 nm (1400-1450 nm; O-H stretch first overtone) and 1930 nm (1920-1940 nm; a combination of O-H stretch and O-H deformation and O-H bend second overtone) are associated with the moisture content [9].According to Liu et al. [18], the C-H bond of the aromatic ring affects the diffuse reflectance module in the range of 1374-1449 nm.The absorbance peak at 2200 nm correlates with the protein content and the wavelength of 2046-2278 nm corresponds to the stretching of N-H molecules in amino acids [9,19].Furthermore, several molecular vibration modes are associated with the absorption peak around 2148 to 2200 nm, including the N-H bend second overtone, the C-H stretch and C=O stretch, the N-H in-plane bend, and the C-N stretch.Carbohydrates have also been investigated in the absorption band around 2308 nm, where the absorption peak occurs due to stretching C-H and C-C [20].

Principal component analysis (PCA) and outliers
The PCA method was tasked to extract useful, relevant information while removing irrelevant ones, allowing similar cocoa pod husk samples to be closer together.In a multivariate data space (X matrix), PCA can identify the most significant direction of variability and primary phenomena in spectra data [21].In PCA analysis, data sets are transformed into a smaller number of uncorrelated variables called Principal Components (PCs) [22].According to the results, the PCA performed on the raw spectra data produced a good and clear trend of clusters or separation, as shown in Figure 3. Furthermore, the principal components contain information about the spectral and chemical composition of the relevant samples.It shows that the two topmost PCs can explain 99% of the variance information extracted from the 48 fermented cocoa pod husk samples.

Figure 1. Score plot of PCA obtained for all samples under different fermentations
Figure 3 depicts the two main clusters of cocoa pod husk samples and does not show any outlier data outside the ellipse line (Hotelling's T 2 ellipse) at a 95% confidence level.The clusters include various cocoa pod husks and the graphical plots offer relevant information to determine differences between samples fermented by Phanerochaete chrysosporium and Ganoderma lucidum.

Calibration model for the nutritional attributes
NIRS requires a dataset from actual laboratory measurements (wet chemical analysis) for the calibration process before developing robust prediction models for measuring the nutritional attributes of fermented cocoa pod husk.Table 1 shows the statistical nutritional content of fermented cocoa pod husk, which was used for the calibration dataset.A PLSR analysis was applied to the datasets to develop prediction models and the algorithm can reduce the data by forming a new Primary Component (PC), which keeps chemical content information to facilitate prediction as presented in Table 2.
The superiority of combined pre-treatment methods, such as MSC+SGs+1st D, over specific methods, such as MSC, SGs, or 1st D alone, could indeed be due to a synergistic effect arising from the complementary nature of these techniques.To elucidate this, the authors could hypothesize potential reasons based on the observed data and the known effects of these pretreatment methods.
One possible hypothesis is that the combined pre-treatment methods address different sources of variation and spectral distortions more comprehensively than singular techniques.For example, while MSC corrects for scatter effects, SGs addresses baseline drift, and 1st D enhances spectral resolution.By combining these techniques, it is likely that a broader range of spectral distortions and noise components are effectively mitigated, leading to a more accurate and robust spectral dataset.
Furthermore, the combinatory approach could potentially amplify the beneficial effects of each individual pre-treatment method, resulting in an enhanced overall correction of spectral interference and noise.This may lead to improved model performance and prediction accuracy due to a more refined and distortion-free spectral dataset.
Another hypothesis could be related to the preservation of relevant information during the pre-processing stage.Combined pre-treatment methods may better retain essential spectral features linked to the variations in nutritional content and chemical composition, thus providing a more comprehensive and informative dataset for subsequent modeling.
The findings regarding the NIRS models have significant practical implications for the industry, particularly within the context of feed ingredient analysis and production.First, these models offer a rapid, non-destructive, and cost-effective method for assessing nutrient content in fermented cocoa pod husk and potentially other feed ingredients, which could streamline quality control processes and provide real-time, accurate data for decision-making.Additionally, their integration can decrease analysis time, reduce the need for extensive sample preparation, and lead to enhanced operational efficiency.
Furthermore, the ability to rapidly monitor and assess nutrient content in feed ingredients allows for more precise and timely adjustments to formulations, enabling betterbalanced diets for animals and potentially improving overall nutritional outcomes.NIRS prediction models performances for all studied parameters are presented in Figure 4.These models could be integrated into routine quality control procedures for frequent and thorough monitoring of nutrient content in feed ingredients, allowing real-time validation and verification of incoming feed ingredient quality, ultimately leading to more efficient production processes and improved decision-making.However, ongoing calibration maintenance and ensuring sample representativeness are key areas that need to be carefully managed, along with the need for confirmation through traditional laboratory methods for niche or specific parameters.

Figure 4. Scatter plots of PLSR calibration with the best result for all nutritional parameters
In general, the model has different capabilities for estimating the nutritional parameters of fermented cocoa pod husk.Pre-treatment of raw spectra data affects the reliability of predictions.This is shown by the increasing R 2 value, the RMSE, which appears to be getting smaller, as well as RPD and RER.Generally, the hybrid pretreatment method can reduce the physical differences between samples caused by scattering to eliminate additive and multiplicative effects and resulting in a more optimal spectrum.Combined pretreatment methods are more effective than specific methods at showing hidden information and reducing noise.A comprehensive comparison of the PLSR model with three specific methods and four different combinations showed that the combined pretreatment of MSC+SGs+1st D with factor LV 6 was the best model for dry matter parameters (R 2 = 0.99, RMSE = 1.45,RPD = 11.68, and RER = 27.22).In contrast, the pretreatment method combining MSC+SGs with factor LV 5 generated the best PLSR model for crude protein parameters (R 2 = 0.81, RMSE = 1.23,RPD = 2.37, and RER = 6.93).
The predictive performance for dry matter and crude protein parameters is considered very good, with accurate quantitative analysis capabilities and good generalization abilities.According to Saeys et al. [23], models with RPD values less than 1.5 should not be used to make predictions, RPD values 1.5-2.0can distinguish between high and low values, and models with RPD 2.0-2.5 can be used to make quantitative prediction estimates.
Meanwhile, the RPD values of 2.0-2.5 and above 3.0 can be used for good and very good predictions.The RER index can act as an additional criterion when evaluating the use of each prediction model.RER is considered the statistical indicator with the greatest weight in determining the accuracy of the NIRS calibration model.RER values in the range 4-8 indicate the probability of discerning between high and low data values in samples, while 8-12 represent the probability of predicting quantitative data [24].
The optimal model for predicting crude fiber and extract ether is also obtained by applying the data pretreatment technique using MSC+SGs+1st D. The R 2 values for the parameters crude fiber and fat are 0.79 and 0.76, respectively.The PLS model only has good category performance with basic quantitative predictive and good generalization abilities.The R 2 value indicates the percentage of variance in Y accounted for by the X variable.
According to Karoui et al. [25], the R 2 value between 0.50 and 0.65 indicates that X's variance accounts for more than 50% of Y, allowing discrimination between high and low concentrations.Meanwhile, R 2 values between 0.60 to 0.81 and 0.80 to 0.90 indicate an approximate quantitative and good prediction.A calibration model with an R 2 value greater than 0.91 is considered reliable.
The PLS model, built based on raw data and various pretreatment algorithms, showed poor performance for predicting ash contents, with values of R 2 = 0.18, RPD = 1.13, and RER = 3.83 fixed, and the ash content of a material is closely related to minerals.The mineral composition of the feed is not detected by NIRS because its structure has no organic bonds.However, minerals are predictable when they belong to organic complexes or are due to mineral-induced changes in the absorbance region of the water spectrum [26].The PLS calibration model for predicting NFE content also shows poor performance.Table 2 shows that the results of the PLS calibration in the raw and pretreatment data did not indicate any significant changes.
The value obtained from the results for the NFE content did not meet the standard (low R 2 value), even though the LV number was increased to 10 factors.However, among the pretreatment methods in Table 2, the SGs+1st D combination reported a higher calibration value than other methods, namely R 2 = 0.19, RMSE = 1.22,RPD = 2.72, and RER = 11.86.R 2 values between 0.75 and 1.00 indicate an acceptable calibration equation.Even though the acceptable calibration ranges from 0.75 to 1.00, the model with a value of R 2 between 0.30 and 0.75 is considered useful for differentiating between low, medium, and high concentrations.Meanwhile, when the value is less than 0.30, the calibration model is considered useless [27,28].

CONCLUSIONS
The study demonstrates that a combination of Near Infrared Reflectance Spectroscopy (NIRS) and chemometrics can effectively and simultaneously assess the nutritional attributes of fermented cocoa pod husk.Through the application of various pretreatment methods, the reliability of the model construction can be significantly enhanced.The combined pretreatment method showed superior performance in increasing model reliability compared to specific pretreatments, as demonstrated in the models' assessment for dry matter content (MSC+SGs+1st D), crude protein (MSC+SGs), crude fiber content (MSC+SGs+1st D), and extract ether (MSc+SGs+1st D), as well as ash content and NFE.
The explicit practical implications of these findings for the industry can be summarized as follows: integrating these models into existing quality control processes stands to enhance efficiency, improve decision-making, and streamline feed formulation, ultimately leading to cost reductions and increased accuracy in feed production.However, it's important to acknowledge potential limitations like the need for ongoing calibration maintenance and ensuring sample representativeness.By discussing these potential implications, the conclusion can provide a more comprehensive and actionable insight into the practical benefits and limitations associated with these models.

Figure 1 .
Figure 1.The absorbance features of a fermented cocoa pod husk's NIR spectrum

Table 1 .
The statistical nutritional content of fermented CPH