Predicting Flowability at Disposal of Spent Heap Leach by Applying Artificial Neural Networks Based on Operational Variables

: The mining sector actively seeks to improve operational processes and manage residual materials, especially in areas used for heap leaching disposal. The flowability of residues following deposition can have an impact on storage capacity, productivity, and workers’ safety. In this study, an artificial neural network (ANN) approach is applied to evaluate the accuracy of three models in predicting the flowability of spent heap leach when it is discharged into the dump, considering three or five segregation categories. The models with five categories exhibited the highest level of accuracy, with learning responses ranging from 72% to 78% and predictions from 88% to 96%. These indicate that ANN models have the potential to be a decision-making tool for the discharge strategy in the dump. Modules containing lithologies such as clays and phyllosilicates exhibited increased susceptibility to separation due to their water retention capacity, which negatively impacted their permeability and conductivity. The decomposition of iron oxide, along with clays and low hardness, led to the formation of fines, limited permeability, and inadequate solution drainage. Rock competence and low formation of fines provide good permeability, and better drainage conditions for the solution, and help maintain the stability of the spent heap leach in the dump.


Introduction
The mining industry is continuously adjusting to the challenges posed by low-grade deposits and the need to process larger quantities of material for the extraction of the metal of interest, consequently increasing the amount of waste that includes sterile material (without economic value) and unwanted by-products [1].For this reason, more attention is placed on the study of minerals that are difficult to treat both chemically and physically [2] and the implementation of new sustainable solutions to improve waste management practices [3].The process of benefiting copper minerals is carried out according to the characteristics of the ore (e.g., oxides or mixed with secondary sulphides) generally treated by hydrometallurgy processes [4,5] where a selective dissolution of the mineral occurs through leaching, following solvent extraction and electro-winning to be recovered as a cathode [6].In the leaching stage, a mass transfer of the element of interest is dependent on the hydraulic flow regime of the fluid and the physicochemical reactions present in the system [7].
Currently, there is a strong presence of hydrometallurgical processes in Chile estimated in 60% of the mining plants [8] with the heap leaching process being part of refined copper preventing the formation of new modules to be leached.Nowadays, the mining industry seeks more complex ores and looks for improvements in both the operation-process line and the disposal of the rejected materials.
In recent years, researchers have used numerical and CFD (computational fluid dynamics) simulation alongside traditional analysis, yielding interesting results.However, these methods present limitations due to uncertainties caused by computing values and their dependence on the approximations made [21].Researchers have applied deep learning methods like artificial neural networks (ANN) to tasks such as predicting and regressing surface quality in flotation and heap leaching processes.For instance, Zadeh [22] used fuzzy logic, Bergh et al. [23], Correa et al. [24], Umucu et al. [25], and Leiva et al. [26] did research on mineral extraction that compares how well Bayesian networks and ANNs work.In the case of applying computational techniques in the copper industry, Haghighi et al. [27] analysed the low-grade mineral identification and reduction of production costs, and in 2015, they improved the copper recovery obtained through leaching by ANN prediction [28].Salmani et al. [29] use an ANN to analyse the copper flotation process to predict copper float rates under different operating conditions, considering different doses of chemical reagents, feed rate, and particle size, obtaining a quality prediction in the test process of 93%.
When spent heap leaches are removed and transported to their final destination, their flowability (or segregation) characteristics can influence the material stacking stability, which affects the original storage capacity, production, and worker safety.This study aims to develop accurate models that can predict the segregation behaviour of the spent heap leach.These models will assist in making strategic decisions regarding the discharge and final disposal of this material.Additionally, they will help optimise the use of the dump area, ensuring it is efficiently adapted to daily operations.We created three artificial neural network (ANN) models to predict the segregation categories that may occur when the spent heap leach is discharged in the dump.These models were developed using seven input variables related to mineralogy, lithology, granulometry, agglomeration conditions, drainage time, cover conditions, and moisture.

