## 3 Materials and Methods
### Applying Bayesian Optimization to Optimize Data Fusion Ratios in Photovoltaic Power Forecasting  
This study aims to determine the optimal data fusion ratio by minimizing the root mean square error (RMSE) of photovoltaic power prediction. To achieve this goal, Bayesian optimization, an advanced optimization method suitable for handling high-cost evaluation problems, was employed. In the photovoltaic power prediction model, this study specifically focuses on optimizing the data fusion ratio. The optimization process involves constructing a Gaussian process (GP) model of the objective function, which not only predicts the values of the objective function but also provides a measure of the uncertainty of these predictions, thereby helping to effectively balance the exploration and exploitation of the parameter space under the guidance of uncertainty.  
Figure 6: Attention and the Conv-LSTM network.  
To accommodate the data fusion needs under different weather conditions, the definition of the objective function \(\mathsf{f}(\theta)\) has been adjusted to a more general form. The specific expression of the function is:  
\[\mathsf{f}(\theta)=\frac{1}{n}\sum\
olimits_{i=1}^{n}(y_{i}-\sum\
olimits_{i \in\mathsf{I}}r_{\mathsf{S}j}\cdot f_{\mathsf{S}j}(X_{i\mathsf{S}j}))^{2} \tag{20}\]  
where \(\theta=\left\{r_{\mathsf{S}j}\mid j\in\mathsf{J}\right\}\) represents the proportion of data from each station in the selected set of stations \(\mathsf{J}\) under specific weather conditions. This form of the objective function allows the model to adjust the number and proportion of integrated stations according to specific environmental conditions, optimizing prediction performance. Each component of the objective function is explained in detail as follows:  
\(\theta=\left\{r_{\mathsf{S}i}\mid j\in\mathsf{J}\right\}\) are the model parameters, representing the fusion ratio of data from each station in the selected station set \(\mathsf{J}\) under given weather conditions. These fusion ratio coefficients \(r_{\mathsf{S}j}\) need to be optimized to minimize the overall prediction error.  
* is the total number of data points, used to calculate the overall prediction error.
* is the actual observed value at the \(\mathsf{i}\)th data point.
* is the predictive function output based on the input data \(X_{i,\mathsf{S}j}\) from station \(\mathsf{J}\).
* is the summation part \(\sum\
olimits_{i\in\mathsf{I}}r_{\mathsf{S}i}\cdot f_{\mathsf{S}j}\left(X_{i \mathsf{S}j}\right)\) calculates the weighted sum of the predictive outputs from all selected stations, where the weights are their respective fusion ratios \(r_{\mathsf{S}j}\), reflecting each station's contribution to the final prediction. The goal is to adjust these fusion ratios to find the parameter configuration that minimizes the overall prediction error.  
Through the Bayesian optimization framework, this study effectively explores the optimal settings of these fusion ratio parameters. The Gaussian process (GP) model provides a method to quantify the uncertainty of the objective function predictions, while the acquisition function, such as expected improvement (EI), guides the search of the parameter space, prioritizing the exploration of parameter combinations that are likely to significantly enhance model performance. This approach not only improves the accuracy and reliability of the model under various environmental conditions but also ensures that the optimal data fusion ratio is achieved under different weather conditions, effectively enhancing the performance of the photovoltaic power prediction model.