Next Article in Journal
SEM-Based Automated Mineralogy and X-Ray Mapping (GXMAP) for Characterization of Early Pleistocene Pyroclastic Deposits from Kurtan, Armenia
Previous Article in Journal
Block Sequencing Using Geometallurgical Parameters in Stochastic Short-Term Models
Previous Article in Special Issue
Advancing Mineral Exploration: Robust and Interpretable Carbonate Quantification in Drill Cores via Hyperspectral Machine Learning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Spatially Constrained Machine Learning for PRISMA-Based Lithological Mapping of Phosphate Mine Waste Rocks

by
Abdelhak El Mansour
1,*,
Jamal-Eddine Ouzemou
2,
Abdellatif Elghali
1,
Malak Elmeknassi
1,
Rachid Hakkou
1,3,
Mostafa Benzaazoua
1 and
Ahmed Laamrani
2,4
1
Geology and Sustainable Mining Institute (GSMI), Mohammed VI Polytechnic University, Lot 660, Hay Moulay Rachid, Ben Guerir 43150, Morocco
2
Center for Remote Sensing Applications (CRSA), Mohammed VI Polytechnic University, Lot 660, Hay Moulay Rachid, Ben Guerir 43150, Morocco
3
Materials and Environmental Chemistry Laboratory (IMED-Lab), Faculty of Science and Technology Gueliz, Cadi Ayyad University, Avenue A. Elkhattabi, BP549, Marrakech 40000, Morocco
4
Department of Geography, Environment & Geomatics, University of Guelph, Guelph, ON N1G 2W1, Canada
*
Author to whom correspondence should be addressed.
Minerals 2026, 16(6), 619; https://doi.org/10.3390/min16060619 (registering DOI)
Submission received: 2 April 2026 / Revised: 20 May 2026 / Accepted: 3 June 2026 / Published: 9 June 2026

Abstract

Phosphate waste rock piles (PWRPs) generated by open-pit phosphate mining are highly heterogeneous and difficult to characterize using conventional point sampling alone, which limits representative resource assessment, selective recovery, and rehabilitation planning. This study develops an integrated framework combining PRISMA spaceborne hyperspectral imagery, ground-based mineralogical analyses, and spatially constrained machine learning to map lithological heterogeneity at the Benguerir phosphate mining site, Morocco. A three-stage spectral optimization workflow, including atmospheric band masking, Savitzky–Golay filtering, and analysis of variance (ANOVA)-based feature selection, was applied to identify the most discriminative Short-Wave Infrared (SWIR) bands for lithological classification. After removing redundant observations located within shared PRISMA pixel footprints, 127 spatially independent samples were retained for model development. Five supervised classifiers (Random Forest, Extra Trees, XGBoost, Support Vector Machine, and K-Nearest Neighbors) were evaluated under a spatially constrained cross-validation framework aligned with the 30 m native PRISMA pixel size. Ensemble-based models, especially Extra Trees and Random Forest, provided the most stable performance, with balanced accuracies of 0.56–0.69 and area under the receiver operating characteristic curve (AUC) values exceeding 0.95 for carbonate-dominated lithologies. Lower discrimination between phosphate and siliceous facies reflects intrinsic mineralogical mixing and spectral overlap at the sensor scale. Entropy-based uncertainty and posterior probability mapping revealed spatially structured prediction ambiguity concentrated along lithological boundaries and transitional zones, consistent with petrographic evidence of compositional heterogeneity. These results indicate that moderate but stable accuracies likely represent realistic performance limits for spaceborne hyperspectral mapping of complex mining environments under spatial constraints. The proposed framework provides a transferable and uncertainty-aware basis for lithological mapping, selective recovery assessment, and sustainable phosphate waste management.

Graphical Abstract

1. Introduction

The sustainable management of phosphate mine waste has become a strategic environmental and economic priority in major phosphate-producing regions worldwide. Large-scale open-pit phosphate operations such as the Benguerir mine generate substantial volumes of waste rock that accumulate in extensive surface piles, alter landscape morphology, and may contribute to nutrient mobilization, erosion, and long-term environmental risk [1,2]. At the same time, residual carbonate and phosphate-bearing phases within these materials create opportunities for selective recovery and circular-economy strategies if their spatial distribution and mineralogical composition can be characterized reliably [3,4].
A major challenge, however, lies in the representativeness of field sampling. Phosphate waste rock piles are strongly heterogeneous because they combine carbonate matrices, siliceous fragments, marls, clay phases, and phosphatic components that vary markedly within and between piles. This heterogeneity is further amplified by mechanical segregation during blasting, hauling, and dumping, as well as by weathering and preferential water circulation through the pile structure. Recent studies at Benguerir have shown that these waste materials include mixtures of dolomite, quartz, clays, and residual carbonate-fluorapatite phases, and that their variability directly affects both revalorization potential and environmental behavior [3,5,6]. Consequently, conventional point-based characterization, although essential, remains insufficient for spatially continuous and scale-consistent recognition of phosphate waste rock piles.
Hyperspectral remote sensing offers a physically grounded approach for extending field observations because diagnostic absorption features in the visible to shortwave infrared (VNIR-SWIR) range are sensitive to mineral composition [7]. Carbonate minerals exhibit strong overtone and combination absorption bands near 2300–2350 nm, whereas siliceous materials lack prominent SWIR absorption features and fluorapatite signatures may be partly masked within mixed pixels. At the 30 m spatial resolution of the PRISMA (PRecursore IperSpettrale della Missione Applicativa) satellite, however, sub-pixel mineral mixing and spectral overlap impose intrinsic limits on lithological separability. PRISMA nevertheless provides contiguous hyperspectral observations across the visible and SWIR regions at 30 m spatial resolution, and previous studies have confirmed its utility for geological and mineral mapping applications [8,9,10]. Recent work has also demonstrated the value of machine learning for enhancing lithological discrimination from PRISMA imagery [11,12], but applications focused specifically on phosphate mine waste remain scarce.
In spatially structured geological environments, random cross-validation can substantially overestimate predictive performance due to spatial autocorrelation between neighboring samples. This issue is especially pronounced in mining landscapes where lithological units are spatially contiguous. Mineral distribution modeling studies have shown that spatially segregated data splitting yields more realistic and transferable performance estimates than conventional random hold-out approaches [13]. Therefore, spatially constrained validation strategies that enforce geographic separation between training and testing data are necessary to obtain operationally meaningful assessments of model generalization.
Despite these advances, no prior study has specifically addressed the lithological classification of phosphate mine waste rock piles using PRISMA spaceborne hyperspectral imagery under spatially constrained cross-validation with mineralogically validated (XRD/petrography) class labels. Existing PRISMA-based machine-learning studies have focused on hydrothermally altered geological targets or coastal mineral environments, leaving phosphate mining wastes characterized by complex fluorapatite–dolomite–calcite–illite mixing entirely unaddressed. Furthermore, the majority of published geological classification studies do not enforce spatial independence during cross-validation, leading to potentially inflated performance estimates that do not reflect genuine spatial transferability.
The specific objectives of this study are to: (i) characterize the mineralogical and chemical composition of phosphate waste rocks using petrography, X-ray diffraction (XRD), and X-ray fluorescence (XRF); (ii) develop a PRISMA-based hyperspectral characterization approach capable of guiding sampling and improving the recognition of phosphate waste rock piles for revalorization and rehabilitation purposes; and (iii) compare the performance and predictive reliability of five supervised machine-learning algorithms under spatially constrained validation, including uncertainty and posterior probability analysis.
By combining mineralogical constraints, spaceborne hyperspectral data, spatial validation rigor, and uncertainty-aware mapping, this study provides a realistic benchmark for the classification of heterogeneous mining waste rock and contributes to the development of data-driven strategies for sustainable phosphate waste management. The scientific contribution of this study is threefold: (i) it presents the first systematic application of PRISMA spaceborne hyperspectral imagery to lithological mapping of phosphate mine waste rock piles, a geologically complex and industrially critical target not addressed by existing PRISMA machine-learning studies, which have focused on hydrothermally altered mineralogy or coastal environments [11,12]; (ii) it implements a fully nested spatially constrained cross-validation framework calibrated to PRISMA’s 30 m pixel footprint, with all preprocessing and feature selection embedded within each fold to eliminate information leakage; and (iii) lithological labels are grounded in XRD mineralogical analysis and petrographic characterization, providing physically validated class definitions rather than relying on visual field identification alone.

2. Materials and Methods

2.1. Study Area and Geological Setting

The Benguerir phosphate deposit is located within the Gantour Basin, one of the four major phosphatic basins of Morocco, approximately 70 km northwest of Marrakech (Figure 1). The Gantour Basin forms part of the North African phosphogenic province and hosts extensive sedimentary phosphate deposits of Maastrichtian to Eocene age. Geologically, the basin is characterized by a tabular to gently folded sedimentary sequence unconformably overlying a Hercynian basement.
The phosphatic series consists of multiple phosphate beds interbedded with limestone, marls, clays, and siliceous horizons, reflecting repetitive depositional cycles and variable sedimentary environments. This lithostratigraphic organization exerts a first-order control on the mineralogical heterogeneity of both the phosphate ore and the waste rocks generated during mining operations [14,15,16].
The Benguerir open-pit mine covers an operational area of approximately 36 km2 and has been in continuous production since 1976 [17]. Open-pit exploitation at Benguerir is associated with a reported stripping ratio of approximately 3:1, meaning that about 3 tons of waste rock are generated for every ton of phosphate rock extracted; for example, 4.2 Mt of phosphate rock extracted in 2020 corresponded to an estimated 12.3 Mt of waste rock stored in piles [5]. Understanding this geological and mining context is essential for interpreting the spatial distribution, composition, and spectral behavior of the waste rock piles investigated in this study.
Figure 1. Geological map of the study area: Gantour basin (adapted from [18]).
Figure 1. Geological map of the study area: Gantour basin (adapted from [18]).
Minerals 16 00619 g001

2.2. Field Sampling Strategy, Limitations, and Accessibility Challenges

