Next Article in Journal
Revisiting the Use of Quantum Chemical Calculations in LogPoctanol-water Prediction
Next Article in Special Issue
Combination of Total-Reflection X-Ray Fluorescence Method and Chemometric Techniques for Provenance Study of Archaeological Ceramics
Previous Article in Journal
Erythromycin Scavenging from Aqueous Solutions by Zeolitic Materials Derived from Fly Ash
Previous Article in Special Issue
Volatile Profiling of Magnolia champaca Accessions by Gas Chromatography Mass Spectrometry Coupled with Chemometrics
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Chemometric Approach Based on Explainable AI for Rapid Assessment of Macronutrients in Different Organic Fertilizers Using Fusion Spectra

1
College of Biosystems Engineering and Food Science, Zhejiang University, 866 Yuhangtang Road, Hangzhou 310058, China
2
Key Laboratory of Spectroscopy Sensing, Ministry of Agriculture and Rural Affairs, Hangzhou 310058, China
3
Huzhou Institute of Zhejiang University, 819 Xisaishan Road, Huzhou 313000, China
*
Author to whom correspondence should be addressed.
Molecules 2023, 28(2), 799; https://doi.org/10.3390/molecules28020799
Submission received: 7 December 2022 / Revised: 29 December 2022 / Accepted: 8 January 2023 / Published: 13 January 2023
(This article belongs to the Special Issue Chemometrics in Analytical Chemistry)

Abstract

:
Wet chemical methods are usually employed in the analysis of macronutrients such as Potassium (K) and Phosphorus (P) and followed by traditional sensor techniques, including inductively coupled plasma optical emission spectrometry (ICP OES), flame atomic absorption spectrometry (FAAS), graphite furnace atomic absorption spectrometry (GF AAS), and inductively coupled plasma mass spectrometry (ICP-MS). Although these procedures have been established for many years, they are costly, time-consuming, and challenging to follow. This study studied the combination of laser-induced breakdown spectroscopy (LIBS) and visible and near-infrared spectroscopy (Vis-NIR) for the quick detection of PK in different varieties of organic fertilizers. Explainable AI (XAI) through Shapley additive explanation values computation (Shap values) was used to extract the valuable features of both sensors. The characteristic variables from different spectroscopic devices were combined to form the spectra fusion. Then, PK was determined using Support Vector Regression (SVR), Partial Least Squares Regression (PLSR), and Extremely Randomized Trees (Extratrees) models. The computation of the coefficient of determination (R2), root mean squared error (RMSE), and residual prediction deviation (RPD) showed that FUSION was more efficient in detecting P (R2p = 0.9946, RMSEp = 0.0649% and RPD = 13.26) and K (R2p = 0.9976, RMSEp = 0.0508% and RPD = 20.28) than single-sensor detection. The outcomes indicated that the features extracted by XAI and the data fusion of LIBS and Vis-NIR could improve the prediction of PK in different varieties of organic fertilizers.

1. Introduction

The excessive use of chemical fertilizers in the agricultural sector has led to nutrient pollution. This pollution is one of the world’s most tenacious, costly, and complex environmental issues [1,2]. In order to rectify the situation, researchers have thought of adopting organic fertilizers, which are more environmentally friendly. Organic fertilizers can improve soil texture, water retention, and erosion reduction. The nutrients in organic fertilizers are available in a form the plant can use, aiding plant growth while causing no root burn or soil microorganism destruction. Compared to chemical fertilizer, which is more industrialized and tightly regulated, organic fertilizers are typically made domestically utilizing various basic materials. These types of fertilizers pose a problem since the production in a domestic way does not allow strict control of the different nutrients, particularly phosphorus (P) and potassium (K). These two macronutrients are essential in fertilizers because they promote plant growth but can also be a source of problems based on their amount. Indeed, a high PK content might cause nutrient pollution, especially water (surface or ground) contamination [3], while a low level can cause a reduction in product quality [4]. It is important to note that P is not only an essential plant macronutrient but also a nonrenewable and strategic resource [5]. Agricultural production depends heavily on phosphate rock, which has been the principal source of phosphorus for the past 50 years. However, phosphate rock reserves are limited. Therefore, a shortage of P may pose a threat to food production and security [5].
Given the above main problems, a rapid technique to characterize their amount is crucial for sustainable PK management.
In place of a long chemical process combined with traditional sensors techniques such as FAAS, GF-AAS, ICP-OES, and ICP-MS, sensor techniques such as laser-induced breakdown spectroscopy (LIBS) and visible and near-infrared reflectance spectroscopy (Vis-NIR) enable the rapid screening of the PK content in various organic fertilizers. LIBS is an emission spectroscopy technique where atoms and ions are created in exciting conditions due to the interaction between a tightly focused laser beam and the material sample. This technology has become popular as it can analyze different materials, such as food, soil, and fertilizer [6,7,8]. Conversely, Vis-NIR is another alternative tool that offers more and better advantages than standard chemistry. This method is non-invasive, has a high penetration rate of radiation beams, is suitable for inline use, and does not require sample preparation [9]. It has also been used to analyze numerous samples, such as food and soil [10,11]. Both methods are inexpensive, easy, non-destructive, and rapid to execute. However, they generate a tremendous amount of data, necessitating the application of chemometrics.
Chemometrics involves utilizing mathematical techniques to extract useful information and knowledge from chemical data. In previous works, the prediction of P in fertilizer with the LIBS approach primarily depended on simple chemometrics techniques such as the calibration curve method, which employed simple linear regression. This technique is unfit for the quantitative analysis of complicated samples because of the matrix effect, leading to the development of alternative chemometric techniques such as the partial least squares method for regression (PLSR), a robust technique for performing quantitative spectral analysis by selecting latent variables, and the support vector machine (SVM), a method based on hyperplanes separation. Using LIBS and PLSR, Zhang et al. [12] suggested a univariate and multivariate analysis of P elements in fertilizers. Their findings suggested that the LIBS methodology paired with PLSR may be a dependable and accurate tool for quantitatively measuring P elements in complicated samples compared to the calibration curve. Nicolodelli et al. [13] proposed a single-pulse (SP) and a double-pulse (DP) LIBS to detect P and K at different emission lines (PI = 214.91, 213.61, 255.3 nm, and KI = 769.9 nm) using PLSR. An improved support vector machine for regression was combined with LIBS to detect NPK at different ranges of 740–890 nm for N, 210–260 nm, 770–885 nm for P, and 400–410 nm, 770–885 nm for K [14]. The authors compared four different optimization techniques: the grid search method (GSM), genetic algorithm (GA), particle swarm optimization (PSO), and least squares (LS). They discovered that LS-SVM was the most accurate. Vis-NIR technology was used by Lin et al. [15] to detect P and K in chemical fertilizers. The authors first applied a genetic algorithm to extract the relevant features and used PCR for modeling. In addition, Vis-NIR has been combined with a competitive adaptive reweighted sampling algorithm (CARS) and extreme learning machine (ELM) to detect PK. [16]. However, it can be noticed that the previous works focused on chemical fertilizer; organic fertilizer has received no or little attention. In addition, LIBS has limited utility and attractiveness due to its significantly lower measurement precision. Vis-NIR may be limited under specific situations, such as extremely high or low concentrations. Consequently, further optimization strategies are required to enhance the efficacy of these two technologies.
The spectral data fusion approach is an innovative technology that merges many spectral signals [17,18]. By providing complementary information, the combined spectral data can boost the accuracy of the prediction. There are many different types of data fusion, and the specific techniques used can vary depending on the application and the data being fused. So far, spectral fusion has shown great promise in a wide range of applications, including the identification of soil components [19,20], the identification of hybrid rice [21], and the evaluation of aromatic plants [22]. To our knowledge, there have been no prior attempts to combine LIBS and Vis-NIR for PK assessment in different varieties of organic fertilizers. Moreover, there is no work using explainable AI (XAI) to extract LIBS and Vis-NIR essential features. The concept of XAI is developing faster because it is no longer just a question of predicting and having the result, but the model must be understood and interpreted by humans. This technique has been used in medical fields such as drug discovery [23] and diagnostics [24] and other fields such as finance [25] and industry [26].
Consequently, this study aimed to examine the effectiveness of Vis-NIR, LIBS, and spectral fusion to predict PK in different organic fertilizers using XAI. The specific objectives were: (i) to compare LIBS and Vis-NIR to determine PK in different organic fertilizers; (ii) to use XAI to explain the best model and extract features for LIBS and Vis-NIR. (iii) to propose a spectral data fusion and compare the result of single- and multi-sensor detection.

