## 3 Methods
### Data Clustering  
The data set \(D_{1}\) was divided into clusters based on the well-known \(k\)-means algorithm [42]. This algorithm has been selected because it can be easily implemented in industrial applications using most statistical packages. Furthermore, the drawbacks of the algorithm are mitigated for the present applications: severe outliers are filtered out in the pre-processing phase, and therefore, the centroids selection should be reliable; furthermore, the dimensionality issue is contained by the fact the selected possible covariates are nine (Table 1). It should be noticed that the literature on the application of clustering algorithms to multivariate wind turbine power curves is at its early stages; for example, the \(k\)-means algorithm was applied in the recent paper [43] and a more sophisticated fuzzy clustering was applied in [44]. Based on these considerations, it was considered of interest for the purposes of the present study to apply the \(k\)-means algorithm, but it is clear that the applications of smarter methods (as hierarchical clustering [45; 46]) would be a valuable step forward.  
The algorithm starts from \(N\) possibly multi-dimensional observations \((x_{1},x_{2},\ldots,x_{n})\), and the objective is partitioning the observations into \(k\) groups in order to minimize the within-cluster sum of squares (variance), as indicated in Equation (4):  
\[\arg\min\sum_{i=1}^{k}\sum_{x\in S_{i}}\|x-m_{i}\|, \tag{4}\]  
where \((S_{1},\ldots,S_{k})\) is the data partitioning and \(m_{i}\) is the data average in the \(i\)-th partition. The standard algorithm starts from an initial set of \(k\) means and assigns each observation to the cluster having less distance with respect to the mean: for each observation addition, the centroids (i.e., the means) are re-computed, and the algorithm stops when the assignments no longer change.  
In this study, the selection of the number of clusters was performed automatically through the analysis of the silhouette score [47]. For each \(i\)-th observation associated with the \(j\)-th cluster, the silhouette score is defined in Equation (2):  
\[s(i)=\begin{cases}1-\frac{a(i)}{b(i)},&a(i)<b(i)\\ 0,&a(i)=b(i)\\ \frac{b(i)}{a(i)}-1,&a(i)>b(i),\end{cases}\]  
where \(a(i)\) is the mean distance between the \(i\)-th observation and all the other data points in the same cluster and \(b(i)\) is the minimum of the mean distances between the \(i\)-th observation and all the points for each other cluster. \(a(i)\) and \(b(i)\) were computed using the Euclidean distance, but there are other possible choices that have been explored in the literature [48; 49]. Given the definition in Equation (2), it arises that \(-1\leq s(i)\leq 1\): \(s(i)\) approaching one means that the observation is well associated with a cluster; \(s(i)\) approaching \(-1\) means that the observation should rather be assigned to a neighboring cluster. The silhouette coefficient for a given clustering of the observations can be computed as the average of the silhouette scores (Equation (2)) over all the observations.  
In this study, \(k\) ranging from 2-20 was contemplated, and the configuration with the highest silhouette coefficient was selected: this procedure was applied on the reference \(D_{1}\) data set, and the obtained centroids were fed as input for the clustering of \(D_{2}\) (with the same number of clusters as \(D_{1}\)).