An integrated methodology combining extensive field sampling with hyperspectral remote sensing analysis was adopted (Figure 2). Field sampling was designed to capture the spatial heterogeneity of phosphate waste rock piles while ensuring compatibility with the spatiotemporal resolution of PRISMA hyperspectral imagery.
A total of 207 samples were collected across multiple phosphate waste rock piles within the Benguerir mining area. Sampling locations were spatially distributed across the surfaces of the waste piles rather than along a linear transect in order to capture both lateral and vertical lithological variability and to represent the full diversity of waste materials present. Accordingly, this spatially distributed strategy was designed to align with pixel-based spectral extraction at the PRISMA spatial resolution (30 m).
At each sampling location, approximately 5–6 kg of material was collected using a handheld shovel from a depth of 15–20 cm to minimize surface contamination and short-term weathering effects. The collected material was subsequently homogenized in the field and subjected to a standard quartering procedure to ensure representativity. Specifically, the bulk sample was thoroughly mixed, divided into four equal portions, and two opposite quarters were retained and recombined; this process was repeated as necessary until a representative laboratory subsample was obtained. In addition, a reference portion of each bulk sample was preserved as a control sample. Geographic coordinates were recorded using a Garmin GPSMAP 65 (from Garmin Ltd., Olathe, KS, USA) handheld GPS receiver. The spatial distribution of sampling points relative to the waste rock piles is illustrated in Figure 3.
Following the field campaign, and despite the initial set of 207 validated sampling locations, a spatial redundancy filter was applied to ensure consistency with the 30 m PRISMA pixel size. In practice, 80 samples occupying shared pixel footprints were removed to prevent duplication of spectral information, resulting in a refined dataset of 127 unique samples for machine-learning analysis. For pixels containing multiple co-located samples, the sample with the most reliable mineralogical characterization (confirmed by XRF and, where available, XRD analysis) was retained. In the subset of cases where co-located samples within the same pixel showed conflicting lithological assignments (reflecting genuine sub-pixel heterogeneity), the pixel was excluded entirely to avoid introducing ambiguous training labels. The final class distribution of the 127 retained samples is as follows: Marl (n = 49, 38.6%), Limestone (n = 35, 27.6%), Phosphate rock (n = 23, 18.1%), and Siliceous facies (n = 20, 15.7%). This quality-control step was essential to mitigate spatial autocorrelation and to avoid spectral leakage during spatially constrained cross-validation. At the same time, the occurrence of multiple field samples within the same 30 m PRISMA support highlights the scale mismatch between point sampling and image-based analysis and suggests likely sub-pixel heterogeneity within the waste-rock piles.
Nevertheless, field sampling was subject to practical constraints inherent to phosphate waste rock piles, including steep slopes, unstable and unconsolidated materials, variable compaction, and safety restrictions limiting access to certain zones. As a result, point-based sampling can only partially represent the full heterogeneity of the waste piles. Therefore, these limitations justify the integration of hyperspectral remote sensing to extrapolate ground-based observations across the entire spatial extent of the PWRPs.

2.3. Mineralogical and Chemical Analysis

Previous studies have documented the strong lithological, mineralogical, and geomechanical heterogeneity of phosphate waste rocks in the Gantour Basin, including the interlayer materials that contribute substantially to waste-rock generation and valorization potential [5,19,20]. Building on this background, the analytical program adopted here was designed to link detailed laboratory characterization with the spatially filtered dataset used for hyperspectral modelling.
Major element concentrations were quantified for all 207 collected samples by X-ray fluorescence (XRF) in order to capture the full geochemical variability of the waste-rock piles. For the machine-learning workflow, however, only the 127 samples associated with unique PRISMA pixel footprints were retained in order to avoid spectral redundancy and preserve strict independence between observations.

2.3.1. Chemical Characterization by XRF

Major element concentrations (including CaO, SiO2, P2O5, Fe2O3, Al2O3, MgO, and related oxides) were measured using a ZSX Primus IV sequential wavelength-dispersive X-ray fluorescence spectrometer (Rigaku Corporation, Tokyo, Japan). Samples were oven-dried, finely pulverized to <50 µm, homogenized, mixed with a cellulose binder (1:4 ratio), and pressed into pellets using an automatic hydraulic press at 30 tons to ensure analytical reproducibility and homogeneity.

2.3.2. Mineralogical Characterization by XRD

The mineralogical composition of 20 representative samples was determined using a Bruker-AXS D8 powder X-ray diffractometer (Bruker AXS GmbH, Karlsruhe, Germany). These samples were selected to ensure spatial representativity across the full study area while covering the principal lithological groups identified during field observations and the main range of geochemical variability observed in the 207-sample XRF dataset. This targeted subset was therefore designed to capture the mineralogical diversity of the phosphate waste rock piles without compromising spatial coverage. X-ray diffraction patterns were collected over a 2θ range of 10–70°, with a counting time of approximately 46 s per step. Mineral phase identification was performed using Python-based routines (Python v3.12.7) for peak detection and matching against reference diffraction databases.
Of the 20 XRD-analyzed samples, all 20 are distributed across the four principal lithological groups (Phosphate rock, Siliceous facies, Marl, and Limestone) and were specifically selected to cover the full range of geochemical variability observed in the 207-sample XRF dataset. Those associated with unique PRISMA pixel footprints are included among the 127 spatially independent modelling samples. The 10 thin-section samples were drawn from this same mineralogically characterized subset. This ensures that the lithological class labels used for ML training are directly validated by independent mineralogical evidence across all classes, even though XRD and petrographic analysis could not be extended to all 127 modelling samples due to cost and time constraints. A mapping of XRD sample identifiers to their corresponding lithological classes and modelling dataset membership is provided in Supplementary Table S2.

2.3.3. Petrographic Analysis of Phosphate Waste Rock Piles

Phosphate waste rock piles consist predominantly of brittle and unconsolidated materials, which complicate conventional thin-section preparation. To investigate petrographic properties and mineral textures, 10 polished thin sections were prepared by manually selecting representative grains from different lithologies. The selected grains were arranged side by side and embedded in resin prior to polishing. Petrographic observations were conducted using a Leica DM2700P polarizing microscope (Leica Microsystems GmbH, Wetzlar, Germany), allowing identification of mineral assemblages, grain relationships, and textural features relevant to waste-rock heterogeneity.

2.4. PRISMA Hyperspectral Dataset

2.4.1. PRISMA Hyperspectral Data Acquisition and Processing

The PRISMA hyperspectral sensor acquires 66 VNIR bands (400–1010 nm) and 173 SWIR bands (920–2500 nm), enabling detailed surface material characterization through high-resolution, continuous spectral coverage [21].
A single cloud-free hyperspectral PRISMA scene covering the Benguerir open-pit phosphate mine (centered at 32.2157, −7.86712) was acquired in January 2022. Data were downloaded from the PRISMA portal in HDF5 format. The Level-2D (L2D) product corresponds to geocoded surface reflectance generated from the Level-2C at-surface reflectance product within the PRISMA processing chain [8,22]. The scene covers an area of 30 × 30 km, with a spatial resolution of 30 m for hyperspectral bands.
The main technical characteristics of the PRISMA hyperspectral sensor and the dataset used in this study are summarized in Table 1.

2.4.2. Data Correction, Spectral Signal Optimization, and Feature Selection

The high dimensionality of PRISMA hyperspectral data requires a structured preprocessing workflow to isolate the true mineralogical signal from sensor noise and atmospheric interference. The spectral optimization was implemented as the following three-stage pipeline:
(1)
Spatial alignment and geometric correction: image registration was performed using the THOR Change Detection tool in ENVI 5.5.2 (L3Harris Technologies, Melbourne, FL, USA) to correct a slight spatial misalignment between the geocoded PRISMA L2D product and the vectorized field boundaries. A nearest-neighbor resampling algorithm was applied to preserve spectral integrity of the pixels.
(2)
Signal integrity, atmospheric masking and smoothing: spectral regions with low SNR (atmospheric water-vapor absorption windows at 1300–1500 nm and 1750–1980 nm) were masked [24,25]. The remaining signal was smoothed using a Savitzky–Golay filter (polynomial order = 2, window size = 7), which preserves the precise geometry of diagnostic absorption features, particularly the clay and carbonate doublets critical for characterizing phosphate mine waste [26,27].
(3)
Dimensionality reduction ANOVA-based feature selection: wavelength ranking was performed using an Analysis of Variance (ANOVA) F-test embedded within each spatial cross-validation fold (Figure 4B). For each training split, F-statistics were computed exclusively on the training subset, and the top 60 highest-scoring bands were selected prior to model fitting. The mean F-score across folds is reported to assess feature-selection stability. This nested implementation prevents information leakage, ensures strict independence between training and validation data, and focuses the models on the SWIR region (1000–2500 nm), which carries the highest discriminative power for lithological differentiation [28].
Initial quality control involved the removal of specific spectral regions characterized by a low Signal-to-Noise Ratio (SNR). This included the masking of the dominant atmospheric water-vapor absorption windows (1300–1500 nm and 1750–1980 nm), where photon scattering suppresses valid surface reflectance [24,25]. To refine the remaining signal, a Savitzky–Golay filter (polynomial order = 2, window size = 7) was applied. Unlike standard moving-average filters, this method preserves the precise geometry and depth of narrow diagnostic absorption features, such as the clay and carbonate doublets essential for characterizing phosphate mine waste [26,27].
To mitigate the curse of dimensionality while preserving discriminative mineralogical information, wavelength ranking was performed using an Analysis of Variance (ANOVA) F-test embedded within each spatial cross-validation fold (Figure 4B). For each training split, F-statistics were computed exclusively on the training subset, and the top 60 highest-scoring bands were selected prior to model fitting. The mean F-score across folds is reported to assess feature-selection stability. This nested implementation prevents information leakage and ensures strict independence between training and validation data. Consistent with mineralogical expectations, the Short-Wave Infrared (SWIR) region (1000–2500 nm) carries the highest informational weight for differentiating lithological units. This targeted selection enables the models to focus on robust diagnostic absorption features while maintaining computational efficiency under spatially constrained validation [28].

2.5. Lithological Mapping and Spatial Validation Strategy

