3.1.1. t-SNE
t-SNE is adopted to generate low-dimensional representations of customer voltage profiles while retaining their local similarity structure [
19]. The voltage measurements of each customer over the observation period are organized into a high-dimensional feature vector. Since customers supplied by the same transformer generally exhibit similar voltage variation patterns, preserving these neighborhood relationships can enhance the separability of customer groups and provide suitable features for subsequent clustering.
For customer feature vectors
and
, their neighborhood similarity in the original feature space is described by the conditional probability
where
denotes the probability that customer
is regarded as a neighbor of customer
, and
controls the neighborhood scale around
The conditional probabilities in both directions are then combined to obtain the symmetric similarity
.
Let
and
denote the embedded coordinates of customers
and
, respectively. Their similarity after dimensionality reduction is calculated using
where
represents the pairwise similarity in the embedded feature space. The low-dimensional coordinates are determined by minimizing the discrepancy between
and
:
where
is the Kullback–Leibler divergence between the two similarity distributions. Minimizing C places customers with comparable voltage trajectories closer together while separating customers with different voltage characteristics, thereby producing the feature representation used by the subsequent GMM clustering procedure.
3.1.2. Improved DOA-WOA for t-SNE Parameter Optimization
Perplexity (
) and learning rate (
) are two key hyperparameters that strongly influence the quality of low-dimensional embeddings, according to the original t-SNE formulation and subsequent studies on parameter sensitivity [
19,
20]. Perplexity determines the effective neighborhood size used to preserve local data structures, whereas the learning rate affects the convergence behavior of the optimization process. Both parameters directly influence the separability of the embedded features and the subsequent clustering performance. In contrast, other parameters, such as the number of iterations and early exaggeration, are generally assigned recommended default values in the MATLAB R2024b implementation and mainly affect optimization convergence rather than the final embedding quality. Therefore, only perplexity and learning rate are selected as the optimization variables in this study.
Grid search and random search are applicable to low-dimensional hyperparameter optimization. However, their performance depends on the predefined sampling strategy and search resolution. A coarse search may overlook high-quality parameter combinations, whereas a fine search significantly increases the number of evaluations. In contrast, the proposed DOA-WOA performs adaptive global exploration and local exploitation without exhaustive enumeration. Moreover, the proposed optimization framework can be readily extended to additional hyperparameters in future applications.
Based on the above considerations, the improved DOA-WOA is employed to adaptively optimize the perplexity and learning rate of t-SNE. The silhouette coefficient is adopted as the objective function to quantitatively evaluate the quality of the low-dimensional embedding [
11], as it simultaneously measures intra-cluster compactness and inter-cluster separation. A higher silhouette coefficient value indicates a clearer cluster structure in the embedded space and guides the optimizer toward parameter combinations that are more favorable for subsequent clustering.
The silhouette coefficient reflects both the intra-cluster compactness and the inter-cluster separation of samples. Its value ranges from −1 to 1, where a larger value indicates a clearer clustering structure. The formula for calculating the silhouette coefficient is given as follows:
where
denotes the intra-cluster average distance;
represents the minimum average distance to other clusters; and
is the silhouette coefficient for sample
.
The final objective function is as follows:
where the silhouette coefficient represents the average value of the silhouette coefficients of all samples.
Accordingly, the parameter optimization problem can be expressed as:
where
denotes the set of t-SNE parameters (
and
) to be optimized. It should be noted that, although the silhouette coefficient is computed based on clustering results, it is only used here as an indicator to evaluate the quality of the feature embedding, rather than being tied to a specific clustering model.
A hybrid optimization strategy is developed to solve the parameter optimization problem formulated. While the Whale Optimization Algorithm (WOA) [
21] exhibits strong global exploration capability in the early search stages, the population gradually converges toward the optimal solution as iterations proceed, leading to a decline in population diversity and a tendency to fall into premature convergence. Conversely, the Dream Optimization Algorithm (DOA) [
22] relies on stochastic perturbations for local search, which effectively refines the solution space, yet it lacks a global guidance mechanism, resulting in limited search efficiency and stability when used independently. An improved DOA-WOA optimization algorithm is proposed to address these limitations, avoiding local optima and enhancing solution accuracy. The specific modifications are introduced as follows:
To characterize the state of the population during the search process, a population diversity metric based on group statistical characteristics is introduced. At each iteration, the mean population vector is calculated as:
on this basis, the population diversity indicator is defined as:
where
denotes the population size, and lb and ub represent the lower bound and upper bound of the search space, respectively. The metric is used to quantify the dispersion degree of individuals within the solution space, thereby reflecting the overall state of the current search stage.
An adaptive hybrid search strategy is constructed based on the variation in the population diversity indicator. When the population diversity remains high, it indicates that the search is still in the global exploration phase, and the global search update rule of the WOA is therefore employed. Once the population diversity decreases below a predefined threshold, it suggests that the population may be entering a region of local convergence. At this stage, the local stochastic search operator of the DOA is introduced to perform local refinement. The aforementioned adaptive hybrid update mechanism can be uniformly expressed as the following piecewise function:
where
. If
, the algorithm is in the global exploration phase and employs the WOA’s encircling prey strategy. Otherwise, it is in the local optimization state and utilizes the DOA’s local perturbation search.
Figure 4 shows the flowchart of the DOA-WOA. After population initialization, the fitness and diversity index are evaluated at each iteration. The WOA update is activated when
; otherwise, DOA perturbation is used for local refinement. Candidate solutions are re-evaluated and the better individuals are retained until the prescribed iteration limit is reached, after which the best parameter pair is returned.
The improved DOA-WOA is employed to optimize the parameters of t-SNE. The flowchart of the DOA-WOA-based t-SNE parameter optimization is illustrated in
Figure 5.
The selection of the DOA-WOA is motivated by the characteristics of the t-SNE hyperparameter optimization problem. Specifically, optimizing the perplexity and learning rate involves a nonlinear, multimodal, and gradient-free search space, making conventional gradient-based optimization methods unsuitable. The Dream Optimization Algorithm (DOA) provides strong global exploration capability by maintaining population diversity and reducing the risk of premature convergence, whereas the Whale Optimization Algorithm (WOA) offers efficient local exploitation through its adaptive encircling and spiral search mechanisms. By integrating these complementary search strategies, the proposed DOA-WOA achieves a better balance between exploration and exploitation, thereby improving the stability and convergence of the optimization process. Although other optimization techniques, such as Bayesian Optimization, Differential Evolution, CMA-ES, and Optuna-based frameworks, have also demonstrated effectiveness in hyperparameter optimization, they exhibit different optimization characteristics and computational trade-offs. In this study, DOA-WOA was selected because its population-based search mechanism is well suited to the highly nonlinear search landscape of t-SNE hyperparameter optimization while remaining straightforward to implement and independent of gradient information. The experimental results presented in
Section 4 further demonstrate that the optimized t-SNE parameters obtained by the DOA-WOA lead to improved clustering performance and more discriminative low-dimensional feature representations for transformer–customer relationship identification.
3.1.3. Performance Analysis
Table 2 were selected to examine the search accuracy and stability of the DOA-WOA. Functions F1–F4 contain a single optimum and were used to evaluate exploitation performance, whereas F5 and F6 were employed to examine the ability to escape local optima. The DOA-WOA was compared with the DOA [
22], WOA [
21], GWO [
23], and PSO [
24] under an identical population size of 30 and a maximum of 500 iterations. Each algorithm was independently executed 30 times, and the resulting mean and standard deviation were used to evaluate solution quality and repeatability.
All algorithms were run in MATLAB 2024b with Intel(R) i7 14650H CPU, 32RAM, and Windows 11 Education.
The numerical results in
Table 3 show that the DOA-WOA obtains the lowest or near-lowest objective values on the six functions while maintaining relatively small inter-run variations. The convergence trajectories in
Figure 6 further indicate that the hybrid update mechanism improves the search process on both unimodal and multimodal functions. The Wilcoxon results provide additional statistical evidence for these differences, although significant superiority is not observed under every comparison condition.
Statistical significance analysis was conducted to evaluate the performance differences between the DOA-WOA and the comparison algorithms. To reduce the influence of random initialization, each algorithm was independently executed 30 times under the same experimental settings. In addition to the mean and standard deviation, the Wilcoxon signed-rank test was employed to assess the statistical significance of the results. The significance level was set to (), and a (p)-value lower than 0.05 indicates a statistically significant difference.
The Wilcoxon signed-rank test results in
Table 4 further show that the DOA-WOA significantly outperforms the GWO and PSO on all six functions. Significant improvements are also obtained over the DOA and WOA on five of the six functions, while no statistically significant differences were observed between the DOA-WOA and DOA on F6 or between the DOA-WOA and WOA on F5. Therefore, the statistical results generally confirm the optimization advantage of the DOA-WOA, although its superiority is not statistically significant under every test condition.