Strength prediction of seawater sea sand concrete based on artificial neural network in python

Based on the artificial neural network method, the nonlinear mapping between the 28d compressive strength of seawater sea sand concrete and concrete water-cement ratio, cement content, and the sand ratio was established in Python. The results showed that with reasonable network settings, the fitting of the model training was good, and the prediction results were satisfactory. The mean relative error of prediction results was 3.16%, and the correlation coefficient was 0.974. Therefore, it is possible to use an artificial neural network to set up a compressive strength prediction model for seawater sea sand concrete. Compared with the traditional mix design method, the artificial neural network design method can decrease the number of mixing proportion adjustments and reduce the waste of labor, time, and materials.


Introduction
The ocean is increasingly valued by countries around the world for its richness in fisheries, minerals, energy, and other natural resources. At the same time, the 19th National Congress of the Communist Party of China proposed to accelerate the pace of building a strong ocean power. Building ocean power is a necessity for the domestic development of China. The need for developing marine resources and protecting maritime rights and interests has resulted in the construction of ports, military facilities, and resource extraction facilities in coastal or island areas. The rapid increase in demand for marine structures has caused a rapid rise in the demand for concrete in civil engineering. However, there is a severe shortage of fresh water in the island area. If ordinary concrete is used, river sand and fresh water must be transported from the inland, leading to a longer construction period and higher construction cost. On islands located farther from inland, the situation would be more difficult. According to the 2015-2020 China Crushing Equipment Industry Market Analysis and Investment Strategic Planning Report, the production of sand and gravel in China accounted for about 35% of the total production in the world. Demand for sand and gravel in China reached 140×10 8 t in 2014, and it is expected to reach 250×10 8 t in 2030 [1]. However, river sands are becoming scarce due to improper and over-exploitation. China has an abundance of sea sand in the islands and coastal areas. According to preliminary estimation, the total amount of sea sand in the offshore waters in China is 67.96×10 10 ∼68.49×10 10 m 3 [2]. Likewise, seawater is inexhaustible. Therefore, sea sand can be used directly to prepare seawater sea sand concrete that meets the performance requirements without desalination in construction projects. In application, seawater sea sand concrete can be combined with corrosion-resistant reinforcement, such as FRP rebar, corrosion-resistant coating steel bar, and stainless steel bar. These applications show an extraordinary significance to the development of the marine economy and the construction of island defense. In recent years, some achievements have been made in the study of seawater sea sand concrete. Xiao et al [3][4][5] reported many studies about mechanical behavior of seawater sea sand concrete. Huang et al [6] and Wu et al [7] studied the influence of mineral admixture on the performance of seawater sea sand concrete.
Artificial neural network (ANN) is dependent on the powerful computational work of computers, which has the ability of self-learning, self-adapting, and approximation of any nonlinearity. The model of an artificial neural network is illustrated in figure 1. The neural network trained on the data could be applied to solve some problems that are non-computational [8,9], such as the prediction of concrete strength and non-analytical expression of concrete carbonation patterns. For modern concrete engineering, the concrete prepared according to the concrete mix design standards often does not meet the strength or liquidity requirements. This design requires multiple adjustments of the mix ratio, which consumes a lot of material, labor, and time. Some scholars predicted the compressive strength of concrete by the artificial neural network. The prediction effect was ideal, which was especially critical for quality control of concrete production in practical projects [10][11][12][13]. In relevant studies, there was no model for predicting the compressive strength of seawater sea sand concrete using the artificial neural network. In this paper, a nonlinear mapping between the compressive strength of seawater sea sand concrete and the concrete water-cement ratio, the unit cement consumption, and the sand ratio was established using an artificial neural network method. The paper didn't consider age of concrete as a variable. It focused on 28 days compressive strength of seawater sea sand concrete. Because there are few data about age of concrete in the relevant literature.
Scripting code for the artificial neural network model was written based on the Python platform. Compared with MATLAB, Python has the characteristics of a more rigorous language and easy maintenance of code, which can be applied to scientific computing, statistics, and other relevant fields. Over the past few years, scientific computing via Python has gained increasing momentum [14], and the Python language has become increasingly important in the scientific area [15].

Raw materials
The cement selected for the test was P·O42.5R ordinary Portland cement with a density of 3150 kg m −3 and a specific surface area of 352 m 2 kg −1 . The natural coarse aggregate was crushed gravel from a mountainous area of Fuzhou in China. The particle size range was 5 to 20 mm, the apparent density was 2695 kg m −3 , and the mud content was 0.38%. The water-reducing agent was polycarboxylate superplasticizer. Sea sand was the pristine sea sand from the Putian sea, China, which was graded as zone II [16]. Seawater was artificial seawater [17]. The relevant indicators of sea sand and seawater are shown in tables 1 and 2.

Experimental results
The mixing ratio and 28d compressive strength of concrete for each test group are shown in table 3. According to the Standard Test Method for Mechanical Properties of Ordinary Concrete [18], since the maximum diameter of the coarse aggregate was less than 31.5 mm, the specimen size was 100 mm×100 mm×100 mm. For each mixing ratio, three specimens were tested. After the laboratory maintenance for 24 h, the specimens were  3. Establishment of the neural network model 3.1. Sample sources In this paper, the concrete water-cement ratio, unit cement consumption, and sand ratio were used as the input values of the artificial neural network, while the compressive strength of 28d concrete was used as the output values. The training samples were from the first experimental group and literature [19][20][21][22][23], and the prediction samples were from the second experimental group and literature [24]. All data are shown in table 4.