Machine learning algorithms were applied to the optimized PRISMA feature vector to perform lithological supervised classification of the phosphate waste rock piles. While the initial field dataset consisted of 207 field-validated observations, a rigorous spatial redundancy filter was applied to ensure that each data point corresponded to a unique PRISMA pixel footprint. This process resulted in a refined set of 127 unique spectral samples categorized into four primary lithological classes: Phosphate rock, Siliceous facies, Marl, and Limestone. By removing the 80 duplicate observations that occupied shared pixels, the study mitigated the risk of spectral leakage, ensuring that the 30 m spatially constrained validation provided a more realistic estimate of spatial generalization rather than being inflated by local autocorrelation. To ensure a robust and transparent evaluation, all models were implemented in a Python v3.12.7 environment using the Scikit-learn and XGBoost frameworks, facilitating a fully reproducible analysis workflow.
We evaluated a suite of five supervised classifiers prioritized for their performance in high-dimensional remote sensing tasks: Random Forest (RF) [29], XGBoost [30], Support Vector Machine (SVM) [31], Extra Trees (ET) [32], and K-Nearest Neighbors (KNN). Two additional classifiers were included as comparative baselines: LightGBM, a second gradient boosting implementation, and Spectral Angle Mapper (SAM), a parameter-free classical hyperspectral classifier that assigns each pixel to the class whose mean training spectrum has the minimum spectral angle. Deep learning architectures (e.g., 1D-CNN) were not included because the 127-sample dataset, with approximately 20–49 samples per class, is insufficient for stable cross-validation of convolutional networks without data augmentation strategies that would introduce additional assumptions beyond the scope of this study. All classifiers used the following configurations: RF and ET: n_estimators = 100, class_weight = balanced, random_state = 42; XGBoost: eval_metric = mlogloss, random_state = 42; SVM: C = 10, kernel = rbf, probability = True, class_weight = balanced; KNN: n_neighbors = 5; LightGBM: n_estimators = 200, learning_rate = 0.05, class_weight = balanced. The class_weight = balanced setting corrects for the moderate class imbalance in the dataset (Marl: 38.6%; Limestone: 27.6%; Phosphate: 18.1%; Siliceous: 15.7%). All experiments were repeated ten times with independent spatial partitions (N_REPEATS = 10, N_FOLDS = 5), yielding 50 train/test splits per model to ensure statistically robust performance estimates. These models were trained using the top 60 ANOVA-ranked bands selected independently within each spatial cross-validation fold. This targeted feature representation ensures that the classifiers prioritize the diagnostic absorption features of the Short-Wave Infrared (SWIR) region, thereby reducing the “curse of dimensionality” and improving the physical interpretability of the results [28].
A critical component of our methodology is the mitigation of spatial autocorrelation, which frequently leads to inflated performance metrics in geological remote sensing [33]. Building upon the initial redundancy filter, we implemented Spatially Constrained Cross-Validation incorporating a 30 m spatial buffer between the training and validation subsets. This distance corresponds to the native spatial resolution of the PRISMA sensor, effectively preventing “data leakage” from spatially adjacent pixels [34]. By enforcing this buffer within 10 independent replicates of the 127-sample dataset, the models were evaluated on their ability to generalize to spatially independent lithological contexts rather than simply reflecting local spectral similarity, thereby improving the geological relevance of the final mapping. Under the 5-fold scheme applied to 127 samples, each fold nominally designates approximately 25 samples for validation and 102 samples for training. After applying the 30 m spatial buffer (which excludes training samples located within one pixel width of any validation sample), the effective training set is reduced to approximately 85–100 samples per fold, depending on the spatial configuration of that particular replicate. This reduction reflects the spatial clustering inherent to field campaigns over contiguous geological units and represents the operationally honest training size used to evaluate generalization performance.
Final model performance was quantified using a comprehensive diagnostic suite, including Receiver Operating Characteristic (ROC) curves, normalized confusion matrices, and per-class F1-scores. To assess the reliability of the spatial predictions, model robustness was verified through repeated training runs, and classification uncertainty was spatially mapped using entropy-based metrics derived from the class probability outputs [35]. This rigorous validation framework provides the statistical foundation for the lithological, uncertainty, and posterior probability maps presented in Section 3.

3. Results

3.1. Petrographic, Mineralogical, and Chemical Characterization

Petrographic observations confirm that phosphate mine waste rocks from the Benguerir site exhibit a complex but systematic mineralogical assemblage. Thin-section analysis reveals a heterogeneous mixture of phosphatic and non-phosphatic components. The non-phosphatic fraction is dominated by calcite, dolomite, quartz, and biogenic fragments, reflecting the combined carbonate and siliciclastic nature of the host formations, whereas the phosphatic fraction is primarily expressed as rounded pelloids and phosphatic clasts embedded within a fine-grained carbonate-siliceous matrix (Figure 5).
Bulk chemical composition determined by XRF confirms the petrographic observations. The PWRPs are dominated by SiO2, CaO, and P2O5, which together account for the majority of the bulk composition. However, substantial compositional variability is observed among samples, particularly for SiO2 and P2O5, reflecting variable proportions of siliceous, carbonate, and phosphatic components. These variations are summarized statistically in Supplementary Table S1, where SiO2 ranges from approximately 6 to 56 wt%, CaO from 13 to 52 wt%, and P2O5 from about 1 to nearly 24 wt%.
X-ray diffraction results further corroborate these findings. All analyzed samples display dominant peaks of calcite and dolomite, with subordinate contributions from quartz, fluorapatite, and illite (Figure 6). Although the mineral assemblage is broadly consistent across samples, variations in peak intensities indicate differences in relative mineral proportions. These differences are critical for hyperspectral analysis, as they contribute directly to spectral heterogeneity and class overlap observed in subsequent machine-learning classification.
From a hyperspectral perspective, carbonate minerals such as calcite and dolomite exhibit strong and diagnostic CO32− absorption features in the short-wave infrared (SWIR) region. Calcite typically presents prominent absorption bands centered at approximately 2333–2340 nm and 2530–2541 nm, whereas dolomite absorption bands are shifted toward shorter wavelengths, occurring around 2312–2323 nm and 2503–2520 nm. These features arise from vibrational processes of the carbonate ion, and the band-position shifts reflect variations in Ca-Mg composition within the carbonate structure [36].
Illite and related clay minerals are characterized by a prominent Al-OH absorption feature centered near 2200–2220 nm, associated with Al-OH bending combined with OH stretching vibrations, and by a water-related absorption band around 1900 nm attributable to molecular H2O [37]. Fluorapatite exhibits weak SWIR absorption features near approximately 2150 nm related to PO43− vibrational processes. These features are generally subtle compared with the strong carbonate absorptions and may be partially masked under mineral-mixing conditions [38].
In contrast, quartz lacks diagnostic absorption features in the VNIR-SWIR spectral range and exhibits a largely featureless reflectance response between approximately 1000 and 2500 nm, which limits its direct identification using hyperspectral data [39,40].
These spectral characteristics provide the physical foundation for hyperspectral discrimination of the identified lithological units and establish the mineralogical basis for the subsequent PRISMA-based analysis.

3.2. Machine Learning Modelling Approach

3.2.1. Learning Curve Analysis and Generalization Behavior

The learning behavior of the five supervised classifiers was evaluated using validation learning curves derived under spatially constrained cross-validation with a 30 m buffer, enabling assessment of spatial generalization performance as a function of training sample size. Although the full dataset consists of 127 samples, the spatial constraint reduces the effective number of independent training samples per fold. Learning curves were therefore constructed using progressively increasing training set sizes to examine model scalability and robustness under spatial separation. Random Forest and Extra Trees exhibit similar learning dynamics, characterized by a marked improvement in validation accuracy from small to intermediate training sizes, followed by stabilization at approximately 0.60–0.65 for larger datasets (Figure 7A,B). This early performance gain and subsequent plateau indicate that ensemble tree-based methods effectively capture dominant spectral patterns but remain constrained by the limited number of spatially independent samples. The relatively narrow confidence intervals at larger training sizes suggest stable generalization behavior.
XGBoost displays comparatively flatter learning dynamics, with validation accuracy remaining within the range of approximately 0.55–0.60 across increasing training sizes (Figure 7C). The limited improvement with additional samples suggests a more conservative generalization pattern under spatially constrained validation, potentially reflecting sensitivity to spatial heterogeneity within the dataset.
SVM demonstrates gradual improvement in validation accuracy as training size increases, reaching values around 0.60 at larger sample sizes (Figure 7D). This trend indicates progressive enhancement in spatial generalization with additional data, consistent with the regularized nature of the classifier.
KNN shows stronger variability in validation performance, with an initial increase at intermediate training sizes followed by slight fluctuations at larger sample sizes (Figure 7E). The wider confidence intervals observed for this classifier reflect sensitivity to sample distribution and local spectral variability, which is expected given its instance-based learning mechanism and the high dimensionality of hyperspectral feature space.

3.2.2. Overall Classification Performance and ROC Analysis

The discrimination performance of the five classifiers evaluated in this study, Random Forest, Extra Trees, XGBoost, Support Vector Machine, and K-Nearest Neighbors, was further assessed using Receiver Operating Characteristic (ROC) curves computed in a one-vs-rest (OvR) framework for each lithological class (Figure 8). All ROC metrics were derived from spatially constrained cross-validation with fold-wise preprocessing and feature selection, ensuring that the reported performance reflects out-of-fold model evaluation without information leakage. Across all classifiers, ROC analysis revealed pronounced class-dependent behavior, reflecting the intrinsic spectral complexity of the mine waste environment.
Carbonate-dominated classes (Marl and Limestone) consistently achieve the highest Area Under the Curve (AUC) values, frequently exceeding 0.95 across all models (Figure 8). This strong performance is attributed to their well-defined and stable spectral signatures in the VNIR–SWIR domains, particularly the diagnostic absorption features associated with CO3 vibrations. In contrast, Phosphate rock and Siliceous facies exhibit lower AUC values, typically ranging between ~0.65 and ~0.78, indicating increased spectral overlap and higher internal variability within these lithological units.
Ensemble-based methods, particularly Random Forest and Extra Trees, demonstrate consistently high ROC performance across all classes (Figure 8A,B). By leveraging bootstrap aggregation and random feature selection, these models effectively preserve excellent discrimination of carbonate lithologies while maintaining moderate but consistent separation of phosphate-bearing materials [29,32]. XGBoost achieves comparable AUC values for carbonate classes but shows greater variability for phosphate-related facies, reflecting its sensitivity to the specific training data distribution (Figure 8C) [30].
SVM maintains robust AUC values across all lithologies, highlighting its ability to preserve class ranking even when overall classification accuracy is reduced (Figure 8D) [31]. In contrast, KNN shows reduced and less stable separation for non-carbonate classes, particularly for Phosphate rock (Figure 8E). This behavior underscores the limitations of instance-based learning when confronted with spectral noise, class overlap, and high-dimensional feature spaces typical of heterogeneous waste rock piles [41].

3.2.3. Confusion Patterns and Class-Specific Performance

Normalized confusion matrices provide a detailed view of systematic misclassification patterns among the targeted lithological units (Figure 9). Across the five-model suite, the most frequent confusion consistently occurs between Phosphate rock and Siliceous facies. This behavior directly reflects their shared mineralogical characteristics, as both classes exhibit overlapping spectral features in the SWIR region associated with siliceous–phosphatic signatures.
Random Forest and Extra Trees show the strongest diagonal dominance overall, indicating superior and more stable classification performance relative to the other models. This advantage is particularly pronounced for the Marl class, where correct classification rates consistently exceed 0.90, and for Limestone, which is also classified with relatively high accuracy (Figure 9A,B). These ensemble methods effectively exploit the high-dimensional feature space defined by the 60 ANOVA-selected bands, using random subspace sampling to isolate subtle spectral differences between lithologies.
XGBoost and SVM exhibit similar confusion patterns but show increased misclassification between phosphate-bearing and siliceous units (Figure 9C,D). This suggests that, while these models remain effective at identifying carbonate-rich lithologies, they are more sensitive to spectral overlap within transitional facies common in heterogeneous waste-rock environments.
KNN displays the highest degree of class mixing, with Phosphate rock most frequently misclassified as Siliceous facies (Figure 9E). This pronounced “spectral bleeding” highlights the limitations of instance-based learning approaches when applied to high-dimensional hyperspectral data characterized by strong mineralogical mixing and non-linear class boundaries.
Overall, the observed confusion patterns are fully consistent with the trends identified in the learning curve and ROC analyses, confirming that ensemble-based methods (Random Forest and Extra Trees) provide the most robust and reliable class separation under spatially constrained validation conditions.

