*The Application of Artificial Neural Network to Predicting the Drainage from Waste Rock… DOI: http://dx.doi.org/10.5772/intechopen.96162*

in the training process, as a prediction of the drainage in the next 2 years will be performed after the training is completed. As the monitoring data of weather and drainage during the next 2 years are also available. The real weather data will be utilized as the input of the neural network. In real situation, weather forecasting data should be adopted for prediction purpose. The predicted drainage flow rates and acidities will be compared with the real monitoring values.

As shown in the **Figure 1**, only a single hidden layer is in the feedforward neural network adopted for this case study. So the number of neurons in the hidden layer is considered as a hyperparameter for the training process. A grid search is performed on 5, 10 and 20 neurons in the hidden layer to find the optimized size. The proposed neural network is trained through Levenberg–Marquardt backpropagation algorithm. The adaptive value (damping factor) is set to 0.001 initially, and will increase by 10 until the change of above results in a reduced performance value. The change is then made to the network and adaptive value is decreased by 0.1. The maximum adaptive value is set to 1e10. The maximum epochs before the stop of training is set to 1000. However, the training may be stopped early if the *MSE* on the validation vectors stops to improve or remains the same for 6 epochs in a row.

The proposed neural network is implemented through the machine learning toolbox built in commercial software MATLAB. The weather monitoring data are pre-constructed for both types of input layer through Microsoft Excel Macro before exporting into the MATLAB.