Network structure and parameters
A three-layer network can achieve an approximation of any function [25], so the number of hidden layers was set to 1. Due to the powerful computing power of Python, iterations could be set to more than 100000. In the gradient descent idea, the learning rate controls the update step size in each iteration of the algorithm. If the learning rate is low, the number of iterations required to reach convergence would be high. If the learning rate is large, it would be easy to make data oscillate and even lead to non-convergence. The learning rate could be ranged from 0.05 to 0.5. The number of neurons could start from 2 and increased by multiple of 5. The commonly used activation functions in the artificial neural network model are Logistic, Tanh, Softplus, Relu. Each function image is shown in figure 2. Sigmoid functions are regarded as the core of the neural network, such as Logistic-Sigmoid and Tanh-Sigmoid. The Softplus, Relu, and Sigmoid functions are distinguished by the unilateral inhibition zone, relatively broad excitation boundary, and sparse activation [26]. The application of Relu can significantly reduce the learning period of the artificial neural network. According to the network trial calculation, the performance of the artificial neural network model was relatively ideal when the activation function was Tanh or Relu.
On the premise that Tanh was the activation function, took the number of neurons, the learning rate, and the iteration times as control variables for model training. By comparing the model results under different settings, the relatively optimal network settings of Tanh ANN could be obtained. If the activation function is replaced by Relu, there is also an optimal solution of Relu ANN. Comparing the model result of Relu ANN with Tanh ANN, it would be possible to get the most ideal result.

Model results
Model results of Tanh ANN and Relu ANN under different network settings were evaluated based on the mean value of the relative errors, as shown in tables 5 and 6. After each training, neural networks with the same settings had different results, varying within a certain range. Therefore, the results in tables 5 and 6 were the mean values of the three training results.
It could be seen from table 5 that ANN model results were ideal. Tanh ANN performed better when the number of neurons was 50. No matter how many neurons were, the mean value of the relative errors of the total results decreased first and then increased with the decrease of learning rate. When the learning rate was 0.3, the total results lowered to the minimum. By performing a comprehensive analysis on the training and prediction The performance of the artificial neural network model remained ideal after replacing the activation function with Relu, especially when the mean value of the relative errors of total results was 3.49%. From tables 5 and 6, when the combination of artificial neural network settings was Relu activation function with 50 neurons, 0.1 learning rate, and 100,000 iterations, ANN model performed best.
The specific results of the Relu neural network models with 50 neurons, 0.1 learning rate, and 100,000 iterations are given in table 7. By comparing the ANN output value and the sample value, the relative error could be calculated. All the relative errors are also shown in table 7. The ANN had the maximum relative error below 10% and the minimum relative error close to 0, the maximum relative error of training results and prediction results were 9.79% and 6.85%, respectively. Some typical statistical indicators were commonly used in previous studies to reflect the performance of mathematical models [8,10]. According to the formulas (1) to (5), R 2 (correlation coefficient), MAE (mean absolute error), MSE (mean square error), MAPE (mean absolute percent error), E (efficiency coefficient) were calculated for each set mentioned above. The calculated statistical indicators are shown in table 8. The mean values of the relative errors of the training and prediction results were 3.82%, 3.16%, respectively. In addition, the R 2 , MAE, MSE, MAPE, and E for the set of all model results were 0.964, 0.0168, 0.0218, 0.193, 0.960, respectively. It could be seen that the model has good performance, and the prediction error meets the requirements of engineering applications. Where X i represents sample value; Y i represents artificial neural network output value.

Conclusion
(1) Although the sample size in the present study was limited, the mean value of the relative errors of the obtained ANN training results was 3.82%, and the mean value of the relative errors of prediction results was 3.16%. The results were still relatively satisfactory. It can be concluded that it is possible to predict the compressive strength of seawater sea sand concrete by the artificial neural network.
(2) If the material parameters are directly input to the trained artificial neural network model, the strength value can be obtained from the topological structure. Compared with the traditional mix design method of concrete, ANN can reduce the number of adjustments and save labor, time, and materials.
(3) If more sample data are available, the artificial neural network model can sufficiently learn the mathematical relationship between input and output values, indicating the model has higher reliability and wider adaptability. Therefore, it is possible to better predict the compressive strength of seawater sea sand concrete with the change of the mix ratio. Besides, the ANN method can be improved. For example, artificial neural network can be optimized by genetic algorithm which is an evolutionary algorithm.
(4) As known, parameters of mix proportion such as concrete water-cement ratio, unit cement consumption, and sand ratio determine the compressive strength of seawater sea sand concrete. Meanwhile, the differences in raw materials also have an impact. In practical applications, the performance of the artificial neural network model can be more ideal if the raw materials of samples are the same or not very different. Therefore, the mix design method of concrete by ANN can be used in the same area or the same production line of seawater sea sand concrete. Besides, we may consider adding properties of concrete materials to the model in the future, such as chloride ion content and shell content of sea sand. In this way, it can also improve accuracy of ANN results. And afterward, the age of concrete may also be considered if the data is enough.