3.2.4. Spatial Distribution of Lithological Classes

Application of the five trained models to the full PRISMA scene enabled the generation of lithological maps illustrating the spatial distribution of the four main units: Phosphate rock, Siliceous facies, Marl, and Limestone (Figure 10). Clear differences in spatial coherence and geological plausibility are observed among the classifiers.
Random Forest (RF) and Extra Trees (ET) produce the most spatially coherent and geologically consistent maps (Figure 10A,B). These ensemble methods clearly delineate extensive carbonate-dominated zones while capturing gradual mineralogical transitions toward phosphate-bearing areas. They preserve fine-scale heterogeneity with limited salt-and-pepper noise, maintaining a balanced representation of local variability and broader geological trends.
XGBoost (Figure 10C) reproduces similar large-scale spatial patterns but introduces increased local variability, particularly along lithological boundaries. This behavior suggests a higher sensitivity to localized spectral fluctuations when applied across the full scene, consistent with the model’s reliance on sequential boosting of decision rules.
SVM results (Figure 10D) exhibit pronounced spatial heterogeneity, characterized by abrupt local transitions and patchy class assignments, especially in the northern sectors of the waste-rock piles. This pattern indicates limited generalization of the separating hyperplane across complex spatial gradients and mixed lithological zones.
KNN (Figure 10E) generates comparatively smoother and more generalized maps, with reduced spatial detail and attenuation of fine-scale heterogeneity. This tendency reflects the instance-based nature of KNN, which relies on local neighborhood averaging and therefore smooths over subtle but geologically meaningful spectral variations.
Overall, the spatial patterns observed in the lithological maps are consistent with the quantitative results derived from validation learning curves, ROC analysis, and confusion matrices, indicating that ensemble-based approaches (RF and ET) provide comparatively stable and geologically coherent spatial predictions for heterogeneous waste-rock environments under spatially constrained evaluation.

3.2.5. Prediction Reliability: Uncertainty, Posterior Probability, and Model Stability

Beyond global accuracy metrics, classification reliability was evaluated through spatial uncertainty, posterior probability, and stability analyses. These complementary perspectives provide deeper insight into the robustness of predictions and the sensitivity of each classifier to mineralogical variability across the waste-rock system.
Spatial uncertainty maps derived from Shannon entropy reveal consistent spatial patterns throughout the study area (Figure 11). Low entropy values dominate the Marl and Limestone zones, indicating high classification scores where spectral signatures are well defined and mineralogical composition is relatively homogeneous. In contrast, elevated entropy is concentrated along lithological boundaries and transitional corridors, particularly where Phosphate and Siliceous facies interact. These areas correspond to zones of mineralogical mixing and compositional variability previously identified through petrographic and geochemical analyses.
Random Forest (RF) and Extra Trees (ET) exhibit the most spatially coherent uncertainty patterns, with entropy primarily confined to geological boundaries and transition zones (Figure 11A,B). SVM and XGBoost display broader regions of elevated entropy, suggesting increased sensitivity to spectral overlap and spatial gradients (Figure 11C,D). KNN produces more irregular and locally patchy uncertainty distributions, reflecting instability associated with its instance-based decision mechanism in high-dimensional hyperspectral feature spaces (Figure 11E).
Overall, the entropy analysis reinforces the findings from learning curves, ROC curves, and confusion matrices, confirming that spatially structured entropy patterns directly reflect the mineralogical complexity of the waste-rock environment and that ensemble-based classifiers produce the most geologically coherent uncertainty fields.
Confidence maps, derived from maximum posterior class probabilities, provide a complementary perspective on classification reliability (Figure 12). High posterior probability estimates (exceeding 0.8) are spatially extensive for the ensemble models, particularly Random Forest and Extra Trees, and are most prominent within carbonate-dominated sectors (Figure 12A,B). These models maintain strong posterior probability scores across large homogeneous zones while exhibiting localized reductions along lithological boundaries.
XGBoost maintains relatively high posterior probability scores over broad areas but shows greater pixel-level variability compared to the ensemble methods (Figure 12C). In contrast, SVM and KNN display lower and more spatially variable posterior probability patterns, with reduced probability values especially evident in transitional and phosphate-rich zones (Figure 12D,E). Reduced posterior probability is particularly pronounced along lithological boundaries and phosphate-siliceous interaction corridors, reflecting the spectral heterogeneity and mineralogical mixing characteristic of the waste-rock environment rather than random classification noise.
Overall, the posterior probability analysis reinforces the quantitative results from learning curves, ROC curves, and confusion matrices, confirming that ensemble-based methods provide not only higher predictive accuracy but also greater spatial posterior probability scores and reduced classification uncertainty under spatially constrained validation.
Model robustness was evaluated through repeated training across ten spatially independent replicates under the 30 m spatial constraint (Figure 13). The stability analysis reveals clear differences in median performance while indicating generally consistent behavior across spatial partitions. Extra Trees and Random Forest achieve the highest median accuracies with relatively narrow interquartile ranges, demonstrating strong resilience to variations in spatial data partitioning. XGBoost and SVM show slightly lower median performance with comparable dispersion, suggesting greater sensitivity to spatial sample configuration. KNN exhibits intermediate median accuracy with moderate variability, reflecting its dependence on local neighborhood structures in the high-dimensional ANOVA-selected feature space. Overall, ensemble-based approaches combine superior median performance with stable behavior across spatial replicates, reinforcing their robustness for heterogeneous waste-rock classification under realistic validation conditions.
Taken together, the learning curves, ROC analysis, confusion matrices, spatial lithological maps, uncertainty assessments, posterior probability distributions, and stability experiments converge toward a consistent interpretation. Ensemble-based classifiers, particularly Extra Trees and Random Forest, achieve the highest and most stable median performance while demonstrating superior spatial coherence, lower boundary uncertainty, and consistent behavior across spatial replicates under spatially constrained cross-validation with fold-wise feature selection. Beyond conventional accuracy metrics, these complementary spatial and statistical diagnostics reveal the internal structure of model behavior and its direct relationship to mineralogical heterogeneity within the waste-rock system. Collectively, the evidence supports the selection of Extra Trees and Random Forest as the most robust and operationally reliable approaches for lithological mapping in complex phosphate waste environments.

3.2.6. Summary of Machine Learning Performance

This section synthesizes the predictive behavior of the five classifiers under spatially constrained cross-validation with fold-wise feature selection. Overall, the comparative evaluation reveals clear differences in the ability of the algorithms to classify complex phosphate waste-rock lithologies using PRISMA hyperspectral data. Ensemble-based approaches, particularly Random Forest and Extra Trees, demonstrated consistently superior performance across most evaluation criteria. These models achieved the highest median overall accuracies and AUC values while maintaining stable learning behavior under the rigorous 30 m spatial validation framework. A comprehensive performance summary for all seven classifiers (the five original models plus LightGBM and SAM) is provided in Table 2, reporting Overall Accuracy (OA), Balanced Accuracy (BA), Cohen’s Kappa (κ), weighted F1-score, Matthews Correlation Coefficient (MCC), and macro-averaged AUC as mean ± standard deviation across ten repeated spatial CV runs. Extra Trees achieves the highest balanced accuracy (BA = 0.693 ± 0.032) and AUC (0.863 ± 0.012), followed closely by Random Forest (BA = 0.666 ± 0.032, AUC = 0.858 ± 0.012). LightGBM (BA = 0.626 ± 0.041) performs comparably to XGBoost (BA = 0.637 ± 0.019), confirming that the performance advantage of bagging-based ensemble methods over boosting-based methods is robust to the specific implementation. SAM, the parameter-free classical hyperspectral baseline, achieves BA = 0.536 ± 0.036, substantially below all supervised classifiers (ΔBA = +0.097 to +0.157), quantifying the added discriminative value of machine learning over spectral similarity metrics alone. A direct comparison between random stratified k-fold and spatially constrained cross-validation was also conducted for the five original classifiers. Performance differences were small (|ΔBA| ≤ 0.035) and did not show a consistent directional bias, which is consistent with the prior pixel deduplication step having already suppressed the dominant spatial autocorrelation at the 30 m scale. Importantly, this result confirms that the reported accuracies under spatial CV are not artefacts of autocorrelation inflation and therefore represent genuine estimates of generalization to spatially independent areas of the waste-rock piles. Feature selection ablation (full 189 bands vs. ANOVA-60) showed that ANOVA-60 matches or exceeds full-band performance for four of five classifiers, with the most pronounced improvement for SVM (ΔBA = +0.064), confirming the suitability of ANOVA-based dimensionality reduction for this task. A comparison between the ANOVA F-test and mutual information as feature selectors (both at k = 60) showed negligible performance differences (|ΔBA| ≤ 0.010), validating the original choice of ANOVA for its interpretability and computational efficiency within the nested CV pipeline (Supplementary Table S4).
Performance consistency was preserved despite fold-wise variability in ANOVA-selected bands, indicating that the dominant mineralogical absorption features driving class separation are robust across spatial partitions. Although some models achieved comparable global accuracy metrics in isolated instances, clear differences emerged in learning dynamics, spatial coherence, and stability. Random Forest and Extra Trees exhibited the most reliable generalization patterns, characterized by low variance across repeated spatial replicates and the production of spatially coherent lithological maps.
XGBoost achieved similar large-scale classification performance but displayed greater sensitivity to spatial sample configuration, as reflected in its learning curves and stability analysis. Support Vector Machine demonstrated intermediate performance, maintaining strong class-ranking capability but exhibiting increased spatial heterogeneity and reduced stability relative to the ensemble methods. K-Nearest Neighbors generally yielded lower median performance and more generalized spatial outputs, indicating limited capacity to resolve complex lithological boundaries under spatial constraints.
The integration of uncertainty and posterior probability analyses further reinforces these findings. Ensemble methods produced lower Shannon entropy and higher posterior probability scores across extensive carbonate-dominated areas, whereas SVM and KNN showed elevated uncertainty and fragmented posterior probability patterns, particularly along lithological boundaries and mineralogically mixed zones.
Collectively, these results indicate that ensemble learning strategies are particularly well suited for exploiting high-dimensional hyperspectral data under realistic spatial validation conditions. The consistent performance hierarchy observed across quantitative and spatial diagnostics provides a robust empirical foundation for the geological interpretation presented in Section 4.

4. Discussion

4.1. Mineralogical Constraints on Hyperspectral Discrimination of Phosphate Waste Rocks