Methodology 2.1. ANN Application Background
Artificial neural networks (ANN) is a deep learning tool inspired by the functioning of the human nervous system, using interconnected artificial neurons as a base [30,31].A classic structure of a neural network is made up of an input layer, a hidden layer, and an output layer where the organisation of the present layers is specified [32].This study follows the workflow of a Gaussian naïve Bayes classification method.The dataset comprises continuous variables assumed to have a Gaussian distribution.The classification procedure excludes dependency among the input variables.The input variables (X i ) to the neurons are responsible for delivering the initial information to the network, where i goes from 1 to n, and considering a weighting (W ij ) where j ranges from 1 to n depending on the input variables.This weight is a probabilistic value based on the Gaussian basis function W (Equation (1)) that indicates the intensity with which the variable affects the neuron and the possible response of the process [24].In the input layer, the values are first standardised by subtracting the sample mean of the n training cases and by dividing over the sample standard deviation.The procedure continues in the pattern layer, where the contribution of X i to the probability density function W in their correspondent group j is calculated.For this, it uses the activation function g ij (Equation ( 2)), which quantifies the contribution of the ith value of X to estimate the density function W for the group j to which it belongs (Equation ( 1)) [30,33,34].Artificial neurons in the hidden layer determine their activation state using an activation or transfer function.This function operates within ranges of −1 to 1 or 0 to 1, where a value of 1 represents a fully active neuron, while −1 or 0 indicates complete inactivity [32].The information about all the features in each training group is represented by Equation (3), which is further processed in the summary layer [33,35,36].
where: i: Only the scaling parameter (φ) can be varied, which affects how quickly the influence of an observation on the density at point X decays as its distance to this point increases, starting from a value of 1, but varying in search of maximising the percentage of correctly classified observations [33,37].The misclassifying cost, c j , refers to the misclassifying effect of a predictive response, and h j is the probability that an observation belongs to a response group without considering the input variables, representing a relative proportion of the sample.This is because, in some cases, it is more detrimental to classify an observation incorrectly in one group than in another.The purpose of this layer is to assign a score to each output group that will later be directed to the output layer.This is done by multiplying the estimated density function by the prior probability and the cost of classifying incorrectly, as described in Equation (4).For this study, we use a non-differential misclassification cost where the probability of misclassification is the same for all the study groups [33,36].
where: h j : Prior probability.c j : Misclassification cost.g j (X): Probability density function.Jackknifing re-sampling was used for cross-validation, removing one point at a time from training groups and determining the frequency of the correct classification.The jackknifing procedure seeks to reduce biases based on logarithmic dispersion methods by randomly eliminating part of the data to make valid interferences for those values that are not distributed linearly [38,39].As a result, in the output layer, the answer to the problem is provided using binary neurons, which activate if the score j > score k when k is different from j; otherwise, they are inactive.The number of responses in the output layer is defined by the number of neurons being used, similar to the characteristics of the input layer [40].Figure 1 represents a conceptual map of the network operation.
ANN can be used to solve regression problems by calculating a continuous function of the input variables or classification problems by producing discrete function values that correspond to a certain class using supervised and unsupervised learning.In these circumstances, one tries to adapt the input variable weights such that the procedure produces the desired response for the model's training and verification [41].The neural network in supervised learning determines the difference between the information provided by the input signals and the output by introducing a set of patterns that contain system inputs and process responses.In unsupervised learning, the neural network simply considers the input data, ignoring the signal it has to provide.It then compares the data it receives to find common features, correlations, and patterns in order to assign synaptic weights and ultimately produce a final signal output response.The classification analysis using nearest neighbours is based on the proximity of an initial data point, assuming that similar behavioural patterns may be identified in the resulting response [33,35].The training set values are preserved, so that if an error occurs, it is mostly observed with the nearest neighbour.The model will generate two predictions: the first prediction will be the response with the highest probability, which corresponds to the nearest neighbour, and the second prediction will be the response with the second highest probability, corresponding to the second nearest neighbour.ANN can be used to solve regression problems by calculating a continuous function of the input variables or classification problems by producing discrete function values that correspond to a certain class using supervised and unsupervised learning.In these circumstances, one tries to adapt the input variable weights such that the procedure produces the desired response for the model's training and verification [41].The neural network in supervised learning determines the difference between the information provided by the input signals and the output by introducing a set of patterns that contain system inputs and process responses.In unsupervised learning, the neural network simply considers the input data, ignoring the signal it has to provide.It then compares the data it receives to find common features, correlations, and patterns in order to assign synaptic weights and ultimately produce a final signal output response.The classification analysis using nearest neighbours is based on the proximity of an initial data point, assuming that similar behavioural patterns may be identified in the resulting response [33,35].The training set values are preserved, so that if an error occurs, it is mostly observed with the nearest neighbour.The model will generate two predictions: the first prediction will be the response with the highest probability, which corresponds to the nearest neighbour, and the second prediction will be the response with the second highest probability, corresponding to the second nearest neighbour.

Case Study Background
The study utilised both operational and laboratory datasets obtained from a copper

Case Study Background
The study utilised both operational and laboratory datasets obtained from a copper mine in Chile.The mine employs a dynamic heap leaching method, with a height ranging from 3.8 to 4.0 m, and a leaching cycle lasting 84 days.The utilisation of sulfuric acid is affected by the particle size distribution within the range of 18% to 150 µm, with concentrations ranging from 4.5 to 8.5 g/L [20].The drainage period begins when the irrigation of heap leaching ceases and concludes when the removal of spent heap leach begins.The intended duration for this procedure is 4 days.However, operational difficulties related to material removal can cause delays in certain modules, resulting in an extended drainage period that may exceed 13 days before proceeding to the removal stage.The spent heap leach is extracted and conveyed to a dump located 4500 m away from the site.The dump has an average moisture content of 13.5%, a surface permeability of 2 × 10 −3 cm/s, and a pH ranging from 1.3 to 1.5 in the drainage/pore water.The spent heap-leach material in this study contains about 12 to 46% of clays, and hydrated phyllosilicates such as biotite, muscovite, and chlorite, with kaolinite and muscovite having a significant impact on moisture retention.The particle size is one of the most important factors of the process [2], and for this case, particles can range from 12 to 25 mm.(P 80 pre-leach of 12.7 mm).The dump contains cuttings that deposit between 27 and 49% of the fines under 75 µm.The site operations measure the moisture level in the spent heap leach, which ranges from 8% to 17.6%.However, there were instances where the moisture content reached 22%, resulting in an average moisture content of 13%.This higher moisture content may cause the material to flow over wider areas than initially projected during unloading, as per the design.The landfill has a total area of 6.36 million square metres and has two layers for environmental protection.The initial layer consists of a 16-to 24-m-thick layer of gravel with a particle size distribution (P 80 ) ranging from 38.1 to 50.8 mm.This layer effectively manages the phreatic level and prevents excessive saturation [20].Subsequently, a layer of impermeable andesite lava volcanic rock is applied as a protective covering.This rock contains less than 5% non-organic material and is devoid of acidic solutions.The dump has a maximum capacity of 726 million tonnes, which needs to be piled in layers at the deposition site.However, the implementation of a 5-level storage system was not possible due to the limited possibilities for stacking the segregated material along the dump.This condition prompts the increased utilisation of the basal area of the landfill, requiring an expansion of the dump surface in order to uphold its intended lifespan of 23 years.The dump incorporates a drainage system that utilises granular material sourced from the mine tailings.The granular material has a maximum size of 305 mm and contains less than 5% particles [42].

