Abstract
Historical monitoring records provide a valuable baseline for assessing physicochemical variability in coastal lagoons. We analyzed 13 variables across five stations in Nuxco Lagoon, Mexico, over 13 sampling campaigns conducted between February 2016 and March 2017 (65 station–campaign profiles; no sampling in March 2016). Using generalized estimating equations (GEE), we modeled elapsed calendar time while incorporating a first-order autoregressive correlation structure and bias-adjusted covariance estimates to account for small-sample uncertainty. Seven group-by-time interactions associated with organic-load, solids, and nitrogen indicators met the false discovery rate (FDR) threshold (q < 0.05), whereas the dissolved oxygen (DO) interaction was not statistically significant (q = 0.119). Although the first three principal components explained 85.6% of the total variance, retention and resampling diagnostics warranted a cautious interpretation beyond the dominant gradient. Finally, a three-cluster solution revealed modest separation and limited stability. Three-cluster separation was modest and unstable under resampling. Logistic regression classified predefined station groups with balanced accuracy of 0.885 under leave-one-campaign-out validation. Fixed Elastic Net estimated DO with RMSE = 0.448 mg L−1 and R2 = 0.385; nested model selection yielded RMSE = 0.503 mg L−1 and R2 = 0.223. Six profiles were flagged by detector consensus, including four October–November profiles retained across detector settings. The results provide an exploratory historical baseline for comparable future monitoring. Their inferential and predictive scope is limited by the five-station design and the absence of independent validation.
1. Introduction
Inland waters and transitional aquatic ecosystems, including coastal lagoons, support biodiversity, provide ecosystem services, and contribute to regional and global biogeochemical cycling [1,2]. These systems are subject to pressures arising from urban expansion, effluent discharges, agricultural runoff, and land-use change [3,4]. Such disturbances can promote eutrophication and alter dissolved oxygen (DO) dynamics. Evaluating these changes calls for monitoring designs and analytical methods that explicitly account for spatial heterogeneity, temporal dependence, and correlations among water-quality variables [5].
Aquatic monitoring commonly yields longitudinal datasets in which fixed stations are sampled repeatedly. Measurements obtained from the same site may be correlated, making conventional independence assumptions potentially inappropriate and standard-error estimates unreliable, particularly when the number of independent sampling units is small [6,7]. Generalized estimating equations (GEE) provide a population-averaged modeling framework in which a working correlation structure, including first-order autoregressive correlation [AR(1)], can be specified for repeated observations within stations [8].
Unsupervised ordination and grouping techniques—including principal component analysis (PCA) [9], K-means [10], and hierarchical clustering assessed using silhouette diagnostics [11]—provide complementary descriptions of multivariate water-quality gradients and recurrent physicochemical profiles. Their utility in water-quality assessment has been demonstrated in related multivariate applications [12]. Such methods summarize correlated measurements and highlight patterns associated with mineralization, organic loading, nutrients, and oxygenation. Nevertheless, ordination and clustering characterize covariance and resemblance; they do not establish causation or independently validated regulatory water-quality classes.
Machine-learning methods can capture complex relationships among physicochemical measurements and support the estimation of ecologically relevant outcomes such as DO [13,14]. In small environmental datasets, however, apparent predictive skill can be inflated by overfitting and information leakage between observations within the same sampling period or site [15]. Grouped validation, including leave-one-period-out cross-validation, is therefore important, as is evaluating predictor relevance on genuinely held-out observations [16].
Multivariate anomaly detection can assist monitoring by highlighting unusual site–period combinations that warrant closer examination [17,18]. Statistical rarity, however, is not equivalent to pollution, source attribution, or non-compliance with water-quality regulations. Such flags should instead prompt review of field notes, hydrometeorological conditions, instrument calibration, and laboratory quality-assurance records [19].
Combining longitudinal inference with interpretable machine learning addresses distinct, complementary questions. GEE estimates marginal trends while accounting for repeated measurements; ordination, clustering, and predictive models describe multivariate gradients, similarities among profiles, and out-of-sample discrimination or regression performance. Within the present dataset, these findings are treated as exploratory rather than as causal or regulatory determinations.
This study characterizes temporal trajectories, major physicochemical gradients, site-group separability, DO estimation, and multivariate anomalies at five locations monitored over thirteen campaigns in Nuxco Lagoon, Mexico. The analytical workflow integrates GEE-AR(1), PCA, unsupervised grouping, classification, regularized regression, and permutation-based interpretation. Given the limited number of independent monitoring sites, conclusions are restricted to the observed system and period and require further external validation.
2. Materials and Methods
2.1. Study Area and Monitoring Design
Nuxco Lagoon is located in the Costa Grande region of Guerrero, Mexico. Five fixed stations (P1–P5; Figure 1 and Table 1) were sampled during thirteen campaigns between February 2016 and March 2017. No sampling was conducted in March 2016. Each campaign included all five stations, yielding 65 station–campaign profiles. The electronic dates identify sampling months; exact sampling days are not available in the integrated dataset. Accordingly, temporal analyses use elapsed calendar months, with February 2016 coded as month 0, April 2016 as month 2, and March 2017 as month 13.
Figure 1.
Location of Nuxco Lagoon and the five monitored stations.
Table 1.
Coordinates and predefined analytical groups of the five stations.
Samples were collected in the morning at a depth of 15–30 cm. Water temperature, pH, and DO were determined directly in the field. DO was measured by the Winkler method, following NMX-AA-012-SCFI-2001. These field determinations are distinct from the samples transported for laboratory analysis. Samples for laboratory measurements were collected in labeled 1 L plastic containers, stored at the reported transport temperature of 10 °C, and taken to ISTA S.A. de C.V. Laboratory procedures followed Standard Methods [20] and the analytical methods specified below. The BOD5 analytical procedure was initiated within 24 h of collection, following NMX-AA-028-SCFI-2001; the five-day incubation defines BOD5.
Nitrate and nitrite determinations followed NMX-AA-079-SCFI-2001 and NMX-AA-099-SCFI-2006, respectively. The laboratory-reported detection and quantification limits were 0.01 and 0.062 mg L−1 for nitrate, and 0.000974 and 0.01 mg L−1 for nitrite. TDS was determined instrumentally using a HACH Sension 156 multiparameter instrument (Hach Company, Loveland, CO, USA) calibrated with reference solutions traceable to the National Institute of Standards and Technology. Analytical blanks were reported below the respective detection limits. These details describe the available analytical documentation; the electronic dataset does not contain replicate measurements or sample-specific recovery results.
The dataset included 13 variables: temperature (°C), pH, electrical conductivity (EC; mS cm−1), total dissolved solids (TDS; mg L−1), salinity (PSU), DO (mg L−1), five-day biochemical oxygen demand (BOD5; mg L−1), chemical oxygen demand (COD; mg L−1), total suspended solids (TSS; mg L−1), settleable solids (SS; mL L−1), ammonia nitrogen (NH3–N; mg L−1), nitrite (mg L−1), and nitrate (mg L−1). Nitrogen-species labels and numerical units follow the source dataset; no conversion between concentrations expressed as nitrogen and concentrations expressed as the corresponding ion was imposed. The arithmetic mean of pH is used only as a descriptive summary of recorded readings, not as the pH of a mixture or a mean hydrogen-ion activity.
2.2. Data Integration and Preprocessing
The integrated dataset was reconciled against the source worksheets for all 845 physicochemical values. Checks covered sample identifiers, station–campaign combinations, missing values, recorded zeros, and agreement with the source measurements. Zone A comprised P1–P3 (39 profiles), and Zone B comprised P4–P5 (26 profiles). This predefined allocation was retained consistently across analyses. Its physical interpretation requires evidence separate from the measurements used for modeling.
EC, TDS, and salinity were retained for descriptive and longitudinal analyses. To avoid representing the mineralization gradient three times, PCA, clustering, and station-group classification used eleven variables, retaining EC and excluding TDS and salinity. DO prediction used the remaining ten variables after excluding DO from this eleven-variable set. No station identifier, campaign label, or group label was included as a predictor. For GEE only, BOD5, COD, TSS, SS, NH3–N, nitrite, and nitrate were transformed using log(1 + Y). Multivariate and predictive analyses used the recorded numerical values with the scaling described for each method.
The original data were retained for the primary analyses, including one recorded nitrite zero and two SS zeros. These values were not automatically reclassified as measurements below detection or quantification limits. Separate sensitivity analyses examined the exclusion of the nitrite-zero record and hypothetical substitution by half the reported nitrite detection or quantification limit. The latter scenarios assess numerical sensitivity and do not determine the analytical meaning of the recorded zero.
2.3. Longitudinal Modeling
For each response, we fitted a Gaussian GEE with an identity link, station as the clustering unit, and an AR(1) working correlation. The response was either the original measurement or log(1 + Y), as specified above. The marginal mean included group, elapsed calendar month, and their interaction:
g(μit) = β0 + β1Zi + β2t + β3(Zi × t)
Here, g is the identity link on the selected response scale, μit denotes the expected modeled response at station i and month t, and Zi equals 1 for Zone B and 0 for Zone A. The Zone A slope is β2, the Zone B slope is β2 + β3, and β3 is the between-group difference in slopes. The within-station working correlation was:
Corr(Yit,Yis) = ρ|t−s|, |ρ| < 1
Elapsed calendar months were used in both the mean model and the correlation distances. This preserves the two-month interval between February and April 2016. An observed-campaign-order formulation was fitted as a sensitivity analysis, rather than treating that interval as a single calendar month. Straight-line slopes summarize change within the observed interval; the model does not estimate recurring seasonal cycles.
Uncertainty was estimated using the bias-adjusted covariance estimator of Mancl and DeRouen [21]. Two-sided tests and 95% confidence intervals used a t reference distribution with G − 1 = 4 degrees of freedom, where G = 5 stations. This is an approximate small-sample analysis, not a guarantee of nominal coverage with five clusters. Benjamini–Hochberg adjustment was applied to the thirteen group-by-time interaction p-values within each model specification. We use q < 0.05 as the reporting threshold for this defined family; the adjustment does not cover every exploratory comparison in the study.
Interaction tests were also evaluated with 3 degrees of freedom. For within-group slopes, additional sensitivity calculations used 2 degrees of freedom for the three Zone A stations and 1 degree of freedom for the two Zone B stations. Full-data fits were compared with fits excluding the six consensus anomalies and with fits excluding the October and November 2016 campaigns. The exclusions assess sensitivity; flagged observations were not assumed to be errors. Standard errors from the explicit GEE implementation were checked against an independent fixed-correlation delete-cluster identity. Random-intercept mixed models were not used to support the reported inference because singular covariance estimates occurred in this five-station dataset.
2.4. Principal Component Analysis
PCA was applied to the eleven-variable matrix after centering each variable and scaling it to unit variance [9]. Scores, eigenvalues, and component coefficients were retained. The coefficients reported as loadings are unit-length eigenvector coefficients; they are distinct from variable–component correlations. Component signs are arbitrary and were oriented consistently for presentation. Pearson and Spearman correlation matrices were examined alongside the ordination, because angles in a two-dimensional projection need not reproduce correlations in the complete variable space.
X = TPT + E
Here, zij is the standardized value of variable j for profile i, is its centering mean, and sj is its scaling standard deviation. In the decomposition of the standardized matrix X, T contains component scores, P contains eigenvector coefficients, and E is the residual matrix for the retained representation.
Sampling adequacy was summarized using the Kaiser–Meyer–Olkin statistic. Bartlett’s test was calculated as a nominal correlation diagnostic, recognizing that its usual independent-observation reference is inappropriate for these repeated measurements. Component retention was examined by parallel analysis using 2000 independent Gaussian reference matrices of the same dimensions and their 95th-percentile eigenvalues. A supplementary reference used 1000 independent circular shifts in each variable’s campaign sequence while keeping its five stations together. This preserves some within-variable temporal structure but is only a sensitivity benchmark for thirteen irregularly spaced campaigns, not an exact null distribution.
PCA stability was evaluated with circular moving-block resampling of two or three successive observed campaigns, keeping all five stations within each resampled campaign. We generated 500 replicates per block length and assessed explained variance and sign-aligned component orientations. Resampling follows campaign order, so a block can span the two-month gap in early 2016. The first three components were retained for descriptive reporting; retention diagnostics determine how strongly each axis is interpreted.
2.5. Cluster Analysis
K-means with 50 initializations and Ward agglomerative clustering were applied to the standardized eleven-variable matrix [10,11]. Candidate partitions of two, three, and four clusters were compared by mean silhouette width. Agreement between methods was summarized using the adjusted Rand index (ARI). The three-cluster partition was retained as a descriptive representation of the full dataset, not as a validated set of ecological classes.
The K-means objective minimizes within-cluster squared Euclidean distances for standardized profiles xi. Cᵣ denotes cluster r and μᵣ its centroid; k was evaluated at two, three, and four.
Stability was assessed using 500 moving-block resamples of two observed campaigns for K-means, selecting the best silhouette among the same candidate cluster counts. Ward stability was evaluated using 500 resamples for each block length of two and three campaigns, comparing the resampled and original assignments on the distinct observations present in each resample. Agreement between algorithms on the original matrix and stability under resampling were evaluated separately.
2.6. Exploratory Classification of Station Groups
We compared L2 logistic regression, a linear support-vector machine (SVM) [22], and random forest [23] for distinguishing Zone A from Zone B. The original fixed configurations were retained: logistic regression with C = 1 and balanced class weights; linear SVM with C = 1, balanced class weights, and probability estimation; and random forest with 300 trees, maximum depth 3, minimum leaf size 3, and balanced class weights. Continuous predictors were standardized within training folds for the logistic and SVM models.
For the logistic model, Yi = 1 identifies Zone A, xi contains the training-standardized predictors, β0 is the intercept, and β contains the regression coefficients.
Primary validation left out one entire campaign at a time. Each of thirteen outer folds held out all five observations from one campaign, and performance was calculated from pooled out-of-fold predictions. This estimates discrimination in withheld campaigns at the monitored stations. Training includes campaigns both before and after a test campaign, so it is not forward forecasting. Balanced accuracy, ROC-AUC, confusion counts, Brier score, and log loss were reported; Zone A was the positive class. Probability calibration curves were treated descriptively given the small test sample.
A supplementary nested analysis selected logistic C from 0.01, 0.1, 1, 10, and 100 by minimizing log loss in four inner folds grouped by campaign. Outer test campaigns remained excluded from preprocessing and tuning. Leave-one-station-out validation was retained as a secondary within-lagoon transfer stress test. Because the classes are defined by station membership, neither validation scheme independently establishes hydrological zonation.
2.7. Dissolved Oxygen Prediction Methods
DO was estimated from the ten contemporaneous physicochemical predictors using Ridge regression, Elastic Net, support-vector regression (SVR), and random forest [24,25]. The fixed configurations were Ridge α = 1; Elastic Net α = 0.05 and L1 ratio = 0.5; radial-basis SVR with C = 10, ε = 0.1, and scale-based γ; and random forest with 300 trees, maximum depth 4, and minimum leaf size 3. Scaling for Ridge, Elastic Net, and SVR was fitted within each training fold. The evaluation used the same leave-one-campaign-out and secondary leave-one-station-out schemes described above.
In the Elastic Net objective, yi is DO and xi is the standardized predictor vector. The penalty strength λ corresponds to the software parameter alpha, while the mixing weight α corresponds to l1_ratio; the intercept β0 is not penalized. The fixed configuration therefore uses λ = 0.05 and α = 0.5.
Each model was compared with the mean DO value in its training fold, evaluated on the same test observations. We report mean absolute error (MAE), root mean squared error (RMSE), and pooled out-of-fold R2. Negative R2 indicates error greater than that of the overall evaluation-sample mean; it is distinct from the explicitly cross-validated training-mean benchmark. Error distributions were examined by campaign and for the three observations with DO ≤ 4 mg L−1. This threshold was used only to inspect the low-DO range and was not treated as a regulatory classification.
An additional nested procedure selected both model family and hyperparameters within each outer training set, using four inner folds grouped by campaign and mean squared error as the selection criterion. Candidate grids are given in Table 2. The nested estimate evaluates this selection procedure, whereas the fixed Elastic Net estimate evaluates one specified model. Sensitivity analyses retrained the fixed Elastic Net model after excluding consensus anomalies or the October–November campaigns, and after removing nitrite as a predictor.
Table 2.
Candidate grids for nested model selection.
2.8. Multivariate Anomaly Detection
The eleven-variable matrix was robustly scaled using medians and interquartile ranges. We applied Isolation Forest with 500 trees and contamination 0.10, Local Outlier Factor (LOF) with 15 neighbors and contamination 0.10, and robust Mahalanobis distance based on a minimum covariance determinant estimator with support fraction 0.80 [26]. The Mahalanobis threshold was the 90th percentile of a chi-squared reference with eleven degrees of freedom. This reference provides a detector threshold, not a calibrated probability of contamination.
D2M is the squared robust Mahalanobis distance, with center μ and covariance Σ estimated by the minimum covariance determinant procedure on the scaled matrix. Its chi-squared reference is used as a screening threshold.
A profile was flagged by consensus when at least two detectors identified it. Sensitivity analysis combined contamination settings of 0.05, 0.10, and 0.15; LOF neighborhoods of 10, 15, and 20; and Mahalanobis reference quantiles of 0.90 and 0.95, yielding eighteen configurations. Detectors were fitted to the available matrix for retrospective screening. Their flags do not establish analytical error, pollution sources, or prospective anomaly detection performance.
2.9. Predictor Interpretation and Software
Held-out permutation importance was used to assess predictive relevance, complementing interpretation approaches used in water-quality modeling [27,28]. Within each held-out campaign, one predictor was shuffled while the fitted model and other predictors were unchanged. We used 30 repetitions per predictor with random seed 42. The loss was pooled log loss for fixed L2 logistic station-group classification and pooled RMSE for fixed Elastic Net DO estimation:
Here, Ij is the increase in loss L after permuting predictor j, Xπj denotes the held-out predictor matrix with that column shuffled within each campaign, and f is the corresponding fold-trained model. For DO, results were compared between the full dataset and the subset without consensus anomalies. Correlated predictors can substitute for one another; permutation scores describe the fitted prediction procedure and cannot be interpreted as causal effects.
Analyses were implemented in Python 3.12.14 using NumPy 2.3.5, pandas 2.2.3, SciPy 1.17.0, scikit-learn 1.8.0, and Matplotlib 3.10.8. Gaussian identity GEE and covariance calculations were implemented explicitly with NumPy and SciPy following the GEE formulation and bias-reduced covariance structure documented in statsmodels [21,29]. Random seeds were recorded in the scripts: 42 for estimators and permutations, 20261108 for initial block diagnostics, and 20261113 for extended block and circular-shift analyses. Machine-learning preprocessing and tuning were confined to the appropriate training partitions. Full-data PCA, clustering, and anomaly screening were descriptive analyses and were not used to select supervised predictors.
2.10. Diagnostics and Sensitivity Analyses
Diagnostics included residual-versus-fitted and Q–Q plots for each GEE response, numerical convergence checks, variance inflation factors, correlation matrices, PCA retention and stability assessments, clustering resampling, classifier calibration, and campaign-level prediction errors. GEE residuals were evaluated on the fitted response scale. Gaussian working models do not require the raw variables to be normally distributed for their estimating-equation interpretation, but misspecified mean structure, influential observations, and very few clusters can affect estimation and uncertainty. Diagnostic patterns were therefore reported rather than treated as a checklist establishing model validity.
The sensitivity analyses address distinct limitations: elapsed calendar time addresses unequal campaign spacing; covariance and degrees-of-freedom changes assess inferential sensitivity; block resampling assesses descriptive stability; nested validation separates selection from testing; and anomaly, nitrite, and zero-value analyses assess dependence on particular observations or predictors. None substitute for independent monitoring data.
The nested-validation settings used for station-group classification and dissolved oxygen estimation are summarized in Table 2. Thirteen outer folds each withheld one complete campaign, while four inner folds grouped by campaign were used for model selection. Regression model families and hyperparameters were selected jointly by minimizing mean squared error; logistic regularization was selected by minimizing log loss. Preprocessing was fitted exclusively within the corresponding training partitions. The nested random forest used 200 trees and therefore represents a different configuration from the fixed 300-tree models.
The primary analyses retained all 65 measured station–campaign profiles. Exclusions of consensus anomalies or selected campaigns were restricted to sensitivity analyses. These analyses assess dependence on modeling choices and sample composition; they do not constitute independent replication.
3. Results
3.1. Descriptive Overview
All 845 integrated measurements agreed with the source worksheets. The table contained 65 unique station–campaign combinations, with no missing physicochemical values. Relative variability was greatest for nitrite, SS, NH3–N, and nitrate (Table 3). DO averaged 4.920 mg L−1 (SD 0.575; range 3.020–6.100), with descriptive group means of 4.712 mg L−1 in Zone A and 5.232 mg L−1 in Zone B. These pooled averages do not themselves establish a longitudinal interaction.
Table 3.
Descriptive statistics for the 65 station–campaign profiles.
The pH median was 8.18, with an interquartile range of 7.98–8.39. EC, TDS, and salinity showed a common upward trajectory across the monitored interval. The observed DO means in April 2016 were identical in the two groups (5.89 mg L−1), causing the plotted group markers to overlap rather than indicating a missing observation.
3.2. Longitudinal Trajectories
Calendar-month GEE estimates retained the main directions of the original fitted trajectories, with wider uncertainty after the covariance and small-sample corrections (Table 4). EC increased by 1.911 mS cm−1 month−1 in Zone A and 1.883 mS cm−1 month−1 in Zone B. TDS and salinity showed similar increases in both groups. Their interaction q-values exceeded 0.82, providing no evidence of different slopes under the specified analysis. Temperature and pH interactions also did not meet the q < 0.05 threshold.
Table 4.
Calendar-month GEE slopes with Mancl–DeRouen 95% confidence intervals and interaction q-values.
Seven group-by-time interactions met the q < 0.05 reporting threshold: BOD5, COD, TSS, SS, NH3–N, nitrite, and nitrate. Their directions described relatively steeper decreases, or less pronounced increases, in Zone B. The same seven interactions remained below this threshold when the reference t distribution used three degrees of freedom, after excluding the six consensus anomalies, and after excluding the October–November 2016 campaigns (Table 5). These results support exploratory differences in temporal trajectories, subject to the limited number of stations.
Table 5.
Interaction q-values under calendar-month GEE sensitivity specifications.
For DO, the estimated Zone A slope was −0.0546 mg L−1 month−1 and the Zone B slope was −0.0088 mg L−1 month−1. The between-group difference was 0.0458 mg L−1 month−1 (95% CI −0.0068 to 0.0984; p = 0.0731; q = 0.1188). Thus, the evidence did not establish different DO slopes between groups. The Zone A interval excluded zero under t4 but included zero when its three stations were reflected by a t2 reference (−0.1146 to 0.0054; p = 0.0596). The declining fitted trajectory is consequently presented as descriptive rather than a robust within-group significance claim.
The dissolved oxygen interaction did not meet the threshold in any of these specifications. Its q-value was 0.1188 in the primary analysis, 0.1536 with the alternative degrees-of-freedom reference, 0.4416 after excluding consensus anomalies, and 0.0651 after excluding October–November. These results support reporting the observed oxygen trajectories while avoiding a claim of statistically established differences between group-specific slopes. The fitted linear trends summarize the observation interval without establishing a persistent lagoon-wide oxygen decline. Residual diagnostics also showed marked positive skewness for transformed NH3–N and nitrite, reinforcing the need for cautious uncertainty interpretation.
Figure 2 shows the observed group means and fitted calendar-month GEE–AR(1) trajectories for dissolved oxygen, nitrate, BOD5, and electrical conductivity.
Figure 2.
Observed group means and fitted calendar-month GEE–AR(1) trajectories for DO, nitrate, BOD5, and EC. Month 0 is February 2016 and month 13 is March 2017; month 1 was not sampled. Blue circles represent Zone A and orange squares represent Zone B. The April 2016 DO means coincide at 5.89 mg L−1; open circles keep both symbols visible. For nitrate and BOD5, exp(fitted log(1 + Y)) − 1 visualizes the fitted transformed response and is not an arithmetic-mean prediction. The DO interaction has q = 0.1188.
3.3. Principal Physicochemical Gradients
PC1, PC2, and PC3 explained 54.8%, 20.2%, and 10.6% of total variance, respectively; the first two explained 75.0% and the first three 85.6% (Table 6 and Figure 3). PC1 contrasted organic-load, solids, and nitrogen indicators with DO. PC2 was most strongly associated with EC, while PC3 provided an additional descriptive contrast involving temperature, pH, DO, and SS.
Table 6.
Variance explained and largest absolute eigenvector coefficients for the first three components.
Figure 3.
PCA of standardized physicochemical profiles. (A) Scores and variable eigenvector coefficients in the PC1–PC2 plane, with all arrows multiplied by the same factor of three for display. Blue circles and orange squares identify Zones A and B. (B) Individual explained variance and cumulative variance; the dashed 80% line is a descriptive reference, not a component-retention test. The first two components explain 75.0% and the first three 85.6%. Arrow angles in this projection do not replace full-variable correlations or establish causal relationships.
KMO was 0.768. Bartlett’s statistic was 892.22 with 55 degrees of freedom; its nominal p-value was very small, but the independence assumption limits an inferential interpretation. Independent-reference parallel analysis retained two components. The supplementary circular-shift reference retained only PC1, illustrating that retention beyond the dominant axis depends on assumptions about temporal structure. PC3 orientations were particularly variable in block resampling. Therefore, 85.6% is a descriptive variance summary, not evidence for three stable environmental dimensions.
The original-variable correlations supported the PC1 interpretation: Pearson r was −0.622 for DO–BOD5, −0.603 for DO–TSS, and 0.978 for BOD5–TSS. These relationships should be read from the complete correlation matrix rather than inferred solely from arrow angles or apparent perpendicularity in a two-component projection.
3.4. Recurring Physicochemical Profiles
The three-cluster solution had the largest full-data silhouette width (0.3525), compared with 0.3143 for two clusters and 0.3485 for four. K-means and Ward gave identical three-cluster assignments (ARI = 1.000). The clusters contained 41, 20, and four profiles (Table 7). The four-profile cluster comprised the P1 and P2 observations from October–November 2016, with elevated organic-load and nitrogen indicators and relatively low DO.
Table 7.
Composition of the descriptive three-cluster partition.
This partition was not stable as an exact cluster count. In 500 two-campaign block resamples, the best silhouette selected four clusters in 371 cases (74.2%), three in 78 cases, and two in 51 cases. Ward agreement with the original partition had median ARI values of 0.623 and 0.708 for block lengths of two and three campaigns, respectively. These results support using the full-data clusters as descriptive summaries while avoiding claims that precisely three persistent water-quality classes were established.
Figure 4 summarizes the three-cluster K-means partition in PCA space, the standardized variable means by cluster, and the mean silhouette widths for two to four clusters.
Figure 4.
Unsupervised clustering of physicochemical profiles. (A) Three-cluster K-means assignments in PCA space. (B) Standardized variable means by cluster. (C) Mean silhouette widths for k = 2–4. The three-cluster partition describes the full dataset; the small silhouette advantage over four clusters and the resampling results do not establish a unique, stable number of ecological classes.
3.5. Exploratory Station Group Classification
Under leave-one-campaign-out validation, logistic regression achieved balanced accuracy of 0.8846 and ROC-AUC of 0.9379, correctly classifying 33 of 39 Zone A profiles and 24 of 26 Zone B profiles. Random forest had a slightly lower balanced accuracy (0.8782) but a higher ROC-AUC (0.9655) and lower Brier score (0.0670; Table 8 and Figure 5). The logistic Brier score was 0.0896, compared with 0.2400 for a constant group-prevalence probability.
Table 8.
Pooled classification performance under leave-one-campaign-out validation.
Figure 5.
Classification of predefined station groups under leave-one-campaign-out validation. (A) Balanced accuracy, macro-F1, and ROC-AUC for the three fixed models; the dashed 0.5 line is a reference for balanced accuracy and ROC-AUC only. (B) Pooled out-of-fold confusion matrix for L2 logistic regression, with rows denoting observed groups and columns predicted groups. (C) Pooled out-of-fold ROC curves. The dashed diagonal line represents chance-level discrimination (AUC = 0.5). Zone A is the positive class. Classification does not independently validate hydrological zonation; calibration is shown in Figure 6.
Nested selection retained C = 1 in all thirteen outer logistic folds and reproduced the fixed-model classification metrics. Probability calibration was examined using pooled out-of-fold predictions (Figure 6). The curves compare predicted probabilities of Zone A membership with observed frequencies; the limited number of observations within probability intervals restricts detailed calibration conclusions.
Figure 6.
Calibration of pooled out-of-fold station-group probabilities. The diagonal represents agreement between predicted probability and observed group frequency. Sparse bin counts limit detailed calibration conclusions.
Secondary leave-one-station-out balanced accuracy ranged from 0.821 for SVM to 0.891 for random forest. These results describe discrimination and probability behavior within the available dataset. They do not independently establish the hydrological interpretation of the predefined station groups.
3.6. Dissolved Oxygen Prediction Performance
Fixed-parameter Elastic Net had the lowest RMSE among the four fixed models under leave-one-campaign-out validation (0.4479 mg L−1), with MAE = 0.3690 mg L−1 and R2 = 0.3847. Its RMSE was 24.4% below the training-mean baseline of 0.5924 mg L−1. Nested selection across model families and hyperparameters yielded RMSE = 0.5033 mg L−1, MAE = 0.4100 mg L−1, and R2 = 0.2229, corresponding to a 15.0% RMSE reduction relative to the same baseline (Table 9). The estimates describe different procedures and should not be conflated.
Table 9.
DO estimation under leave-one-campaign-out validation and targeted sensitivity analyses.
The fixed Elastic Net error varied substantially among campaigns, with RMSE from 0.140 to 0.933 mg L−1. Only three observations had DO ≤ 4 mg L−1. When the original out-of-fold predictions were summarized for the other 62 observations, R2 was 0.084 and RMSE was 0.449 mg L−1. This subgroup assessment did not refit the model. The 1:1 line in Figure 7 is a reference for agreement, not an estimated regression line.
Figure 7.
DO estimation under leave-one-campaign-out validation. (A) RMSE for four fixed models, the training-mean baseline, and nested selection across model families and parameters (orange bar). (B) Observed and pooled out-of-fold predictions for fixed Elastic Net. The dashed 1:1 line is an agreement reference, not a fitted regression. Fixed Elastic Net R2 = 0.385 and nested-selection R2 = 0.223 describe different procedures. Only three observations have DO ≤ 4 mg L−1.
After refitting without the six consensus anomalies, Elastic Net had R2 = −0.024 and RMSE = 0.445 mg L−1, compared with a subset baseline RMSE of 0.462 mg L−1. Its absolute error was similar to that in the complete dataset, but its relative advantage was small because the retained DO values had less variation. Removing the October–November campaigns also reduced R2 to 0.011. These analyses show that the apparent explanatory performance depends partly on the range and composition of the historical sample.
3.7. Held out Predictor Importance
For station-group classification, TSS, NH3–N, and nitrate had the largest permutation-associated increases in log loss: 0.0913 (SD 0.0235), 0.0881 (SD 0.0269), and 0.0828 (SD 0.0158), respectively (Figure 8A). These values describe predictive dependence of the fixed logistic model under the stated campaign-grouped validation.
Figure 8.
Grouped out-of-sample permutation importance. (A) Increase in pooled log loss for L2 logistic station-group classification. (B) Increase in pooled RMSE for fixed Elastic Net DO estimation. Each predictor was shuffled within held-out campaigns over 30 repetitions; error bars are standard deviations across permutations, not confidence intervals. Correlated predictors and sensitivity to atypical observations limit causal or unique-variable interpretations.
Nitrite had the largest full-data permutation importance for fixed Elastic Net, increasing out-of-fold RMSE by an average of 0.1351 mg L−1 (SD across permutations 0.0470; Figure 8B). Removing nitrite as a predictor reduced full-data R2 from 0.385 to 0.169 and increased RMSE from 0.448 to 0.521 mg L−1. Its contribution therefore affected prediction in the full dataset but was not stable across the sensitivity subsets.
Without the six consensus anomalies, nitrite permutation increased RMSE by only 0.0166 mg L−1, and excluding nitrite slightly improved RMSE from 0.445 to 0.440 mg L−1. Predictor correlations were substantial: variance inflation factors in the ten-predictor matrix were 65.23 for BOD5, 37.12 for TSS, 17.58 for NH3–N, and 12.18 for COD. These relationships limit interpretation of a unique contribution for each variable. Near-zero or negative permutation values indicate that shuffling did not worsen predictions under that procedure; they are not protective environmental effects.
Excluding the single nitrite-zero record yielded DO prediction R2 = 0.361 and RMSE = 0.454 mg L−1. Hypothetical replacement by half the reported detection or quantification limit left R2 near 0.385. Thus, that one recorded zero had little influence on the full-data performance, although its analytical meaning still requires sample documentation.
3.8. Consensus Multivariate Anomalies
Six profiles were flagged by at least two of the three baseline detectors (Table 10 and Figure 9 and Figure 10). Four corresponded to stations P1 and P2 in October and November 2016 and were identified by all three detectors. The remaining consensus profiles were P1 in April 2016 and P5 in March 2017.
Table 10.
Consensus anomalies under the baseline detector settings.
Figure 9.
Consensus multivariate anomaly detection. (A) Isolation Forest anomaly scores, defined as the negative of score_samples, for observations ordered by campaign and station; tick labels identify the first station in each campaign. (B) Consensus anomalies projected into the PC1–PC2 plane. Blue circles indicate profiles without consensus flags and orange diamonds indicate the six profiles flagged by at least two detectors. Four P1–P2 profiles from October–November 2016 remain flagged across all eighteen sensitivity configurations. Statistical rarity is not proof of contamination; detector vote counts are retained in Figure 10.
Figure 10.
Detector vote counts for the 65 station–campaign profiles under the baseline settings. Gray dots represent profiles flagged by zero or one detector; red dots represent profiles flagged by at least two detectors.The dashed line marks the two-detector consensus threshold. The four P1–P2 profiles from October–November 2016 were also retained across all eighteen sensitivity configurations.
Figure 10 shows the detector vote count for every station–campaign profile, making the consensus threshold explicit. Across eighteen detector configurations, the total number of consensus flags ranged from four to ten, while the four October–November profiles were retained in every configuration. This persistence identifies records deserving further examination, without establishing a pollution event or an analytical error. The April 2016 low-EC and relatively oxygenated profile and the March 2017 high-EC profile were more dependent on detector settings.
3.9. Diagnostic and Stability Assessment
The principal diagnostic and stability results are summarized in Table 11. Numerical convergence and agreement between covariance calculations support computational reproducibility. Component-retention analyses, block resampling, and targeted exclusions describe the sensitivity of the environmental summaries and predictive results to analytical assumptions. Together, these assessments define the scope of the historical dataset and its exploratory interpretation.
Table 11.
Diagnostic and stability results.
4. Discussion
4.1. Historical Baseline and Temporal Evidence
The contribution of this study is a reproducible characterization of physicochemical conditions observed at five Nuxco Lagoon stations in 2016–2017. Its historical status defines the interpretation: the records provide a reference against which new, methodologically comparable observations can be assessed. They cannot establish the lagoon’s current condition or a trend extending from the 1970s to the present. Comparison with older records requires harmonization of station coverage, season, analytical methods, and units before numerical changes can be interpreted.
The monitored interval showed increasing EC, TDS, and salinity in both predefined groups, together with contrasting trajectories in seven organic-load, solids, and nitrogen indicators. These patterns describe variation during the sampled campaigns. A monitoring interval slightly longer than one year cannot separate a repeating seasonal cycle from an interval-specific trend, particularly without discharge, rainfall, residence-time, or lagoon-opening records. Broader nutrient-transport research provides environmental context [1] but does not identify the processes responsible for the Nuxco trajectories.
The treatment of DO illustrates why uncertainty matters. Although the pooled mean was lower in Zone A and its fitted slope was negative, the corrected interaction did not establish different temporal slopes between the groups. The within-Zone A inference also changed with the degrees-of-freedom reference. Reporting this sensitivity preserves the observed pattern while avoiding an unsupported claim of differential oxygen deterioration. The persistence of the seven other interactions across the specified checks supports further investigation, but their small-sample q-values remain approximate.
Studies in other coastal lagoons report spatial and temporal variation in oxygenation, nutrients, and salinity [30,31,32,33]. They support the relevance of examining such gradients, while differences in hydrological setting and sampling design limit direct quantitative comparison. Freshwater inputs, marine exchange, and organic-matter processing are plausible explanations to evaluate with independent measurements. Classification performance and agreement among analyses using the same Nuxco records cannot by themselves assign those mechanisms to Zones A and B.
4.2. Multivariate Gradients and Stability
PC1 summarized a coherent covariance pattern in which organic-load, suspended-solids, and nitrogen indicators increased as DO decreased. Multivariate water-quality studies use similar approaches to identify correlated groups of measurements [12,34,35]. Here, the actual variable correlations support the interpretation, while PCA provides a compact representation. The ordination does not establish whether oxygen consumption, nitrification, mixing, or another process caused the observed association.
The 85.6% variance explained by three components remains a valid descriptive result. However, independent-reference parallel analysis supported two axes, the temporal-shift sensitivity supported one, and PC3 orientation varied substantially under resampling. The defensible interpretation emphasizes the dominant gradient and treats additional axes as supplementary descriptions of the sample. This is more informative than using a variance-explained threshold alone to imply that three environmental dimensions are stable.
The three-cluster representation likewise describes the full dataset rather than establishing a fixed ecological classification. Identical K-means and Ward assignments demonstrate algorithmic agreement for one matrix. They do not overcome the small silhouette advantage over four clusters or the variability observed under campaign-block resampling. The four unusual October–November profiles materially influence the grouping structure, which is useful for describing the data but warrants verification before assigning an environmental category.
4.3. Scope of Prediction and Interpretation
The classification results show that contemporaneous physicochemical profiles discriminate the predefined station groups across held-out campaigns. Nested logistic tuning reproduced the fixed-model estimate, providing reassurance for that particular procedure. Nevertheless, the same five stations appear repeatedly, and their group labels were specified by membership. The result should be understood as within-study separability, not discovery of independently validated ecological zones, consistent with concerns about environmental machine-learning evaluation [15].
DO estimation showed an advantage over the training-mean baseline, but the magnitude depends on the evaluated procedure and sample. Fixed Elastic Net reduced RMSE by 24.4%, whereas nested model selection reduced it by 15.0%. The nested result incorporates model selection inside training; the fixed-model result remains informative for its stated configuration. Neither result establishes adequate accuracy for operational decisions, particularly at low DO where only three observations were available. Additional covariates and independent validation would be needed to assess an operational application [16].
The weak relative performance after removing consensus anomalies does not mean that absolute prediction errors increased: RMSE remained close to 0.45 mg L−1. Rather, the remaining DO range was narrower, and a simple mean became more competitive. Both the benchmark error and the response distribution therefore matter when interpreting R2. Results from studies predicting water-quality indices or using different spatial and validation designs [36,37,38] cannot supply a universal threshold by which the present R2 should be labeled sufficient.
Nitrite contributed to full-data DO prediction, but its importance decreased markedly after exclusion of atypical profiles. Together with substantial collinearity, this sensitivity prevents interpreting its ranking as evidence that nitrite uniquely controls oxygen conditions. The laboratory-measured predictors also do not establish a low-cost surrogate for direct field DO measurement. Any proposed monitoring benefit should be assessed using measurement cost, timeliness, and prospective performance in new campaigns.
4.4. Interpretation of Anomalies
The repeated identification of P1 and P2 profiles from October–November 2016 across detector settings supports prioritizing those records for investigation. Their proximity in space and time makes a shared environmental context plausible, but statistical agreement cannot distinguish that explanation from shared sampling or laboratory influences. Anomaly screening is therefore an entry point for examining field and quality-control records, rather than evidence of a confirmed contamination episode.
Follow-up interpretation would require the corresponding field notes, rainfall and flow conditions, sample-handling records, and laboratory controls. Review of the April 2016 profile should also consider its relatively high DO and low EC without assuming dilution or marine exchange. Keeping these observations in the primary dataset and reporting exclusion sensitivities makes their effect on inference visible without presuming that they are invalid.
4.5. Limitations and Research Priorities
The principal inferential limitation is the five-station design, with three stations in one group and two in the other. The 65 profiles do not provide 65 independent spatial replicates. Bias-adjusted covariance and alternative reference degrees of freedom improve transparency but do not ensure accurate coverage with so few clusters. Shared conditions across stations within a campaign may also create dependence beyond the within-station working correlation. More independent stations and designs that characterize spatial as well as temporal dependence are needed for confirmatory inference.
The records are historical, cover only thirteen campaigns, and lack March 2016. The elapsed-month formulation addresses the spacing of the available observations; it does not reconstruct the missing campaign or establish recurring seasonality. A contemporary survey with comparable station locations and laboratory procedures is required to determine whether the identified patterns persist. Independent hydrological information is also necessary to interpret the predefined groups as freshwater- or marine-influenced zones.
Analytical interpretation is limited by the available archival documentation. The reported transport conditions require confirmation against sample-specific records, and the basis of nitrogen-species reporting and the meaning of recorded zeros should be reconciled with laboratory certificates. The sensitivity calculations demonstrate how selected coding assumptions affect the results but cannot substitute for those records. Field determination of DO, pH, and temperature distinguishes those measurements from transported laboratory samples.
Future monitoring should collect hydrological and biological covariates, including precipitation, water depth, flow or exchange conditions, and chlorophyll a, with explicit quality-assurance records. Additional campaigns and independently sampled stations would permit the assessment of recurring seasonal patterns, prospective prediction, and transfer to new settings. Until such validation is available, the current models serve as exploratory analyses of the historical record.
5. Conclusions
The 2016–2017 Nuxco Lagoon dataset establishes an exploratory historical physicochemical baseline based on 13 monitoring campaigns at five stations. Calendar-month GEE models with bias-adjusted covariance identified seven group-by-time interactions below the specified FDR threshold, involving indicators of organic loading, solids, and nitrogen. The DO interaction did not meet this threshold, and inference for the Zone A slope depended on the reference degrees of freedom. These limitations are essential to interpreting the temporal results.
PCA identified a dominant gradient linking organic-load, solids, and nutrient indicators with lower oxygenation. However, resampling did not support three stable components or a unique three-cluster classification. Supervised models distinguished the predefined station groups in held-out campaigns, whereas DO estimation showed moderate, sample-dependent performance. Fixed Elastic Net and nested-selection estimates refer to different evaluation procedures. Neither has been independently validated for practical monitoring.
Consensus anomaly detection flagged six profiles, including four from October–November 2016 that were consistently identified across detector configurations. These flags prioritize records for field and laboratory review; they do not establish pollution events. Overall, the integrated workflow provides a reproducible description of historical physicochemical patterns and their uncertainty. It can inform comparable future monitoring but cannot establish current lagoon conditions or causal environmental mechanisms.
Author Contributions
Conceptualization, J.L.R.-A., H.Á.-P., J.A.V.-M., I.G.-B. and A.C.-E.; methodology, L.A.G.L., M.G.-M. and I.G.-B.; software, M.G.-M. and I.G.-B.; validation, D.J.N.-C., L.A.G.L. and M.G.-M.; formal analysis, M.G.-M., E.J.F.-M. and I.G.-B.; investigation, A.C.-C., L.A.G.L., H.Á.-P. and J.A.V.-M.; resources, D.J.N.-C., J.L.R.-A. and A.C.-C.; data curation, M.G.-M. and I.G.-B.; writing—original draft preparation, A.C.-E., H.Á.-P. and I.G.-B.; writing—review and editing, J.L.R.-A. and H.Á.-P.; visualization, D.J.N.-C., I.G.-B. and J.L.R.-A.; supervision, J.A.V.-M.; project administration, H.Á.-P. and A.C.-C. All authors have read and agreed to the manuscript.
Funding
This research received no external funding.
Data Availability Statement
The integrated dataset and reproducible Python code are deposited in the GitHub repository https://github.com/Igallardo77/nuxco-water-quality-ml (accessed 12 October 2026). At the time of manuscript preparation, the repository is private; therefore, the files are not publicly accessible. Access can be requested from the corresponding author. Public release of the repository is pending coauthor approval and applicable data-sharing requirements.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Beusen, A.H.W.; Bouwman, A.F. Future Projections of River Nutrient Export to the Global Coastal Ocean Show Persisting Nitrogen and Phosphorus Distortion. Front. Water 2022, 4, 893585. [Google Scholar] [CrossRef] [Scilit]
- Cervantes Duarte, R.; Rodríguez Mata, L.M.; López López, S. Efecto de la marea en la concentración de nutrientes, clorofila a y parámetros físicos y químicos en una laguna costera subtropical (Bahía Magdalena, México). Hidrobiológica 2017, 27, 253–264. [Google Scholar] [CrossRef]
- Boateng, I.; Mitchell, S.; Couceiro, F.; Failler, P. An Investigation into the Impacts of Climate Change on Anthropogenic Polluted Coastal Lagoons in Ghana. Coast. Manag. 2020, 48, 601–622. [Google Scholar] [CrossRef] [Scilit]
- Bhatt, G.; Linker, L.; Shenk, G.; Bertani, I.; Tian, R.; Rigelman, J.; Hinson, K.; Claggett, P. Water Quality Impacts of Climate Change, Land Use, and Population Growth in the Chesapeake Bay Watershed. J. Am. Water Resour. Assoc. 2023, 59, 1313–1341. [Google Scholar] [CrossRef] [Scilit]
- Erostate, M.; Ghiotti, S.; Huneau, F.; Jouffroy, D.; Garel, E.; Garrido, M.; Pasqualini, V. The Challenge of Assessing the Proper Functioning Conditions of Coastal Lagoons to Improve Their Future Management. Sci. Total Environ. 2022, 803, 150052. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ishii, R.; Ohigashi, T.; Maruo, K.; Gosho, M. Geessbin: An R Package for Analyzing Small-Sample Binary Data Using Modified Generalized Estimating Equations with Bias-Adjusted Covariance Estimators. BMC Med. Res. Methodol. 2024, 24, 277. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Li, P.; Redden, D.T. Small Sample Performance of Bias-Corrected Sandwich Estimators for Cluster-Randomized Trials with Binary Outcomes. Stat. Med. 2015, 34, 281–296. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhang, Y.; Preisser, J.S.; Li, F.; Turner, E.L.; Rathouz, P.J. CRTFASTGEEPWR: A SAS Macro for Power of Generalized Estimating Equations Analysis of Multi-Period Cluster Randomized Trials with Application to Stepped Wedge Designs. J. Stat. Softw. 2024, 108, 1–27. [Google Scholar] [CrossRef] [Scilit]
- Jolliffe, I.T.; Cadima, J. Principal Component Analysis: A Review and Recent Developments. Philos. Trans. R. Soc. A 2016, 374, 20150202. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- MacQueen, J. Some Methods for Classification and Analysis of Multivariate Observations. In Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability; University of California Press: Berkeley, CA, USA, 1967; Volume 1, pp. 281–297. [Google Scholar]
- Rousseeuw, P.J. Silhouettes: A Graphical Aid to the Interpretation and Validation of Cluster Analysis. J. Comput. Appl. Math. 1987, 20, 53–65. [Google Scholar] [CrossRef] [Scilit]
- Marín Celestino, A.E.; Martínez Cruz, D.A.; Otazo Sánchez, E.M.; Gavi Reyes, F.; Vásquez Soto, D. Groundwater Quality Assessment: An Improved Approach to K-Means Clustering, Principal Component Analysis and Spatial Analysis: A Case Study. Water 2018, 10, 437. [Google Scholar] [CrossRef] [Scilit]
- Yan, X.; Zhang, T.; Du, W.; Meng, Q.; Xu, X.; Zhao, X. A Comprehensive Review of Machine Learning for Water Quality Prediction over the Past Five Years. J. Mar. Sci. Eng. 2024, 12, 159. [Google Scholar] [CrossRef] [Scilit]
- Zhi, W.; Appling, A.P.; Golden, H.E.; Podgorski, J.; Li, L. Deep Learning for Water Quality. Nat. Water 2024, 2, 228–241. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhu, J.-J.; Yang, M.; Ren, Z.J. Machine Learning in Environmental Research: Common Pitfalls and Best Practices. Environ. Sci. Technol. 2023, 57, 17671–17689. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- He, M.; Qian, Q.; Liu, X.; Zhang, J.; Curry, J. Recent Progress on Surface Water Quality Models Utilizing Machine Learning Techniques. Water 2024, 16, 3616. [Google Scholar] [CrossRef] [Scilit]
- Rigueira, X.; Olivieri, D.N.; Araújo, M.; Saavedra, Á.; Pazo, M. Multivariate Functional Data Analysis and Machine Learning Methods for Anomaly Detection in Water Quality Sensor Data. Environ. Model. Softw. 2025, 190, 106443. [Google Scholar] [CrossRef] [Scilit]
- Uddin, M.G.; Rahman, A.; Taghikhah, F.R.; Olbert, A.I. Data-Driven Evolution of Water Quality Models: An In-Depth Investigation of Innovative Outlier Detection Approaches—A Case Study of Irish Water Quality Index (IEWQI) Model. Water Res. 2024, 255, 121499. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Kim, C.-S.; Kim, C.-R.; Kok, K.-H. Outlier Detection in Hydrological Data Using Machine Learning: A Case Study in Lao PDR. Water 2025, 17, 3120. [Google Scholar] [CrossRef] [Scilit]
- APHA; AWWA; WEF. Standard Methods for the Examination of Water and Wastewater, 21st ed.; American Public Health Association: Washington, DC, USA, 2005. [Google Scholar]
- Mancl, L.A.; DeRouen, T.A. A Covariance Estimator for GEE with Improved Small-Sample Properties. Biometrics 2001, 57, 126–134. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Cortes, C.; Vapnik, V. Support-Vector Networks. Mach. Learn. 1995, 20, 273–297. [Google Scholar] [CrossRef] [Scilit]
- Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Scilit]
- Yang, J. Predicting Water Quality through Daily Concentration of Dissolved Oxygen Using Improved Artificial Intelligence. Sci. Rep. 2023, 13, 20370. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhao, Y.; Chen, M. Prediction of River Dissolved Oxygen (DO) Based on Multi-Source Data and Various Machine Learning Coupling Models. PLoS ONE 2025, 20, e0319256. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Rousseeuw, P.J.; Van Driessen, K. A Fast Algorithm for the Minimum Covariance Determinant Estimator. Technometrics 1999, 41, 212–223. [Google Scholar] [CrossRef]
- Bramm, A.M.; Matrenin, P.V.; Khalyasmaa, A.I. A Review of XAI Methods Applications in Forecasting Runoff and Water Level Hydrological Tasks. Mathematics 2025, 13, 2830. [Google Scholar] [CrossRef] [Scilit]
- Choudhary, R.; Kumar, A.; Priyadharsini, C.; Naik, M.M.; Choudhury, M.; Khan, N.A. Predicting Water Quality Index Using Stacked Ensemble Regression and SHAP Based Explainable Artificial Intelligence. Sci. Rep. 2025, 15, 31139. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Seabold, S.; Perktold, J. Statsmodels: Econometric and Statistical Modeling with Python. In Proceedings of the 9th Python in Science Conference, Austin, TX, USA, 28 June–3 July 2010; pp. 92–96. [Google Scholar]
- Wang, Y.; Dong, X.; Xian, H.; Zhang, Y.; Li, Y.; Wang, Y.; Bennion, H. Emerging Environmental Risks to the Largest Coastal Lagoon (Pinqing Lagoon) on the Chinese Mainland: Assessment through a Water-Sediment-Ecological Perspective. Mar. Pollut. Bull. 2025, 212, 117498. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Basatnia, N.; Hossein, S.A.; Rodrigo-Comino, J.; Khaledian, Y.; Brevik, E.C.; Aitkenhead-Peterson, J.; Natesan, U. Assessment of Temporal and Spatial Water Quality in International Gomishan Lagoon, Iran, Using Multivariate Analysis. Environ. Monit. Assess. 2018, 190, 314. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Menció, A.; Madaula, E.; Meredith, W.; Casamitjana, X.; Quintana, X.D. Nitrogen in Surface Aquifer–Coastal Lagoons Systems: Analyzing the Origin of Eutrophication Processes. Sci. Total Environ. 2023, 871, 161947. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Lingofo Bolaya, R.; Mouhamed, C.K.O.N.; Ousmane, T.B.; Serge, H.Z.T.; Mohamed, G.; Youssouf, A. Dynamic of Organic Pollution in Two Benin Coastal Lagoons, Lake Nokoué and Porto-Novo Lagoon (Ramsar Site 1018). Int. J. Biol. Chem. Sci. 2025, 19, 797–810. [Google Scholar] [CrossRef] [Scilit]
- Maiolo, M.; Pantusa, D. Multivariate Analysis of Water Quality Data for Drinking Water Supply Systems. Water 2021, 13, 1766. [Google Scholar] [CrossRef] [Scilit]
- Sharma, M.; Rawat, S.; Lodh, A.; Kumar, P.; Pathak, V.V.; Awasthi, A. Component Analysis and Temporal Evaluation of Water Quality in the Yamuna River, Uttarakhand, India. Front. Water 2026, 8, 1743011. [Google Scholar] [CrossRef] [Scilit]
- Kadam, A.K.; Wagh, V.M.; Muley, A.A.; Umrikar, B.N.; Sankhua, R.N. Prediction of Water Quality Index Using Artificial Neural Network and Multiple Linear Regression Modelling Approach in Shivganga River Basin, India. Model. Earth Syst. Environ. 2019, 5, 951–962. [Google Scholar] [CrossRef] [Scilit]
- Xu, J.; Mo, Y.; Zhu, S.; Wu, J.; Jin, G.; Wang, Y.-G.; Ji, Q.; Li, L. Assessing and Predicting Water Quality Index with Key Water Parameters by Machine Learning Models in Coastal Cities, China. Heliyon 2024, 10, e33695. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Babbar, R.; Chaubey, I. Multiple Regression Analysis for Predicting Few Water Quality Parameters at Unmonitored Sub-Watershed Outlets in the St. Joseph River Basin, USA. Geocarto Int. 2022, 37, 8697–8723. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.