The integrated petrographic, mineralogical, and geochemical analyses indicate that the phosphate waste rock piles of the Benguerir mine comprise a heterogeneous, yet stratigraphically coherent assemblage dominated by carbonate minerals, with variable contributions from quartz, fluorapatite, and clay phases. This configuration reflects the lithostratigraphic organization of the Gantour Basin phosphatic series and is consistent with established descriptions of Moroccan phosphate deposits [19,20].
From a hyperspectral perspective, this mineralogical architecture imposes fundamental physical constraints on class separability. Carbonate-dominated lithologies, particularly marl and limestone, exhibit stable and diagnostically distinct spectral responses in the VNIR–SWIR domain. The strong overtone and combination absorption bands of the CO3 group near 2300–2350 nm [42] provide robust spectral signatures that remain detectable even under moderate mixing conditions. These diagnostic features were prominently represented among the highest-ranking ANOVA-selected bands, contributing to the consistently high classification accuracy and AUC values (>0.95) observed across all models.
In contrast, phosphate-bearing and siliceous facies commonly occur as mixed mineral assemblages at both macroscopic and microscopic scales. At the 30 m spatial resolution of the PRISMA sensor, individual pixels frequently integrate quartz-rich fragments, phosphatic clasts (fluorapatite), carbonate matrices, and weathered surfaces within a single observation. This sub-pixel heterogeneity promotes both linear and intimate spectral mixing, reducing effective spectral contrast. Unlike carbonates, quartz lacks strong diagnostic absorption features in the VNIR–SWIR region [43], while fluorapatite absorption features are comparatively subtle and often masked by dominant matrix minerals. This spectral dilution likely contributes to the recurrent confusion between phosphate rock and siliceous facies observed in the normalized confusion matrices (Figure 9).
Similar constraints have been documented in other complex mining environments, where mineralogical mixing and surface heterogeneity limit hyperspectral discrimination despite high spectral resolution [44]. These findings underscore that classification performance is not solely a function of algorithmic sophistication but is inherently constrained by intrinsic spectral separability and material mixing dynamics. While ensemble-based models such as Extra Trees and Random Forest more effectively approximate non-linear decision boundaries within this feature space, their performance remains ultimately governed by the spectral distinctiveness and purity of the mapped lithological units. The highest predictive reliability therefore occurs in classes characterized by strong and unique chemical bond vibrations, whereas mixed or transitional facies present unavoidable physical limits to separability.

4.2. Machine Learning Performance Under Realistic Spatial Validation

A central methodological contribution of this study is the implementation of spatially constrained cross-validation using a 30 m buffer, corresponding to the native spatial resolution of PRISMA hyperspectral imagery. This validation strategy minimizes spatial dependence between training and validation samples and substantially reduces information leakage associated with spatial autocorrelation among neighboring pixels that share similar spectral signatures. In addition, all preprocessing and ANOVA-based feature selection steps were embedded within the cross-validation pipeline, ensuring that each fold was trained independently and eliminating potential feature-selection bias.
Under this rigorous framework, classification accuracies for the best-performing ensemble models (Extra Trees and Random Forest) stabilized between 0.67 and 0.69. Although these values are lower than those commonly reported under random cross-validation, they represent a realistic and conservative estimate of generalization performance for spaceborne hyperspectral mapping over heterogeneous geological materials. Previous studies have demonstrated that random cross-validation can significantly overestimate predictive accuracy in spatially structured datasets, as autocorrelation between proximate samples violates the assumption of independence and introduces optimistic bias [34,45].
In contrast, spatially constrained validation strategies that explicitly separate training and validation data in geographic space yield more robust and transferable performance estimates, particularly in mining environments where lithological units are spatially contiguous [46]. The moderate but methodologically robust accuracies observed here reflect the intrinsic difficulty of lithological discrimination at the 30 m PRISMA pixel scale, where mixed pixels, sub-pixel heterogeneity, and mineralogical blending are unavoidable.
These results should therefore be interpreted as a realistic benchmark of operational predictive capability rather than as evidence of methodological limitation. By enforcing spatial separation at the sensor’s native resolution, the modeling framework prioritizes transferable spectral–mineralogical relationships over spatial proximity effects, a critical requirement for reliable mine-scale mapping, reclamation planning, and waste-rock management.

4.3. Algorithmic Behavior and Ensemble Robustness

Clear differences emerge in how the various machine learning algorithms respond to the spectral complexity and spatial structure of the phosphate waste rock piles. Ensemble-based classifiers, particularly Extra Trees and Random Forest, demonstrated consistently strong performance across the majority of evaluation criteria, including learning curves, ROC analysis, spatial mapping, uncertainty assessment, and robustness experiments. Their superior and stable behavior likely reflects their capacity to model complex nonlinear relationships while reducing variance through aggregation of multiple randomized decision trees. This ensemble advantage is particularly relevant in high-dimensional hyperspectral feature spaces, where averaging across randomized feature subsets reduces sensitivity to individual noisy or redundant bands [29,32].
XGBoost exhibited strong discriminative capability and competitive large-scale accuracy but showed greater sensitivity to spatial partitioning and training sample variability compared to the bagging-based ensemble approaches. This behavior is consistent with the sequential boosting strategy, which incrementally fits residual errors and may become more responsive to localized spectral structures within spatially clustered training data.
Support Vector Machine (SVM) maintained relatively high AUC values, indicating effective class ranking performance. However, its lower balanced accuracy and increased spatial heterogeneity suggest a more constrained decision boundary relative to ensemble methods when modeling complex nonlinear spectral mixtures characteristic of heterogeneous waste rock environments [31].
K-Nearest Neighbors (KNN) generally yielded lower median performance and produced more spatially generalized outputs. This behavior is consistent with the curse of dimensionality and the inherent sensitivity of distance-based classifiers to spectral overlap and noise in high-dimensional hyperspectral datasets [47]. Collectively, these findings indicate that for operational mapping in spatially heterogeneous mining environments, ensemble-based strategies provide a more stable and resilient modeling framework under realistic spatial validation constraints.

4.4. Spatial Coherence, Uncertainty, and Geological Meaning

Beyond numerical metrics, spatial prediction patterns provide important insight into the relationship between model behavior and geological structure. The ensemble models generate spatially coherent and geologically plausible lithological maps that preserve gradual mineralogical transitions between waste rock facies. In contrast, SVM and KNN produce more heterogeneous or spatially simplified patterns, particularly in lithologically complex zones where class boundaries are less distinct.
The uncertainty and posterior probability analyses further reinforce this interpretation by showing that model uncertainty is spatially structured rather than randomly distributed. Elevated Shannon entropy and reduced posterior probability estimates (used here as relative indicators of classification reliability, noting that formal probability calibration was not applied) consistently occur along lithological boundaries and within phosphate-bearing or siliceous facies. These zones correspond to areas of increased mineralogical mixing at the 30 m pixel scale. Conversely, marl- and limestone-dominated sectors exhibit low uncertainty and high classification scores, reflecting their more homogeneous composition and diagnostically distinct spectral responses.
This spatial correspondence suggests that uncertainty patterns are geologically meaningful and largely controlled by intrinsic mineralogical heterogeneity rather than solely reflecting algorithmic instability. From an operational perspective, these maps provide practical guidance for mine reclamation and waste-rock management by identifying areas of complex mineralogical mixing that may require differentiated handling strategies [48]. By explicitly quantifying both posterior probability estimates and spatial uncertainty, the modeling framework illustrates the potential of hyperspectral mapping as a decision-support tool in heterogeneous mining environments.

4.5. Implications for Phosphate Waste Management and Future Perspectives

The generation of spatially explicit lithological maps together with associated uncertainty profiles provides a structured and operationally relevant framework for phosphate waste rock management at the Benguerir mine. By delineating the spatial distribution of phosphate-bearing zones within heterogeneous waste piles, the approach supports selective recovery assessments and targeted valorization strategies. In parallel, the integration of Shannon entropy-based uncertainty mapping facilitates more risk-informed planning by identifying areas where posterior probability scores are reduced due to mineralogical mixing. Such zones can be prioritized for additional field validation, detailed geochemical sampling, or targeted ground investigations. Similar sensor-based workflows have been shown to support improved resource efficiency and environmentally informed decision-making in large-scale mining contexts [19,20].
Despite the robustness of the present framework, several physical and sensor-related limitations must be acknowledged. The 30 m spatial resolution of the PRISMA sensor, although suitable for regional hyperspectral monitoring, constrains discrimination in zones characterized by fine-scale lithological variability and intense sub-pixel mixing. Furthermore, the analysis relies on a single-date acquisition and surface-only characterization, representing a temporal and vertical snapshot of the waste-rock system. Atmospheric variability, surface weathering conditions, and feature selection choices may also influence model performance. The comparative classifier evaluation is limited to the seven models assessed here; deep learning architectures (e.g., 1D-CNN, transformers) were not included due to insufficient sample sizes for reliable spatial cross-validation at the present dataset scale. Furthermore, the framework has been validated at a single site (Benguerir), and its transferability to other phosphate mining contexts (e.g., Khouribga, Youssoufia and Boucrâa) has not been empirically demonstrated. While the pipeline relies exclusively on globally available PRISMA L2D products and GPS-georeferenced field labels, making it applicable in principle to other sites, lithological class prototypes and ANOVA-selected bands will differ between sites due to geochemical variability, requiring site-specific retraining. Multi-site validation remains an important direction for future work before broad operational deployment can be claimed. Finally, the posterior probabilities used to construct confidence and uncertainty maps are not formally calibrated (no Platt scaling or isotonic regression was applied), and the Shannon entropy and maximum posterior probability metrics should therefore be interpreted as relative indicators of prediction uncertainty rather than absolute probabilistic estimates.
Future research should therefore explore multi-temporal hyperspectral acquisitions to monitor weathering evolution and surface alteration processes within waste-rock piles. The integration of spectral unmixing approaches could further enhance quantification of sub-pixel mineral abundances, particularly within phosphate–siliceous transitional facies. Ultimately, coupling surface hyperspectral predictions with subsurface geophysical surveys, borehole datasets, or 3D geological models will be essential for developing comprehensive three-dimensional characterizations required for long-term mine rehabilitation, environmental risk mitigation, and sustainable site stabilization.

5. Conclusions