Dataset
The approach collects available data from previous studies and operating conditions.To generate the dataset, we included operational data from 122 copper-oxide ore heap leaching modules in 6 months of operation, which also includes the characterization of their correspondent spent leach at the time of discharge in the dump.In this study, 26 variables were analysed as presented in Figure 2, which are grouped into mineralogical characteristics, lithology, drainage time, moisture, granulometry, and channels present in the cover, in addition to considering conditions used in stages prior to leaching, such as dosages used in agglomeration.
The characterization and operation data were obtained from the processing plant, and analyses were done in the laboratory, including mineralogical data, lithology, particle size (coarse and fine), solution drainage conditions from the modules, impermeable layer conditions, and moisture data from the spent heap leach.
For the creation of the dataset, we considered the following assumptions: i.The dump slope in the discharge of the spent heap leach was first estimated and fixed as constant due to no significant variability; ii.The speed and capacity of the conveyor belts were fixed constant, it is a standardised process without failures or stop times, and it does not vary significantly; iii.Having a regular movement during the operation, the inclination of the discharge plume is considered constant, not a significant variable in the behaviour since it does not generate variation in the physical behaviour analysed.
For the input of the ANN model, we carefully chose the most pertinent variables that have an impact on the spent heap leach during disposal.These variables are categorised and shown in Figure 2.For training and corroboration of the models, Figure 3 describes the five spent heap leach segregation categories used in the study.The flowability observed in the material disposal, recorded hourly by the spreader, serves as the foundation for the categorization.Subsequently, data from 30 modules covering one month of operation will be utilised to validate the constructed predictive model and identify findings and recommendations.
operation will be utilised to validate the constructed predictive model and identify fin ings and recommendations.

Segregation Categories
The evaluation of segregation quality in the discharged spent heap leach was p formed, resulting in the identification of five categories (Figure 3) based on the behavio of the material.Category 1 represents the driest material with the least fluidity, while c egory 5 corresponds to wet material with complete fluidity.The compilation of this d is generated at the time of unloading the spent heap leach from the spreader, consideri the corresponding category, the height of the plume, the slope of the dump, and the tra ported flow.operation will be utilised to validate the constructed predictive model and identify findings and recommendations.

Segregation Categories
The evaluation of segregation quality in the discharged spent heap leach was performed, resulting in the identification of five categories (Figure 3) based on the behaviour of the material.Category 1 represents the driest material with the least fluidity, while category 5 corresponds to wet material with complete fluidity.The compilation of this data is generated at the time of unloading the spent heap leach from the spreader, considering the corresponding category, the height of the plume, the slope of the dump, and the transported flow.

Segregation Categories
The evaluation of segregation quality in the discharged spent heap leach was performed, resulting in the identification of five categories (Figure 3) based on the behaviour of the material.Category 1 represents the driest material with the least fluidity, while category 5 corresponds to wet material with complete fluidity.The compilation of this data is generated at the time of unloading the spent heap leach from the spreader, consider-ing the corresponding category, the height of the plume, the slope of the dump, and the transported flow.

Data Analysis
Once the metadata is generated, an analysis is conducted to establish strategies for the data acquired in the field and from the available variables from the operation plant, plus a benchmarking of the behaviour of spent heap leach that considers four mining companies close to the operation of the case studied to identify relevant variables.As shown in Figure 2, the mineralogical characteristics, granulometry, drain time, and moisture are considered critical factors that affect the flowability of the deposit of the spent heap leach.The postulates of López et al. [20], Núñez [43], and Bard [17] reinforce the idea that the fine grain size factor and distribution within a module can significantly affect permeability, which is crucial for constructing predictive models.Once the database has been generated, the predictive models designed are organised (Figure 4) following the next response variables: Model 1 with 5 response variables (solid, semi-solid, intermediate, semiliquid, and liquid), model 2 with 3 response variables (solid, intermediate, and liquid), both considering the general behaviour of the module, and model 3 using 5 response variables but based on the behaviour by module advance.This corresponds to the monitoring of mineralogical conditions in the modules carried out as the process progresses, which corresponds to a range of 12 to 14 measurements to exceed 1500 conditions to use as a database.The comparison regarding general and advanced databases also seeks to analyse the prediction behaviour generated by different sizes of datasets, with the dataset used in models 1 and 2 being significantly smaller compared to that generated from the advance, and corroborate that by analysing nonlinear behaviours in small datasets, it is possible to aim at finding causal relationships, particularly using ANN as presented by Pasini [44], Condon [45], and Feng et al. [46].The software RAPIDMINER Studio Version 9. 10 [47] is used to construct predictive models.First, we used a supervised method to train the neural network by looking at all the possible outcomes.Then, we used an unsupervised method to let the network make its own predictions, and finally, we checked that the predictions were correct.Initially, we use supervised training to determine the process response based on seven predictive variables (Figure 2).These variables are chosen from analyses conducted with the metallurgy department of the mining company, benchmarking of other mining processes with similar characteristics, and correlation analysis associated with the segregation categories of the spent heap leach.The combination of variables is then expanded based on the generation of the highest percentage of success in network training.A statistical summary of these variables is presented in Table 1.
Minerals 2024, 14, x FOR PEER REVIEW 8 o

