Real-time P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_2$$\end{document}O\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_5$$\end{document} quantification in industrial phosphoric acid using laser-induced breakdown spectroscopy: a paradigm shift in process analytical chemistry Authors: Mohammed EL KOHEN, Mohammed EL ASRI, Hafssa EL IDRISSI, Amine MOUNAAM, Hafid GRIGUER, Rafiq EL ALAMI Published: 2026 ABSTRACT Industrial chemical manufacturing relies heavily on process analytical technology for quality assurance and efficiency. However, many critical assays remain constrained by slow, off-line laboratory methods, creating significant latency in process control. Here we demonstrate that Laser-Induced Breakdown Spectroscopy (LIBS), a form of atomic emission spectroscopy, can overcome these limitations for direct in-line analysis of industrial liquids. Using LIBS as the measurement platform, we develop and validate a comprehensive chemometric framework for quantifying phosphorus pentoxide (P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_2$$\end{document}O\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_5$$\end{document}) equivalence in concentrated phosphoric acid, a key parameter in fertilizer and chemical production. The LIBS analysis requires less than ten seconds, representing a greater than 180 fold decrease in analysis time compared to classical ICP-OES analysis or chromatographic procedures. The core of this work lies in the systematic evaluation of data processing strategies: twelve regression algorithms spanning linear, regularized, ensemble, and non-linear paradigms were benchmarked across four preprocessing conditions (raw data, variable-selected, SNV-corrected, and SNV/Savitzky–Golay smoothed spectra), providing a rigorous and reproducible comparison of chemometric approaches for LIBS-based liquid analysis. A strategic variable selection strategy, targeting chemically significant emission wavelengths combined with variable importance in projection (VIP) analysis. Using a carefully designed experimental setup with laser characteristics that were customized (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lambda = 1064\,\textrm{nm}$$\end{document}, pulse energy around \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$25\,\textrm{mJ}$$\end{document}), the optimized partial least squares (PLS) regression model, built on SNV + Savitzky–Golay preprocessed spectra in the 200–900 nm range, achieves a cross-validated coefficient of determination \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2 = 0.96$$\end{document} and a root mean square error of prediction (RMSEP) of 1.81 % P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_2$$\end{document}O\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_5$$\end{document}. This methodology makes in situ, real-time feedback for closed-loop process controls possible, which can translate to dramatically increased product consistency, resource utilization, and sustainability in production. Beyond the specific application to phosphoric acid, this work establishes a transferable methodological template, integrating spectral preprocessing, data-driven feature selection, and systematic model benchmarking, that can be extended to various liquid process streams in chemical production. Introduction Laser-Induced Breakdown Spectroscopy (LIBS) has transitioned from a specialized laboratory technique to a versatile analytical tool with considerable industrial and scientific value1,2. The technique exploits optical emissions from laser-induced micro plasmas to determine elemental composition with minimal sample preparation. LIBS is now widely applied in planetary science3,4, cultural heritage diagnostics5, environmental monitoring6, and biomedical imaging7. Of particular relevance to the present work, advances in laser and spectrometer technologies have enabled the successful deployment of LIBS for real-time, in-line process control in metallurgy8, additive manufacturing9, alloy recycling10, and pharmaceutical production11,12, addressing the pressing industrial need for immediate, in-situ measurements to replace sluggish off-line analyses. Notwithstanding these advances in solid-phase applications, extending LIBS to liquid-phase analysis introduces distinct challenges. Direct ablation of bulk liquids is hampered by splashing, aerosol formation, and plasma quenching, which severely reduce sensitivity and reproducibility13. The flowing liquid jet configuration is particularly attractive for process analytics, as it provides a continuously renewed ablation surface, eliminates memory effects, and integrates readily into closed loop circuits14. Quantitative LIBS determination of phosphorus has been reported for solid matrices such as soils and mineral ores6; however, to the best of our knowledge, no study has yet addressed the direct quantification of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} in concentrated phosphoric acid. The combination of high acid strength, a corrosive matrix, and the inherent difficulties of liquid-phase plasma generation renders this a demanding, hitherto unexplored analytical scenario. The high dimensionality of broadband LIBS spectra has motivated the adoption of multivariate calibration, with Partial Least Squares (PLS) regression being the most established method15. Machine learning approaches, including Random Forest, Gradient Boosting, and neural networks, have also been tested. Preprocessing strategies such as Standard Normal Variate (SNV) and Savitzky–Golay smoothing are essential for removing non-informative variance, while Variable Importance in Projection (VIP) analysis enables principled feature selection16–18. Despite these individual advances, systematic comparisons of multiple algorithm families under controlled preprocessing conditions remain scarce and virtually absent for liquid-phase applications. In the industrial wet-process production of phosphoric acid, rigorous control of reactant concentrations is essential for optimizing yield and minimizing waste19. The acid concentration, expressed as % \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}, is the primary quality parameter. Conventional titration or ion chromatography requires manual sampling and 30 to 60 minutes of laboratory time, severely limiting real-time process correction. There exists a compelling need for analytical technology capable of delivering precise concentration data within seconds to enable dynamic, closed-loop control. The present study addresses these gaps by developing and validating a LIBS-based methodology for real-time \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} quantification in industrial phosphoric acid. A systematic benchmarking of regression algorithms across four progressively refined preprocessing conditions provides a comprehensive chemometric comparison for liquid LIBS calibration. Furthermore, a Variable Importance in Projection (VIP)-guided wavelength selection strategy is introduced, reducing the spectral feature space while improving model generalizability and spectroscopic interpretability. The optimized calibration model achieves prediction accuracy fully suitable for industrial process monitoring, with analysis times under ten seconds, representing a greater than 180-fold improvement over conventional ICP-OES procedures, and directly compatible with the requirements of real-time closed-loop process control. Materials and methods LIBS technology The interaction of high-intensity laser pulses with target materials has attracted significant attention in numerous fields of research and analysis13. When a high-powered laser pulse is focused onto a sample a small amount of material is evaporated, thereby triggering avalanche ionization of the constituent elements and leading to the formation of a microplasma. The use of lasers to vaporizing, dissociating, exciting, or ionizing species at material surfaces has shown great potential as a powerful analytical technique20,21.Given that only nanogram- to microgram-level quantities of material are ablated over femtosecond to nanosecond timescales (depending on the laser pulse duration), the entire process can be deemed minimally destructive22–24. The technique that exploits the spectroscopic analysis of optical emissions from these laser-induced plasmas to determine the composition of the target material is known as Laser-Induced Breakdown Spectroscopy (LIBS). LIBS is a rapid spectral detection methodology capable of analyzing substances in various states (solid, liquid, and gas)14,25–27. It offers several advantages, including non-destructive (or micro-destructive) measurement, synchronous detection of multiple elements, and rapid, real-time analysis. Consequently, LIBS has been applied extensively across diverse sectors, such as industry, environmental science, agriculture, and food quality control7,28–30. Owing to continuous technological advancements the number and range of LIBS applications for elemental analysis have expanded rapidly, and numerous studies have employed LIBS for the quantitative assessment of elemental content in various samples30–32.Within a LIBS experiment, a high-intensity pulsed laser beam is focused onto the surface of a sample, generating a plasma with temperatures on the order of 10,000 to 20,000 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textrm{K}$$\end{document} through a multi-stage breakdown process wherein the laser energy couples to the material. Typically, a tiny quantity of the substance is initially ablated and vaporized by both thermal and non-thermal mechanisms under a laser pulse energy density reaching tens of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textrm{GW}\,\textrm{cm}^{-2}$$\end{document}15,32–35. It subsequently undergoes dissociation in the high-temperature plasma, yielding free electrons along with weakly ionized molecular, atomic, and ionic species36–44. Since expanding plasma travels at supersonic velocities, it quickly cools down, allowing species recombination and de-excitation to happen, giving rise to discrete light emissions at specific wavelengths. This is due to the energy being released in the form of photons synchronous with electrons moving down to lower energy states45,46. Atoms therefore emit specific spectral signatures that are harvested using optical instruments. Emission peaks for individual elements have characteristic wave lengths such that several elements are detectable at a go from a single LIBS spectrum47–49. Because most elements possess multiple electron orbital transitions, a single LIBS emission intensity spectrum typically contains numerous peaks for each element, often yielding hundreds or even thousands of spectral lines for many materials. In fact, a broadband LIBS spectrum, covering the ultraviolet to near-infrared range (approximately 200\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textrm{nm}$$\end{document} to 900\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textrm{nm}$$\end{document}), records the full elemental composition of a sample. As the intensity of the emitted light for a given element is proportional to the concentration of the corresponding species in the plasma. Furthermore, LIBS offers high-volume chemical analysis, in situ and in real time, whether using bench-top systems in a conventional laboratory setting in the field50–60.LIBS data, however, are highly multivariate, encompassing several thousand to tens of thousands of variables per spectrum61. In addition to information on the elemental composition of samples, numerous other factors contribute to the overall spectral fingerprint such as molecular fragments in the plasma62, variations in laser coupling across different sample types, and other matrix effects inherent to LIBS spectra63. The extensive and intricate chemical information contained in each spectrum poses a substantial challenge in terms of rapid and effective data processing. Phosphoric acid A major part of phosphoric acid production (90%) is dedicated to chemical fertilizers64, the rest being used as raw materials to produce detergents, animal feed, additives in toothpastes, ingredients of non-alcoholic drinks like soda or cola and in the surface treatment of stainless metals65. The main industrial way generally applied to make phosphoric acid from this rock, known as the “wet process,”includes combining phosphate rock with sulfuric acid (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {H_2SO_4}$$\end{document}). Widely used in the fertilizer business, this method gives an acid of high concentration but may contain various unwanted elements (heavy metals, fluorides, etc.) that need to be reduced or removed based on the final application66. The phenomenon can be described by the following two-stage reaction:1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \mathrm {Ca_3(PO_4)_2 \cdot CaF_2 + 6H_3PO_4}&\rightarrow \mathrm {4Ca(H_2PO_4)_2 + 2HF} \end{aligned}$$\end{document}2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \mathrm {Ca(H_2PO_4)_2 + H_2SO_4 + nH_2O}&\rightarrow \mathrm {2H_3PO_4 + CaSO_4 \cdot nH_2O} \end{aligned}$$\end{document}where the gypsum product can be dihydrate (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n = 2$$\end{document}), hemihydrate (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n = 0.5$$\end{document}) or anhydrite (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n = 0$$\end{document}). Overall, worldwide production of phosphoric acid comes to several tens of millions of tons per year, showing its critical importance in the chemical industry and for food security. To ensure that the product meets these standards, makers and labs commonly employ reference methods such as ICP-OES, ICP-MS, titration, or absorption spectroscopy. These methods offer high sensitivity and selectivity, allowing exact measurement of crucial parameters such as the P2O5 content (a sign of acid concentration) or trace-level toxins. However, they often require physical sampling, preparation of the sample (e.g., dilution, hardening), and shipment to a faraway laboratory67, the time that elapses between sample collection and the release of data can thus extend to several hours or even days, reducing the capacity to act quickly to changes in the process. In an industrial setting increasingly directed toward digitalization and“Industry 4.0,”there is a growing need for live analysis systems capable of giving ongoing data or frequent updates. Although these systems may exhibit slightly lower precision or sensitivity compared to laboratory-based methods, their chief advantage is substantially increased responsiveness: any drift in concentration or rise in impurities can be detected within a matter of seconds or minutes, allowing near real-time adjustments to operational parameters (flow rate, temperature, pH, etc.). Such a method improves product quality, optimizes returns, and reduces energy consumption, all while combining into a larger strategy of process automation and control. Phosphoric acid, whose content and purity can vary due to the variety of raw materials or changing process conditions, is particularly well suited to constant tracking. This study is fully placed within the setting of online research of phosphoric acid. Our attention is especially to the measurement of phosphorus pentoxide (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}), the percentage of which serves as a key sign of acid strength. In an industrial setting, our goal is to assess the possibility of applying a fast, process-integrated analysis method capable of sending data in near real time. Sample preparation Industrial-grade phosphoric acid with a nominal concentration of 75% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {H_3PO_4}$$\end{document} by weight (equivalent to 54% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}) was obtained from a commercial supplier as the stock solution for this study. This commercial phosphoric acid contained typical industrial impurities, including trace metals (Fe, Al, Mg) and silicates, representative of industrial phosphoric acid streams used in fertiliser production. To generate the required concentration variations, an initial calibration series was prepared by systematically diluting the commercial 75% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {H_3PO_4}$$\end{document} stock solution with ultrapure deionized water with a resistance of 18.2 M\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Omega \cdot$$\end{document}cm to produce a set of calibration solutions. Nine primary calibration standards were prepared, covering a \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} concentration range of 1.0% to 54.0% w/w, establishing the fundamental analytical relationship across the full industrial range. To comprehensively evaluate the method’s performance under realistic industrial conditions, an extended sample set of 59 synthetic phosphoric acid samples was prepared from the commercial 75% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {H_3PO_4}$$\end{document} stock to simulate the two primary concentration regimes encountered in fertiliser production:High-concentration phosphoric acid samples (n=30): Concentrations ranging from 45% to 52% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}, representing the concentrated acid streams typically used for triple superphosphate (TSP) and diammonium phosphate (DAP) production.Medium-strength phosphoric acid preparations (n=29): Concentrations between 24% and 34% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}, modelling intermediate-strength acids used for monoammonium phosphate (MAP) production and other specialty fertiliser preparations. Distribution of concentration within each range was selected to comply with a uniform statistical distribution such that the industrially relevant parameter space was comprehensively spanned.Preparation of each sample entailed precise volumetric dilution of the commercial 75% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {H_3PO_4}$$\end{document} stock solution using calibrated micropipettes and Class A volumetric glassware. Standards and synthesised preparations were each prepared at \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$20 \pm 1~^\circ \textrm{C}$$\end{document} in controlled laboratory conditions. Samples were stored in sealed, acid-proof polypropylene flasks in a manner precluding evaporation and contamination. Preparations were taken to room (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$20 \pm 1~^\circ \textrm{C}$$\end{document}) temperature prior to LIBS measurement and gently mixed for homogeneity.The preparation procedure ensured traceability to the commercial standard and preserved sample integrity throughout the programme of analysis.As an independent reference, the 59 samples were analysed by inductively coupled plasma optical emission spectrometry (ICP-OES). Phosphorus determinations were converted to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} equivalents and taken as ground-truth for building and validating the LIBS calibration models. This approach follows established practice in LIBS workflows, where ICP-OES provides reliable reference concentrations prior to model construction68. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_2$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_5$$\end{document}Table 1Reference P and P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_2$$\end{document}O\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_5$$\end{document}concentrations determined by ICP-AOS for calibration samples.Sample[P] (%)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${[\textbf{P}_\textbf{2}O_\textbf{5}]}$$\end{document} (%)ECH F16-1211H3022.3251.15ECH F16-1213H22.1050.64ECH F16-1223H22.0850.60ECH F17-1219H21.8950.16ECH F17-1213H22.3951.30ECH F18-1203H21.9150.20ECH F18-1205H22.4751.48ECH F18-1213H22.3651.23ECH F18-1219H22.1750.79ECH F16-1215H22.6151.81ECH F16-1221H22.2350.94ECH F17-1203H22.1150.66ECH F17-1215H22.4951.54ECH F18-1207H22.0250.45ECH F18-1215H22.5051.55ECH F18-1223H22.1950.84ECH F19-1205H22.5951.77ECH F19-1207H22.1250.68ECH F19-1213H22.9652.60ECH F19-1215H22.5751.72ECH F19-1221H22.2951.08ECH F19-1223H21.8850.14ECH F20-1203H22.7252.05ECH F20-1207H22.4651.47ECH F20-1213H22.1650.78ECH F20-1215H22.5551.68ECH F20-1221H22.6751.95ECH F20-1223H21.8850.13ECH F17-1221H19.8545.49AP 0110.6224.33AP 0210.6924.50AP 0310.7224.57AP 0410.7624.65AP 0510.8924.95AP 0610.9425.07AP 0710.9725.14AP 0811.0825.38AP 0911.2325.74AP 1011.6026.57AP 1115.1034.61AP 1220.8247.70AP 1320.8547.77AP 1420.9648.02AP 1521.2548.70AP 1621.3148.83AP 1721.5749.43AP 1821.5949.47AP 1921.6149.52AP 2021.9350.25AP 2121.9750.34AP 2222.3051.10AP 2322.6251.82AP 2422.7152.03AP 2522.7952.23AP 4622.4851.50AP 4722.6551.91AP 4822.7252.06AP 4922.7252.07AP 5022.8952.44 High-concentration phosphoric acid samples (n=30): Concentrations ranging from 45% to 52% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}, representing the concentrated acid streams typically used for triple superphosphate (TSP) and diammonium phosphate (DAP) production. High-concentration phosphoric acid samples (n=30): Concentrations ranging from 45% to 52% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}, representing the concentrated acid streams typically used for triple superphosphate (TSP) and diammonium phosphate (DAP) production. Medium-strength phosphoric acid preparations (n=29): Concentrations between 24% and 34% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}, modelling intermediate-strength acids used for monoammonium phosphate (MAP) production and other specialty fertiliser preparations. Distribution of concentration within each range was selected to comply with a uniform statistical distribution such that the industrially relevant parameter space was comprehensively spanned. Medium-strength phosphoric acid preparations (n=29): Concentrations between 24% and 34% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}, modelling intermediate-strength acids used for monoammonium phosphate (MAP) production and other specialty fertiliser preparations. Distribution of concentration within each range was selected to comply with a uniform statistical distribution such that the industrially relevant parameter space was comprehensively spanned. Table 1Reference P and P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_2$$\end{document}O\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_5$$\end{document}concentrations determined by ICP-AOS for calibration samples.Sample[P] (%)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${[\textbf{P}_\textbf{2}O_\textbf{5}]}$$\end{document} (%)ECH F16-1211H3022.3251.15ECH F16-1213H22.1050.64ECH F16-1223H22.0850.60ECH F17-1219H21.8950.16ECH F17-1213H22.3951.30ECH F18-1203H21.9150.20ECH F18-1205H22.4751.48ECH F18-1213H22.3651.23ECH F18-1219H22.1750.79ECH F16-1215H22.6151.81ECH F16-1221H22.2350.94ECH F17-1203H22.1150.66ECH F17-1215H22.4951.54ECH F18-1207H22.0250.45ECH F18-1215H22.5051.55ECH F18-1223H22.1950.84ECH F19-1205H22.5951.77ECH F19-1207H22.1250.68ECH F19-1213H22.9652.60ECH F19-1215H22.5751.72ECH F19-1221H22.2951.08ECH F19-1223H21.8850.14ECH F20-1203H22.7252.05ECH F20-1207H22.4651.47ECH F20-1213H22.1650.78ECH F20-1215H22.5551.68ECH F20-1221H22.6751.95ECH F20-1223H21.8850.13ECH F17-1221H19.8545.49AP 0110.6224.33AP 0210.6924.50AP 0310.7224.57AP 0410.7624.65AP 0510.8924.95AP 0610.9425.07AP 0710.9725.14AP 0811.0825.38AP 0911.2325.74AP 1011.6026.57AP 1115.1034.61AP 1220.8247.70AP 1320.8547.77AP 1420.9648.02AP 1521.2548.70AP 1621.3148.83AP 1721.5749.43AP 1821.5949.47AP 1921.6149.52AP 2021.9350.25AP 2121.9750.34AP 2222.3051.10AP 2322.6251.82AP 2422.7152.03AP 2522.7952.23AP 4622.4851.50AP 4722.6551.91AP 4822.7252.06AP 4922.7252.07AP 5022.8952.44 Reference P and P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_2$$\end{document}O\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_5$$\end{document}concentrations determined by ICP-AOS for calibration samples. LIBS setup for liquid analysis Fig. 1Overview of the custom-built LIBS analytical system for liquid sample analysis. Overview of the custom-built LIBS analytical system for liquid sample analysis. The LIBS analysis was performed using a custom-built experimental setup (Figure 1a, b). A Q-switched Nd:YAG laser operating at its fundamental wavelength of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${1064}\,\textrm{nm}$$\end{document} was used as the ablation source. The laser delivered pulses of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${5}\,\textrm{ns}$$\end{document} duration with a pulse energy of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${25}\,\textrm{mJ}$$\end{document}, operating at a repetition rate of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${100}\,\textrm{Hz}$$\end{document}. The laser beam was focused onto the surface of the liquid sample using standard focusing optics that produced a spot of approximately \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${75}\,\mu \textrm{m}$$\end{document} in diameter on the target, with a Rayleigh range (depth of field) of approximately \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${5}\,\textrm{mm}$$\end{document}. The liquid was delivered as a vertical laminar jet formed by a PTFE (Teflon) nozzle of approximately \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${1}\,\textrm{cm}$$\end{document} diameter, integrated into a closed-loop pumping circuit operating at \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${2}\,\textrm{L.}\,\textrm{min}^{-1}$$\end{document} with an in-line agitator to ensure homogenization; the pulsed laser was focused perpendicular to the jet. At the maximum pulse energy, the resulting laser fluence at the jet was approximately \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$5.66\times 10^{2} \,\textrm{J}\,\textrm{cm}^{-2}$$\end{document}. Optical emission from the plasma was collected using achromatic collection lenses and coupled into a \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${400}\,\mu \textrm{m}$$\end{document} low-UV-absorption optical fiber. The collected light was relayed to a high-resolution echelle spectrograph coupled to an ICCD, providing broadband coverage from \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${200}\,\textrm{nm}$$\end{document} to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${900}\,\textrm{nm}$$\end{document}. All measurements were conducted in ambient air (1 atm, 20 ± 1 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$^\circ$$\end{document}C). To optimise the signal-to-background ratio for liquid analysis, the ICCD gate delay was set to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${0.8}\,\mu \textrm{s}$$\end{document} relative to the laser Q-switch trigger. The gate width was \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${5.0}\,\mu \textrm{s}$$\end{document}. These timing parameters were optimized by monitoring the signal-to-background ratio of the primary analytical emission lines targeted in this study: the phosphorus P I lines at 253.53 nm and 255.38 nm, and the calcium Ca II at 393.37 nm and 396.85 nm. The 0.8 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu$$\end{document}s delay allows the intense continuum background emission to decay sufficiently while retaining strong discrete atomic emission from these target species, and the 5.0 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu$$\end{document}s gate width integrates the maximum useful atomic emission before plasma cooling renders the signal negligible. Each sample was measured in six independent replicates (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n = 6$$\end{document}). For every replicate, a single spectrum (Fig. 2) was recorded as the sum of six consecutive laser shots on the continuously renewed liquid jet at the fixed focus. Replicates were acquired on fresh segments of the jet under identical timing conditions (gate delay \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${0.8}\,\mu \textrm{s}$$\end{document}; gate width \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${5.0}\,\mu \textrm{s}$$\end{document}) to average pulse-to-pulse variability and improve precision. The six replicate spectra were then averaged to yield the sample response used for calibration and validation (36 pulses per sample in total). This multi shot/multi replicate acquisition mitigates the stochastic fluctuations typical of LIBS plasmas and follows common practice in LIBS workflows.Fig. 2Representative LIBS spectrum showing the full spectral range from 200 to 900 nm. Representative LIBS spectrum showing the full spectral range from 200 to 900 nm. Results and discussion Data exploration and preliminary analysis Before applying any methods for reducing the dimensionality, an extensive investigation of the bivariate interconnections between the first spectral components was performed as a means of systematically determining and describing the structure that lies hidden in the dataset of spectral LIBS. This preliminary exploratory investigation offers a prime base upon which subsequent modeling approaches can be guided. The initial bivariate exploration (Fig. 3) identified a few intriguing structural properties that are extremely relevant for later methods of analysis:Population Stratification: A strong and unambiguous segregation between two populations was evident that was indicative of existing compositional or physical heterogeneities that appear as separate spectral signatures. The bimodal nature of the distribution indicates that the samples can be automatically divided into two classes based on their spectral properties that can be indicative of various regimes of acid strength or ranges of composition.Distribution Properties: The dataset had a regular bimodal distribution on several spectral variables, further supporting that the dataset contained two radically distinct types of samples. The regularity across the variables further supports that such separation is not an accident solely on the part of a particular spectral feature but instead reflects real chemical or physical distinctions that underlie samples.Linearity of Relationships: Linearized relationships between the spectral variables were such that responses in the spectrum varied in a proportional amount with changes in concentration. Linearity is especially favorable for quantitative modeling since it implies that the regression methods that are linear or nearly so will adequately describe relationships between spectral features and analyte concentrations.Fig. 3PCA pair plot showing relationships between the first four principal components, with samples colored according to P2O5 content (%). Population Stratification: A strong and unambiguous segregation between two populations was evident that was indicative of existing compositional or physical heterogeneities that appear as separate spectral signatures. The bimodal nature of the distribution indicates that the samples can be automatically divided into two classes based on their spectral properties that can be indicative of various regimes of acid strength or ranges of composition. Population Stratification: A strong and unambiguous segregation between two populations was evident that was indicative of existing compositional or physical heterogeneities that appear as separate spectral signatures. The bimodal nature of the distribution indicates that the samples can be automatically divided into two classes based on their spectral properties that can be indicative of various regimes of acid strength or ranges of composition. Distribution Properties: The dataset had a regular bimodal distribution on several spectral variables, further supporting that the dataset contained two radically distinct types of samples. The regularity across the variables further supports that such separation is not an accident solely on the part of a particular spectral feature but instead reflects real chemical or physical distinctions that underlie samples. Distribution Properties: The dataset had a regular bimodal distribution on several spectral variables, further supporting that the dataset contained two radically distinct types of samples. The regularity across the variables further supports that such separation is not an accident solely on the part of a particular spectral feature but instead reflects real chemical or physical distinctions that underlie samples. Linearity of Relationships: Linearized relationships between the spectral variables were such that responses in the spectrum varied in a proportional amount with changes in concentration. Linearity is especially favorable for quantitative modeling since it implies that the regression methods that are linear or nearly so will adequately describe relationships between spectral features and analyte concentrations. Linearity of Relationships: Linearized relationships between the spectral variables were such that responses in the spectrum varied in a proportional amount with changes in concentration. Linearity is especially favorable for quantitative modeling since it implies that the regression methods that are linear or nearly so will adequately describe relationships between spectral features and analyte concentrations. PCA pair plot showing relationships between the first four principal components, with samples colored according to P2O5 content (%). Principal component analysis: variance structure and sample discrimination Principal Component Analysis was systematically used to explore and describe the internal structure in the high-dimensional set of spectral data. The primary objective here was to critically assess if the LIBS spectra contain sufficient discriminatory variance to resolve between strong and weak phosphoric acids prior to applying supervised modeling methods. This evaluation is important as it will establish if the spectroscopic differences are significant enough to permit quantitative prediction with confidence. The full-spectrum standardized LIBS spectral datasets were then passed for PCA transformation in order that they could be condensed to four principal components for preliminary visualization and exploration. It can be found that the three-dimensional representation of the first three principal components (PC1, PC2, and PC3) captures much of the variance structure as well as clustering patterns in the samples. These three components together explain approximately 77.06% of total spectral variance with a large amount of the variance being found almost entirely in the first principal component (Fig. 4).Fig. 43D PCA plot of the first three principal components, with samples colored according to P2O5 content (%). 3D PCA plot of the first three principal components, with samples colored according to P2O5 content (%). Variance Distribution Analysis: The variance decomposition highlights a strongly asymmetric variance structure where PC1 predominates by explaining 76.25% of the total variance. This large explanatory value means that a single latent variable summarizes most of the systematic variation in the spectral data, which almost surely reflects the major compositional gradient (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} concentration). To the contrary, contributions by PC2 and PC3 to the total variance are negligible (0.43%, respectively 0.38%), which implies that these components might reflect subtle secondary compositional nuances, instrument noise, or minor matrix effects.Concentration-Dependent Clustering: The PCA score plot in three dimensions clearly shows a concentration-dependent spatial arrangement of the samples such that the color gradient nicely reflects the correlation between the position of samples in the PC space and respective \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} concentrations. Samples containing lower \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} (about 25%, in purple) clearly occupy specific areas of the principal component space than do samples containing higher \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} (about 50%, in yellow). This regular spatial arrangement visually affirms that spectral changes are controlled almost entirely by changes in phosphate concentration rather than by vagaries of measurement error.The intense demarcation across PC1, coupled with the concentration-dependent color gradient further offers strong evidence that the LIBS spectral signatures harbor robust and measurable information amenable for deriving predictive calibration models. Visualization was performed with the Python scientific computing platform where PCA was executed with the scikit-learn library as well as matplotlib library where graphical representation was concerned. Variance Distribution Analysis: The variance decomposition highlights a strongly asymmetric variance structure where PC1 predominates by explaining 76.25% of the total variance. This large explanatory value means that a single latent variable summarizes most of the systematic variation in the spectral data, which almost surely reflects the major compositional gradient (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} concentration). To the contrary, contributions by PC2 and PC3 to the total variance are negligible (0.43%, respectively 0.38%), which implies that these components might reflect subtle secondary compositional nuances, instrument noise, or minor matrix effects. Variance Distribution Analysis: The variance decomposition highlights a strongly asymmetric variance structure where PC1 predominates by explaining 76.25% of the total variance. This large explanatory value means that a single latent variable summarizes most of the systematic variation in the spectral data, which almost surely reflects the major compositional gradient (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} concentration). To the contrary, contributions by PC2 and PC3 to the total variance are negligible (0.43%, respectively 0.38%), which implies that these components might reflect subtle secondary compositional nuances, instrument noise, or minor matrix effects. Concentration-Dependent Clustering: The PCA score plot in three dimensions clearly shows a concentration-dependent spatial arrangement of the samples such that the color gradient nicely reflects the correlation between the position of samples in the PC space and respective \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} concentrations. Samples containing lower \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} (about 25%, in purple) clearly occupy specific areas of the principal component space than do samples containing higher \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} (about 50%, in yellow). This regular spatial arrangement visually affirms that spectral changes are controlled almost entirely by changes in phosphate concentration rather than by vagaries of measurement error. Concentration-Dependent Clustering: The PCA score plot in three dimensions clearly shows a concentration-dependent spatial arrangement of the samples such that the color gradient nicely reflects the correlation between the position of samples in the PC space and respective \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} concentrations. Samples containing lower \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} (about 25%, in purple) clearly occupy specific areas of the principal component space than do samples containing higher \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} (about 50%, in yellow). This regular spatial arrangement visually affirms that spectral changes are controlled almost entirely by changes in phosphate concentration rather than by vagaries of measurement error. Data preprocessing: spectral correction and enhancement The raw LIBS spectra, as much as they contain a wealth of information, necessarily harbor numerous sources of systematics and noise variations that do not relate to the chemical composition under investigation. These sources of confounding can strongly undermine quantitative calibration models’ performance if not corrected for. Thus, raw spectral datasets underwent a specially conceived series of preprocessing that was intended to correct instrumental variations, remove physical interference effects, improve the signal-to-noise ratio, yet maintain the inherent chemical information. Standard Normal Variate (SNV) Standard Normal Variate (SNV) normalization was applied to each spectrum individually to remove multiplicative intensity variations. These variations refer to systematic, whole-spectrum proportional scaling effects where the entire spectrum is multiplied by a sample or shot-dependent factor devoid of chemical information. In the LIBS analysis of dynamic liquid jets, these multiplicative effects arise primarily from: (1) pulse-to-pulse fluctuations in the ablated mass and laser-liquid coupling efficiency caused by the dynamic surface hydrodynamics of the fluid jet; (2) variations in plasma temperature and electron density; and (3) changes in optical collection efficiency due to slight geometric shifts of the plasma position relative to the collection optics. By standardizing each spectrum to a zero mean and unit variance, SNV effectively eliminates these inter-sample intensity differences while preserving the underlying relative emission line patterns that encode the critical compositional information16. For a set of n spectra organized in a matrix \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{X}$$\end{document} of dimension \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n \times p$$\end{document}, the SNV transformation is applied row by row69:1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \textbf{X}_{\text {SNV}}(j,:) = \frac{\textbf{X}(j,:) - \bar{x}_j \textbf{1}_p^T}{s_j} \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$j = 1, \ldots , n$$\end{document} indexes the spectra, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{1}_p$$\end{document} is a vector of ones of dimension p, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\bar{x}_j$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$s_j$$\end{document} are respectively the mean and standard deviation of the j-th spectrum. After SNV transformation, each spectrum has the following properties:Zero mean: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\displaystyle \frac{1}{p}\sum _{i=1}^{p} x_{\text {SNV},i} = 0$$\end{document}Unit standard deviation: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\displaystyle \sqrt{\frac{1}{p}\sum _{i=1}^{p}x_{\text {SNV},i}^2} = 1$$\end{document}This spectrum wise approach ensures that each sample is normalized based on its own intensity distribution, making SNV particularly robust for datasets with high compositional heterogeneity or varying matrix effects. Unlike methods that rely on a common reference spectrum. SNV avoids sensitivity to outliers or extreme samples in the dataset, as the normalization parameters (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu _i, \sigma _i$$\end{document}) are computed solely from each individual spectrum. This independent normalization is especially critical for our phosphoric acid dataset, which consists of a mixture of strong and weak acids forming two distinct groups in Principal Component Analysis (PCA); SNV ensures that inter-group comparability is maintained, and intra-group variability is preserved16.Fig. 5Raw spectra at 393.38 nm (±3 nm) showing baseline variations and intensity differences.Fig. 6SNV-normalized spectra at 393.38 nm (±3 nm) with reduced variability and improved spectral alignment. Zero mean: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\displaystyle \frac{1}{p}\sum _{i=1}^{p} x_{\text {SNV},i} = 0$$\end{document} Zero mean: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\displaystyle \frac{1}{p}\sum _{i=1}^{p} x_{\text {SNV},i} = 0$$\end{document} Unit standard deviation: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\displaystyle \sqrt{\frac{1}{p}\sum _{i=1}^{p}x_{\text {SNV},i}^2} = 1$$\end{document} Unit standard deviation: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\displaystyle \sqrt{\frac{1}{p}\sum _{i=1}^{p}x_{\text {SNV},i}^2} = 1$$\end{document} Raw spectra at 393.38 nm (±3 nm) showing baseline variations and intensity differences. SNV-normalized spectra at 393.38 nm (±3 nm) with reduced variability and improved spectral alignment. Figures 5, 6 illustrate the effect of SNV normalization on the Phosphoric acid LIBS dataset at the calcium emission line region 393.38 (± 3 nm). The intensity range is dramatically reduced from [−127.83, 211 573.70] a.u. (before SNV) to [−0.926, 21.539] a.u. (after SNV). The cross-sample standard deviation at 393.38 nm decreases from 8582.44 to 1.40. This demonstrates that the vast majority of intensity variance in the raw data was due to multiplicative scatter effects rather than genuine chemical information. Moreover, the spectral shapes and relative peak patterns are preserved, as evidenced by the consistent peak structure at 393.38 nm and neighboring emission lines. SNV successfully removes the non-informative variance while retaining the spectral features necessary for quantitative analysis and discrimination between strong and weak acid groups. Savitzky-Golay smoothing The Savitzky-Golay smoothing was then applied as an auxiliary preprocessing after SNV normalization for further enhanced spectral quality by selectively diminishing high-frequency noise without sacrificing the significant peak shapes carrying chemical information. Unlike simple moving average filters that tend to increase broadening of peak shapes and reduce peak heights with attendant loss of chemical information, the Savitzky-Golay filter uses local polynomial fitting to maintain spectral fidelity while effectively reducing noise. This filter operates by applying a pre-specified-degree polynomial to successive contiguous data points (defined by a moving window) by least-squares regression, then replacing the central point by the regressed value of the polynomial in that spot. This digital filter procedure achieves noise reduction by virtue of local regression by polynomials while concurrently preserving the geometrical attributes of spectral features like positions, heights, widths, as well as shapes of peaks17. In this investigation, a Savitzky-Golay filter with an 11-point window and first-order polynomial was applied using the savgol filter function from the SciPy library in a Python/Jupyter Notebook computing environment. These parameters were optimized through comparative testing of multiple window sizes and polynomial orders against model performance metrics:Window Size (11 points): We set the window width such that it is large enough to effectively average over multiple spectral points for noise reduction, yet small enough to preserve sharp spectral features characteristic of LIBS emission lines. An 11-point window with a spectral resolution of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${0.01}\,\textrm{nm}$$\end{document} per point corresponds to approximately \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${0.11}\,\textrm{nm}$$\end{document} in the spectral domain, suitable for the typical width of atomic emission lines in LIBS spectra, which typically range from \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${0.1}\,\textrm{nm}$$\end{document} to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${1}\,\textrm{nm}$$\end{document}.Polynomial Order (1): First-order linear polynomial fitting was chosen to preserve peak shapes and intensities that are crucial for quantitative analysis. Higher orders may cause edge artifacts in the presence of sharp peaks or undesirable oscillations, while first-order polynomial fitting offers a robust performance for maintaining peak characteristics.This set of parameters suppresses stochastic measuring noise and enhances the signal/noise ratio without sacrificing the spectral characteristics that hold quantitative chemical information required for prediction of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}.Fig. 7Preprocessed spectra after SNV normalization and SG smoothing. Window Size (11 points): We set the window width such that it is large enough to effectively average over multiple spectral points for noise reduction, yet small enough to preserve sharp spectral features characteristic of LIBS emission lines. An 11-point window with a spectral resolution of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${0.01}\,\textrm{nm}$$\end{document} per point corresponds to approximately \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${0.11}\,\textrm{nm}$$\end{document} in the spectral domain, suitable for the typical width of atomic emission lines in LIBS spectra, which typically range from \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${0.1}\,\textrm{nm}$$\end{document} to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${1}\,\textrm{nm}$$\end{document}. Window Size (11 points): We set the window width such that it is large enough to effectively average over multiple spectral points for noise reduction, yet small enough to preserve sharp spectral features characteristic of LIBS emission lines. An 11-point window with a spectral resolution of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${0.01}\,\textrm{nm}$$\end{document} per point corresponds to approximately \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${0.11}\,\textrm{nm}$$\end{document} in the spectral domain, suitable for the typical width of atomic emission lines in LIBS spectra, which typically range from \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${0.1}\,\textrm{nm}$$\end{document} to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${1}\,\textrm{nm}$$\end{document}. Polynomial Order (1): First-order linear polynomial fitting was chosen to preserve peak shapes and intensities that are crucial for quantitative analysis. Higher orders may cause edge artifacts in the presence of sharp peaks or undesirable oscillations, while first-order polynomial fitting offers a robust performance for maintaining peak characteristics. Polynomial Order (1): First-order linear polynomial fitting was chosen to preserve peak shapes and intensities that are crucial for quantitative analysis. Higher orders may cause edge artifacts in the presence of sharp peaks or undesirable oscillations, while first-order polynomial fitting offers a robust performance for maintaining peak characteristics. Preprocessed spectra after SNV normalization and SG smoothing. Compared to the spectrum after SNV alone (Fig. 6), complete preprocessing (Fig. 7) significantly reduces spectral noise, as evidenced by the decrease in standard deviation (from 1.401 to 1.329). The main peak at 393.38 nm now has a sharper and better-defined profile, while the side bands at 394 nm and 396 nm are more clearly discernible. Savitzky-Golay smoothing effectively preserves important spectral features while attenuating random fluctuations, improving the overall data quality for further analysis. Model development and variable selection strategy Instead of utilizing the full spectral range (comprising thousands of points in terms of wavelengths), a strategic variable selection method was adopted where only the analytically most important wavelengths were identified and kept. The selective method has some merits over the full range approach: (1) Simplification of the model structure and computational burden, (2) Removal of uninformative spectral areas that contribute mostly towards to noise, (3) Increase in model interpretability by selecting chemically significant emission lines that will give more focus on chemically interpretable models, (4) Enhancement in model generalizability by diminishing the overfitting chance towards spurious spectral features. Eleven particular wavelengths were selected on dual criteria: their inherent analytical significance for phosphate calibration in spectra by LIBS (on the basis of their atom physics as well as typical characteristics of emission lines) as well as their demonstrated superior performance for preliminary calibration models. These chosen wavelengths may then be classified accordingly based on the respective atomic transitions they belong to:Fig. 8NIST reference spectra for Phosphorus - 255.38, 253.53, and 214.92 nm.Fig. 9NIST reference spectra for Phosphorus - 516.22 nm.Fig. 10NIST reference spectra for Calcium - 315.9, 317.95, 393.38, 396.83, 430.24, and 372.0 nm.Fig. 11NIST reference spectra for Potassium. NIST reference spectra for Phosphorus - 255.38, 253.53, and 214.92 nm. NIST reference spectra for Phosphorus - 516.22 nm. NIST reference spectra for Calcium - 315.9, 317.95, 393.38, 396.83, 430.24, and 372.0 nm. NIST reference spectra for Potassium. Phosphorus Emission Lines - 255.38, 253.53, 214.92, and 516.22 nm (Figs. 8 and 9): These emissions correspond to characteristic atomic emission transitions for phosphorus. The emissions at 253.53 nm and 255.38 nm correspond to neutral phosphorus (P I) transitions and exhibit by far the greatest sensitivity for phosphorus detection. The transition for 214.92 nm corresponds to a very energetic transition; however, 516.22 nm provides complementary information corresponding to a completely different spectral region. These phosphorus-specific emissions provide direct analytical signals that correspond to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} content70.Calcium Emission Lines - 315.9, 317.95, 393.38, 396.83, 430.24, and 372.0 nm (Fig. 10): These feature characteristic atomic emission transitions of calcium (Ca I and Ca II). Although calcium itself is not the analyte of primary interest, its level in phosphoric acid samples has very strong correlation with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} content. This correlation exists by virtue of the geological production of phosphoric acid as a product manufactured from natural phosphate rock (mainly fluorapatite, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {Ca_5(PO_4)_3F)}$$\end{document}. The stoichiometric ratio between calcium and phosphate in the parent material ensures predictable co-variation between these elements in the product acid so that the addition of calcium lines forms an indirect yet highly informative set of signals predictive for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} by taking full advantage of the natural geochemical association between these elements70.Potassium Emission Lines - 766.5 nm (Fig. 11): This is the dominant potassium (K I) resonance line assignable at 766.5 nm (potassium D-line). Similar to calcium, the concentration of potassium might be tied with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} content by the existence of potassium-bearing phosphate rocks’ minerals. Inclusion of this line will provide additional matrix-related information that has the potential of giving better prediction accuracy70.These specific wavelengths were then further justified by iterative model optimization, where their use demonstrated superior predictive capability compared to other options of wavelengths. To compensate for potential instrumental drift, uncertainty in wavelength calibration, as well as the finite widths of atomic emission profiles, a \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\pm 3$$\end{document} nm spectral window was employed around each optimized wavelength. By this type of windowing, the complete profile of the emission peak, with the peak summit and adjacent baseline areas, will always be covered, thereby permitting safe spectral integration despite small changes in wavelength. To compensate for shot-to-shot measurement variability typical of the LIBS analysis and achieve representative spectral signatures for every sample, six replicate spectral measures were taken per sample and then averaged as mentioned before. It then necessarily follows that these replicates averaging process significantly decreases random uncertainty in measurement, increases the signal to noise ratio, as well as increases the accuracy in measurement by taking advantage of the fact that variance decreases by an amount proportional to the square root of the number of replicates when averaging. After preprocessing and replicating averaging, the entire dataset was split randomly into training (80% of samples) and test (20% of samples) subsets with a fixed random seed for the purpose of reproducing results. This approach to splitting the data adheres to common machine learning best practices for validating models. The training set was used solely for developing models, optimizing hyperparameters, and making variable selection choices, but the test set was held strictly aside for independent validation of models. This prevents model performance statistics calculated on the test set from being biased estimates of the model’s performance on novel data during a prediction task that is so vital for determining the real world usefulness of the calibration models built. Phosphorus Emission Lines - 255.38, 253.53, 214.92, and 516.22 nm (Figs. 8 and 9): These emissions correspond to characteristic atomic emission transitions for phosphorus. The emissions at 253.53 nm and 255.38 nm correspond to neutral phosphorus (P I) transitions and exhibit by far the greatest sensitivity for phosphorus detection. The transition for 214.92 nm corresponds to a very energetic transition; however, 516.22 nm provides complementary information corresponding to a completely different spectral region. These phosphorus-specific emissions provide direct analytical signals that correspond to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} content70. Phosphorus Emission Lines - 255.38, 253.53, 214.92, and 516.22 nm (Figs. 8 and 9): These emissions correspond to characteristic atomic emission transitions for phosphorus. The emissions at 253.53 nm and 255.38 nm correspond to neutral phosphorus (P I) transitions and exhibit by far the greatest sensitivity for phosphorus detection. The transition for 214.92 nm corresponds to a very energetic transition; however, 516.22 nm provides complementary information corresponding to a completely different spectral region. These phosphorus-specific emissions provide direct analytical signals that correspond to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} content70. Calcium Emission Lines - 315.9, 317.95, 393.38, 396.83, 430.24, and 372.0 nm (Fig. 10): These feature characteristic atomic emission transitions of calcium (Ca I and Ca II). Although calcium itself is not the analyte of primary interest, its level in phosphoric acid samples has very strong correlation with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} content. This correlation exists by virtue of the geological production of phosphoric acid as a product manufactured from natural phosphate rock (mainly fluorapatite, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {Ca_5(PO_4)_3F)}$$\end{document}. The stoichiometric ratio between calcium and phosphate in the parent material ensures predictable co-variation between these elements in the product acid so that the addition of calcium lines forms an indirect yet highly informative set of signals predictive for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} by taking full advantage of the natural geochemical association between these elements70. Calcium Emission Lines - 315.9, 317.95, 393.38, 396.83, 430.24, and 372.0 nm (Fig. 10): These feature characteristic atomic emission transitions of calcium (Ca I and Ca II). Although calcium itself is not the analyte of primary interest, its level in phosphoric acid samples has very strong correlation with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} content. This correlation exists by virtue of the geological production of phosphoric acid as a product manufactured from natural phosphate rock (mainly fluorapatite, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {Ca_5(PO_4)_3F)}$$\end{document}. The stoichiometric ratio between calcium and phosphate in the parent material ensures predictable co-variation between these elements in the product acid so that the addition of calcium lines forms an indirect yet highly informative set of signals predictive for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} by taking full advantage of the natural geochemical association between these elements70. Potassium Emission Lines - 766.5 nm (Fig. 11): This is the dominant potassium (K I) resonance line assignable at 766.5 nm (potassium D-line). Similar to calcium, the concentration of potassium might be tied with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} content by the existence of potassium-bearing phosphate rocks’ minerals. Inclusion of this line will provide additional matrix-related information that has the potential of giving better prediction accuracy70. Potassium Emission Lines - 766.5 nm (Fig. 11): This is the dominant potassium (K I) resonance line assignable at 766.5 nm (potassium D-line). Similar to calcium, the concentration of potassium might be tied with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} content by the existence of potassium-bearing phosphate rocks’ minerals. Inclusion of this line will provide additional matrix-related information that has the potential of giving better prediction accuracy70. Comprehensive model evaluation across preprocessing conditions To investigate comprehensively the effect of the preprocessing methods as well as variable selection on predictive power systematically, twelve regression algorithms were deliberately selected in this study to represent the major families of supervised learning methods, ensuring a comprehensive and unbiased assessment of the chemometric landscape for LIBS-based calibration. Specifically, three regularized linear models (Ridge, Lasso, and ElasticNet) were included to probe the linearity of the spectral–concentration relationship under L2, L1, and combined L1/L2 penalty structures, respectively. PLS regression was included as the established reference method in spectroscopic chemometrics, designed to extract latent variables from collinear predictor sets. Five tree-based ensemble methods (Decision Tree, Random Forest, Extra Trees, Gradient Boosting, XGBoost, and LightGBM) were selected to evaluate whether non-linear relationships or complex feature interactions could improve predictive accuracy beyond what linear models achieve. Finally, two fundamentally different non-linear paradigms were included: Support Vector Regression (SVR), a kernel-based method, and K-Nearest Neighbors (KNN), an instance-based learner. This deliberate diversity of algorithmic paradigms follows recommended practice in chemometrics, where empirical comparison across model families is preferred over a priori selection of a single algorithm, as the optimal model complexity for a given dataset cannot be reliably predicted from theoretical considerations alone. The algorithms were tested under four separate preprocessing as well as variable selection scenarios such that the effect of each separate preprocessing step can be determined:Condition A - Original Data with All Variables: Initial baseline condition with raw spectra over the full range of wavelengths (thousands of variables). This condition corresponds to the“naive” condition where no feature selection or spectral correction has been applied.Condition B - Original Data for the Selected Variables: Original spectra of only the 11 well-selected wavelength ranges. It reveals the actual effect of variable selection without doing any transformations on the spectra.Condition C - SNV with Selected Variables: This means using SNV for specific wavelength ranges. It shows the advantages of scatter correction along with choosing certain variables.Condition D - SNV + Savitzky-Golay using Selected Wavelengths: It is an entire preprocessing procedure. It involves correcting scatters as well as smoothing for some selected wavelengths. It is the optimal kind of preprocessing technique.All models were thoroughly assessed by means of 10-fold cross-validation on the training set for internal consistency and robustness, then validated independently on the held-out test set for a measure of generalization performance. Model performance was measured predominantly in terms of coefficient of determination (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document}) on both cross-validation and test datasets, with root mean squared error (RMSE) and mean absolute error (MAE) being used as a complement to give alternative views on prediction accuracy.Table 2Comparative performance analysis of regression and machine learning models for P2O5 prediction.ModelRaw data (all vars)Raw data (selected vars)SNV (selected vars)SNV+SG (selected vars)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{TEST}$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{CV}$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{TEST}$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{CV}$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{TEST}$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{CV}$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{TEST}$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{CV}$$\end{document}Ridge Regression0.7850.4490.6760.3440.9740.9570.9690.950Lasso Regression0.6070.4900.8040.2980.8890.6320.8950.856ElasticNet0.2430.2410.7550.4040.7090.2330.9050.779PLS Regression0.7340.4860.8770.5810.9400.8810.9750.953Decision Tree0.0350.5050.0350.5130.6670.2750.2830.362Random Forest0.6280.4900.5850.6680.8940.7480.9050.843Extra Trees0.8150.4280.9260.6670.9870.8950.9610.938Gradient Boosting0.0650.5900.0330.6120.7770.7490.9500.871XGBoost0.1670.7570.0760.7190.5500.2850.9910.736LightGBM0.3660.1220.5830.3910.8250.5110.9200.749Support Vector Regression0.9600.5340.9410.6790.9630.9220.9770.940K-Nearest Neighbors0.8400.1560.9950.8650.9150.9270.9250.929SNV: Standard Normal Variate; SG: Savitzky–Golay smoothing; CV: Cross-validation. Condition A - Original Data with All Variables: Initial baseline condition with raw spectra over the full range of wavelengths (thousands of variables). This condition corresponds to the“naive” condition where no feature selection or spectral correction has been applied. Condition A - Original Data with All Variables: Initial baseline condition with raw spectra over the full range of wavelengths (thousands of variables). This condition corresponds to the“naive” condition where no feature selection or spectral correction has been applied. Condition B - Original Data for the Selected Variables: Original spectra of only the 11 well-selected wavelength ranges. It reveals the actual effect of variable selection without doing any transformations on the spectra. Condition B - Original Data for the Selected Variables: Original spectra of only the 11 well-selected wavelength ranges. It reveals the actual effect of variable selection without doing any transformations on the spectra. Condition C - SNV with Selected Variables: This means using SNV for specific wavelength ranges. It shows the advantages of scatter correction along with choosing certain variables. Condition C - SNV with Selected Variables: This means using SNV for specific wavelength ranges. It shows the advantages of scatter correction along with choosing certain variables. Condition D - SNV + Savitzky-Golay using Selected Wavelengths: It is an entire preprocessing procedure. It involves correcting scatters as well as smoothing for some selected wavelengths. It is the optimal kind of preprocessing technique. Condition D - SNV + Savitzky-Golay using Selected Wavelengths: It is an entire preprocessing procedure. It involves correcting scatters as well as smoothing for some selected wavelengths. It is the optimal kind of preprocessing technique. Table 2Comparative performance analysis of regression and machine learning models for P2O5 prediction.ModelRaw data (all vars)Raw data (selected vars)SNV (selected vars)SNV+SG (selected vars)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{TEST}$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{CV}$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{TEST}$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{CV}$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{TEST}$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{CV}$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{TEST}$$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{CV}$$\end{document}Ridge Regression0.7850.4490.6760.3440.9740.9570.9690.950Lasso Regression0.6070.4900.8040.2980.8890.6320.8950.856ElasticNet0.2430.2410.7550.4040.7090.2330.9050.779PLS Regression0.7340.4860.8770.5810.9400.8810.9750.953Decision Tree0.0350.5050.0350.5130.6670.2750.2830.362Random Forest0.6280.4900.5850.6680.8940.7480.9050.843Extra Trees0.8150.4280.9260.6670.9870.8950.9610.938Gradient Boosting0.0650.5900.0330.6120.7770.7490.9500.871XGBoost0.1670.7570.0760.7190.5500.2850.9910.736LightGBM0.3660.1220.5830.3910.8250.5110.9200.749Support Vector Regression0.9600.5340.9410.6790.9630.9220.9770.940K-Nearest Neighbors0.8400.1560.9950.8650.9150.9270.9250.929SNV: Standard Normal Variate; SG: Savitzky–Golay smoothing; CV: Cross-validation. Comparative performance analysis of regression and machine learning models for P2O5 prediction. SNV: Standard Normal Variate; SG: Savitzky–Golay smoothing; CV: Cross-validation. The combined model evaluation in table 2 reveals some significant insights on the inter-connections between the preprocessing approaches, feature selection, and selection of algorithms:Variable Selection Effect: In nearly every model category, strategic variable selection (move from Condition A to Condition B) greatly improved performance, including without spectral prescreening. This means that the selected 11 wavelengths preserve the strongest spectral features while ignoring uninformative regions that accumulate much noise and increase model complexity. The variable selection-caused improvement was largest for regularized linear models as well as for ensemble methods.Synergistic Effect of Preprocessing: SNV (Condition C) application produced drastic increases in model quality over raw spectra, particularly for models containing linearity as well as partial least squares models. Incorporation of Savitzky-Golay smoothing (Condition D) produced further small gains for the bulk of models. This stepwise improvement supports that each preprocessing corrects an independent source of spectral variability: SNV corrects scatter-induced multiplicative effects; smoothing reduces stochastic noise. Variable Selection Effect: In nearly every model category, strategic variable selection (move from Condition A to Condition B) greatly improved performance, including without spectral prescreening. This means that the selected 11 wavelengths preserve the strongest spectral features while ignoring uninformative regions that accumulate much noise and increase model complexity. The variable selection-caused improvement was largest for regularized linear models as well as for ensemble methods. Variable Selection Effect: In nearly every model category, strategic variable selection (move from Condition A to Condition B) greatly improved performance, including without spectral prescreening. This means that the selected 11 wavelengths preserve the strongest spectral features while ignoring uninformative regions that accumulate much noise and increase model complexity. The variable selection-caused improvement was largest for regularized linear models as well as for ensemble methods. Synergistic Effect of Preprocessing: SNV (Condition C) application produced drastic increases in model quality over raw spectra, particularly for models containing linearity as well as partial least squares models. Incorporation of Savitzky-Golay smoothing (Condition D) produced further small gains for the bulk of models. This stepwise improvement supports that each preprocessing corrects an independent source of spectral variability: SNV corrects scatter-induced multiplicative effects; smoothing reduces stochastic noise. Synergistic Effect of Preprocessing: SNV (Condition C) application produced drastic increases in model quality over raw spectra, particularly for models containing linearity as well as partial least squares models. Incorporation of Savitzky-Golay smoothing (Condition D) produced further small gains for the bulk of models. This stepwise improvement supports that each preprocessing corrects an independent source of spectral variability: SNV corrects scatter-induced multiplicative effects; smoothing reduces stochastic noise. Model specific performance patterns The results identify several top-performing models under optimal preprocessing conditions:Ridge Regression (Condition C: SNV with Selected Variables) demonstrated exceptional performance:Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.974Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.957Configuration: Ridge regression with regularization parameter \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\alpha = 1.0$$\end{document} The moderate strength of regularization optimizes the tradeoff between model complexity and predictive ability. Ridge regression penalizes large coefficients through L2 regularization which adds a proportional penalty to the square of the coefficients, and prevents overfitting while maintaining all selected variables in the model. The strong agreement between test and cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} values (within 0.017) indicates excellent model stability and generalizability.Partial Least Squares Regression (Condition D: SNV +SG with Selected Variables) achieved comparable performance:Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.975Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.953Configuration : 4 latent componentsExtra Trees (Condition C: SNV with Selected Variables) showed outstanding test performance:Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.987Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.895While achieving the highest test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document}, the larger gap between test and cross-validation performance (0.092) suggests some degree of overfitting, making this model potentially less reliable for practical deployment despite its impressive test set results.K-Nearest Neighbors (Condition B: Raw Data with Selected Variables) achieved remarkable results:Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.995Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.865This very high test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} yet much lower cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} (0.130 disparity) strongly inclines us towards overfitting on this particular test set examples. KNN models greatly suffer from memorizing neighborhood patterns during training as opposed to acquiring relationships that generalize.While \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} measures the proportion of variance explained by the model, it does not directly indicate real-world predictive performance. RMSE and MAE provide complementary information by quantifying prediction errors in the original concentration units (% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}), facilitating direct assessment against industrial requirements. Comparing the two best-performing linear models reveals their practical accuracy in table 3 and figure 12:Table 3Performance comparison of top 2 models with different preprocessing approaches.Approach\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} test\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} CVRMSE testRMSE CVMAE testMAE CVPLS (SNV + SG)0.9870.941.3562.11.0851.6Ridge (SNV)0.9820.941.6172.0091.2521.45 Ridge Regression (Condition C: SNV with Selected Variables) demonstrated exceptional performance:Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.974Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.957Configuration: Ridge regression with regularization parameter \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\alpha = 1.0$$\end{document} The moderate strength of regularization optimizes the tradeoff between model complexity and predictive ability. Ridge regression penalizes large coefficients through L2 regularization which adds a proportional penalty to the square of the coefficients, and prevents overfitting while maintaining all selected variables in the model. The strong agreement between test and cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} values (within 0.017) indicates excellent model stability and generalizability. Ridge Regression (Condition C: SNV with Selected Variables) demonstrated exceptional performance:Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.974Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.957Configuration: Ridge regression with regularization parameter \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\alpha = 1.0$$\end{document} The moderate strength of regularization optimizes the tradeoff between model complexity and predictive ability. Ridge regression penalizes large coefficients through L2 regularization which adds a proportional penalty to the square of the coefficients, and prevents overfitting while maintaining all selected variables in the model. The strong agreement between test and cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} values (within 0.017) indicates excellent model stability and generalizability. Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.974 Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.974 Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.957 Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.957 Configuration: Ridge regression with regularization parameter \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\alpha = 1.0$$\end{document} Configuration: Ridge regression with regularization parameter \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\alpha = 1.0$$\end{document} Partial Least Squares Regression (Condition D: SNV +SG with Selected Variables) achieved comparable performance:Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.975Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.953Configuration : 4 latent components Partial Least Squares Regression (Condition D: SNV +SG with Selected Variables) achieved comparable performance:Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.975Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.953Configuration : 4 latent components Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.975 Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.975 Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.953 Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.953 Configuration : 4 latent components Configuration : 4 latent components Extra Trees (Condition C: SNV with Selected Variables) showed outstanding test performance:Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.987Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.895While achieving the highest test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document}, the larger gap between test and cross-validation performance (0.092) suggests some degree of overfitting, making this model potentially less reliable for practical deployment despite its impressive test set results. Extra Trees (Condition C: SNV with Selected Variables) showed outstanding test performance:Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.987Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.895While achieving the highest test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document}, the larger gap between test and cross-validation performance (0.092) suggests some degree of overfitting, making this model potentially less reliable for practical deployment despite its impressive test set results. Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.987 Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.987 Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.895 Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.895 While achieving the highest test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document}, the larger gap between test and cross-validation performance (0.092) suggests some degree of overfitting, making this model potentially less reliable for practical deployment despite its impressive test set results. While achieving the highest test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document}, the larger gap between test and cross-validation performance (0.092) suggests some degree of overfitting, making this model potentially less reliable for practical deployment despite its impressive test set results. K-Nearest Neighbors (Condition B: Raw Data with Selected Variables) achieved remarkable results:Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.995Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.865This very high test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} yet much lower cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} (0.130 disparity) strongly inclines us towards overfitting on this particular test set examples. KNN models greatly suffer from memorizing neighborhood patterns during training as opposed to acquiring relationships that generalize. K-Nearest Neighbors (Condition B: Raw Data with Selected Variables) achieved remarkable results:Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.995Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.865This very high test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} yet much lower cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} (0.130 disparity) strongly inclines us towards overfitting on this particular test set examples. KNN models greatly suffer from memorizing neighborhood patterns during training as opposed to acquiring relationships that generalize. Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.995 Test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.995 Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.865 Cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.865 This very high test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} yet much lower cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} (0.130 disparity) strongly inclines us towards overfitting on this particular test set examples. KNN models greatly suffer from memorizing neighborhood patterns during training as opposed to acquiring relationships that generalize. This very high test \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} yet much lower cross-validation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} (0.130 disparity) strongly inclines us towards overfitting on this particular test set examples. KNN models greatly suffer from memorizing neighborhood patterns during training as opposed to acquiring relationships that generalize. Table 3Performance comparison of top 2 models with different preprocessing approaches.Approach\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} test\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} CVRMSE testRMSE CVMAE testMAE CVPLS (SNV + SG)0.9870.941.3562.11.0851.6Ridge (SNV)0.9820.941.6172.0091.2521.45 Performance comparison of top 2 models with different preprocessing approaches. Fig. 12Model performance evaluation for phosphate quantification. Model performance evaluation for phosphate quantification. Both models show comparable prediction ability, with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document}CV being equal at 0.94. The practical prediction error amounts RMSE < 2.1% and MAE < 1.6% for cross-validation are quite small in consideration of the analytical complexity involved with the LIBS measurements as well as the concentration range that extends over 23–53% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}. These error amounts are presumably acceptable for industrial process monitoring application use cases where concentration trends as well as relative change are frequently more significant than absolute accuracy. The similar efficiency between Partial Least Squares (PLS) and Ridge regression reinforces the validity of the spectral-concentration correlation as well as the two preprocessing approaches. In contrast, PLS regression offers a unique advantage through its ability to generate Variable Importance in Projection (VIP) measures that provide quantitative judgments on the relevance of each wavelength towards the predictive model. This characteristic property of interpretability makes PLS highly useful in the understanding of the spectroscopic basis for the calibration as well as in the identification of the optimally crucial analytical signals. Variable importance in projection (VIP) analysis: identifying critical wavelengths In order to achieve further mechanistic understanding on the specific spectral features responsible for precise prediction of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} as well as for optimizing the model based on data-driven selection of features, Variable Importance in Projection (VIP) was calculated on the PLS regression model. VIP values give a holistic quantitative estimate on the importance of each variable by considering the extent of magnitude in the PLS regression coefficients (due to strength in the relationship between each wavelength and concentration of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}) as well as the extent of response variance (Y-variance) attributed by each PLS component. The variable importance in projection (VIP) score for the j-th variable is defined as:2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \textrm{VIP}_j = \sqrt{ p \cdot \frac{ \displaystyle \sum _{k=1}^{A} w_{jk}^{2}\, s_k }{ \displaystyle \sum _{k=1}^{A} s_k } } \end{aligned}$$\end{document}where p is the total number of predictor variables (e.g., wavelengths), A is the number of PLS components, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$w_{jk}$$\end{document} is the weight of variable j in component k, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$s_k = t_k^{2} q_k^{2}$$\end{document} denotes the contribution of component k, computed from the squared X-scores (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$t_k^2$$\end{document}) and squared Y-loadings (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$q_k^2$$\end{document}). The VIP measure for each variable reflects its total contribution towards all PLS latent components considering the amount of Y-variance explained by each component. Generally speaking, variables with a VIP value more than 1.0 can be regarded as being strongly important, while variables with a VIP value more than 0.5 can be regarded as moderately important and potentially retained. Variables with a VIP value below 0.5 contribute minimally towards the model and might be targeted for removal18. In this study, we set a conservative threshold of VIP > 0.5 (Fig. 13) in order to retain all moderately to highly significant wavelengths and reject truly non-informative spectral regions. This threshold actually balances the competing objectives of maximizing information richness versus model simplification.Fig. 13VIP score distribution for wavelength selection in PLS modeling. VIP score distribution for wavelength selection in PLS modeling. The VIP spectrum visualization reveals several critical insights (Fig. 14):Significant VIP Peaks in the Ultraviolet Region (214–253 nm): Maximum VIP values lie in the ultraviolet region corresponding to the typical phosphorus emission lines. The much higher VIP values of 253.53 nm and 255.38 nm (P I lines) establish that phosphorus direct signals contain the richest features for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} measurement according to known principles of spectroscopy.Significant VIP Values in the UV-Visible Range (300–400 nm): Higher VIP ranks in this region will be suggestive of emission lines due to calcium, particularly the significant Ca II doublet placed around 393–397 nm as well as Ca I lines around 315–318 nm. The fact that these calcium signatures prove so significant reflects the strength of employing the natural geochemical correlation between phosphate and calcium inherent in the source material.Selective Use of Features: The VIP spectrum reveals that the PLS model astutely highlights some areas of the spectrum but not others. This selective use equates to the model finding and taking advantage of just the most informative spectral features rather than attempting to glean something from the entire spectrum where much of it predominantly contains noise or duplicated information.Fig. 14VIP-guided feature selection for spectral modeling. Significant VIP Peaks in the Ultraviolet Region (214–253 nm): Maximum VIP values lie in the ultraviolet region corresponding to the typical phosphorus emission lines. The much higher VIP values of 253.53 nm and 255.38 nm (P I lines) establish that phosphorus direct signals contain the richest features for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} measurement according to known principles of spectroscopy. Significant VIP Peaks in the Ultraviolet Region (214–253 nm): Maximum VIP values lie in the ultraviolet region corresponding to the typical phosphorus emission lines. The much higher VIP values of 253.53 nm and 255.38 nm (P I lines) establish that phosphorus direct signals contain the richest features for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} measurement according to known principles of spectroscopy. Significant VIP Values in the UV-Visible Range (300–400 nm): Higher VIP ranks in this region will be suggestive of emission lines due to calcium, particularly the significant Ca II doublet placed around 393–397 nm as well as Ca I lines around 315–318 nm. The fact that these calcium signatures prove so significant reflects the strength of employing the natural geochemical correlation between phosphate and calcium inherent in the source material. Significant VIP Values in the UV-Visible Range (300–400 nm): Higher VIP ranks in this region will be suggestive of emission lines due to calcium, particularly the significant Ca II doublet placed around 393–397 nm as well as Ca I lines around 315–318 nm. The fact that these calcium signatures prove so significant reflects the strength of employing the natural geochemical correlation between phosphate and calcium inherent in the source material. Selective Use of Features: The VIP spectrum reveals that the PLS model astutely highlights some areas of the spectrum but not others. This selective use equates to the model finding and taking advantage of just the most informative spectral features rather than attempting to glean something from the entire spectrum where much of it predominantly contains noise or duplicated information. Selective Use of Features: The VIP spectrum reveals that the PLS model astutely highlights some areas of the spectrum but not others. This selective use equates to the model finding and taking advantage of just the most informative spectral features rather than attempting to glean something from the entire spectrum where much of it predominantly contains noise or duplicated information. VIP-guided feature selection for spectral modeling. To test whether VIP-guided feature reduction could yield additional improvement in model performance, an optimised version of the PLS model was built using only those wavelength regions for features where VIP values were above the 0.5 threshold.This VIP-filtered model was then compared against the original PLS model (using all 11 pre-selected wavelength regions) to evaluate the impact of data-driven feature refinement (table 4)Table 4Performance comparison of PLS models for P2O5 prediction.Approach\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{{test}}$$\end{document}RMSEtestMAEtest\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{\text {CV}}$$\end{document}RMSECVMAECVPLS (SNV + SG), 4711 wavelengths0.9871.3561.0850.9402.1001.600PLS (SNV + SG) + VIP, 3099 wavelengths0.9871.4111.1930.9601.8101.483SNV: Standard Normal Variate; SG: Savitzky–Golay smoothing; VIP: Variable Importance in Projection; CV: Cross-validation. Table 4Performance comparison of PLS models for P2O5 prediction.Approach\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{{test}}$$\end{document}RMSEtestMAEtest\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2_{\text {CV}}$$\end{document}RMSECVMAECVPLS (SNV + SG), 4711 wavelengths0.9871.3561.0850.9402.1001.600PLS (SNV + SG) + VIP, 3099 wavelengths0.9871.4111.1930.9601.8101.483SNV: Standard Normal Variate; SG: Savitzky–Golay smoothing; VIP: Variable Importance in Projection; CV: Cross-validation. Performance comparison of PLS models for P2O5 prediction. SNV: Standard Normal Variate; SG: Savitzky–Golay smoothing; VIP: Variable Importance in Projection; CV: Cross-validation. This comparison reveals a subtle yet useful difference in the models’ behavior under consideration. While both models achieve the same coefficient of determination on the test set (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document} = 0.987), meaning the same performance on the examples in the set, the VIP-filtered model significantly betters the others on cross-validation (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document}CV = 0.96 vs. 0.94) as well as possesses superior cross-validation error behavior (RMSECV = 1.81 compared to 2.1% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}). The VIP-optimally selected PLS model was thoroughly validated for its predictive ability (Fig. 15), systematic error, and potential limitations. The graphical presentation by predicted versus measured concentrations shows an excellent agreement between the model prediction and reference concentrations \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} across the entire calibration range (23–53% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}). Data points closely cluster around the theoretical 1:1 relationship line with negligible dispersion and no evident concentration ranges with systematic deviations. The residual plot (predicted - measured concentration vs. measured concentration) -Fig. 16- provides valuable diagnostic information on model properties of behavior:Random Distribution: The residuals scatter randomly around zero over the complete range of concentration levels without a consistent positive or negative skew over any level.Absence of Heteroscedasticity: Residual size remains relatively constant over the concentration range so that uncertainty in prediction is homogenous. No concentration-dependent error behavior (heteroscedasticity) exists that would appear as a residual size increasing or decreasing with concentration.No Systematic Patterns: Since no curved patterns, trends, or clustering exhibit on the residual data, this means that the linear PLS model sufficiently describes the spectral feature- \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} concentration relationship without severe unmodeled nonlinearities.Outlier Assessment: While a few samples exhibit slightly larger residuals (approximately ±3–4% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}), these remain within acceptable bounds and likely reflect genuine measurement challenges (e.g., matrix effects, surface inhomogeneity) rather than systematic model deficiencies.Fig. 15Parity plot.Fig. 16Residuals analysis for the VIP-selected PLS model. Random Distribution: The residuals scatter randomly around zero over the complete range of concentration levels without a consistent positive or negative skew over any level. Random Distribution: The residuals scatter randomly around zero over the complete range of concentration levels without a consistent positive or negative skew over any level. Absence of Heteroscedasticity: Residual size remains relatively constant over the concentration range so that uncertainty in prediction is homogenous. No concentration-dependent error behavior (heteroscedasticity) exists that would appear as a residual size increasing or decreasing with concentration. Absence of Heteroscedasticity: Residual size remains relatively constant over the concentration range so that uncertainty in prediction is homogenous. No concentration-dependent error behavior (heteroscedasticity) exists that would appear as a residual size increasing or decreasing with concentration. No Systematic Patterns: Since no curved patterns, trends, or clustering exhibit on the residual data, this means that the linear PLS model sufficiently describes the spectral feature- \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} concentration relationship without severe unmodeled nonlinearities. No Systematic Patterns: Since no curved patterns, trends, or clustering exhibit on the residual data, this means that the linear PLS model sufficiently describes the spectral feature- \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} concentration relationship without severe unmodeled nonlinearities. Outlier Assessment: While a few samples exhibit slightly larger residuals (approximately ±3–4% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}), these remain within acceptable bounds and likely reflect genuine measurement challenges (e.g., matrix effects, surface inhomogeneity) rather than systematic model deficiencies. Outlier Assessment: While a few samples exhibit slightly larger residuals (approximately ±3–4% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}), these remain within acceptable bounds and likely reflect genuine measurement challenges (e.g., matrix effects, surface inhomogeneity) rather than systematic model deficiencies. Parity plot. Residuals analysis for the VIP-selected PLS model. Practical considerations for industrial deployment and matrix effects While the current study establishes a strong calibration baseline with volumetrically diluted industrial stock solutions, the use of the LIBS analytical system in a real-world production setting will necessarily involve dynamic matrix effects associated with the wet process. It should be noted that the use of commercial industrial-grade phosphoric acid (75% H\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_3$$\end{document}PO\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_4$$\end{document}) as the stock solution ensures that the calibration matrix already contains a representative set of typical industrial impurities (Fe, Al, Mg, silicates), providing a first-order approximation of the real analytical matrix rather than a simplified synthetic system. In active industrial streams, fluctuations in acid viscosity, the presence of suspended solids such as calcium sulphate (gypsum), and varying concentrations of co-extracted impurities can significantly perturb laser–target coupling and plasma optical emission. Physical matrix variations typically manifest as multiplicative intensity fluctuations due to inconsistent ablated masses. Our methodological choice to apply Standard Normal Variate (SNV) normalization specifically counteracts these physical variations by standardizing the spectral intensity independent of the absolute ablated volume. Furthermore, chemical matrix effects, such as shifts in plasma temperature or electron density induced by varying concentrations of easily ionizable elements, are inherently mitigated by our Partial Least Squares approach. By utilizing a multivariate feature space that includes matrix-associated emission lines rather than relying solely on isolated phosphorus peaks, the PLS model captures and mathematically compensates for these complex matrix interferences. An additional consideration concerns the effect of temperature on measurement performance, all measurements in this study were conducted at controlled laboratory temperature (20 ± 1 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$^\circ$$\end{document}C), whereas industrial phosphoric acid streams typically operate at elevated temperatures (60–85 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$^\circ$$\end{document}C), such temperatures affect both the physical properties of the liquid (viscosity, surface tension, jet flow behavior) and the plasma characteristics (initial temperature of the ablated material, plasma expansion dynamics, electron density and excitation temperature), potentially altering laser–liquid coupling efficiency and emission line intensities. The laminar jet configuration employed here is well suited to accommodate these variations, since the continuously renewed liquid surface mitigates thermal accumulation effects and surface degradation. In conclusion, while the controlled conditions of this study do not perfectly simulate the characteristics of a true industrial process stream, the methodology employed in this investigation using industrial-grade acid and impurities, a liquid jet system, and a multivariate calibration approach provides a solid foundation for future work in validating this approach. The challenges outlined in the above sections are well known in the LIBS field and can be overcome by using engineering and chemometric techniques. The future work in this investigation will be focused on validating and adapting this approach to real process streams. Conclusion The central contribution of this work is a comprehensive chemometric framework encompassing systematic preprocessing optimization, data-driven feature selection, and rigorous model benchmarking, for the quantification of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document} in industrial phosphoric acid by LIBS spectroscopy. By evaluating twelve regression algorithms, spanning linear, regularized, tree-based ensemble, and non-linear paradigms, across four progressively refined preprocessing conditions, we provide a reproducible and unbiased assessment of the chemometric landscape for LIBS-based calibration in liquid matrices. The optimally operating calibration model based on PLS regression assisted by VIP-driven feature selection and full-spectrum spectral preprocessing (SNV + Savitzky-Golay) attains remarkable prediction capability (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document}CV = 0.96, RMSECV = 1.81% \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm {P_2O_5}$$\end{document}) that can be applied in industrial process monitoring procedures. The systematic comparison of preprocessing conditions demonstrates that scatter correction (SNV) and noise reduction (Savitzky–Golay) address independent sources of spectral variability, and their combination yields synergistic gains across nearly all model families tested. Importantly, the strategic selection of eleven emission wavelengths grounded in atomic physics reduced model complexity while preserving predictive performance, demonstrating that domain-informed feature engineering outperforms naive full-spectrum approaches for LIBS data. From a measurement perspective, the custom LIBS platform, employing a liquid jet sampling configuration with sub-ten-second analysis time, provides the rapid, in-situ analytical capability that, when coupled with the validated chemometric pipeline, enables real-time closed-loop process control. These results provide a transferable template applicable to other LIBS-based quantification challenges in liquid process streams across the chemical industries.