This study demonstrates the feasibility of integrating PRISMA spaceborne hyperspectral imagery, ground-based mineralogical characterization, and spatially constrained machine learning for mapping phosphate waste rock piles in the Gantour Basin, Morocco. The combined use of petrography, XRD, XRF, and hyperspectral data establishes a multi-scale framework capable of capturing both compositional and spatial heterogeneity within mining wastes.
Mineralogical and geochemical analyses reveal a lithological assemblage dominated by carbonate minerals, silica phases, and phosphate components. Petrographic observations confirm the frequent coexistence of phosphatic clasts and microcrystalline silica within carbonate matrices, explaining the spectral mixing and inherent limits on lithological separability at the 30 m PRISMA pixel scale.
Among the evaluated classifiers, ensemble methods, particularly Extra Trees and Random Forest, demonstrate comparatively stable and consistent performance relative to distance-based and margin-based approaches. While SVM maintains high AUC values, its lower balanced accuracy suggests a more constrained decision boundary when modeling nonlinear spectral mixtures. The use of spatially constrained cross-validation with a 30 m buffer, combined with nested preprocessing and feature selection, yielded moderate but stable accuracies (0.56–0.69), providing a realistic and methodologically rigorous estimate of model generalization while minimizing optimistic bias associated with random cross-validation in spatially structured datasets.
The resulting lithological maps exhibit spatially coherent geological patterns, and the integration of Shannon entropy and posterior probability analyses highlights zones of ambiguity concentrated along lithological boundaries and mixed phosphate–siliceous facies. These uncertainty structures primarily reflect intrinsic mineralogical heterogeneity rather than algorithmic instability, offering valuable guidance for risk-informed interpretation.
Overall, the findings indicate that moderate classification accuracies represent a realistic and physically constrained outcome when mapping heterogeneous geological materials using spaceborne hyperspectral sensors under spatial independence constraints. A direct comparison between spatial and random cross-validation confirmed that the reported accuracies are not artefacts of autocorrelation inflation. The addition of LightGBM and SAM baselines confirmed the performance hierarchy: bagging-based ensembles outperform gradient boosting methods, which in turn substantially outperform the parameter-free spectral baseline (SAM: BA = 0.536 vs. Extra Trees: BA = 0.693). Feature selection ablation and ANOVA vs. mutual information comparisons further validated the original methodological choices. Several limitations should be noted: the framework has been validated at a single site; formal probability calibration for uncertainty maps was not performed; and deep learning approaches were outside scope at the present sample size. The developed framework provides operationally relevant insights for selective recovery assessment, sustainable waste management, and rehabilitation planning. Future research should incorporate multi-temporal hyperspectral monitoring, spectral unmixing techniques, multi-site validation, and integration with subsurface datasets to enhance three-dimensional characterization and long-term site management strategies.

Supplementary Materials

The following supporting information can be downloaded at https://www.mdpi.com/article/10.3390/min16060619/s1, Table S1: XRF geochemical summary statistics by lithological class; Table S2: XRD and petrographic sample mapping to the 127-sample modelling dataset; Table S3: Full-band vs. ANOVA-60 feature selection ablation; Table S4: ANOVA F-test vs. Mutual Information feature selection; Table S5: Spatial vs. random cross-validation: quantifying the autocorrelation effect; Figure S1: Feature selection ablation, full-band vs. ANOVA-60; Figure S2: Feature selection comparison, ANOVA F-test vs. Mutual Information; Figure S3: Quantifying the overestimation risk of random cross-validation; Figure S4: Class distribution of the 127 spatially independent samples; Figure S5: Balanced accuracy, all seven classifiers (Including LightGBM and SAM baselines).

Author Contributions

Conceptualization, A.E.M. and J.-E.O.; methodology, A.E.M., J.-E.O. and A.L.; software, A.E.M.; validation, R.H., A.L., A.E., M.E. and M.B.; formal analysis, J.-E.O.; investigation, A.E.M.; resources, M.B.; data curation, A.E.M. and J.-E.O.; writing—original draft preparation, A.E.M.; writing—review and editing, J.-E.O., A.L., A.E., M.E. and R.H.; visualization, A.E.M.; supervision, M.B., A.L. and A.E.; project administration, M.B.; funding acquisition, M.B. All authors have read and agreed to the published version of the manuscript.

Funding

Funding for this work was made possible by a special grant from the OCP–UM6P APRA Project (AS 189). While the project provided the necessary financial backing, we also acknowledge OCP S.A. for their instrumental role in allowing us to collect samples at their mine site.

Data Availability Statement