Data Analysis
Once the metadata is generated, an analysis is conducted to establish strategies the data acquired in the field and from the available variables from the operation pl plus a benchmarking of the behaviour of spent heap leach that considers four min companies close to the operation of the case studied to identify relevant variables shown in Figure 2, the mineralogical characteristics, granulometry, drain time, and m ture are considered critical factors that affect the flowability of the deposit of the sp heap leach.The postulates of López et al. [20], Núñez [43], and Bard [17] reinforce the i that the fine grain size factor and distribution within a module can significantly aff permeability, which is crucial for constructing predictive models.Once the database been generated, the predictive models designed are organised (Figure 4) following next response variables: Model 1 with 5 response variables (solid, semi-solid, interm ate, semi-liquid, and liquid), model 2 with 3 response variables (solid, intermediate, liquid), both considering the general behaviour of the module, and model 3 using 5 sponse variables but based on the behaviour by module advance.This corresponds to monitoring of mineralogical conditions in the modules carried out as the process p gresses, which corresponds to a range of 12 to 14 measurements to exceed 1500 conditi to use as a database.The comparison regarding general and advanced databases seeks to analyse the prediction behaviour generated by different sizes of datasets, w the dataset used in models 1 and 2 being significantly smaller compared to that genera from the advance, and corroborate that by analysing nonlinear behaviours in small tasets, it is possible to aim at finding causal relationships, particularly using ANN as sented by Pasini [44], Condon [45], and Feng et al. [46].The software RAPIDMINER dio Version 9. 10 [47] is used to construct predictive models.First, we used a superv method to train the neural network by looking at all the possible outcomes.Then, we u an unsupervised method to let the network make its own predictions, and finally, checked that the predictions were correct.Initially, we use supervised training to de mine the process response based on seven predictive variables (Figure 2).These varia are chosen from analyses conducted with the metallurgy department of the mining c pany, benchmarking of other mining processes with similar characteristics, and corr tion analysis associated with the segregation categories of the spent heap leach.The c bination of variables is then expanded based on the generation of the highest percent of success in network training.A statistical summary of these variables is presented Table 1.The artificial neural network (ANN) scheme used in this study (Figure 5) consist a pattern layer with 10 neurons, which receives input data corresponding to the varia selected for each model, assigns them a weight ( ), and processes it through various c nections.Five neurons in a summatory cell combine the output of each neuron in the tern layer.This summatory cell computes the weighted sum of the inputs and applie   The artificial neural network (ANN) scheme used in this study (Figure 5) consists of a pattern layer with 10 neurons, which receives input data corresponding to the variables selected for each model, assigns them a weight (W i ), and processes it through various connections.Five neurons in a summatory cell combine the output of each neuron in the pattern layer.This summatory cell computes the weighted sum of the inputs and applies an activation function.Finally, the output layer consists of 5 neurons based on the segregation categories that generate the network's response based on the computed values from the summatory cell.In the first stage, a training phase is conducted to build models that can successfully categorise flowability.An optimised activation function is implemented using jackknifing for models 1 and 2, while for the third model, the nearest neighbour approach is used.
The second stage corresponds to evaluating the models and identifying how the chosen variables influence the prediction, considering different amounts of fluency categories.

Results and Discussion
Figure 6 displays a multivariate analysis that presents density graphs on the major diagonal.These graphs demonstrate the correlations among the variables utilised in the database for models 1 and 2, which are related to the overall behaviour of the modules.From a statistical analysis, the intermediate lithology and poor-quality lithology variables exhibit higher average values compared to the other parameters.The sulphate percentage and poor-quality lithology variables stand out as the most variable parameters.There is a strong correlation between intermediate lithology and variables such as sulphate percentage, iron oxide, and plagioclase, indicating their interdependence.Mesh fines 2 percentage shows a moderate positive correlation with iron oxide and plagioclase, implying that higher levels of these components lead to increased fines.Moisture exhibits a positive correlation with iron oxide and plagioclase, implying an association between these variables and increasing the moisture content in the module.

