# Research on Replacing Numerical Simulation of Mooring System with Machine Learning Methods
## 2 Data from Numerical Simulation of the CALM System
### Sampling Strategy  
The simulation base dataset should be obtained using an appropriate sampling method to ensure high machine learning accuracy, which depends on the sampling approach, sampling amplitude, and sampling density. In this work, Latin Hypercube sampling, a form of stratified sampling method with approximately random sampling seed across the distribution of multiple parameters [23; 24], is adopted given the multiple dimensions of the input data. Due to the demanding resource consumption of numerical simulation, it is unrealistic to sample the data globally as much as possible to achieve satisfactory accuracy. The overall data can be mainly divided into global and local data. If the prediction made by the model trained by global data is poor, local data should be tested, in which case a resultant high accuracy means that the local data density could be applied in the global data range. The data range, test data value, and the minimum sampling accuracy for the self and operation conditions are shown in Tables 1 and 2, respectively. All the data are sampled within the specified range, and local data are sampled with a certain deviation around the test value. The local data are sampled by two-precision and three-precision rules. The former samples two values for each input dimension around the test value by a difference equal to the sampling accuracy. For example, the _vw_ values sampled for the operation condition are 21.9 and 22.1, according to the two-precision rule. Similarly, the three-precision rule samples three values around the test value, including the test value itself (21.9, 22, and 22.1 for the aforementioned example). In order to guarantee the validity of the training dataset, the value combinations which are the same as the test dataset are eliminated. Figure 3: Input and output parameters of AQWA. More refined structures for global data and local data are shown in Figures 4 and 5. Because operation calculation is more complicated and time-consuming, the size of the operation condition dataset is made smaller than the self condition dataset to achieve a similar level of computation time. Three datasets are sampled in the operation condition, as illustrated in Figure 4. Dataset 1 (global_1) includes 81 data in the global area sampled by Latin hypercube, which makes the total number of cases 1620, considering 20 working conditions for each sampled global data. Dataset 2 adds 337 global data and two-precision sampled local data to dataset 1. The total amount of added data is 10,240, composed of 6740 (337 \(\times\) 20) global data and 5120 local data, which are the combination of the two-precision data of eight input parameters (28) and working conditions (28 \(\times\) 20). Dataset 3 adds 131,220 (38 \(\times\) 20) three-precision method sampled data to the dataset. However, the model was later shown to achieve satisfactory performance with fewer data, so 49,020 data were used. Four datasets are sampled for the self condition, as shown in Figure 5. Dataset 1 (global_1) constitutes 1450 data in the global area by the Latin hypercube sampling method, making the total data 14,500 given 10 working conditions. Dataset 2 adds 19,900 (1990 \(\times\) 10) global data to dataset 1. Dataset 3 takes two-precision sampling to include 1280 (27 \(\times\) 10) local data (the exponent 7 refers to 7 input parameters). Some experiments are performed to refine the sampling accuracy, and 1270 local data are added, making the total local data 2550. Dataset 4 further includes 21,870 (37 \(\times\) 10) local data by three-precision sampling. With the repetitive data by two-precision sampling excluded, 20,880 data are added in addition to Dataset 3. For evaluating the accuracy of the machine learning model, the dataset is further divided into three parts: training dataset, validation dataset, and test dataset, as shown in Figure 6. The training dataset is used to train the models, and the validation dataset and test dataset are both used to assess the prediction accuracy of the trained model.