2. Results and Discussion

2.1. Descriptive Analysis

The different concentrations of P and K determined with ICP-MS for the diverse variety are shown in Figure 1a. The descriptive statistics demonstrated that P’s highest concentration was category four, and the lowest was two. The central tendency (Mean) measure was 1.53%, while the standard deviation (Std) was 0.58%. The lower quartile (Q1) and the upper quartile(Q3) were estimated to be 1.71% and 2.34%. The K values ranged from 1.44% to 3.16%, with category one as the highest and category three as the lowest. The mean reached 1.44%, and Std obtained 0.66%. The interquartile Q1 reached 1.54%, and Q3 received 2.26%. It can be seen that the concentration of P and K were distributed between classes and were heterogeneous.

2.2. LIBS and Vis-NIR Spectra

The LIBS spectra of various organic fertilizer samples are shown in Figure 1b. The different spectra have similar curves and emit the same emission lines. Some atomic emission lines, such as Ca II (393.4 nm, 396.8 nm, 854.2 nm), Ca I (422.7 nm, 616.2 nm), Mg II (280 nm), Mg I (383.2 nm, 518.4 nm), Al II (288.1 nm), and Al I (396.1 nm), were identified through the database of the National Institute of Standards and Technology (NIST: https://physics.nist.gov/PhysRefData/ASD/lines_form.html) accessed on 15 April 2021. Figure 1c shows representative Vis-NIR spectra recorded for various organic fertilizers. In contrast to LIBS, Vis-NIR can identify absorption peaks, and the four varieties also have similar curves. The spectra-wide disparity of the baseline shifts was related to the loading density and the particle size. The absorption peaks associated with the vibration of molecular bonds C–H, O–H, and N–H, which were from water and carbohydrates, were situated between 1350 nm and 1600 nm in the NIR region [27]. The absorption peaks at 1887–2200 nm, which are the most substantial absorbance peaks, can also be seen in the spectra. Overall, the differences between the LIBS and Vis-NIR data spectra for the various categories are difficult to discern. As a result, chemometrics is required for further processing.

2.3. Prediction of P and K Using Full Spectra

LIBS and Vis-NIR organic fertilizer spectra were correlated with P and K reference data using SVR, PLSR, and Extratrees. The created models utilized 96 samples for calibration and 24 for prediction. We chose to perform k-fold cross-validation on the calibration data with k = 10. Table 1 displays the model statistics for each modeling strategy. Compared to other conventional models, the results obtained using Extratrees were efficient for both calibration and prediction set to predict PK using the complete LIBS and Vis-NIR spectra. Indeed, the detection of P with Extratrees using the LIBS spectra for the calibration set yielded 0.9707 for R2c,0.1749% for RMSEc, and the prediction set, R2p, was 0.9942, RMSEc produced 0.0673%, and its RPD was 13.15. Meanwhile, Extratrees’ findings for P prediction using Vis-NIR data were R2c = 0.9894, RMSEc = 0.1052%, and for the prediction, R2p achieved 0.9529, RMSEp = 0.1922% and RPD = 4.60. Figure 2a,c depicts the prediction error of the Extratrees model’s correlation between the P actual values and the P predicted using full LIBS and Vis-NIR. Based on the relationship between the predicted concentrations by Extratrees and their reference concentrations using LIBS and Vis-NIR shown in Figure 2a,c, it can be seen that the calibration curves generated with LIBS outperformed Vis-NIR in terms of prediction.
Regarding K prediction using the LIBS spectra, the Extratrees resulted in 0.9904 for R2c, 0.0960% for RMSEc, and its prediction set results were R2p = 0.9770, RMSEp = 0.1563%, and RPD = 6.59. When the Vis-NIR spectra were used as input, the calibration result reached 0.9971 for R2c, and 0.0532% for RMSEc, while the prediction R2p produced 0.9882, RMSEp attained 0.1121%, and RPD reached 9.19. However, compared to P prediction, different phenomena appeared for K prediction as Vis-NIR performed better than data collected by LIBS. Figure 2b,d shows the prediction error plots for the reference value and the prediction value for K using LIBS and Vis-NIR.

2.4. Prediction of PK with the Selected Wavelength of LIBS and Vis-NIR, and Their FUSION

Many high-dimensional datasets, such as those obtained with LIBS and Vis-NIR spectroscopy, exhibit a remarkable property known as colinearity, implying that some of the spectral variables are exact linear combinations of others. The existence of colinearity can cause several problems, including overfitting. As a result, it is necessary to compress the correlated or redundant information to preserve the essential data before modeling. Moreover, as seen before, it is crucial to reduce the data before constructing a midlevel fusion approach. This study computed Shap values to interpret and extract the critical features from the Extratrees model since the model predicted PK better using full spectra than any other model (Table 1). The different wavelengths with a powerful positive influence derived from Shap values computation for LIBS spectra (LIBS-Shap) and Vis-NIR ranges (Vis-NIR-Shap) and their fusion (FUSION) were utilized to estimate PK in order to improve quantification findings. To know the minimum number of variables to take among the essential variables with the highest Shap, we calculated the prediction of PK using 5 variables, 10 variables, 20, and 30 variables for Vis-NIR-Shap and LIBS-Shap with Extratrees. The results for PK showed us that 30 wavelengths were the optimal variable and could lead to satisfactory results. The different samples were split into 96 samples for calibration and 24 for prediction. The results of PK prediction using features selected by Shap and the fusion on predicting PK are shown in Table 2.
A comparison of Table 1 and Table 2 clearly shows an improvement in the models for predicting P content utilizing LIBS-Shap and Vis-NIR-Shap data. The Extratrees model was the most accurate predictor of P for both LIBS-Shap (R2p = 0.9943, RMSEp = 0.0668%, and RPD = 13.26) and Vis-NIR-Shap (R2p = 0.9715, RMSEp = 0.21486%, and RPD = 5.96) among the models tested. Moreover, when comparing the LIBS-Shap and Vis-NIR-Shap results, it is evident that LIBS-Shap provides superior P prediction results. The prediction error graphs for LIBS-Shap and Vis-NIR-Shap utilized to forecast P are shown in Figure 3a,b. The combination of both sensor data for forecasting P led to better results in comparison to using single-sensor data for all three models, with the highest (Extratrees) reaching 0.9946 for R2p, 0.0649 % for RMSEp, and its RPD equaling 13.65. The prediction error curve for FUSION employed to forecast P with Extratrees is shown in Figure 3c. In summary, the ranking of P contents prediction using different spectra was as follows: FUSION > LIBS-Shap > Vis-NIR-Shap.
In contrast to the full data prediction (Table 1), the LIBS-Shap and Vis-NIR-Shap data significantly improved the outcomes of K prediction (Table 2). According to our estimation results, Extratrees produced an excellent prediction result for both LIBS-Shap (R = 0.9870, RMSEp = 0.1177%, and RPD = 8.75) and Vis-NIR-Shap (R2p = 0.9941, RMSEp = 0.0792%, and RPD = 13.01). Figure 3d,e shows the prediction error plots for LIBS-Shap and Vis-NIR-Shap used to forecast K. On the other hand, it has also been observed that the fusion of the two datasets produced a better prediction of K (R2p = 0.9976, RMSEp = 0.0508, RPD = 20.28) than LIBS-Shap and Vis-NIR-Shap. Figure 3f depicts the prediction error curve for the fusion used to predict K. Overall, the prediction of K contents with different input factors was listed as follows: FUSION > Vis-NIR-Shap > LIBS-Shap.

2.5. Discussion

This paper investigated the fusion of Vis-NIR and LIBS spectra on PK prediction in different varieties of organic fertilizers using Extratrees and XAI. The full spectra of LIBS and Vis-NIR were used first to predict PK using SVR, PLSR, and Extratrees models. Table 1 summarizes the calibration and prediction results from the three models. The results for the two sensors demonstrate that Extratrees is the most efficient model. This result was expected since Extratrees’ machine learning model is nonlinear and composed of many decision trees (Ensemble model). The previous study on fertilizer to determine PK was all based on simple linear regression or a simple machine learning model (SVR, PLSR) for both LIBS [12,28,29] and Vis-NIR [15,16]. However, the accuracy and applicability of these simple methods are often less than suitable since they focus only on the lines of interest and discard the spectral information provided by other lines [30].
On the other hand, Extratrees, an ensemble machine learning model, can learn from a large-scale band and decrease variance while increasing bias compared to standard trees [31]. Extratrees have been shown in a few papers to have the potential to lead to favorable results over simple machine learning models [32,33]. In addition to Extratrees, SVR was superior to PLSR in this study for predicting PK using LIBS and Vis-NIR spectra.
In addition, to the ability to predict, interpretability is another crucial characteristic of the model. It is pertinent to note that even though the model developed in this study demonstrated excellent nonlinear regression performance. There is still a disagreement as to how to interpret these findings. Thus, Shap was used to obtain directly interpretable data about the PK content predicted by the machine learning model, which avoided the problems caused by “black box” predictions [34]. Model predictions combined with the Shap algorithm produced robust, interpretable, and transparent data, which is critical for chemometrics. As part of this example, we found that the range of variables influencing P prediction in Vis-NIR was between [542–1092 nm]. This region was similar to the iron oxide absorption region presented by Gholizadeh et al. [35]. From this range, we observed that variables at 542 nm and 588 nm with Shap > 0.01 were the most significant features (Figure 4b). While for K detection using Vis-NIR, variables at NIR positions such as 2086 nm, 1110 nm, 1221 nm, 792 nm, and 833 nm were the most impactful, with Shap >0.005 (Figure 4c). A similarity was found between the detected regions and those corresponding to clay minerals and water [9]. The different ranges where the highest contributing features were observed are similar to those reported in [16,36]. However, no information is available in the literature on direct absorption by K and P in the Vis-NIR region.
Regarding the LIBS sensor, the variables significantly contributing to predicting P were 324.81 nm and 285.35 nm with Shap values > 0.01. A number of significant features were also found within the interval [251.48–461.48 nm]. In contrast, 327.47 nm, 394.47 nm, 251.47 nm, 250.73 nm, 251.66 nm, 257.66 nm, and 309.32 nm were substantially linked with the prediction of K.
It should be noted that the wavelengths that drove both P and K’s LIBS prediction were unexpected. Indeed, some literature has reported that P-sensitive wavelengths can be found around 214 nm and 253 nm [12,37]. Furthermore, K was scheduled to be at 766.13 nm or 769.68 [13,14]. However, according to the NIST website and the Kurucz database, the values 324.81 nm and 285.35 nm that contribute to the prediction of P correspond to the elements Fe II [38] and Mg I [39]. This finding leads us to deduce a relationship between P and Mg and between P and Fe. This assertion is endorsed by Fageria [40], who explained that interactions between P and Mg could occur since Mg contributes to activating several enzymes.
Additionally, it has been demonstrated that a small amount of P increases the concentration of Mg [41]. Moreover, two variables among the features, namely 330.9 nm and 324.74 nm, were determined to be P II [42]. Regarding K prediction, the number of reported high contributing variables was mainly in the 230–300 nm wavelength range, which was determined to be KCl and KOH absorption [43].
Full-range spectroscopic data necessitate a complex model development and a long training period. Numerous studies proved that a wide range of features in the Vis-NIR [9] and LIBS [14,44] might make prediction difficult. Thus, we tested the performance of predicting PK using only the variables contributing significantly to the model for LIBS(LIBS-Shap) and Vis-NIR(Vis-NIR-Shap). It turned out that the results for both enhanced the prediction of PK as compared to the full spectrum. Additionally, both sensors’ reduced variables were combined to create a mid-level fusion. It was discovered that combining the two sensors, to some extent, improved the calibration and prediction results. Extratrees’ prediction of P using FUSION data achieved 0. 9946 for R2p, 0. 0649% for RMSEp, and 13.65 for RPD, which was marginally better than the predictions using LIBS-Shap and Vis-NIR-Shap, respectively. Similar results were seen for K prediction by Extratrees, with FUSION-Shap (R2p = 0. 9976, RMSEp = 0.0508%, RPD = 20.28) outperforming Vis-NIR-Shap and LIBS-Shap in terms of precision. The results obtained from combining Vis-NIR and LIBS were expected because data fusion approaches have demonstrated improved outcomes in predicting some other materials [21,45].
Overall, the experimental findings demonstrate that the computation of Shap values may aid in a better understanding of the model and the identification of high-impact wavelengths that can enhance the detection of PK in organic fertilizers utilizing LIBS and Vis-NIR technologies. A further finding of the study was that the combination of both sensors might be used to provide a more accurate and reliable prediction of PK, although additional samples may be required to support this idea. XAI has the potential to significantly impact chemometrics by promoting confidence in analyses, especially in applications where decisions made based on the analysis have significant consequences for individuals or society. Moreover, as XAI can help to merge LIBS and Vis-NIR data, it can therefore enable the creation of a powerful new sensor technology that could be helpful in characterizing elements in complex samples. Lastly, the study will contribute to environmental conservation and the viability of local agriculture.

3. Material and Methods

3.1. Samples

The College of Biosystem Engineering and Food Science at Zhejiang University in Hangzhou (China) provided the organic fertilizers used in this study. Four distinct categories of organic fertilizers were utilized in this investigation. For category one (1), the raw materials are fermented and digested by earthworms. At the same time, category two (2) is a mix of rice straw and earthworm manure. Category three (3) raw materials are pure sheep manure fermented and decomposed by microbial fungus. The last category (4) is made through the fermentation and decomposition of chicken manure as raw materials. Each type was composed of thirty samples, resulting in a total of 120. The various fertilizer samples were dried and ground into powders in a grinder, then sieved through a 60-mesh screen. Finally, pellets with a 30 mm diameter and a 2 mm thickness were created with a pressure machine (pressure = 20 MPa, time = 15 s) for all 120 samples.

3.2. Chemical Reference Values Measurement through ICP-MS

The exact concentrations of phosphorus(P) and potassium(K) were determined using inductively coupled plasma mass spectrometry (ICP-MS), which is an effective and widely used technique for analyzing environmental materials for multiple elements and isotopes. Each organic fertilizer was digested in 2.5 mL of nitric acid (HNO3), 1 mL of hydrogen peroxide(H2O2), and hydrofluoric acid (HF). We then combined these solutions, microwaved (MARS 6, CEM, Mathews, VA, USA) at 240 °C, 80 bar for 10 min, then heated and cooled. Approximately 0.25 g of each sample was weighed and placed into 50 mL Falcon tubes along with 25 mL Milli-Q water. All of the samples were centrifuged, and the supernatants were transferred to Falcon tubes after being agitated for 1 h on an orbital shaker. If particles could be detected in the supernatant, they were filtered using filter papers. The extractions were performed in triplicate to guarantee total analyte extraction, and the Chinese national standards (CNS), which are technical norms issued by the National Standardization Administration of China, were employed as reference materials. In the end, the solution was analyzed by ICP-MS (ELAN DRC-e, PerkinElmer, Beijing, China) to measure the amount of P and K, especially isotopes P-31 and K-39. It should be noted that the dynamic reaction cell (DRC) of the ICP-MS is filled with argon gas in order to remove interferences. The obtained result of P is reported as the percentage (%) of pentoxide oxide (P2O5), commonly referred to as the element phosphate, in order to distinguish it from phosphorus (P). In contrast, K is reported as a percentage of potassium oxide (K2O), called potash. However, we will use P and K in the whole manuscript, referring to P2O5 and K2O.

3.3. Spectral Measurement and Preprocessing

3.3.1. LIBS Measurement and Preprocessing

In this study, the LIBS equipment (Figure 5) employed to generate plasma was made of a Q-switch pulsed laser (Vlite 200, Beamtech, Beijing, China) with parameters such as maximum energy, pulse duration, and wavelength, the same as reported by Zhao et al. [7]. The obtention and the record of the emission spectra have been made possible through a spectrograph (ME5000, Andor, Belfast, UK) and an image charge-coupled device (ICCD- DH334T-18U-03, Andor, Belfast, UK). At the same time, the delay generator helped to control the ICCD camera and the laser Q-switch. The overall system has a spectral range of 229–876 nm. The LIBS spectra were obtained by applying 16 laser pulses to five randomly chosen positions of each sample. A total of 80 spectra were obtained and averaged for each sample to eliminate heterogeneity. The median filter was used to minimize noise first. Then, area normalization was employed to normalize the smoothed spectra to the same scale. In the end, iteratively reweighted penalized least squares were used to remove the spectral background.

3.3.2. Vis-NIR Measurement and Preprocessing

Vis-NIR spectra were collected by suspending a 50 W halogen lamp of a Fieldspec3 spectral analytical device (Analytical Spectral Devices, Boulder, CO, USA) directly above each experimental Petri dish. However, Unlike LIBS, which uses pelletized samples, Vis-NIR uses raw and unpelletized samples. The spectrometer was calibrated once per fifteen measurements with a white plate using a Spectralon (Malvern Panalytical Ltd., Malvern, UK), and the sample was measured three times. In the end, 360 spectra were acquired and averaged to obtain 120 spectra. The multiplicative scatters correction (MSC) and the first-order derivative were applied to eliminate the baseline offset [9].

3.4. Chemometrics

3.4.1. Conventional Machine Learning

Two conventional machine learning models were used to estimate the PK content: SVR and PLSR. Many papers have discussed and explained these two algorithms [9,46]. The best parameters for each model were found through grid search computation.

3.4.2. Ensemble Machine Learning

Extremely Randomized Trees, also known as Extratrees, is a machine learning ensemble algorithm proposed by Geurts et al. [31]. Extra trees generate a massive number of decision trees from the training dataset and use majority voting for classification. In contrast, regression uses the average of the different predictions for each decision tree. Contrary to Random Forest, which uses the tree bagging step to obtain the training subset for each tree, Extra tree uses the whole training set. Furthermore, it chooses the best feature and value to split the node, making the extra trees less likely to overfit and reporting better results. The Extratrees model was used to detect the PK contents.

3.5. Wavelength Selection through Shapley Additive Explanation Values

XAI helps to visualize, explain, and interpret the machine learning models. There are many XAI approaches [47]. However, in this study, we will focus on Shapley additive explanation values (Shap), which Lundberg and Lee [48] described. The Shap algorithm is a combination of game theory [49] and local explanation [50]; its primary purpose is to know the contribution of each feature in a particular prediction. In order to better allocate the contribution of each feature ( ϕ i ) , its Shapley values were calculated through:
ϕ i = S F { i } S | S | ! ( F | S | 1 ) ! F ! [ f S U { i } ( x S U { i } ) f s ( x s ) ]
The purpose is to retrain all features subsets S of the model. S is included in variable F , which represents all features, f S U { i } is the model used to train the feature subset, and f s is the model used to train the retains feature. To compare both predictions f S U { i } ( x S U { i } ) f s ( x s ) were calculated, and this is repeated for all subsets. Furthermore, the explainability of the additive feature attribution represented by a linear function g was determined through:
g ( z ) = ϕ 0 + i = 1 M ϕ i z i
The coalition of the vector Z is between the interval { 1 , 1 } , and M is the number of features. Moreover, as the Shap values only emphasize the importance and mention whether the importance has a positive or negative impact on the model, we modified it in order to be able to extract relevant features. In order to be able to extract features, we will calculate the correlation between Shap ϕ i and the data used to calculate the Shap noted X i . Both must have the same shape size (P*n) and should have the same feature number M . Then, for each feature number M i , we calculate the correlation noted in Corr ( ϕ i , X i ). In the end, we will pose a constraint to select only Corr > 0 in order to select the relevant features.

3.6. Data Fusion Approach

Data fusion aims to create a more comprehensive and detailed set of information by integrating data from multiple sources. There are three methods of implementing data fusion, namely low-level, mid-level, and high-level, according to the fusion level between the different data forms. In this study, we will focus on mid-level fusion, which is achieved by merging the features extracted from the Vis-NIR and LIBS spectra. In order to obtain the best features for LIBS and Vis-NIR, the Shap values were computed to extract the essential features that contribute the most to predicting P and K in organic fertilizer. The variables with the highest Shap value were considered essential.
Overall, the features with the highest Shap values for LIBS, called LIBS-Shap, were concatenated to the features with the highest Shap values for Vis-NIR, called Vis-NIR-Shap, to improve the quantification of P and K. The Scheme of the data fusion process of mid-level using Shap values can be found in Figure 6.

4. Conclusions

This study aimed to explore the potential of explainable AI on chemical analytics in predicting PK in various organic fertilizers using LIBS and Vis-NIR sensors. First, the full spectra of LIBS and Vis-NIR were used to predict PK using Extratrees, SVR, and PLSR. The quantification results showed that Extratrees provided better results than SVR and PLS for both sensors. Secondly, XAI through Shap computation was used to explain Extratrees and select important characteristics. The results of different features demonstrated that P’s important features were mainly at the visible part while K’s main characteristics were located at the NIR part for Vis-NIR. For LIBS, the spectra’s main features for both P and K were between [251.48–461.48 nm]. The computation of Shap values assisted in interpreting the model and helped select features, improving the detection performance of PK for both sensors (LIBS-Shap and Vis-NIR-Shap). Meanwhile, the fusion of the reduced spectra obtained with the two sensors (FUSION) resulted in slightly better results than a single sensor. The performance of the model for P with FUSION achieved 0.9946 for R2p, 0.0649% for RMSEp, and 13.65 for RPD, slightly better than LIBS-Shap (R2p = 0.9943, RMSEC = 0.0668% and RPD = 13.26) and Vis-NIR-Shap data (R2p = 0.9719, RMSEp = 0.1486%, and RPD = 5.96). While for K prediction FUSION with R2p = 0.9976, RMSEp = 0.0508% and RPD = 20.28 outperformed better than Vis-NIR-Shap (R2p = 0.9941, RMSEp = 0.0792%, and RPD = 13.01) and LIBS-Shap (R2p = 0.9870, RMSEp = 0.1177%, and RPD = 8.75). Finally, the outcomes of these results serve as a step toward understanding the usefulness of explainable AI in analytical chemistry to build a robust model for detecting chemical elements using LIBS, Vis-NIR, and fusion spectra.

Author Contributions

Conceptualization, F.L. and M.L.G.; Data curation, M.L.G., M.H.K., R.C. and X.L.; Formal analysis, M.L.G.; Funding acquisition, F.L. and H.F.; Investigation M.L.G.; Methodology, M.L.G.; Project administration, F.L.; Resources, F.L. and H.F.; Software, M.L.G.; Validation, F.L.; Visualization, F.L.; Writing—original draft, M.L.G.; Writing—review and editing, F.L., M.L.G., M.H.K., R.C., J.H., X.L. and H.F. All authors have read and agreed to the published version of the manuscript.

Funding

This study was supported by the Science and Technology Department of Zhejiang Province (2022C02034, 2021C02023) and the Natural Science Foundation of China (61975174).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author. The data are not publicly available due to privacy.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Kang, Y.; Hao, Y.; Shen, M.; Zhao, Q.; Li, Q.; Hu, J. Impacts of supplementing chemical fertilizers with organic fertilizers manufactured using pig manure as a substrate on the spread of tetracycline resistance genes in soil. Ecotoxicol. Environ. Saf. 2016, 130, 279–288. [Google Scholar] [CrossRef] [PubMed]
  2. Nadarajan, S.; Sukumaran, S. Chapter 12—Chemistry and toxicology behind chemical fertilizers. In Controlled Release Fertilizers for Sustainable Agriculture; Lewu, F.B., Volova, T., Thomas, S., KR, R., Eds.; Academic Press: New York, NY, USA, 2021; pp. 195–229. [Google Scholar]
  3. Puckett, L.J. Identifying the major sources of nutrient water pollution. Environ. Sci. Technol. 1995, 29, 408A–414A. [Google Scholar] [CrossRef]
  4. Butler, H.J.; Adams, S.; McAinsh, M.R.; Martin, F.L. Detecting nutrient deficiency in plant systems using synchrotron Fourier-transform infrared microspectroscopy. Vib. Spectrosc. 2017, 90, 46–55. [Google Scholar] [CrossRef] [Green Version]
  5. Huang, J.; Glaesner, N.; Triolo, J.; Bekiaris, G.; Bruun, S.; Liu, F. Application of Fourier transform mid-infrared photoacoustic spectroscopy for rapid assessment of phosphorus availability in digestates and digestate-amended soils. Sci. Total Environ. 2022, 832, 155040. [Google Scholar] [CrossRef] [PubMed]
  6. Markiewicz-Keszycka, M.; Cama-Moncunill, X.; Casado-Gavalda, M.P.; Dixit, Y.; Cama-Moncunill, R.; Cullen, P.J.; Sullivan, C. Laser-induced breakdown spectroscopy (LIBS) for food analysis: A review. Trends Food Sci. Technol. 2017, 65, 80–93. [Google Scholar] [CrossRef]
  7. Zhao, Y.; Guindo, M.L.; Xu, X.; Sun, M.; Peng, J.; Liu, F.; He, Y. Deep learning associated with laser-induced breakdown spectroscopy (LIBS) for the prediction of lead in soil. Appl. Spectrosc. 2019, 73, 565–573. [Google Scholar] [CrossRef]
  8. Nicolodelli, G.; Cabral, J.; Menegatti, C.R.; Marangoni, B.; Senesi, G.S. Recent advances and future trends in LIBS applications to agricultural materials and their food derivatives: An overview of developments in the last decade (2010–2019). Part I. Soils and fertilizers. TrAC Trends Anal. Chem. 2019, 115, 70–82. [Google Scholar] [CrossRef]
  9. Guindo, M.L.; Kabir, M.H.; Chen, R.; Liu, F. Potential of Vis-NIR to measure heavy metals in different varieties of organic-fertilizers using Boruta and deep belief network. Ecotoxicol. Environ. Saf. 2021, 228, 112996. [Google Scholar] [CrossRef]
  10. Bellon-Maurel, V.; Fernandez-Ahumada, E.; Palagos, B.; Roger, J.-M.; McBratney, A. Critical review of chemometric indicators commonly used for assessing the quality of the prediction of soil attributes by NIR spectroscopy. TrAC Trends Anal. Chem. 2010, 29, 1073–1081. [Google Scholar] [CrossRef]
  11. Kabir, M.H.; Guindo, M.L.; Chen, R.; Liu, F. Geographic origin discrimination of millet using Vis-NIR spectroscopy combined with machine learning techniques. Foods 2021, 10, 2767. [Google Scholar] [CrossRef]
  12. Zhang, B.; Ling, P.; Sha, W.; Jiang, Y.; Cui, Z. Univariate and multivariate analysis of phosphorus element in fertilizers using laser-induced breakdown spectroscopy. Sensors 2019, 19, 1727. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  13. Nicolodelli, G.; Senesi, G.S.; de Oliveira Perazzoli, I.L.; Marangoni, B.S.; De Melo Benites, V.; Milori, D.M.B.P. Double pulse laser induced breakdown spectroscopy: A potential tool for the analysis of contaminants and macro/micronutrients in organic mineral fertilizers. Sci. Total Environ. 2016, 565, 1116–1123. [Google Scholar] [CrossRef] [PubMed]
  14. Sha, W.; Li, J.; Xiao, W.; Ling, P.; Lu, C. Quantitative analysis of elements in fertilizer using laser-induced breakdown spectroscopy coupled with support vector regression model. Sensors 2019, 19, 3277. [Google Scholar] [CrossRef] [Green Version]
  15. Lin, Z.; Wang, R.; Wang, Y.; Wang, L.; Lu, C.; Liu, Y.; Zhang, Z.; Zhu, L. Accurate and rapid detection of soil and fertilizer properties based on visible/near-infrared spectroscopy. Appl. Opt. 2018, 57, D69–D73. [Google Scholar] [CrossRef] [PubMed]
  16. Shen, J.; Qiao, W.; Chen, H.; Zhou, J.; Liu, F. Application of visible/near infrared spectrometers to quickly detect the nitrogen, phosphorus, and potassium content of chemical fertilizers. Appl. Sci. 2021, 11, 5103. [Google Scholar] [CrossRef]
  17. Zhang, Y.; Hartemink, A.E. Data fusion of vis–NIR and PXRF spectra to predict soil physical and chemical properties. Eur. J. Soil Sci. 2020, 71, 316–333. [Google Scholar] [CrossRef]
  18. Sanaeifar, A.; Li, X.; He, Y.; Huang, Z.; Zhan, Z. A data fusion approach on confocal Raman microspectroscopy and electronic nose for quantitative evaluation of pesticide residue in tea. Biosyst. Eng. 2021, 210, 206–222. [Google Scholar] [CrossRef]
  19. Sánchez-Esteva, S.; Knadel, M.; Kucheryavskiy, S.; de Jonge, L.W.; Rubæk, G.H.; Hermansen, C.; Heckrath, G. Combining Laser-Induced Breakdown Spectroscopy (LIBS) and Visible Near-Infrared Spectroscopy (Vis-NIRS) for Soil Phosphorus Determination. Sensors 2020, 20, 5419. [Google Scholar] [CrossRef]
  20. Bricklemyer, R.S.; Brown, D.J.; Turk, P.J.; Clegg, S. Comparing vis–NIRS, LIBS, and combined vis–NIRS-LIBS for intact soil core soil carbon measurement. Soil Sci. Soc. Am. J. 2018, 82, 1482–1496. [Google Scholar] [CrossRef]
  21. Wang, H.; Zhang, P.; Xu, Z.; Cheng, W.; Li, X.; Yang, Y.; Wu, Y.; Wang, Q. An authenticity method for determining hybrid rice varieties using fusion of LIBS and NIRS. Microw. Opt. Technol. Lett. 2022, 1–10. [Google Scholar] [CrossRef]
  22. Ercioglu, E.; Velioglu, H.M.; Boyaci, I.H. Chemometric evaluation of discrimination of aromatic plants by Using NIRS, LIBS. Food Anal. Methods 2018, 11, 1656–1667. [Google Scholar] [CrossRef]
  23. Jiménez-Luna, J.; Grisoni, F.; Schneider, G. Drug discovery with explainable artificial intelligence. Nat. Mach. Intell. 2020, 2, 573–584. [Google Scholar] [CrossRef]
  24. Zhang, Y.; Weng, Y.; Lund, J. Applications of Explainable Artificial Intelligence in Diagnosis and Surgery. Diagnostics 2022, 12, 237. [Google Scholar] [CrossRef] [PubMed]
  25. Bussmann, N.; Giudici, P.; Marinelli, D.; Papenbrock, J. Explainable AI in fintech risk management. Front. Artif. Intell. 2020, 3, 26. [Google Scholar] [CrossRef] [PubMed]
  26. Brito, L.C.; Susto, G.A.; Brito, J.N.; Duarte, M.A. An explainable artificial intelligence approach for unsupervised fault detection and diagnosis in rotating machinery. Mech. Syst. Signal Process. 2022, 163, 108105. [Google Scholar] [CrossRef]
  27. Kaur, H.; Künnemeyer, R.; McGlone, A. Correction of temperature variation with independent water samples to predict soluble solids content of kiwifruit juice using NIR spectroscopy. Molecules 2022, 27, 504. [Google Scholar] [CrossRef] [PubMed]
  28. Dib, S.R.; Senesi, G.S.; Gomes Neto, J.A.; Ribeiro, C.A.; Ferreira, E.C. Phosphorous determination in biochar-based fertilizers by spark discharge-laser-induced breakdown spectroscopy. Chemosensors 2021, 9, 337. [Google Scholar] [CrossRef]
  29. Liao, S.Y.; Wu, X.L.; Li, G.H.; Wei, M.; Zhang, M. Quantitative analysis of P in Fertilizer by laser-induced breakdown spectroscopy with multivariate nonlinear method. Spectrosc. Spectr. Anal. 2018, 38, 271–275. [Google Scholar]
  30. Song, W.; Hou, Z.; Gu, W.; Afgan, M.S.; Cui, J.; Wang, H.; Wang, Y.; Wang, Z. Incorporating domain knowledge into machine learning for laser-induced breakdown spectroscopy quantification. Spectrochim. Acta Part B At. Spectrosc. 2022, 195, 106490. [Google Scholar] [CrossRef]
  31. Geurts, P.; Ernst, D.; Wehenkel, L. Extremely randomized trees. Mach. Learn. 2006, 63, 3–42. [Google Scholar] [CrossRef] [Green Version]
  32. Scalzo, F.; Hamilton, R.; Asgari, S.; Kim, S.; Hu, X. Intracranial hypertension prediction using extremely randomized decision trees. Med. Eng. Phys. 2012, 34, 1058–1065. [Google Scholar] [CrossRef] [PubMed]
  33. Ahmad, M.W.; Reynolds, J.; Rezgui, Y. Predictive modelling for solar thermal energy systems: A comparison of support vector regression, random forest, extra trees and regression trees. J. Clean. Prod. 2018, 203, 810–821. [Google Scholar] [CrossRef]
  34. Adadi, A.; Berrada, M. Peeking inside the black-box: A survey on explainable artificial intelligence (XAI). IEEE Access 2018, 6, 52138–52160. [Google Scholar] [CrossRef]
  35. Gholizadeh, A.; Saberioon, M.; Ben-Dor, E.; Rossel, R.A.V.; Borůvka, L. Modelling potentially toxic elements in forest soils with vis–NIR spectra and learning algorithms. Environ. Pollut. 2020, 267, 115574. [Google Scholar] [CrossRef]
  36. Mohamed, E.S.; Baroudy, A.A.E.; El-beshbeshy, T.; Emam, M.; Belal, A.A.; Elfadaly, A.; Aldosari, A.A.; Ali, A.M.; Lasaponara, R. Vis-NIR spectroscopy and satellite landsat-8 OLI data to map soil nutrients in arid conditions: A Case Study of the Northwest Coast of Egypt. Remote Sens. 2020, 12, 3716. [Google Scholar] [CrossRef]
  37. Marangoni, B.S.; Silva, K.S.G.; Nicolodelli, G.; Senesi, G.S.; Cabral, J.S.; Villas-Boas, P.R.; Silva, C.S.; Teixeira, P.C.; Nogueira, A.R.A.; Benites, V.M.; et al. Phosphorus quantification in fertilizers using laser induced breakdown spectroscopy (LIBS): A methodology of analysis to correct physical matrix effects. Anal. Methods 2016, 8, 78–82. [Google Scholar] [CrossRef] [Green Version]
  38. Samek, O.; Krzyžánek, V.; Beddows, D.C.S.; Telle, H.H.; Kaiser, J.; Liška, M. Material Identification Using Laser Spectroscopy and Pattern Recognition Algorithms. In Proceedings of the International Conference on Computer Analysis of Images and Patterns, Warsaw, Poland, 5–7 September 2001; Springer: Berlin/Heidelberg, Germany, 2001; pp. 443–450. [Google Scholar]
  39. Vervack, R.J.; McClintock, W.E.; Killen, R.M.; Sprague, A.L.; Anderson, B.J.; Burger, M.H.; Bradley, E.T.; Mouawad, N.; Solomon, S.C.; Izenberg, N.R. Mercury’s Complex Exosphere: Results from MESSENGER’s Third Flyby. Science 2010, 329, 672–675. [Google Scholar] [CrossRef] [PubMed]
  40. Fageria, V.D. Nutrient interactions in crop plants. J. Plant Nutr. 2001, 24, 1269–1290. [Google Scholar] [CrossRef]
  41. Weih, M.; Liu, H.; Colombi, T.; Keller, T.; Jäck, O.; Vallenback, P.; Westerbergh, A. Evidence for magnesium–phosphorus synergism and co-limitation of grain yield in wheat agriculture. Sci. Rep. 2021, 11, 9012. [Google Scholar] [CrossRef]
  42. Martin, W.C. Atomic Energy Levels and Spectra of Neutral and Singly Ionized Phosphorus (P i and P ii). J. Opt. Soc. Am. 1959, 49, 1071–1085. [Google Scholar] [CrossRef]
  43. Leffler, T.; Brackmann, C.; Weng, W.; Gao, Q.; Aldén, M.; Li, Z. Experimental investigations of potassium chemistry in premixed flames. Fuel 2017, 203, 802–810. [Google Scholar] [CrossRef]
  44. Dai, Y.; Song, C.; Gao, X.; Chen, A.; Hao, Z.; Lin, J. Quantitative determination of Al–Cu–Mg–Fe–Ni aluminum alloy using laser-induced breakdown spectroscopy combined with LASSO–LSSVM regression. J. Anal. At. Spectrom. 2021, 36, 1634–1642. [Google Scholar] [CrossRef]
  45. Liang, J.; Li, M.; Du, Y.; Yan, C.; Zhang, Y.; Zhang, T.; Zheng, X.; Li, H. Data fusion of laser induced breakdown spectroscopy (LIBS) and infrared spectroscopy (IR) coupled with random forest (RF) for the classification and discrimination of compound salvia miltiorrhiza. Chemom. Intell. Lab. Syst. 2020, 207, 104179. [Google Scholar] [CrossRef]
  46. Gholizadeh, A.; Borůvka, L.; Saberioon, M.; Vašát, R. A Memory-based learning approach as compared to other data mining algorithms for the prediction of soil texture using diffuse reflectance spectra. Remote Sens. 2016, 8, 341. [Google Scholar] [CrossRef] [Green Version]
  47. Guidotti, R.; Monreale, A.; Ruggieri, S.; Turini, F.; Giannotti, F.; Pedreschi, D. A survey of methods for explaining black box models. ACM Comput. Surv. (CSUR) 2018, 51, 1–42. [Google Scholar] [CrossRef] [Green Version]
  48. Lundberg, S.M.; Erion, G.; Chen, H.; DeGrave, A.; Prutkin, J.M.; Nair, B.; Katz, R.; Himmelfarb, J.; Bansal, N.; Lee, S.-I. From local explanations to global understanding with explainable AI for trees. Nat. Mach. Intell. 2020, 2, 56–67. [Google Scholar] [CrossRef]
  49. Trumbelj, E.; Kononenko, I. Explaining prediction models and individual predictions with feature contributions. Knowl. Inf. Syst. 2013, 41, 647–665. [Google Scholar] [CrossRef]
  50. Ribeiro, M.T.; Singh, S.; Guestrin, C. “Why should i trust you?” Explaining the predictions of any classifier. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 1135–1144. [Google Scholar]
Figure 1. Organic fertilizer data; (a) Actual values obtained by ICP-MS; (b) preprocessed data obtained by LIBS; (c) Preprocessed data obtained by Vis-NIR.
Figure 1. Organic fertilizer data; (a) Actual values obtained by ICP-MS; (b) preprocessed data obtained by LIBS; (c) Preprocessed data obtained by Vis-NIR.
Molecules 28 00799 g001
Figure 2. Prediction error plot of PK reference value and predicted value using Extratrees model; (a) Prediction error plot of P using full LIBS spectra; (b) Prediction error plot of K using full LIBS spectra; (c) Prediction error plot of P using full Vis-NIR spectra; (d) Prediction error plot of K using full Vis-NIR spectra. The red area means 95% of the prediction interval.
Figure 2. Prediction error plot of PK reference value and predicted value using Extratrees model; (a) Prediction error plot of P using full LIBS spectra; (b) Prediction error plot of K using full LIBS spectra; (c) Prediction error plot of P using full Vis-NIR spectra; (d) Prediction error plot of K using full Vis-NIR spectra. The red area means 95% of the prediction interval.
Molecules 28 00799 g002
Figure 3. Prediction error plot of PK for calibration and prediction set using Extratrees; (a) Prediction error plot of P using LIBS-Shap spectra; (b) Prediction error plot of P using full Vis-NIR-Shap spectra; (c) Prediction error plot of P using FUSION spectra; (d) Prediction error plot of K using LIBS-Shap spectra; (e) Prediction error plot of K using Vis-NIR-Shap spectra; (f) Prediction error plot of K using FUSION spectra. The red area means 95% of prediction intervals.
Figure 3. Prediction error plot of PK for calibration and prediction set using Extratrees; (a) Prediction error plot of P using LIBS-Shap spectra; (b) Prediction error plot of P using full Vis-NIR-Shap spectra; (c) Prediction error plot of P using FUSION spectra; (d) Prediction error plot of K using LIBS-Shap spectra; (e) Prediction error plot of K using Vis-NIR-Shap spectra; (f) Prediction error plot of K using FUSION spectra. The red area means 95% of prediction intervals.
Molecules 28 00799 g003
Figure 4. Important features contributing to PK detection using Extratrees; (a) Important features for Vis-NIR with a red dot representing P features and a blue dot representing K features; (b) Ten features with highest Shap values for P using Vis-NIR; (c) Ten features with highest Shap values for K using Vis-NIR; (d) Important features for LIBS with the red dot representing P features and a blue dot representing K features; (e) Ten features with highest Shap values for P using LIBS; (f) Ten features with highest Shap values for K using LIBS.
Figure 4. Important features contributing to PK detection using Extratrees; (a) Important features for Vis-NIR with a red dot representing P features and a blue dot representing K features; (b) Ten features with highest Shap values for P using Vis-NIR; (c) Ten features with highest Shap values for K using Vis-NIR; (d) Important features for LIBS with the red dot representing P features and a blue dot representing K features; (e) Ten features with highest Shap values for P using LIBS; (f) Ten features with highest Shap values for K using LIBS.
Molecules 28 00799 g004
Figure 5. LIBS equipment setup.
Figure 5. LIBS equipment setup.
Molecules 28 00799 g005
Figure 6. Flowchart midlevel fusion.
Figure 6. Flowchart midlevel fusion.
Molecules 28 00799 g006
Table 1. Prediction of PK with full spectra LIBS and Vis-NIR using PLSR, SVR, Extratrees.
Table 1. Prediction of PK with full spectra LIBS and Vis-NIR using PLSR, SVR, Extratrees.
CalibrationPrediction
DataElementsModelsR2cRMSEcR2pRMSEpRPD
LIBSPSVR0.97740.15350.97360.14396.15
PPLSR0.95470.21740.87870.30862.87
PEXTRA0.97070.17490.99420.067313.15
KSVR0.96180.19180.84300.40862.52
KPLSR0.74060.49980.83790.41522.48
KEXTRA0.99040.09600.97700.15636.59
Vis-NIRPSVR0.98490.12550.94660.20474.32
PPLSR0.98060.14240.90080.27903.17
PEXTRA0.98940.10520.95290.19224.60
KSVR0.98660.11350.97220.17195.99
KPLSR0.98620.11520.88940.34293.00
KEXTRA0.99710.05320.98820.11219.19
R2c: Coefficient of determination for calibration; R2p: Coefficient of determination for prediction; RMSEc: Root mean square error for calibration; RMSEp: Root mean square error for prediction; RPD: Residual prediction deviation.
Table 2. Prediction of PK with PLSR, SVR, and Extratrees using features selected by Shap computation for LIBS and Vis-NIR and the fusion spectra.
Table 2. Prediction of PK with PLSR, SVR, and Extratrees using features selected by Shap computation for LIBS and Vis-NIR and the fusion spectra.
Calibration Prediction
DataElementsModelsR2cRMSEcR2pRMSEpRPD
LIBS-ShapPSVR0.98060.14230.97320.14506.11
PPLSR0.93690.25660.88120.30542.90
PEXTRA0.98430.12820.99430.066813.26
KSVR0.97980.13960.95000.23064.47
KPLSR0.87290.34980.79870.46262.22
KEXTRA0.99670.05620.98700.11778.75
Vis-NIR-ShapPSVR0.98810.11140.96050.17625.02
PPLSR0.95640.21340.85310.33962.60
PEXTRA0.99610.06370.97190.14865.96
KSVR0.99170.08930.98380.13117.86
KPLSR0.98320.12730.88710.34652.97
KEXTRA0.99810.04290.99410.079213.01
FUSIONPSVR0.98430.12800.97840.14166.48
PPLSR0.96640.18730.90460.27373.23
PEXTRA0.99090.09750.99460.064913.65
KSVR0.99150.09030.98720.11688.82
KPLSR0.97460.15640.88380.35152.93
KEXTRA0.99660.05760.99760.050820.28
R2c: Coefficient of determination for calibration; R2p: Coefficient of determination for prediction; RMSEc: Root mean square error for calibration; RMSEp: Root mean square error for prediction; RPD: Residual prediction deviation.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Guindo, M.L.; Kabir, M.H.; Chen, R.; Huang, J.; Liu, F.; Li, X.; Fang, H. Chemometric Approach Based on Explainable AI for Rapid Assessment of Macronutrients in Different Organic Fertilizers Using Fusion Spectra. Molecules 2023, 28, 799. https://doi.org/10.3390/molecules28020799

AMA Style

Guindo ML, Kabir MH, Chen R, Huang J, Liu F, Li X, Fang H. Chemometric Approach Based on Explainable AI for Rapid Assessment of Macronutrients in Different Organic Fertilizers Using Fusion Spectra. Molecules. 2023; 28(2):799. https://doi.org/10.3390/molecules28020799

Chicago/Turabian Style

Guindo, Mahamed Lamine, Muhammad Hilal Kabir, Rongqin Chen, Jing Huang, Fei Liu, Xiaolong Li, and Hui Fang. 2023. "Chemometric Approach Based on Explainable AI for Rapid Assessment of Macronutrients in Different Organic Fertilizers Using Fusion Spectra" Molecules 28, no. 2: 799. https://doi.org/10.3390/molecules28020799

Article Metrics

Back to TopTop