Results and Discussion
Figure 6 displays a multivariate analysis that presents density graphs on the major diagonal.These graphs demonstrate the correlations among the variables utilised in the database for models 1 and 2, which are related to the overall behaviour of the modules.From a statistical analysis, the intermediate lithology and poor-quality lithology variables exhibit higher average values compared to the other parameters.The sulphate percentage and poor-quality lithology variables stand out as the most variable parameters.There is a strong correlation between intermediate lithology and variables such as sulphate percentage, iron oxide, and plagioclase, indicating their interdependence.Mesh fines 2 percentage shows a moderate positive correlation with iron oxide and plagioclase, implying that higher levels of these components lead to increased fines.Moisture exhibits a positive correlation with iron oxide and plagioclase, implying an association between these variables and increasing the moisture content in the module.
The data correlation implies that the most important correlation can be observed between intermediate lithology and sulphate percentage, iron oxide, and plagioclase variables.This correlation highlights the potential trade-off between poor-quality lithology and moisture content, indicating that as one variable worsens, the other may improve.It may be worth investigating the specific factors that contribute to this negative correlation to identify strategies for optimising both variables simultaneously.Regarding the correlation present in the variables used in the database for model 3 related to the advanced behaviour of the modules (Figure 7), it was observed that intermediate lithology with a high presence of clays and silicates had a positive correlation but a relatively low impact on segregation behaviour.Sulphate presence exhibited a low correlation but high weight in the ANN models, influencing the segregation of the spent heap leach.This is explained considering that its presence occurs in a range between 1 and 30%.Iron oxide showed a positive correlation but with small weights in the models.On the other hand, phyllosilicates had a high ANN weight, signifying a significant impact on the ANN model's output.Poor-quality lithology that considers the presence of granodioritic minerals with potassium alterations and drain time as variables both had moderate correlations and ANN weights.With this, the importance of considering the composition of clays, silicates, and sulphates in understanding acid consumption and drain time is detected.The data correlation implies that the most important correlation can be observed between intermediate lithology and sulphate percentage, iron oxide, and plagioclase variables.This correlation highlights the potential trade-off between poor-quality lithology and moisture content, indicating that as one variable worsens, the other may improve.It may be worth investigating the specific factors that contribute to this negative correlation to identify strategies for optimising both variables simultaneously.
Regarding the correlation present in the variables used in the database for model 3 related to the advanced behaviour of the modules (Figure 7), it was observed that intermediate lithology with a high presence of clays and silicates had a positive correlation but a relatively low impact on segregation behaviour.Sulphate presence exhibited a low correlation but high weight in the ANN models, influencing the segregation of the spent heap leach.This is explained considering that its presence occurs in a range between 1 and 30%.Iron oxide showed a positive correlation but with small weights in the models.On the other hand, phyllosilicates had a high ANN weight, signifying a significant impact on the ANN model's output.Poor-quality lithology that considers the presence of granodioritic minerals with potassium alterations and drain time as variables both had moderate correlations and ANN weights.With this, the importance of considering the composition of clays, silicates, and sulphates in understanding acid consumption and drain time is detected.In the general module data, variables such as intermediate lithology, sulphate percentage, and phyllosilicates exhibited higher correlation weights, indicating a moderate to strong linear relationship with the target variable, whereas the ANN weights varied across these variables.Phyllosilicates had the highest ANN weight, suggesting an important impact on the prediction models.In the advanced module, data variables such as the high percentage presence of clays and silicates, the high percentage presence of sulphates, and the medium percentage presence of sulphates demonstrate positive correlation weights.The ANN weights for these variables varied as well, with the medium percentage presence of sulphates having the highest weight, indicating its strong influence in the ANN model.Figure 8 presents a comparison between the correlation and ANN weights for the variables used in the models.Positive correlation weights suggest a positive relationship and higher ANN weights indicate a stronger influence of the variable on the model's output.In the general module data, variables such as intermediate lithology, sulphate percentage, and phyllosilicates exhibited higher correlation weights, indicating a moderate to strong linear relationship with the target variable, whereas the ANN weights varied across these variables.Phyllosilicates had the highest ANN weight, suggesting an important impact on the prediction models.In the advanced module, data variables such as the high percentage presence of clays and silicates, the high percentage presence of sulphates, and the medium percentage presence of sulphates demonstrate positive correlation weights.The ANN weights for these variables varied as well, with the medium percentage presence of sulphates having the highest weight, indicating its strong influence in the ANN model.

ANN Model Training Stage
The training result with seven predictor variables is presented in Table 2, where model 1 obtained a 72.5% correct classification in training considering the general behaviour of the modules being applied to 98 cases, with a spacing parameter optimised by jackknifing of 0.1109.Model 2, considering the same predictor variables and cases used for the generation of model 1, with a spacing parameter optimised during training by jackknifing of 0.0429, obtains a success rate of 73.47%.The training of model 3 was incremented to 5 response categories (solid, semi-solid, intermediate semi-liquid, and liquid) and elaborated considering the percentages of stacking and removal of the modules, reaching 78.10% of correctly classified cases for a total of 1575 cases analysed and using the nearest neighbour as a spacing parameter.The error obtained in the model classification occurs when spent heap leach data is interpreted as a contiguous category.For model 1, of the 48 cases identified with intermediate flow and segregation, forty were correctly classified, three were classified as semi-solid, and five as semi-liquid.
For the case of semi-liquid behaviour, of the 32 cases studied, 18 were correctly classified, 13 were classified as intermediate behaviour, and 1 was liquid behaviour.This situation confirms what was expressed by Alom et al. [41], where the error can be minimised as more cases are entered into the data for training, where the errors mostly occur with neighbouring behaviours that the spent heap leach presents.
Model 2 presents a better classification due to the reduction of response variables, and the errors produced mostly occur in the closest category.Model 3 is the one that achieves a better classification of the behaviour of the unloading spent related to the cases used to train the network, as expressed by Albalasmeh et al. [48], minimising the error, covering all the feasible options that may occur, adjusting the synaptic weights of the neurons, and modifying the outputs according to the error made in each learning step until getting as close as possible to the desired output.

