# Multivariate Relationship in Big Data Collection of Ocean Observing System
## 2 Materials and Method
### Experimental Setting  
As stated above, in order to train and validate the model, measurements from the _EMODnet_ dataset are used. The inputs chosen are:  
* Date (year, month, day);
* Geolocation (latitude, longitude, depth);
* Temperature;
* Salinity;
* Oxygen.
* The outputs we aim to predict consist of:
* Nitrate (NO\({}_{3}^{-}\));
* Phosphate (PO\({}_{4}^{3}\));
* Silicate (Si(OH)\({}_{4}\));
* Total alkalinity (A\({}_{7}\));
* Chlorophyll-a;
* Ammonium (NH\({}_{4}^{+}\)).  
Before training, data are randomly mixed, then the dataset is split into a training set, used to optimize the weights, and a test set used to test the performance of the proposed model: this partition is obtained based on a proportion of 80% and 20%.  
To improve the performance of the network, a phase of preprocessing of the data is undertaken. The operations selected to be applied during this stage consist of the most effective among the ones introduced by [10; 14; 15]. Firstly the latitude input is divided by 90: as latitude values vary over the range \([-90,90]\), this operation ensures they fall in the range \([-1,1]\). Additionally, the longitude input is modified in order to take account of the periodicity of the variable, as follows: \(|1-mod(lon-110.360)/180|\) and \(|1-mod(lon-20.360)/180|\), where lon indicates the original longitude. The depth input is transformed,combining a linear and a non-linear function, to limit the degrees of freedom of the network in deep waters, as shown in Equation (2):  
\[D_{new}=\frac{D}{20,000}+\frac{1}{(1+\exp(-\frac{D}{300})^{3})} \tag{2}\]  
where \(D\) is the original depth and \(D_{new}\) is the new preprocessed input depth. The input and the output data are then normalized in order to make training faster and to reduce the chances of becoming stuck in local optima, subtracting from the original variable \(x\) the mean \(\bar{x}\) and dividing the result for the standard deviation \(\sigma\) as follows:  
\[x_{n}=\frac{\gamma(x-\bar{x})}{\sigma} \tag{3}\]  
where both \(\bar{x}\) and \(\sigma\) are computed over the data contained in the training set, while \(\gamma\) is a constant introduced with the aim of increasing the number of data included in the range \([-1,1]\).  
The hyperparameters that govern the [PERSON] algorithm [25] (that is the gradient-based optimizer used for minimizing the loss function) have been tuned independently for each variable. The optimal values have been selected after a preliminary study where different combinations have been tested, and the best values are reported in Table 1.  
The metrics utilized to evaluate the performance of the models are the _Mean Absolute Error_ (MAE), defined as:  
\[\text{MAE}=\frac{1}{n}\sum_{i=1}^{n}\|Y_{P_{i}}-Y_{S_{i}}\|=\frac{1}{n}\sum_{i =1}^{n}\|e_{i}\|\]  
and the _Root Mean Square Error_ (RMSE), defined as:  
\[\text{RMSE}=\sqrt{\frac{1}{n}\sum_{i=1}^{n}(Y_{P_{i}}-Y_{S_{i}})^{2}}=\sqrt{ \frac{1}{n}\sum_{i=1}^{n}e_{i}^{2}}\]  
where \(n\) is the dimension of the dataset; \(Y_{S_{i}}\) is the set of in situ values of the considered output, and \(Y_{P_{i}}\) the corresponding set of predictions.