{'fraction_non_alphanumeric': 0.027913403961308154, 'fraction_numerical': 0.010870566559189313, 'mean_word_length': 5.171688459351905, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Rapid Prediction of Soil Quality Indices Using Near Infrared Spectroscopy

To determine soil macro nutrients and other quality indices, conventional and laborious procedures were employed. However, this method is time consuming, involve chemical materials and laborious. Thus, alternative fast and environmental friendly method is required to determine several quality indices in agricultural soil. This present study is aimed to apply near infrared spectroscopy (NIRS) in determining soil macro nutrients namely N, P and K. Diffuse reflectance spectrum of soil samples were acquired and recorded in wavelength range from 1000 to 2500 nm. Near infrared spectrum were enhanced using de-trending (DT) method. Prediction models, used to predict N, P and K, were established using principal component regression (PCR) algorithm followed by leverage validation. The results showed that NIRS method can determine all three quality indices with good accuracy and robustness. Maximum correlation coefficient (r) for N, P, K prediction were achieved using DT correction method with r = 0.86 for N prediction, r = 0.90 for both P and K prediction. Based on obtained results, it may conclude that NIRS can applied as an alternative rapid and simultaneous method in predicting soil quality indices.


Introduction
In precision farming practices, it is important to monitor soil quality condition and health. As a matter of fact, plants can grow ideally on healthy soil from which it has physical and chemical properties that are suitable with plant growth [1]. Soil chemical properties are usually related to macro nutrients needed by plants, with the amount needed will be different for each growing phase [2]. Soil macro nutrients were very crucial to be provided since these quality indices were commonly required for plants to grow and develop. Macro nutrients with normally consist of nitrogen, protein and potassium (NPK), can be added by fertilization practice. Yet, this fertilization must be performed optimally in order to avoid unwanted impact. Fertilization and excessive use of fertilizer will cause pollution to the environment because it can cause artificial nutrient deposits that are not utilized by plants [3]. Therefore, the determination and quantification of soil macro nutrients (NPK) is necessary to monitor and further to take preventative actions. A reliable and environmentally friendly method is therefore needed to rapidly predict the amount of soil macro nutrients in agricultural soils and diagnose suspected areas as well as control the rehabilitation processes [4]- [6].
During the last few decades, near infrared technology has been widely used and become most promising methods of analysis in many field areas including in soil and agriculture science due to its advantage; simple sample preparation, rapid, and environmental friendly since no chemicals are involved and used [7]. More importantly, it has the potential ability to determine multiple parameters  [10]. Quantification of soil parameters by near infrared spectroscopy (NIRS) has become an interesting and attractive topic for research in soil science targeting several issues associated with agriculture and the environment, as reported by several authors, NIRS has been proved and employed to determine organic matter in soil [5], phosphorus species in soil [11], ammonia concentration [12], [13] and hazardous contamination in agricultural soil [2].
Numerous studies and publications on the application of near infrared spectroscopy (NIRS), shows that NIRS was feasible to be applied as a rapid and non-destructive tools for quality attributes prediction in agricultural sectors. The NIRS can be used to predict several quality parameters on intact mangos, oranges and apples [14]- [19], meat and dairy products [20]- [23], animal feed [24], [25], coffee qualities [26]- [30], cocoa and wheat products [31]- [34]. Prediction model performance was sufficiently robust and accurate with correlation coefficient (r) range of 0.83 -0.99 and residual predictive deviation (RPD) index was 1.54 -5.18 which is categorized as sufficient to excellent prediction model performances.
Based on advantages and excellence of NIRS performance, we performed a study to apply the NIRS in predicting soil quality indices (N, P and K). These macro nutrients are crucial to be monitored in precision farming practices to ensure plant growth optimally. In this study, we attempted to apply spectra enhancement method namely de-trending (DT) and compare reduction result obtained from raw original spectra data. The prediction models were developed based on near infrared spectroscopic data and actual reference data using principal component regression (PCR).

Soil samples
A bulk of soil samples (approximately 100g) from five different site locations in Aceh Besar were taken and stored for two days to equilibrate before spectra acquisition and further chemical analysis [2]. Soil samples were then sorted from rocks and other substances to ensure uniformity.

Near infrared spectra acquisition
Near infrared spectral data in form of diffuse reflectance spectrum were taken of all soil samples using infrared instrument (FTIR, Thermo Nicolet Antaris II MDS). The basic measurement with integrating sphere probe inGaS detector was chosen as a basic measurement in high resolution format. Infrared spectrum was acquired and recorded in wavenumbers range from 1000 to 2500 nm with co-added 64 scans and averaged [35].

Spectra data enhancement
To minimize light scatter and interference effects, infrared spectra data were enhanced and corrected using de-trending (DT). Spectra data were then use to predict soil quality indices as soil macro nutrients and the result was compared with raw original spectra.

Soil macro nutrients prediction
Soil quality indices, in form of soil macro nutrients were predicted using principal component regression (PCR) and validated using leverage validation method. Prediction models for N, P and K were developed using raw original spectra and de-trending spectra data.

Prediction model performance
Prediction performances were quantified and judged for their accuracies and robustness using several statistical indicators: coefficient of determination (R 2 ), correlation coefficient (r), root mean square error (RMSE) and the residual predictive deviation (RPD) index defined as the ratio between the standard deviation (SD) of the actual reference measurements and the RMSE. The higher the RPD, the greater and robust the model to predict macro nutrients on soil sample. It is obvious that the good model should have high R 2 and r coefficient, low value of RMSE and few number latent variables of PCR [35]- [37].

Typical spectra of soil sample
Typical diffuse reflectance spectra for soil samples was presented in Figure 1. it shows several peaks represent the vibration of molecular bonds of C-C, O-H, N-H, C-H-O and C-H. Original spectra data before correction were still interference due to noise resulted from light scattering. These noises were corrected using several pre-treatment methods were in this study, we employed de-trending enhancement method. The de-trending pre-treatment method tends to remove nonlinear trends in spectroscopic data and also reduce amplification due to light scattering and offset due to additive chemical effects. Spectra correction and enhancement clearly will enhance spectra appearance and remove some noises due to light scattering and interfering effects. Spectral data acquired from the near infrared instrument generally contain background information and noises which are interfered and affected desired relevant soil quality information such as macro nutrient contents (N, P and K). Interfering spectral parameters, such as light scattering, path length variations and random noise resulted from variable physical sample properties or instrumental effects need to be removed or minimized in order to obtain accurate, robust and stable calibration models. This also in agreement with several authors who noted that it is necessary to enhance and correct spectral data before further analysis [37]- [39].

Soil macro nutrients prediction
As mentioned previously, macro nutrient contents on soil samples were predicted using principal component regression (PCR) by regressing the near infrared spectra data (X-variables) and actual reference N, P, K data obtained using laboratory method (Y-variables). The prediction results for all three parameters were presented in Table 1. At first, we attempted to predict N, P and K using raw original spectra data. As shown in Table 1, the maximum correlation coefficient achieved was 0.85 for P and K predictions.
Moreover, using the raw original spectra data, the maximum RPD index was 2.45 for K prediction which categorized as good prediction performance, while for P and N prediction, the RPD index were 2.17 and 1.31, which were categorized as sufficient and coarse prediction performance respectively. The maximum latent variables (LVs) required to establish the model was 8 for P prediction model, while for N and K, maximum LVs required was 7. Prediction model performances were improved when the models were developed using de-trending spectra data. The correlation coefficients were significantly increased for all three parameters. The maximum correlation coefficient was 0.90 for P and K predictions, while for N prediction, the r coefficient was 0.86. Moreover, the RPD index was also improved when the models were established using DT spectrum. The highest RPD index was achieved for K prediction (3.03) which categorized as excellent prediction performance. Scatter plot derived between actual reference soil macro nutrients and predicted ones were presented in Figure 2 to 4. It is obvious that spectra enhancement significantly improved prediction accuracy and robustness for all those three soil macro nutrients.  . Scatter plot between reference and predicted K content of soil samples using DT spectra As shown in Figure 2 to 4, it is clear that NIRS can be used to predict N, P and K contents of soil samples. This method can be used to monitor soil condition and take further actions required to maintain soil quality. Spectra enhancement has a significant impact to prediction performances. It obviously improved prediction accuracy and robustness for all macro nutrient parameters of soil samples.

Conclusion
Based on achieved prediction results, it may conclude that near infrared spectroscopy (NIRS) can be applied in precision farming practises and employed as a rapid and environmental friendly method used to predict soil quality indices. Achieved present study shows that NIRS technology was feasible to be used to monitor and rapidly determine the N, P and K contents of soil samples with good prediction accuracy and robustness.