ANN Models Prediction and Corroboration
Once the training of the three models has been carried out, an unsupervised classification method is applied in order to analyse the level of prediction achieved.To analyse the behaviour capacity, two levels of classification response probability are applied, the first corresponding to the nearest neighbour, that is, the response with the highest probability of being obtained, and the second corresponding to the second closest neighbour, that is, the answer with the second highest probability of coming out.In the results given in Tables 3 and 4, the percentage correctly classified difference for the intermediate category is approximately 28.5%, indicating a significant improvement in model 3's classification accuracy for this category.This suggests that model 3 was preferable at classifying spent heap leach with intermediate behaviour, achieving a higher rate of accuracy.In the category of semi-liquids, the percentage difference is approximately 61.5%, indicating that model 3's correct classification percentage has increased, suggesting that model 3 performed significantly better than model 1 with 5 categories.For the category of liquids, the percentage difference is approximately 54.3%, indicating a substantial improvement in the classification accuracy of model 3. Model 1 made 90 predictions, of which it corroborated 26 cases, obtaining 73.55% certainty as the first response.This increases to 95.24% certainty for the process considering the two predictions corresponding to the first and second highest probability that a certain behaviour of the spent heap leach will occur.The prediction analysis strategy of model 2 considers, like model 1, the generation of 90 predictions obtaining 1.06% less success than that obtained in model 1 with corroboration from 26 cases considering the first probable answer, but this difference increasing by 4.76% considering the 2nd highest probability, where the range of physical qualities is smaller so there are no intermediate behaviours (semi-solid or semi-liquid), so it can be considered more drastic when making the decision.Model 2 reaches a prediction level of 100% certainty with the first and second highest probabilities, defining strategies for both categories with the highest probability of exiting.
For model 3, considering the behaviour due to module advancement, 192 corroborations were conducted, obtaining a 79.33% accuracy in the prediction, considering the first highest probability of a certain category occurring, increasing to 91.47% when considering two probabilities of occurrence.The errors produced in the models correspond to the responses given to the categories close to the true response, mostly in the intermediate behaviour and the semi-solid and semi-liquid classifications.
The error generated under the 5 categories provides an opportunity for correction during the operation since these categories are contiguous and defined with similar spent heap leach discharge strategies, thereby not affecting the space allocated to the dump.These results demonstrate that it is indeed possible with the currently monitored variables and with the application of ANN to obtain a high degree of prediction as the new data related to spent heap leach is integrated into the original data.Model 3 performed slightly better than models 1 and 2 in terms of the overall percentage correctly classified, which leads us to consider that the use of a small dataset can be a possibility to evaluate an ANN performance considering ensuring that the input data is diverse, covers patterns, and is relevant to the behaviour.There are variations in the accuracy for the segregation categories; the solid category improved significantly, semi-solid and liquid dropped in the larger dataset, and the accuracy for the intermediate segregation category remained consistently high in both models.Figure 9 presents the prediction percentage for the three models, considering the training and prediction stages.