The full analysis pipeline (spatially constrained cross-validation, LightGBM, SAM baselines, ablation experiments) will be deposited in a public repository (GitHub/Zenodo) available from the corresponding author upon reasonable request. The PRISMA hyperspectral imagery was obtained from the Italian Space Agency (ASI) PRISMA portal (https://prisma.asi.it (accessed on 22 February 2022)) under a standard data access agreement and may be requested independently.

Acknowledgments

The authors would like to thank Bassou Zayi for his expertise in preparing the thin sections. We are also grateful to Jose Luis Garcia, Pablo Reyes and Miguel Morata for their insightful discussions regarding PRISMA image processing. Special thanks are extended to Elmehdi Elghizlany, Abderrazak Makhzoum, Aymane Bouhmid and Abdeljabbar Makhzoum for their essential assistance during the sample collection campaigns and the crushing/grinding process.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
ANOVAAnalysis of Variance
AUCArea Under the Curve
ETExtra Trees
GPSGlobal Positioning System
KNNK-Nearest Neighbors
L2CLevel-2C
L2DLevel-2D
OvROne-vs-Rest
PANPanchromatic
PRISMAPRecursore IperSpettrale della Missione Applicativa
PWRPsPhosphate Waste Rock Piles
RFRandom Forest
ROCReceiver Operating Characteristic
SNRSignal-to-Noise Ratio
SSISpectral Sampling Interval
SVMSupport Vector Machine
SWIRShort-Wave Infrared
VNIRVisible and Near-Infrared
XRDX-ray Diffraction
XRFX-ray Fluorescence

References

  1. Jiang, L.; Xue, Q.; Liu, L. Evaluation of the Potential Release of Phosphorus from Phosphate Waste Rock Piles in Different Environmental Scenarios. Environ. Earth Sci. 2015, 74, 597–607. [Google Scholar] [CrossRef]
  2. Yang, Y.-Y.; Wu, H.-N.; Shen, S.-L.; Horpibulsuk, S.; Xu, Y.-S.; Zhou, Q.-H. Environmental Impacts Caused by Phosphate Mining and Ecological Restoration: A Case History in Kunming, China. Nat. Hazards 2014, 74, 755–770. [Google Scholar] [CrossRef]
  3. Elmeknassi, M.; Elghali, A.; Laamrani, A.; Benzaazoua, M. Circular Economy Strategies in Sedimentary Phosphate Mine Reclamation: Development of Technosol from Phosphate Waste Rock. J. Environ. Manag. 2024, 370, 122674. [Google Scholar] [CrossRef]
  4. Idrissi, H.; Taha, Y.; Elghali, A.; El Khessaimi, Y.; Aboulayt, A.; Amalik, J.; Hakkou, R.; Benzaazoua, M. Sustainable Use of Phosphate Waste Rocks: From Characterization to Potential Applications. Mater. Chem. Phys. 2021, 260, 124119. [Google Scholar] [CrossRef]
  5. Chlahbi, S.; Belem, T.; Elghali, A.; Rochdane, S.; Zerouali, E.; Inabi, O.; Benzaazoua, M. Geological and Geomechanical Characterization of Phosphate Mine Waste Rock in View of Their Potential Civil Applications: A Case Study of the Benguerir Mine Site, Morocco. Minerals 2023, 13, 1291. [Google Scholar] [CrossRef]
  6. Mansour, A.E.; Najih, A.; Ouzemou, J.-E.; Laamrani, A.; Elghali, A.; Hakkou, R.; Benzaazoua, M. Integrating VNIR–SWIR Spectroscopy and Handheld XRF for Enhanced Mineralogical Characterization of Phosphate Mine Waste Rocks in Benguerir, Morocco: Implications for Sustainable Mine Reclamation. Sensors 2025, 26, 2. [Google Scholar] [CrossRef]
  7. Van Der Meer, F.D.; Van Der Werff, H.M.A.; Van Ruitenbeek, F.J.A.; Hecker, C.A.; Bakker, W.H.; Noomen, M.F.; Van Der Meijde, M.; Carranza, E.J.M.; Smeth, J.B.D.; Woldai, T. Multi- and Hyperspectral Geologic Remote Sensing: A Review. Int. J. Appl. Earth Obs. Geoinf. 2012, 14, 112–128. [Google Scholar] [CrossRef]
  8. Loizzo, R.; Daraio, M.; Guarini, R.; Longo, F.; Lorusso, R.; Dini, L.; Lopinto, E. Prisma Mission Status and Perspective. In Proceedings of the IGARSS 2019—2019 IEEE International Geoscience and Remote Sensing Symposium, Yokohama, Japan, July 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 4503–4506. [Google Scholar]
  9. Genesio, L.; Braga, F.; Bresciani, M.; Boschetti, M.; Carotenuto, F.; Cogliati, S.; Colella, S.; Colombo, R.; Giardino, C.; Gioli, B.; et al. Updates On PRISMA: Scientific Calibration/Validation Activities and Supporting Studies. In Proceedings of the IGARSS 2022—2022 IEEE International Geoscience and Remote Sensing Symposium, Kuala Lumpur, Malaysia, 17–22 July 2022; IEEE: Piscataway, NJ, USA, 2022; pp. 4585–4586. [Google Scholar]
  10. Pignatti, S.; Amodeo, A.; Mona, L.; Palombo, A.; Pascucci, S.; Rosoldi, M.; Santini, F.; Casa, R.; Laneve, G. Evaluation of the PRISMA Hyperspectral Radiance Data: The PRISCAV Project Activities in the Basilicata Region (Southern Italy). In Proceedings of the 2021 IEEE International Geoscience and Remote Sensing Symposium IGARSS, Brussels, Belgium, 11–16 July 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 1390–1393. [Google Scholar]
  11. Agrawal, N.; Govil, H.; Mishra, G.; Gupta, M.; Srivastava, P.K. Evaluating the Performance of PRISMA Shortwave Infrared Imaging Sensor for Mapping Hydrothermally Altered and Weathered Minerals Using the Machine Learning Paradigm. Remote Sens. 2023, 15, 3133. [Google Scholar] [CrossRef]
  12. Sudharsan, S.; Hemalatha, R.; Tejas, N.V.; Sivakumar, K.A. Machine Learning-Driven Mineral Identification Using PRISMA Hyperspectral Data along the Coastal Regions of Southeast Tamil Nadu. Earth Sci. Inf. 2025, 18, 327. [Google Scholar] [CrossRef]
  13. Ibrahim, A.M.; Bennett, B. The Assessment of Machine Learning Model Performance for Predicting Alluvial Deposits Distribution. Procedia Comput. Sci. 2014, 36, 637–642. [Google Scholar] [CrossRef]
  14. Charbaoui, A.; Kchikach, A.; Jaffal, M.; Khadiri, O.Y.; Guernouche, M.; Amar, M.; Bikarnaf, A.; Jourani, E.-S.; Khelifi, N. New Insights from Geophysical, Hydrogeological and Borehole Data into the Deep Structure of the Louta Phosphatic Deposit (Gantour Basin, Morocco): Mining Implications. Geosciences 2023, 13, 357. [Google Scholar] [CrossRef]
  15. El Bamiki, R.; Raji, O.; Ouabid, M.; Elghali, A.; Khadiri Yazami, O.; Bodinier, J.-L. Phosphate Rocks: A Review of Sedimentary and Igneous Occurrences in Morocco. Minerals 2021, 11, 1137. [Google Scholar] [CrossRef]
  16. Zouhri, S.; Kchikach, A.; Saddiqi, O.; Haïmer, F.Z.E.; Baidder, L.; Michard, A. The Cretaceous-Tertiary Plateaus. In Continental Evolution: The Geology of Morocco: Structure, Stratigraphy, and Tectonics of the Africa-Atlantic-Mediterranean Triple Junction; Michard, A., Saddiqi, O., Chalouan, A., de Lamotte, D.F., Eds.; Springer: Berlin/Heidelberg, Germany, 2008; pp. 331–358. [Google Scholar]
  17. OCP Sustainability Integrated Report. 2021, p. 132. Available online: https://www.ocpgroup.ma/en/node/896 (accessed on 2 June 2026).
  18. Ihbach, F.-Z.; Kchikach, A.; Jaffal, M.; El Azzab, D.; Khadiri Yazami, O.; Jourani, E.-S.; Peña Ruano, J.A.; Olaiz, O.A.; Dávila, L.V. Geophysical Prospecting for Groundwater Resources in Phosphate Deposits (Morocco). Minerals 2020, 10, 842. [Google Scholar] [CrossRef]
  19. Amar, H.; Benzaazoua, M.; Elghali, A.; Taha, Y.; El Ghorfi, M.; Krause, A.; Hakkou, R. Mine Waste Rock Reprocessing Using Sensor-Based Sorting (SBS): Novel Approach toward Circular Economy in Phosphate Mining. Miner. Eng. 2023, 204, 108415. [Google Scholar] [CrossRef]
  20. Safhi, A.E.M.; Amar, H.; El Berdai, Y.; El Ghorfi, M.; Taha, Y.; Hakkou, R.; Al-Dahhan, M.; Benzaazoua, M. Characterizations and Potential Recovery Pathways of Phosphate Mines Waste Rocks. J. Clean. Prod. 2022, 374, 134034. [Google Scholar] [CrossRef]
  21. Cogliati, S.; Sarti, F.; Chiarantini, L.; Cosi, M.; Lorusso, R.; Lopinto, E.; Miglietta, F.; Genesio, L.; Guanter, L.; Damm, A.; et al. The PRISMA Imaging Spectroscopy Mission: Overview and First Performance Analysis. Remote Sens. Environ. 2021, 262, 112499. [Google Scholar] [CrossRef]
  22. Giardino, C.; Bresciani, M.; Fabbretto, A.; Ghirardi, N.; Mangano, S.; Pellegrino, A.; Vaiciute, D.; Braga, F.; Brando, V.E.; Laanen, M.; et al. Hyperspectral Prisma Products of Aquatic Systems. In Proceedings of the 2021 IEEE International Geoscience and Remote Sensing Symposium IGARSS, Brussels, Belgium, 11–16 July 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 1229–1232. [Google Scholar]
  23. Vangi, E.; D’Amico, G.; Francini, S.; Giannetti, F.; Lasserre, B.; Marchetti, M.; Chirici, G. The New Hyperspectral Satellite PRISMA: Imagery for Forest Types Discrimination. Sensors 2021, 21, 1182. [Google Scholar] [CrossRef]
  24. Acito, N.; Diani, M.; Procissi, G.; Corsini, G. Atmospheric Compensation of PRISMA Data by Means of a Learning Based Approach. Remote Sens. 2021, 13, 2967. [Google Scholar] [CrossRef]
  25. Guanter, L.; Richter, R.; Moreno, J. Spectral Calibration of Hyperspectral Imagery Using Atmospheric Absorption Features. Appl. Opt. 2006, 45, 2360. [Google Scholar] [CrossRef]
  26. Ruffin, C.; King, R.L.; Younan, N.H. A Combined Derivative Spectroscopy and Savitzky-Golay Filtering Method for the Analysis of Hyperspectral Data. GISci. Remote Sens. 2008, 45, 1–15. [Google Scholar] [CrossRef]
  27. Savitzky, A.; Golay, M.J.E. Smoothing and Differentiation of Data by Simplified Least Squares Procedures. Anal. Chem. 1964, 36, 1627–1639. [Google Scholar] [CrossRef]
  28. Rasti, B.; Scheunders, P.; Ghamisi, P.; Licciardi, G.; Chanussot, J. Noise Reduction in Hyperspectral Imagery: Overview and Application. Remote Sens. 2018, 10, 482. [Google Scholar] [CrossRef]
  29. Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
  30. Chen, T.; Guestrin, C. XGBoost: A Scalable Tree Boosting System. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; ACM: New York, NY, USA, 2016; pp. 785–794. [Google Scholar]
  31. Cortes, C.; Vapnik, V. Support-Vector Networks. Mach. Learn. 1995, 20, 273–297. [Google Scholar] [CrossRef]
  32. Geurts, P.; Ernst, D.; Wehenkel, L. Extremely Randomized Trees. Mach. Learn. 2006, 63, 3–42. [Google Scholar] [CrossRef]
  33. Karasiak, N.; Dejoux, J.-F.; Monteil, C.; Sheeren, D. Spatial Dependence between Training and Test Sets: Another Pitfall of Classification Accuracy Assessment in Remote Sensing. Mach. Learn. 2022, 111, 2715–2740. [Google Scholar] [CrossRef]
  34. Roberts, D.R.; Bahn, V.; Ciuti, S.; Boyce, M.S.; Elith, J.; Guillera-Arroita, G.; Hauenstein, S.; Lahoz-Monfort, J.J.; Schröder, B.; Thuiller, W.; et al. Cross-validation Strategies for Data with Temporal, Spatial, Hierarchical, or Phylogenetic Structure. Ecography 2017, 40, 913–929. [Google Scholar] [CrossRef]
  35. Shadman Roodposhti, M.; Aryal, J.; Lucieer, A.; Bryan, B.A. Uncertainty Assessment of Hyperspectral Image Classification: Deep Learning vs. Random Forest. Entropy 2019, 21, 78. [Google Scholar] [CrossRef]
  36. Zaini, N.; Van Der Meer, F.; Van Der Werff, H. Determination of Carbonate Rock Chemistry Using Laboratory-Based Hyperspectral Imagery. Remote Sens. 2014, 6, 4149–4172. [Google Scholar] [CrossRef]
  37. Zhang, G.; Wasyliuk, K.; Pan, Y. The characterization and quantitative analysis of clay minerals in the Athabasca basin, Saskatchewan: Application of shortwave infrared reflectance spectroscopy. Can. Min. 2001, 39, 1347–1363. [Google Scholar] [CrossRef]
  38. Desikan, R.; Rajendran, K. Exploring Rock Phosphates Using Hyperspectral Remote Sensing & Field Spectroscopy. In Proceedings of the 2018 9th Workshop on Hyperspectral Image and Signal Processing: Evolution in Remote Sensing (WHISPERS), 23 September 2018; IEEE: Piscataway, NJ, USA, 2018; pp. 1–5. [Google Scholar]
  39. Chen, X.; Warner, T.A.; Campagna, D.J. Integrating Visible, near-Infrared and Short-Wave Infrared Hyperspectral and Multispectral Thermal Imagery for Geological Mapping at Cuprite, Nevada: A Rule-Based System. Int. J. Remote Sens. 2010, 31, 1733–1752. [Google Scholar] [CrossRef]
  40. Mulder, V.L.; Plötze, M.; De Bruin, S.; Schaepman, M.E.; Mavris, C.; Kokaly, R.F.; Egli, M. Quantifying Mineral Abundances of Complex Mixtures by Coupling Spectral Deconvolution of SWIR Spectra (2.1–2.4 Μm) and Regression Tree Analysis. Geoderma 2013, 207–208, 279–290. [Google Scholar] [CrossRef]
  41. Cover, T.; Hart, P. Nearest Neighbor Pattern Classification. IEEE Trans. Inf. Theory 1967, 13, 21–27. [Google Scholar] [CrossRef]
  42. Hunt, G.R. Visible and Near-Infrared Spectra of Minerals and Rocks: I Silicate Minerals. Mod. Geol. 1970, 1, 283–300. [Google Scholar]
  43. Francos, N.; Notesco, G.; Ben-Dor, E. Estimation of the Relative Abundance of Quartz to Clay Minerals Using the Visible–Near-Infrared–Shortwave-Infrared Spectral Region. Appl. Spectrosc. 2021, 75, 882–892. [Google Scholar] [CrossRef] [PubMed]
  44. Peyghambari, S.; Zhang, Y. Hyperspectral Remote Sensing in Lithological Mapping, Mineral Exploration, and Environmental Geology: An Updated Review. J. Appl. Remote Sens. 2021, 15, 031501. [Google Scholar] [CrossRef]
  45. Ploton, P.; Mortier, F.; Réjou-Méchain, M.; Barbier, N.; Picard, N.; Rossi, V.; Dormann, C.; Cornu, G.; Viennois, G.; Bayol, N.; et al. Spatial Validation Reveals Poor Predictive Performance of Large-Scale Ecological Mapping Models. Nat. Commun. 2020, 11, 4540. [Google Scholar] [CrossRef]
  46. Kattenborn, T.; Schiefer, F.; Frey, J.; Feilhauer, H.; Mahecha, M.D.; Dormann, C.F. Spatially Autocorrelated Training and Validation Samples Inflate Performance Assessment of Convolutional Neural Networks. ISPRS Open J. Photogramm. Remote Sens. 2022, 5, 100018. [Google Scholar] [CrossRef]
  47. Melgani, F.; Bruzzone, L. Support Vector Machines for Classification of Hyperspectral Remote-Sensing Images. In Proceedings of the IEEE International Geoscience and Remote Sensing Symposium, Toronto, ON, Canada, 2002; IEEE: Piscataway, NJ, USA, 2002; Volume 1, pp. 506–508. [Google Scholar]
  48. Wang, Z.; Zuo, R.; Kreuzer, O.P. Uncertainty Quantification of Deep Learning Algorithms for Lithological Mapping. Math. Geosci. 2025, 58, 503–531. [Google Scholar] [CrossRef]
Figure 2. Flowchart of methodological approach of the study of mine waste rock piles.
Figure 2. Flowchart of methodological approach of the study of mine waste rock piles.
Minerals 16 00619 g002
Figure 3. Spatial distribution of field sampling points across the Benguerir phosphate waste rock piles. (A) Map showing the initial 207 validated sampling locations. Black dots indicate the 80 redundant samples removed after a pixel-by-pixel audit confirmed that they occupied shared 30 m PRISMA pixel footprints and therefore carried identical spectral information. (B,C) Representative field photographs illustrating sampling conditions and accessibility on the waste-rock piles.
Figure 3. Spatial distribution of field sampling points across the Benguerir phosphate waste rock piles. (A) Map showing the initial 207 validated sampling locations. Black dots indicate the 80 redundant samples removed after a pixel-by-pixel audit confirmed that they occupied shared 30 m PRISMA pixel footprints and therefore carried identical spectral information. (B,C) Representative field photographs illustrating sampling conditions and accessibility on the waste-rock piles.
Minerals 16 00619 g003
Figure 4. Cross-validated spectral feature-selection workflow. (A) Optimized PRISMA reflectance profile after masking atmospheric absorption regions and applying Savitzky–Golay denoising. (B) Mean ANOVA F-score across spatial cross-validation folds. The dashed red line marks the cutoff for the top 60 ranked bands. The SWIR region shows the highest discriminative contribution.
Figure 4. Cross-validated spectral feature-selection workflow. (A) Optimized PRISMA reflectance profile after masking atmospheric absorption regions and applying Savitzky–Golay denoising. (B) Mean ANOVA F-score across spatial cross-validation folds. The dashed red line marks the cutoff for the top 60 ranked bands. The SWIR region shows the highest discriminative contribution.
Minerals 16 00619 g004
Figure 5. Mineralogical observation of PWRP lithologies. Legend: CAL: calcite, BFR: biofragments, DOL: dolomite, PEL: pelloid, QRZ: quartz, PCL: phosphatic clast.
Figure 5. Mineralogical observation of PWRP lithologies. Legend: CAL: calcite, BFR: biofragments, DOL: dolomite, PEL: pelloid, QRZ: quartz, PCL: phosphatic clast.
Minerals 16 00619 g005
Figure 6. XRD results of the PWRP sample highlighting key phases.
Figure 6. XRD results of the PWRP sample highlighting key phases.
Minerals 16 00619 g006
Figure 7. Validation learning curves under spatially constrained cross-validation (30 m buffer). (A) Random Forest, (B) Extra Trees, (C) XGBoost, (D) Support Vector Machine (SVM), and (E) K-Nearest Neighbors (KNN). Curves show validation accuracy as a function of increasing training sample size. Shaded areas represent the variability across cross-validation folds.
Figure 7. Validation learning curves under spatially constrained cross-validation (30 m buffer). (A) Random Forest, (B) Extra Trees, (C) XGBoost, (D) Support Vector Machine (SVM), and (E) K-Nearest Neighbors (KNN). Curves show validation accuracy as a function of increasing training sample size. Shaded areas represent the variability across cross-validation folds.
Minerals 16 00619 g007
Figure 8. Receiver Operating Characteristic (ROC) curves under spatially constrained cross-validation (30 m buffer). (A) Random Forest, (B) Extra Trees, (C) XGBoost, (D) Support Vector Machine (SVM), and (E) K-Nearest Neighbors (KNN). Curves are shown in a one-vs-rest (OvR) framework for each lithological class; corresponding AUC values quantify class-specific discrimination performance.
Figure 8. Receiver Operating Characteristic (ROC) curves under spatially constrained cross-validation (30 m buffer). (A) Random Forest, (B) Extra Trees, (C) XGBoost, (D) Support Vector Machine (SVM), and (E) K-Nearest Neighbors (KNN). Curves are shown in a one-vs-rest (OvR) framework for each lithological class; corresponding AUC values quantify class-specific discrimination performance.
Minerals 16 00619 g008
Figure 9. Normalized confusion matrices under spatially constrained cross-validation (30 m buffer). (A) Random Forest, (B) Extra Trees, (C) XGBoost, (D) Support Vector Machine (SVM), and (E) K-Nearest Neighbors (KNN). Values represent class-wise prediction proportions, illustrating model-specific misclassification patterns among the four lithological units.
Figure 9. Normalized confusion matrices under spatially constrained cross-validation (30 m buffer). (A) Random Forest, (B) Extra Trees, (C) XGBoost, (D) Support Vector Machine (SVM), and (E) K-Nearest Neighbors (KNN). Values represent class-wise prediction proportions, illustrating model-specific misclassification patterns among the four lithological units.
Minerals 16 00619 g009
Figure 10. Lithological maps generated from PRISMA hyperspectral imagery under spatially constrained validation. (A) Random Forest, (B) Extra Trees, (C) XGBoost, (D) Support Vector Machine (SVM), and (E) K-Nearest Neighbors (KNN). Maps illustrate the spatial distribution of the four lithological classes: Phosphate rock, Siliceous facies, Marl, and Limestone.
Figure 10. Lithological maps generated from PRISMA hyperspectral imagery under spatially constrained validation. (A) Random Forest, (B) Extra Trees, (C) XGBoost, (D) Support Vector Machine (SVM), and (E) K-Nearest Neighbors (KNN). Maps illustrate the spatial distribution of the four lithological classes: Phosphate rock, Siliceous facies, Marl, and Limestone.
Minerals 16 00619 g010
Figure 11. Spatial distribution of classification uncertainty derived from Shannon entropy under spatially constrained validation. (A) Random Forest, (B) Extra Trees, (C) XGBoost, (D) Support Vector Machine (SVM), and (E) K-Nearest Neighbors (KNN). Higher entropy values indicate increased prediction uncertainty.
Figure 11. Spatial distribution of classification uncertainty derived from Shannon entropy under spatially constrained validation. (A) Random Forest, (B) Extra Trees, (C) XGBoost, (D) Support Vector Machine (SVM), and (E) K-Nearest Neighbors (KNN). Higher entropy values indicate increased prediction uncertainty.
Minerals 16 00619 g011
Figure 12. Spatial distribution of posterior probability scores derived from maximum posterior class probability under spatially constrained validation. (A) Random Forest, (B) Extra Trees, (C) XGBoost, (D) Support Vector Machine (SVM), and (E) K-Nearest Neighbors (KNN). Higher values indicate stronger model posterior probability for the assigned lithological class.
Figure 12. Spatial distribution of posterior probability scores derived from maximum posterior class probability under spatially constrained validation. (A) Random Forest, (B) Extra Trees, (C) XGBoost, (D) Support Vector Machine (SVM), and (E) K-Nearest Neighbors (KNN). Higher values indicate stronger model posterior probability for the assigned lithological class.
Minerals 16 00619 g012
Figure 13. Model stability analysis under spatially constrained cross-validation (30 m buffer). Boxplots show the distribution of overall accuracy across ten spatially independent replicates for each classifier. The lower and upper edges of each box represent the 25th and 75th percentiles, respectively; the horizontal line inside the box indicates the median; whiskers indicate the spread of the non-outlier values.
Figure 13. Model stability analysis under spatially constrained cross-validation (30 m buffer). Boxplots show the distribution of overall accuracy across ten spatially independent replicates for each classifier. The lower and upper edges of each box represent the 25th and 75th percentiles, respectively; the horizontal line inside the box indicates the median; whiskers indicate the spread of the non-outlier values.
Minerals 16 00619 g013
Table 1. Main characteristics of the PRISMA hyperspectral image, including the panchromatic band (after [23]).
Table 1. Main characteristics of the PRISMA hyperspectral image, including the panchromatic band (after [23]).
Orbit altitude reference615 km
Swath/Field of view30 km/2.77°
Ground Sample DistanceHyperspectral: 30 m PAN: 5 m
Spatial pixelsHyperspectral: 1000
PAN: 6000
Pixel sizeHyperspectral: 30 × 30 m
PAN: 5 × 5 m
Spectral rangeVNIR: 400–1010 nm (66 bands)
SWIR: 920–2500 nm (173 bands)
PAN: 400–700 nm
Spectral sampling interval (SSI)<12 nm
Spectral width<12 nm
Spectral calibration accuracy±0.1 nm
Radiometric quantization12 bit
VNIR Signal to noise ratio (SNR)>200:1
SWIR SNR>100:1
PAN SNR>240:1
Absolute radiometric accuracyBetter than 5%
Table 2. Summary of classification performance metrics for all classifiers under spatially constrained cross-validation (30 m buffer, 10 × 5-fold). Values are reported as mean ± standard deviation. OA = Overall Accuracy; BA = Balanced Accuracy; κ = Cohen’s Kappa; F1 = weighted F1-score; MCC = Matthews Correlation Coefficient; AUC = macro-averaged area under the ROC curve (one-vs-rest). Bold values indicate the best-performing classifier for each metric.
Table 2. Summary of classification performance metrics for all classifiers under spatially constrained cross-validation (30 m buffer, 10 × 5-fold). Values are reported as mean ± standard deviation. OA = Overall Accuracy; BA = Balanced Accuracy; κ = Cohen’s Kappa; F1 = weighted F1-score; MCC = Matthews Correlation Coefficient; AUC = macro-averaged area under the ROC curve (one-vs-rest). Bold values indicate the best-performing classifier for each metric.
OABAκF1MCCAUC
Extra Trees0.653 ± 0.0330.693 ± 0.0320.510 ± 0.0460.649 ± 0.0320.513 ± 0.0470.863 ± 0.012
Random Forest0.633 ± 0.0310.666 ± 0.0320.480 ± 0.0450.628 ± 0.0320.484 ± 0.0450.858 ± 0.012
XGBoost0.587 ± 0.0200.637 ± 0.0190.421 ± 0.0290.584 ± 0.0230.422 ± 0.0290.827 ± 0.011
KNN0.593 ± 0.0280.615 ± 0.0340.423 ± 0.0400.590 ± 0.0280.427 ± 0.0410.837 ± 0.014
SVM0.576 ± 0.0300.561 ± 0.0290.385 ± 0.0420.517 ± 0.0350.421 ± 0.0510.832 ± 0.011
LightGBM0.569 ± 0.0400.626 ± 0.0410.399 ± 0.0550.569 ± 0.0420.400 ± 0.0550.823 ± 0.018
SAM0.541 ± 0.0320.536 ± 0.0360.361 ± 0.0440.543 ± 0.0320.362 ± 0.0440.828 ± 0.007
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

El Mansour, A.; Ouzemou, J.-E.; Elghali, A.; Elmeknassi, M.; Hakkou, R.; Benzaazoua, M.; Laamrani, A. Spatially Constrained Machine Learning for PRISMA-Based Lithological Mapping of Phosphate Mine Waste Rocks. Minerals 2026, 16, 619. https://doi.org/10.3390/min16060619

AMA Style

El Mansour A, Ouzemou J-E, Elghali A, Elmeknassi M, Hakkou R, Benzaazoua M, Laamrani A. Spatially Constrained Machine Learning for PRISMA-Based Lithological Mapping of Phosphate Mine Waste Rocks. Minerals. 2026; 16(6):619. https://doi.org/10.3390/min16060619

Chicago/Turabian Style

El Mansour, Abdelhak, Jamal-Eddine Ouzemou, Abdellatif Elghali, Malak Elmeknassi, Rachid Hakkou, Mostafa Benzaazoua, and Ahmed Laamrani. 2026. "Spatially Constrained Machine Learning for PRISMA-Based Lithological Mapping of Phosphate Mine Waste Rocks" Minerals 16, no. 6: 619. https://doi.org/10.3390/min16060619

APA Style

El Mansour, A., Ouzemou, J.-E., Elghali, A., Elmeknassi, M., Hakkou, R., Benzaazoua, M., & Laamrani, A. (2026). Spatially Constrained Machine Learning for PRISMA-Based Lithological Mapping of Phosphate Mine Waste Rocks. Minerals, 16(6), 619. https://doi.org/10.3390/min16060619

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop