## 3 Results
### Feature Engineering  
Feature engineering is the process of creating new features from the existing ones. Some of these features might prove very efficient for the regression algorithm and can help the prediction of the target variable. Since time series data were considered, a very large number of features was created. These features include descriptive statistics like mean, median, standard deviation, maximum, minimum, maximum to minimum difference, skewness, kurtosis, mean absolute deviation,  
Figure 2: Graphical representation of the proposed procedure. First, data are collected from AquaMaps, which make the target variable. For these points, environmental parameters that serve as dependent variables are extracted from platforms such as CMES and EMODnet. Data are spatially filtered in the Mediterranean Sea. Next, feature engineering is performed, and after that, feature selection to reduce the number of variables to the optimum. Finally, using the model that was trained, predictions for the probability of the species are performed in every point of the Mediterranean at a fine resolution. Example values are for _Engraulis encrasicolus_.  
and several quantiles. All of them were computed at annual and monthly basis. For example, a feature can be 'temperatureSurface_April_mean'. Time series and signal related features were also computed, like moving and expanding averages, maximums, minimums, medians, quantiles, skewness, mean change rate, short and long term averages, Hilbert transformation, Hann window, spline interpolation, Gaussian spline interpolation, trend, median-filtered mean, Wiener-filtered mean, Savitzky-Golay mean, downsample, detrend, relative minima and maxima, local minima and maxima and features that take into account spatial neighbors of each observation.  
The above-described feature engineering procedure created a total of 6830 features. This is a huge number compared to the number of observations (\(\approx\)902 on average). Having seven times more features than samples can cause overfitting and it is computationally inefficient. Thus, the next vital step is to perform feature selection to get the feature importance and select the very top performing ones. The reason for creating so many features is because it is impossible to know _a priori_ which features are the best, and to have a diversity in the feature selection process. But before proceeding to feature selection, a machine learning algorithm has to be chosen.  
As stated in Section 2.4, ten regression algorithms were compared using all features (6830) in the test set. The test set is consisted of randomly picked areas from the dataset (20% of initial dataset). The Python language was used, along with the libraries scikit-learn, xgboost and lightgbm. The parameters of the algorithms were left to their default values. This is the baseline experiment and its outcome is shown in Table 3. The overall best algorithm among species is the XGBoost and is the one that will be used for the rest of the paper. From these results we can observe that the boosting models perform similarly best, while simpler models like Decision Tree and the linear models have the lowest performance. Species Distribution Modeling data seem to favor nonlinear models. Nonlinear regression is much more flexible in the shapes of the curves that it can fit and this kind of data cannot be easily modeled with simple linear models. Based on the above results, the XGBoost, Gradient Boosting or LightGBM are recommended for similar problems.