Segregation Behaviour and Moisture Relation
As it was established by Pieretti et al. [52], the moisture content of the spent heap leach is one of the most influential variables in the behaviour of these materials in their operational transport and deposition.The use of this variable as input data depends on the time of availability of this characterization, and for the case studied, it is performed once the module has been downloaded, with an average waiting period of 7 days for analysis.This situation means that currently, it is not possible to use this variable as part of a previous predictive analysis if the result delivery times cannot be improved.When analysing the behaviour of the moisture percentage against the segregation behaviour as shown in Figure 10, there is a clear relationship, whereas as the moisture increases, the quality of the spent heap leach becomes more liquid, reaching category 5.When employing 5 response categories, the moisture present is modified to exhibit a logarithmic pattern, in contrast to the observed polynomial.If we compared the predictive models based on evaluation metrics, the results indicate that the ANN advance module outperforms the ANN general module in terms of predictive performance but considering the differences in cases used in the database, it is possible to say that the ANN general module results can be considered "not as strong" as the predictions obtained with the advance module.
The ANN advance module demonstrates a lower root mean squared error (RMSE) of 0.819 ± 0.023 compared to the RMSE of 0.853 ± 0.278 for the ANN general module, indicating better accuracy in its predictions.The ANN advance module model also achieves better accuracy and superior performance for average absolute error (0.613 ± 0.016 vs. 0.682 ± 0.012) and relative error (16.12% ± 0.28% compared to 17.47% ± 0.31%).Additionally, the ANN advance module exhibits a higher correlation of 0.429 ± 0.083, while the ANN general module correlates 0.191 ± 0.074, indicating a stronger relationship between the predicted variables and actual segregation categories.
Analysing the weight given by the variables at the prediction level, the presence of fines in the ore is one of the most influential variables that explain the behaviour of the spent heap leach.As mentioned by López et al. [20], the particle size profile for the leaching process seeks to maximise the surface contact area in order to maximise the extraction of the element of interest, which results in changes in the physicochemical characteristics of the mineral that can affect the heap permeability.In this study, the granulometry in this process is between 11 and 18% under 75 µm (200 Tyler mesh), reaching a P 80 of 12.7 mm, which affects the behaviour of the material in the dump.If the fines percentage increases, greater compaction is generated, decreasing the size of the pores, and reducing their hydraulic conductivity, as also established by Marchant [14], preventing good drainage in the piles.
Other variables, such as the fluctuation in ferrous sulphate concentration (low, medium, and high), have been recognised as significant factors for the model.This is due to the presence of them exceeding 30% in certain modules, resulting in a spent heap leach with minimal rock competition and high solubility in water, leading to chemical crushing.The presence of phyllosilicates as the major component leads to a rise in the fines percentage, as demonstrated by Bard et al. [17].This drop in particle sizes adversely affects permeability, resulting in a reduced drainage capacity.
The lithology of intermediate quality is primarily composed of limonite and clays, such as muscovite and kaolinite.This lithology significantly affects the model due to its low permeability and capacity to undergo chemical crushing, facilitated by the presence of fine-grained iron oxide and low hardness (1.5-1.6 on the Mohs scale).When lithologies of good quality, such as granodiorite with potassium are present, it results in strong rock competition, preventing the generation of fine materials.This leads to excellent permeability within the material, improved hydraulic conductivity, and efficient drainage of solutions.Phyllosilicates play a crucial role in transporting water, as indicated by Ganzhorn et al. [49], highlighting their significance as a constant factor throughout the three models.In models 1 and 2, the inclusion of sulphates as a variable significantly improves the accuracy of the model.This is because sulphates generate a substantial number of fines, which have a physical and chemical impact on the behaviour of spent heap leach by affecting its permeability.Minerals with relatively low hardness, such as brochantite (3.5 to 4.0) [50] and chalcanthite (2.5), can be disintegrated on the surface [51].

Segregation Behaviour and Moisture Relation
As it was established by Pieretti et al. [52], the moisture content of the spent heap leach is one of the most influential variables in the behaviour of these materials in their operational transport and deposition.The use of this variable as input data depends on the time of availability of this characterization, and for the case studied, it is performed once the module has been downloaded, with an average waiting period of 7 days for analysis.This situation means that currently, it is not possible to use this variable as part of a previous predictive analysis if the result delivery times cannot be improved.When analysing the behaviour of the moisture percentage against the segregation behaviour as shown in Figure 10, there is a clear relationship, whereas as the moisture increases, the quality of the spent heap leach becomes more liquid, reaching category 5.When employing 5 response categories, the moisture present is modified to exhibit a logarithmic pattern, in contrast to the observed polynomial.

Segregation Behaviour and Moisture Relation
As it was established by Pieretti et al. [52], the moisture content of the spent heap leach is one of the most influential variables in the behaviour of these materials in their operational transport and deposition.The use of this variable as input data depends on the time of availability of this characterization, and for the case studied, it is performed once the module has been downloaded, with an average waiting period of 7 days for analysis.This situation means that currently, it is not possible to use this variable as part of a previous predictive analysis if the result delivery times cannot be improved.When analysing the behaviour of the moisture percentage against the segregation behaviour as shown in Figure 10, there is a clear relationship, whereas as the moisture increases, the quality of the spent heap leach becomes more liquid, reaching category 5.When employing 5 response categories, the moisture present is modified to exhibit a logarithmic pattern, in contrast to the observed polynomial.

Conclusions
In this study, it was possible to verify that the application of deep learning is feasible to predict the behaviour of the spent heap leach when they are dumped.The neural network method is efficient for this kind of analysis prediction, with 95.24% accuracy for model 1 when the two highest probabilities of data correlation are taken into account.From the three models generated, the models using five variables as a classification response are more reliable as they have intermediate segregation behaviours that can help minimise prediction errors by designating similar discharge strategies.The versatility of using an artificial neural network in this type of operation considers the option of using two models together using different predictor variables to know the general segregation by the spent heap leach disposal.The errors produced in the models occur with the closest neighbour to the correct category; therefore, it would not affect the discharge strategy of the spent heap leach in the dump.
However, when the moisture content is over 8%, the material flows using larger areas than originally estimated by design.Currently, considering the moisture percentage as a predictive variable in a day-by-day operation is not possible because its measurement is performed once the modules are removed, and the results of the chemical analysis are not available before the spent heap leach is discarded in the dump.However, since the objective of this work was to identify the most relevant variables to predict behaviours at the time of depositing the spent heap leach, moisture has a clear relationship with segregation and flows; therefore, it must be used as a parameter to consider for the elaboration of shifting.Evaluating a small dataset with adequate input data can be the first approach to assessing segregation behaviour.Although a larger dataset generally yields more reliable and robust results, it has been identified that carefully designing, representing, and studying a small dataset beforehand can provide valuable insights into the classification performance.
The modules with a high presence of sulphate showed poor rock competence and great ability to form fines, causing permeability problems and preventing proper drainage of the leach solution, and the spent heap leach will have less stability in the dump.The high presence of clays and silicates has an important effect on permeability, inhibiting the hydraulic conductivity of the modules, as clays have a high capacity to retain moisture.The presence of fine granulometry in the modules (higher than 18% −150 µm) is one of the variables with the greatest weight when developing the models, since a high presence in the module directly affects the permeability of the bed, decreasing the hydraulic conductivity and thus the fluidity.The flowability is better for the lithologies considered to be of good quality, formed with granodiorite and potassium alterations, providing good permeability with high rock competence and low formation of fines.With a higher presence of lithologies in the module, better drainage conditions for the solution will be obtained, helping to maintain the stability of the spent heap leach in the dump.Phyllosilicates provide fine granulometry to the modules and are considered water carriers.They cause solution drainage problems, producing a drainage deficit and causing spent heap leach with high segregation.In the presence of iron oxides presenting clays as impurities with low hardness, a scenario of easy disintegration is presented, causing fines, low permeability, and a deficit in the drainage of the solution.

Recommendations
Using this methodology, it is relevant to obtain more data over time to complement the metadata and provide a deeper level of characterization associated with the composites that make up the modules.To use the moisture percentage as a predictive variable, a 24-48 h sampling procedure must be established after the module irrigation ends for the characterization response time to occur before the module removal and to consider with robust information the possible relationship with the spent heap leach behaviour in the dump.

Figure 2 .
Figure 2. Predictor variables were analysed and used for model design.

Figure 2 .
Figure 2. Predictor variables were analysed and used for model design.

Figure 2 .
Figure 2. Predictor variables were analysed and used for model design.

Figure 4 .
Figure 4. ANN model design strategy to predict the segregation behaviour in the dump.

Figure 4 .
Figure 4. ANN model design strategy to predict the segregation behaviour in the dump.
Minerals 2024, 14, x FOR PEER REVIEW 9 of 19 activation function.Finally, the output layer consists of 5 neurons based on the segregation categories that generate the network's response based on the computed values from the summatory cell.

Figure 5 .
Figure 5. Artificial neural network scheme used for model generation.

Figure 5 .
Figure 5. Artificial neural network scheme used for model generation.

Figure 6 .
Figure 6.Correlation between the variables used in models 1 and 2 by multivariable analysis.

Figure 6 .
Figure 6.Correlation between the variables used in models 1 and 2 by multivariable analysis.

Figure 7 .
Figure 7. Correlation between the variables used in model 3 by multivariable analysis.

Figure 8
Figure8presents a comparison between the correlation and ANN weights for the variables used in the models.Positive correlation weights suggest a positive relationship and higher ANN weights indicate a stronger influence of the variable on the model's output.In the general module data, variables such as intermediate lithology, sulphate percentage, and phyllosilicates exhibited higher correlation weights, indicating a moderate to strong linear relationship with the target variable, whereas the ANN weights varied across these variables.Phyllosilicates had the highest ANN weight, suggesting an important impact on the prediction models.In the advanced module, data variables such as the high percentage presence of clays and silicates, the high percentage presence of sulphates, and the medium percentage presence of sulphates demonstrate positive correlation weights.The ANN weights for these variables varied as well, with the medium percentage presence of sulphates having the highest weight, indicating its strong influence in the ANN model.

Figure 8 .Figure 7 .
Figure 8. Correlation and ANN weight comparison for general and advanced modules variables.

Figure 8
Figure8presents a comparison between the correlation and ANN weights for the variables used in the models.Positive correlation weights suggest a positive relationship and higher ANN weights indicate a stronger influence of the variable on the model's output.In the general module data, variables such as intermediate lithology, sulphate percentage, and phyllosilicates exhibited higher correlation weights, indicating a moderate to strong linear relationship with the target variable, whereas the ANN weights varied across these variables.Phyllosilicates had the highest ANN weight, suggesting an important impact on the prediction models.In the advanced module, data variables such as the high percentage presence of clays and silicates, the high percentage presence of sulphates, and the medium percentage presence of sulphates demonstrate positive correlation weights.The ANN weights for these variables varied as well, with the medium percentage presence of sulphates having the highest weight, indicating its strong influence in the ANN model.

Figure 7 .
Figure 7. Correlation between the variables used in model 3 by multivariable analysis.

Figure 8 .Figure 8 .
Figure 8. Correlation and ANN weight comparison for general and advanced modules variables.

Figure 9 .
Figure 9. Models' prediction corroboration considering the most likely segregation category.

Figure 10 .
Figure 10.Average moisture percentage for physical behaviour of spent heap leach with 5 and 3 response categories.Figure 10.Average moisture percentage for physical behaviour of spent heap leach with 5 and 3 response categories.

Figure 10 .
Figure 10.Average moisture percentage for physical behaviour of spent heap leach with 5 and 3 response categories.Figure 10.Average moisture percentage for physical behaviour of spent heap leach with 5 and 3 response categories.
Corresponds to input values.j: Corresponds to output groups.X i : input variable in activation function.n j : Number of observations belonging to the output group j.

Table 1 .
Statistical summary of the variables used in the models.

Table 1 .
Statistical summary of the variables used in the models.