Data prediction method based on Bayesian optimization and multi-output Gaussian process regression
By introducing Bayesian optimization and multi-output Gaussian process regression methods in data prediction, the accuracy and efficiency problems of traditional prediction methods when processing complex time series data are solved, and higher prediction accuracy and computing efficiency are achieved.
Patent Information
- Application Number
- CN202411614483.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-04-11
AI Technical Summary
When traditional data prediction methods process complex time series data, especially in power data prediction, there are problems such as linear assumption dependence, insufficient nonlinear relationship capture, and mutual influence of multivariables, resulting in a decrease in prediction accuracy.
The data prediction method based on Bayesian optimization and multi-output Gaussian process regression is adopted to optimize data sampling through Bayesian optimization sampling model, generate target time series data sets, and use the multi-output Gaussian process regression model to deeply explore the intrinsic correlation of data and quantify prediction uncertainty.
It improves the prediction accuracy and computing efficiency of data prediction, can effectively process complex time series data, and improves the accuracy and stability of power data prediction.
Smart Images

Figure CN119808016A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a data prediction method based on Bayesian optimization and multi-output Gaussian process regression. Background Art
[0002] Traditional data forecasting methods are usually based on statistical models (such as autoregressive integrated moving average model and seasonal autoregressive integrated moving average model) and machine learning models (such as support vector machine and neural network, etc.). These methods perform well when processing simple time series data and can use historical data for effective forecasting. However, with the increase in the complexity of time data, traditional data forecasting methods gradually reveal their limitations.
[0003] Take power data prediction as an example. Power data prediction is an important part of power system management and dispatching, and its accuracy directly affects the stability and economy of power supply. When related power data prediction technologies process complex time series data, statistical models often rely on linear assumptions, which leads to deficiencies in capturing nonlinear relationships and the mutual influence of multiple variables. The performance of many statistical models and machine learning algorithms will significantly decline when faced with highly nonlinear and multi-correlated power data, affecting the accuracy of the prediction. At the same time, with the continuous expansion of data scale and the increasing complexity of data structure, how to strike a balance between prediction accuracy and computational efficiency has become a key issue that needs to be solved urgently. Summary of the invention
[0004] The embodiments of the present disclosure at least provide a data prediction method based on Bayesian optimization and multi-output Gaussian process regression, which improves the prediction accuracy and computational efficiency of data prediction.
[0005] The present disclosure provides a data prediction method based on Bayesian optimization and multi-output Gaussian process regression, including:
[0006] Acquire a historical time series data set; and use a Bayesian optimization sampling model to sample the historical time series data set to obtain a target time series data set; wherein the amount of data in the target time series data set is less than the amount of data in the historical time series data set;
[0007] Acquire a time series data set to be predicted; and determine a predicted time series data set corresponding to the time series data set to be predicted based on a multi-output Gaussian process regression model and the target time series data set.
[0008] The present disclosure provides a data prediction device based on Bayesian optimization and multi-output Gaussian process regression, including:
[0009] A data sampling module is used to obtain a historical time series data set; and to sample the historical time series data set using a Bayesian optimization sampling model to obtain a target time series data set; wherein the amount of data in the target time series data set is less than the amount of data in the historical time series data set;
[0010] The data prediction module is used to obtain a time series data set to be predicted; and determine a predicted time series data set corresponding to the time series data set to be predicted based on a multi-output Gaussian process regression model and the target time series data set.
[0011] An embodiment of the present disclosure provides a computer device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, a data prediction method based on Bayesian optimization and multi-output Gaussian process regression as described in any possible implementation manner described above is performed.
[0012] An embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the data prediction method based on Bayesian optimization and multi-output Gaussian process regression as described in any possible implementation manner described above is implemented.
[0013] The data prediction method based on Bayesian optimization and multi-output Gaussian process regression provided in the embodiment of the present disclosure introduces a Bayesian optimization strategy to optimize the data sampling process, so that the amount of data in the generated target time series data set is smaller than that in the historical data set, thereby effectively reducing the computational burden; at the same time, the use of a multi-output Gaussian process regression model can deeply explore the inherent correlation in the data and can also quantify the uncertainty of data prediction. In this way, the prediction accuracy and computational efficiency of data prediction are improved.
[0014] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required to be cited in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 A flow chart of a data prediction method based on Bayesian optimization and multi-output Gaussian process regression provided by an embodiment of the present disclosure is shown;
[0017] Figure 2 A flowchart of a Bayesian optimization sampling model data sampling method in a data prediction method based on Bayesian optimization and multi-output Gaussian process regression provided by an embodiment of the present disclosure is shown;
[0018] Figure 3 A schematic diagram of a Bayesian optimization sampling model data sampling method in a data prediction method based on Bayesian optimization and multi-output Gaussian process regression provided by an embodiment of the present disclosure is shown;
[0019] Figure 4 A schematic diagram of the structure of a data prediction device based on Bayesian optimization and multi-output Gaussian process regression provided by an embodiment of the present disclosure is shown;
[0020] Figure 5 A schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0022] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0023] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.
[0024] Traditional data forecasting methods are usually based on statistical models (such as autoregressive integrated moving average model and seasonal autoregressive integrated moving average model) and machine learning models (such as support vector machine and neural network, etc.). These methods perform well when processing simple time series data and can use historical data for effective forecasting. However, with the increase in the complexity of time data, traditional data forecasting methods gradually reveal their limitations.
[0025] Take power data prediction as an example. Power data prediction is an important part of power system management and dispatching, and its accuracy directly affects the stability and economy of power supply. When related power data prediction technologies process complex time series data, statistical models often rely on linear assumptions, which leads to deficiencies in capturing nonlinear relationships and the mutual influence of multiple variables. The performance of many statistical models and machine learning algorithms will significantly decline when faced with highly nonlinear and multi-correlated power data, affecting the accuracy of the prediction. At the same time, with the continuous expansion of data scale and the increasing complexity of data structure, how to strike a balance between prediction accuracy and computational efficiency has become a key issue that needs to be solved urgently.
[0026] In response to the above problems, a data prediction method based on Bayesian optimization and multi-output Gaussian process regression is provided in an embodiment of the present disclosure, which specifically includes: obtaining a historical time series data set; and using a Bayesian optimization sampling model to sample the historical time series data set to obtain a target time series data set; obtaining a time series data set to be predicted; and determining a predicted time series data set corresponding to the time series data set to be predicted based on the multi-output Gaussian process regression model and the target time series data set.
[0027] In the disclosed embodiment, the Bayesian optimization strategy is introduced to optimize the data sampling process, so that the amount of data in the generated target time series data set is smaller than that in the historical data set, thereby effectively reducing the computational burden; at the same time, the multi-output Gaussian process regression model is used to deeply explore the inherent correlation in the data and quantify the uncertainty of data prediction. In this way, the prediction accuracy and computational efficiency of data prediction are improved.
[0028] To facilitate understanding of the present embodiment, the execution subject of the data prediction method based on Bayesian optimization and multi-output Gaussian process regression provided by the embodiment of the present disclosure is first introduced in detail. The execution subject of the data prediction method based on Bayesian optimization and multi-output Gaussian process regression provided by the embodiment of the present disclosure is a computer device. The computer device can be a server. Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, big data and artificial intelligence platforms.
[0029] The following is a detailed description of the data prediction method based on Bayesian optimization and multi-output Gaussian process regression provided by the embodiment of the present application in conjunction with the accompanying drawings. Figure 1 As shown, it is a flow chart of a data prediction method based on Bayesian optimization and multi-output Gaussian process regression provided by an embodiment of the present disclosure, and the method includes the following S101-S102:
[0030] S101, obtaining a historical time series data set; and using a Bayesian optimization sampling model to sample the historical time series data set to obtain a target time series data set.
[0031] It is understandable that before obtaining the historical time series data set, the following (1) to (2) are included:
[0032] (1) obtaining an initial historical time series data set; and determining a historical time series observation data set based on a single-target Gaussian calculation formula and the initial historical time series data set;
[0033] (2) Determine a plurality of historical time series pairs based on the initial historical time series data set and the historical time series observation data set, and obtain the historical time series data set based on the plurality of historical time series pairs; wherein the historical time series pairs include initial historical time series data and historical time series observation data corresponding to the initial historical time series data.
[0034] Here, the initial historical time series data set is usually composed of regularly recorded values, reflecting the trend of data in different fields over time. For the power system, the typical data types of the initial historical time series data set can include load data, solar power generation data, and wind power generation data, etc. These data are usually recorded in hours to form a time series data set. Among them, load data reflects the changes in demand in the power system, and solar and wind power data reflect the generation of renewable energy, which is crucial for energy management in the power system.
[0035] In some other embodiments, the data type of the initial historical time series data set may also cover time series in other fields, such as social data. For example, social data related to population migration, urbanization process, etc. also have time series characteristics. These data can reflect the dynamic process of social change and have important guiding significance for urban planning, social policy formulation, infrastructure construction and other fields. By analyzing these data, decision makers can better understand the context of social development, predict future development trends, and provide a scientific basis for policy adjustments.
[0036] It is understandable that after obtaining the initial historical time series data set, the reason for processing it using the single-target Gaussian formula is the characteristics of the Gaussian distribution and its application in time series analysis. The Gaussian distribution is symmetric and fully defined, which is convenient for describing and processing random data. Time series data usually exhibits randomness, stationarity, and correlation. Assuming that its output obeys the Gaussian distribution can effectively capture these characteristics. Here, the single-target Gaussian process is expressed as:
[0037] f(x)~GP(0,k(x,x'));
[0038] Wherein, f(x) is represented as a single Gaussian process; k(x,x') is represented as a covariance function, which is used to define the correlation between the data set corresponding to the time point x and the data set corresponding to the time point x' in the initial historical time series data set.
[0039] Exemplarily, when processing time series data, the present disclosure fully considers the complexity of the real environment, especially the impact of noise factors on data accuracy. Therefore, after performing a single Gaussian process calculation on the initial historical time series data set, in order to be closer to the actual situation and improve the generalization ability and prediction accuracy of the model, the present disclosure artificially introduces simulated noise in the results of the single-target Gaussian process calculation. The purpose is to simulate the inevitable random disturbances in the data observation process in the real world, aiming to enable the model to learn to accurately perform time series analysis and prediction in a noisy environment. Here, the specific manifestation of the introduction of noise is:
[0040] y i (x) = f i (x)+ε i ;
[0041] Among them, y i (x) represents the observed value of the i-th data output in the data set corresponding to time point x; f i (x) represents the Gaussian process output value of the i-th data at a given time point x; ε i Represented as the noise term of the i-th data.
[0042] Here, the noise term is assigned to the i-th output, where Denoted as the noise variance of the ith output.
[0043] Here, i outputs y i The likelihood function is expressed as:
[0044] p(y|f,x,∑ s );
[0045] Among them, ∑ s ∈R N×N Represents the noise covariance matrix, which is a diagonal matrix whose diagonal elements are the noise variances of each output p(y|f,x,∑ s ) is expressed as the probability distribution of the observed data y under the condition of the predicted value f(x) of the single-target Gaussian process, the data set corresponding to the time point x in the input initial historical time series data set, and the noise covariance matrix.
[0046] It can be understood that after calculating the historical time series observation data set, each initial historical time series data in the initial historical time series data set can be combined with the corresponding historical time series observation data to form a pair of historical time series pairs. Through this combination, a historical time series data set including multiple historical time series pairs can be obtained.
[0047] Exemplarily, after obtaining the historical time series data set, the Bayesian optimization sampling model can be used to sample it to obtain the target time series data set. Here, the number of data in the target time series data set is less than the number of data in the historical time series data set.
[0048] It is understandable that the Bayesian sampling model is a tool based on Bayesian statistical theory, which aims to effectively extract samples from complex posterior distributions. Its core operating mechanism relies on Bayes' theorem, which combines the prior distribution with the likelihood function to calculate the posterior distribution. Given the inherent uncertainty of the model and data, the posterior distribution generated by Bayesian sampling can provide a representation that includes uncertainty for parameter estimation. In contrast, a major challenge faced by Bayesian optimization models when dealing with problems is the incomplete understanding of the objective function, which leads to the existence of uncertainty. To address this challenge, Bayesian optimization models usually use surrogate models (such as Gaussian processes) to approximate the objective function. In the present disclosure, a new sampling function, adaptive uncertainty minimization with neighborhood-aware penalty, is introduced. The working principle of this method is that it can more keenly identify potential patterns in the data by perceiving neighborhood information. At the same time, the method embeds a penalty mechanism in the sampling process to prevent samples from being overly concentrated in a specific area. This adaptive mechanism ensures that the generated target time series data set has a higher diversity and can more comprehensively capture and reflect the characteristics of the historical data set.
[0049] Specifically, see Figure 2 As shown, in the process of sampling the historical time series data set using the Bayesian optimization sampling model, the following steps S201 to S202 are included:
[0050] S201: Randomly extract a first number of historical time series pairs from the historical time series data set as an initial sampling time series data set;
[0051] It is understandable that, in order to ensure that the obtained target time series data set can retain the statistical characteristics and distribution information of the original data set, a first number (e.g., 50, 100) of samples can be randomly taken out to form a representative initial sample (i.e., an initial sampling time series data set). The initial sampling time data set includes an initial historical sampling time data set and an initial historical sampling time series observation data set corresponding to the initial historical sampling time data set.
[0052] S202: Acquire a training observation point set, and sample the historical time series data set according to the training observation point set based on the Bayesian optimization sampling model, and update the initial sampling time series data set based on the sampling result to obtain a target time series data set.
[0053] It can be understood that the training observation point set is a data set containing multiple known observation points, which is used to guide the sampling process; the historical time series data set includes the historical time series data set to be sampled and the historical time series observation data set to be sampled. Figure 3As shown in the figure, the specific steps of the Bayesian optimization sampling model for sampling the historical time series data set are S2021~S20211:
[0054] S2021: Take out a training observation point from the training observation point set.
[0055] S2022, calculating the uncertainty values of the training observation points and each historical time series data to be sampled in the historical time series data set to be sampled based on the uncertainty calculation formula, and determining a first uncertainty value statistic based on the calculation result.
[0056] Specifically, the Adaptive Uncertainty Minimization with a Predictive Approach (AUMPAP) aims to minimize the uncertainty about the offset set. Its core idea is to gradually reduce the uncertainty by dynamically adjusting the observation points and prediction models given the observation values and data sets at the given points.
[0057] The uncertainty calculation formula is expressed as:
[0058]
[0059] Wherein, V(A) represents the uncertainty value of the training observation point A in the training observation point set; D represents the historical time series data set; X represents the historical time series data set to be sampled; x represents the historical time series data to be sampled in the historical time series data set to be sampled; It is an integral form that measures the change of uncertainty in the input space X.
[0060] Exemplarily, after calculating the uncertainty values of the training observation points and each historical time series data to be sampled in the historical time series data set to be sampled according to the uncertainty calculation formula, each uncertainty value is added together to obtain a first uncertainty numerical statistic, which is used to measure the uncertainty that still exists under historical observations.
[0061] S2023, determine whether the first uncertainty numerical statistic is greater than the first preset uncertainty numerical value; if so, adopt a batch sampling method and execute step S2024; if not, adopt a single point sampling method and execute step S2027.
[0062] It is understandable that as the number of samples to be sampled increases, the average value of the first uncertainty numerical statistic gradually decreases, indicating that with the introduction of more data, uncertainty is gradually being reduced. Therefore, after obtaining the first uncertainty numerical statistic, it is compared with the first preset uncertainty value. If the first uncertainty numerical statistic is higher than this threshold, it means that the uncertainty in the current data set is high, and a more active sampling strategy is needed to quickly reduce the uncertainty. Therefore, the batch sampling method is selected and step S2024 is executed; on the contrary, if the first uncertainty numerical statistic does not exceed the threshold, it indicates that the uncertainty is relatively low. At this time, the single-point sampling method is more efficient, and then step S2027 is executed.
[0063] S2024, determining whether the size of the initial sampling time series data set is greater than a second number; if so, executing step S2025; if not, executing step S2026.
[0064] S2025, calculating the data distance between the training observation point and each historical time series data to be sampled in the historical time series data set to be sampled, and applying a distance penalty to the uncertainty value of each historical time series data to be sampled based on the learning criterion according to the calculation result, and updating the uncertainty value of each historical time series data to be sampled based on the distance penalty result.
[0065] It is understandable that after deciding to adopt the batch sampling method, the size of the initial sampling time series data set is further considered. If the size of the data set exceeds the set second number (greater than the first number; it can be set to 500, 1000, etc., which is not specifically limited here), it means that there are enough data points for analysis. At this time, it is necessary to calculate the data distance between the training observation point and each data point in the historical time series data set to be sampled, and apply a distance penalty to the uncertainty values of these data points according to the learning criteria, so as to adjust their uncertainty weights, thereby more accurately guiding the subsequent sampling process. After completing the update of the uncertainty value, continue to execute step S2026. If the size of the initial sampling time series data set does not exceed the second quantity threshold, skip the calculation of the distance penalty and execute step S2026 directly.
[0066] Here, the learning criterion is expressed as:
[0067] U(A)=V(A)+λL(A);
[0068] Among them, U(A) represents the learning criterion function; λ represents the regularization coefficient; L(A) represents the distance penalty value of the training observation point A, which is used to consider the proximity between data points and ensure that when data points are close to each other, unnecessary uncertainty can be reduced by increasing the penalty.
[0069] Here, the penalty expression considering the proximity between data points is:
[0070]
[0071] Where n represents the total number of data points in the data set corresponding to the time point x in the historical time series data set to be sampled; ψ(x i ,x j ) represents the data point x in the data set corresponding to time point x i and x j The similarity or proximity measurement function between them reflects the distance or correlation between data points; σ(x i ,A) means at point x i The uncertainty of the training observation point A at σ(x j ,A) means at point x j The uncertainty at θ relative to the training observation point A.
[0072] Specifically, when performing batch sampling, the optimization principle is followed, that is, finding the optimal historical time series data set X to be sampled in the input space Let the learning criterion function U i (x) is minimized. This optimization process can be expressed as Among them U i (x) represents the learning criterion of the i-th step, which is related to the uncertainty measure and the penalty term. By solving this optimization problem, the location of the next sampling point or batch of sampling points can be determined to minimize the uncertainty of the data set.
[0073] S2026, sorting the uncertainty values of each historical time series data to be sampled, and adding a first number of historical time series data to be sampled that meet the uncertainty standard and the historical time series observation data to be sampled corresponding to the historical time series data to be sampled to the initial sampling time series data set according to the sorting result, to obtain an updated initial sampling time series data set.
[0074] Exemplarily, the uncertainty values of each historical time series data to be sampled are sorted according to the uncertainty calculation formula. The purpose of sorting is to clearly identify which data points have high uncertainty, and then select the historical time series data to be sampled that meet the uncertainty standard from the sorting results according to the preset first quantity standard. For example, when the first quantity is 50, the historical time series data to be sampled corresponding to the first 50 high uncertainty data points are selected from the sorting results. These selected data points and their corresponding historical time series observation data to be sampled are then added to the initial sampling time series data set, thereby forming an updated data set containing more information.
[0075] Here, the uncertainty value reflects the model's confidence in the prediction result of the data point. The larger the value, the weaker the model's predictive ability is at the data point. Therefore, selecting the data point with the largest uncertainty for sampling will help the model pay more attention to these difficult-to-predict areas in subsequent training, thereby improving the overall prediction performance.
[0076] S2027, adding the historical time series data to be sampled with the largest uncertainty value among the historical time series data to be sampled and the historical time series observation data to be sampled corresponding to the historical time series data to be sampled to the initial sampling time series data set to obtain an updated initial sampling time series data set.
[0077] It is understandable that if the single-point sampling method is used, the data point to be sampled with the highest uncertainty value will be selected, and the corresponding historical time series observation data to be sampled will be added to the initial sampling time series data set. The single-point sampling strategy is simple and direct, and is suitable for situations where the current uncertainty is low.
[0078] S2028, calculating the uncertainty values of the training observation points and each historical time series data to be sampled in the historical time series data set to be sampled based on the uncertainty calculation formula, and determining a second uncertainty value statistic based on the calculation result.
[0079] Exemplarily, after the historical time series data set to be sampled is taken out, the uncertainty values of the training observation points and each historical time series data to be sampled in the historical time series data set to be sampled are recalculated according to the uncertainty calculation formula, and then the second uncertainty value statistic is determined.
[0080] S2029, determine whether the second uncertainty numerical statistic is less than the second preset uncertainty numerical value; if so, execute step S20210; if not, execute step S20211.
[0081] S20210, using the updated initial sampling time series data set as the target time series data set, and ending the training.
[0082] It is understandable that whether to end the training process is determined based on the comparison result of the second uncertainty numerical statistic and the preset second preset uncertainty numerical value (less than the preset first uncertainty numerical value). If the statistic is lower than this preset value, it means that the current data set is sufficient to represent the characteristics of the entire data space, and the uncertainty of the model has been reduced to a standard level. At this time, the current updated initial sampling time series data set can be determined as the final target time series data set, and the training is terminated. Here, the number of data in the target time series data set obtained is less than the number of data in the historical time series data set.
[0083] S20211, taking the updated initial sampling time series data set as the initial sampling time series data set, taking the historical time series data set to be sampled after taking out the historical time series data to be sampled as the historical time series data set to be sampled, and returning to step S2021.
[0084] It can be understood that if the second uncertainty numerical statistic is still higher than the preset value, it means that sampling needs to continue. In this case, the updated initial sampling time series data set will be used as the new sampling starting point (i.e., the initial sampling time series data set), and the historical time series data set to be sampled after the historical time series data to be sampled is taken out will be used as the historical time series data set to be sampled, and the process returns to step S2021 until the end condition is met.
[0085] In the disclosed embodiments, by introducing an adaptive uncertainty minimization strategy, combining batch and single-point sampling, considering the initial data set size and imposing distance penalties, and iteratively updating the data set, the targetedness and efficiency of sampling are effectively improved, uncertainty is reduced, and the representativeness of the data set and the generalization ability of the model are enhanced.
[0086] S102, obtaining a time series data set to be predicted; and determining a predicted time series data set corresponding to the time series data set to be predicted based on a multi-output Gaussian process regression model and the target time series data set.
[0087] It is understandable that after sampling the historical time series data set using the Bayesian optimization sampling model to obtain the target time series data set, the time series data set to be predicted is obtained and data cleaning is performed on it to ensure the accuracy and reliability of the data. In the data cleaning process, a series of steps need to be performed, which may include detecting and correcting outliers, standardizing data to eliminate dimensional effects, etc.
[0088] It should be noted that the data prediction method based on Bayesian optimization and multi-output Gaussian process regression provided by the embodiment of the present disclosure can break through the dependence of traditional prediction models on linear relationships of data, can deeply explore the nonlinearity and multidimensional correlations between complex data, can effectively solve the problem of missing values in time series data, and use the correlation of existing data to infer missing data, ensuring that even when the data is incomplete, it can maintain a high prediction performance. Therefore, in the embodiment of the present disclosure, the input data does not need to consider the problem of missing data, which improves the efficiency of data processing and saves data cleaning and preprocessing time.
[0089] Specifically, after obtaining the time series data set to be predicted, for each time series data in the time series data set to be predicted, the predicted time series data corresponding to the time series data to be predicted is determined based on the multi-output Gaussian process regression model and the target time series data set; further, the predicted time series data set is determined based on the predicted time series data corresponding to each time series data to be predicted.
[0090] Exemplarily, the multi-output Gaussian process regression model can be expressed as:
[0091]
[0092] Among them, f(x*) represents the predicted time series data at x* of the time series data to be predicted; P represents the time series data set; Q represents the time series observation data set; Expressed as the predicted mean value at the time series data x* to be predicted; K M (P,P) represents the covariance matrix of the time series data set; Represented as the transposed matrix of the covariance matrix of the time series dataset; δ M It is represented as the noise covariance matrix of the time series data set; δ* is represented as the predicted covariance value of the time series data x* to be predicted; K M (x*,x*) represents the covariance matrix of the time series data x* to be predicted; K M* It is represented as the covariance matrix between the time series data set and the time series data x* to be predicted.
[0093] In the formula, K M* Contains block K tt (P,x*)=[k tt' (p i ,x*)], where i = 1,…,n and t,t' = 1,…,T. The matrix K M The form of (P,P) is:
[0094]
[0095] In the formula, Kij (P,P) is an element in the covariance matrix, which represents the covariance between the i-th output and the j-th output. It describes the strength of the similarity between two different outputs on the same set of training points. When i=j, K ii (P, P) represents the autocovariance of the same output (i-th output) between training points (i.e., the internal correlation of the output); when i≠j, K ij (P, P) represents the covariance between two different outputs (i-th and j-th outputs) at training points. P = {P1, ..., P T} is the input point set of the time series data set, which represents the input set of T time points or T groups of data in the time series data set. Each P i represents an input point or a set of input features in the training data. T means there are T outputs in total, where each K ij (P,P) are both sub-matrices of size n×n, where n is the number of data points in the time series dataset.
[0096] The data prediction method based on Bayesian optimization and multi-output Gaussian process regression provided in the embodiment of the present disclosure introduces a Bayesian optimization strategy to optimize the data sampling process, so that the amount of data in the generated target time series data set is smaller than that in the historical data set, thereby effectively reducing the computational burden; at the same time, the use of a multi-output Gaussian process regression model can deeply explore the inherent correlation in the data and can also quantify the uncertainty of data prediction. In this way, the prediction accuracy and computational efficiency of data prediction are improved.
[0097] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0098] Based on the same inventive concept, the present disclosure also provides a data prediction device based on Bayesian optimization and multi-output Gaussian process regression corresponding to the data prediction method based on Bayesian optimization and multi-output Gaussian process regression. Since the principle of solving the problem by the device in the present disclosure embodiment is similar to the above-mentioned data prediction method based on Bayesian optimization and multi-output Gaussian process regression in the present disclosure embodiment, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0099] Reference Figure 4 FIG. 4 is a schematic diagram of a data prediction device 400 based on Bayesian optimization and multi-output Gaussian process regression provided by an embodiment of the present disclosure, wherein the device comprises:
[0100] The data sampling module 401 is used to obtain a historical time series data set; and to sample the historical time series data set using a Bayesian optimization sampling model to obtain a target time series data set; wherein the amount of data in the target time series data set is less than the amount of data in the historical time series data set;
[0101] The data prediction module 402 is used to obtain a time series data set to be predicted; and determine a predicted time series data set corresponding to the time series data set to be predicted based on a multi-output Gaussian process regression model and the target time series data set.
[0102] In some possible embodiments, the data sampling module 401 is further used for:
[0103] Obtain an initial historical time series data set; and determine a historical time series observation data set based on a single-target Gaussian calculation formula and the initial historical time series data set;
[0104] Determine a plurality of historical time series pairs based on the initial historical time series data set and the historical time series observation data set, and obtain the historical time series data set based on the plurality of historical time series pairs; wherein the historical time series pairs include initial historical time series data and historical time series observation data corresponding to the initial historical time series data;
[0105] The single target Gauss calculation formula includes:
[0106] f(x)~GP(0,k(x,x'));
[0107] y i (x) = f i (x)+ε i ;
[0108] Wherein, f(x) is represented as a single Gaussian process; k(x,x') is represented as a covariance function, which is used to define the correlation between the data set corresponding to the time point x and the data set corresponding to the time point x' in the initial historical time series data set; y i (x) represents the observed value of the i-th data output in the data set corresponding to time point x; f i (x) represents the Gaussian process output value of the i-th data at a given time point x; ε i Represented as the noise term of the i-th data.
[0109] In some possible embodiments, the data sampling module 401 is specifically used for:
[0110] Randomly taking out a first number of historical time series pairs from the historical time series data set as an initial sampling time series data set; wherein the initial sampling time data set includes an initial historical sampling time data set and an initial historical sampling time series observation data set corresponding to the initial historical sampling time data set;
[0111] A training observation point set is obtained, and the historical time series data set is sampled according to the training observation point set based on the Bayesian optimization sampling model, and the initial sampling time series data set is updated based on the sampling result to obtain a target time series data set; wherein the target time series data set includes a time series data set and a time series observation data set.
[0112] In some possible embodiments, the historical time series data set includes a historical time series data set to be sampled and a historical time series observation data set to be sampled; the data sampling module 401 is further used to execute:
[0113] Step 1: taking a training observation point from the training observation point set;
[0114] Step 2: Calculate the uncertainty values of the training observation points and each historical time series data to be sampled in the historical time series data set to be sampled based on the uncertainty calculation formula, and determine a first uncertainty numerical statistic based on the calculation result;
[0115] Step 3: Determine whether the first uncertainty numerical statistic is greater than a first preset uncertainty numerical value; if so, use a batch sampling method and execute step 4; if not, use a single point sampling method and execute step 6;
[0116] Step 4: Determine whether the size of the initial sampling time series data set is greater than the second number; if so, calculate the data distance between the training observation point and each historical time series data to be sampled in the historical time series data set to be sampled, and impose a distance penalty on the uncertainty value of each historical time series data to be sampled based on the learning criterion according to the calculation result, update the uncertainty value of each historical time series data to be sampled based on the distance penalty result, and execute step 5; if not, execute step 5;
[0117] Step 5: sorting the uncertainty values of each historical time series data to be sampled, and according to the sorting result, adding a first number of historical time series data to be sampled that meet the uncertainty standard and the historical time series observation data to be sampled corresponding to the historical time series data to be sampled to the initial sampling time series data set to obtain an updated initial sampling time series data set; executing step 7;
[0118] Step 6: adding the historical time series data to be sampled with the largest uncertainty value of each of the historical time series data to be sampled and the historical time series observation data to be sampled corresponding to the historical time series data to be sampled to the initial sampling time series data set to obtain an updated initial sampling time series data set;
[0119] Step 7: Calculate the uncertainty values of the training observation points and each historical time series data to be sampled in the historical time series data set to be sampled based on the uncertainty calculation formula, and determine a second uncertainty numerical statistic based on the calculation result;
[0120] Step 8: Determine whether the second uncertainty numerical statistic is less than the second preset uncertainty numerical value; if so, use the updated initial sampling time series data set as the target time series data set and end the training; if not, use the updated initial sampling time series data set as the initial sampling time series data set, use the historical time series data set to be sampled after taking out the historical time series data to be sampled as the historical time series data set to be sampled, and return to step 1.
[0121] In some possible embodiments, the uncertainty calculation formula includes:
[0122]
[0123] Wherein, V(A) represents the uncertainty value of the training observation point A in the training observation point set; D represents the historical time series data set; X represents the historical time series data set to be sampled; x represents the historical time series data to be sampled in the historical time series data set to be sampled;
[0124] The learning criteria include:
[0125] U(A)=V(A)+λL(A);
[0126] Among them, U(A) represents the learning criterion function; λ represents the regularization coefficient; L(A) represents the distance penalty value of the training observation point A.
[0127] In some possible embodiments, the data prediction module 402 is specifically used for:
[0128] For each time series data to be predicted in the time series data set to be predicted, determining predicted time series data corresponding to the time series data to be predicted based on the multi-output Gaussian process regression model and the target time series data set;
[0129] The predicted time series data set is determined based on the predicted time series data corresponding to each of the time series data to be predicted.
[0130] In some possible embodiments, the multi-output Gaussian process regression model is expressed as:
[0131]
[0132] Among them, f(x*) represents the predicted time series data at x* of the time series data to be predicted; P represents the time series data set; Q represents the time series observation data set; Expressed as the predicted mean value at the time series data x* to be predicted; K M (P,P) represents the covariance matrix of the time series data set; Represented as the transposed matrix of the covariance matrix of the time series dataset; δ M It is represented as the noise covariance matrix of the time series data set; δ* is represented as the predicted covariance value of the time series data x* to be predicted; K M (x*,x*) represents the covariance matrix of the time series data x* to be predicted; K M* It is represented as the covariance matrix between the time series data set and the time series data x* to be predicted.
[0133] Based on the same technical concept, the embodiment of the present disclosure also provides a computer device. Figure 5 , which is a schematic diagram of the structure of a computer device 500 provided in an embodiment of the present disclosure, including a processor 501, a memory 502, and a bus 503. The memory 502 is used to store execution instructions, including a memory 5021 and an external memory 5022; the memory 5021 is also called an internal memory, which is used to temporarily store the operation data in the processor 501 and the data exchanged with the external memory 5022 such as a hard disk. The processor 501 exchanges data with the external memory 5022 through the memory 5021.
[0134] In the embodiment of the present application, the memory 502 is specifically used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 501. That is, when the computer device 500 is running, the processor 501 communicates with the memory 502 through the bus 503, so that the processor 501 executes the application code stored in the memory 502, and then executes the method described in any of the above embodiments.
[0135] Among them, the memory 502 can be, but is not limited to, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), programmable read-only memory (Programmable Read-Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable read-only memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
[0136] Processor 501 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present invention may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0137] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the computer device 500. In other embodiments of the present application, the computer device 500 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0138] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the data prediction method based on Bayesian optimization and multi-output Gaussian process regression described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0139] The embodiments of the present disclosure also provide a computer program product, which carries a program code. The instructions included in the program code can be used to execute the steps of the data prediction method based on Bayesian optimization and multi-output Gaussian process regression described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0140] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0141] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0142] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0143] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0144] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0145] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A data prediction method based on Bayesian optimization and multi-output Gaussian process regression, characterized in that: include: Acquire a historical time series data set; and use a Bayesian optimization sampling model to sample the historical time series data set to obtain a target time series data set; wherein the amount of data in the target time series data set is less than the amount of data in the historical time series data set; Get the time series data set to be predicted; And based on the multi-output Gaussian process regression model and the target time series data set, a predicted time series data set corresponding to the time series data set to be predicted is determined.
2. The method according to claim 1, characterized in that: Before obtaining the historical time series data set, the following steps are included: Obtain an initial historical time series data set; and determine a historical time series observation data set based on a single-target Gaussian calculation formula and the initial historical time series data set; Determine a plurality of historical time series pairs based on the initial historical time series data set and the historical time series observation data set, and obtain the historical time series data set based on the plurality of historical time series pairs; wherein the historical time series pairs include initial historical time series data and historical time series observation data corresponding to the initial historical time series data; The single target Gauss calculation formula includes: f(x)~GP(0,k(x,x')); y i (x)=f i (x)+ε i ; Wherein, f(x) is represented as a single Gaussian process; k(x,x') is represented as a covariance function, which is used to define the correlation between the data set corresponding to the time point x and the data set corresponding to the time point x' in the initial historical time series data set; y i (x) represents the observed value of the i-th data output in the data set corresponding to time point x; f i (x) represents the Gaussian process output value of the i-th data at a given time point x; ε i Represented as the noise term of the i-th data.
3. The method according to claim 2, characterized in that The method of sampling the historical time series data set by using the Bayesian optimization sampling model includes: Randomly taking out a first number of historical time series pairs from the historical time series data set as an initial sampling time series data set; wherein the initial sampling time data set includes an initial historical sampling time data set and an initial historical sampling time series observation data set corresponding to the initial historical sampling time data set; A training observation point set is obtained, and the historical time series data set is sampled according to the training observation point set based on the Bayesian optimization sampling model, and the initial sampling time series data set is updated based on the sampling result to obtain a target time series data set; wherein the target time series data set includes a time series data set and a time series observation data set.
4. The method according to claim 3, characterized in that The historical time series data set includes a historical time series data set to be sampled and a historical time series observation data set to be sampled; sampling the historical time series data set according to the training observation point set based on the Bayesian optimization sampling model, and updating the initial sampling time series data set based on the sampling result, including: Step 1: taking a training observation point from the training observation point set; Step 2: Calculate the uncertainty values of the training observation points and each historical time series data to be sampled in the historical time series data set to be sampled based on the uncertainty calculation formula, and determine a first uncertainty numerical statistic based on the calculation result; Step 3: Determine whether the first uncertainty numerical statistic is greater than a first preset uncertainty numerical value; if so, use a batch sampling method and execute step 4; if not, use a single point sampling method and execute step 6; Step 4: Determine whether the size of the initial sampling time series data set is greater than the second number; if so, calculate the data distance between the training observation point and each historical time series data to be sampled in the historical time series data set to be sampled, and impose a distance penalty on the uncertainty value of each historical time series data to be sampled based on the learning criterion according to the calculation result, update the uncertainty value of each historical time series data to be sampled based on the distance penalty result, and execute step 5; if not, execute step 5; Step 5: sorting the uncertainty values of each historical time series data to be sampled, and according to the sorting result, adding a first number of historical time series data to be sampled that meet the uncertainty standard and the historical time series observation data to be sampled corresponding to the historical time series data to be sampled to the initial sampling time series data set to obtain an updated initial sampling time series data set; executing step 7; Step 6: adding the historical time series data to be sampled with the largest uncertainty value of each of the historical time series data to be sampled and the historical time series observation data to be sampled corresponding to the historical time series data to be sampled to the initial sampling time series data set to obtain an updated initial sampling time series data set; Step 7: Calculate the uncertainty values of the training observation points and each historical time series data to be sampled in the historical time series data set to be sampled based on the uncertainty calculation formula, and determine a second uncertainty numerical statistic based on the calculation result; Step 8: Determine whether the second uncertainty numerical statistic is less than the second preset uncertainty numerical value; if so, use the updated initial sampling time series data set as the target time series data set and end the training; if not, use the updated initial sampling time series data set as the initial sampling time series data set, use the historical time series data set to be sampled after taking out the historical time series data to be sampled as the historical time series data set to be sampled, and return to step 1.
5. The method according to claim 4, characterized in that The uncertainty calculation formula includes: Wherein, V(A) represents the uncertainty value of the training observation point A in the training observation point set; D represents the historical time series data set; X represents the historical time series data set to be sampled; x represents the historical time series data to be sampled in the historical time series data set to be sampled; The learning criteria include: U(A)=V(A)+λL(A); Among them, U(A) represents the learning criterion function; λ represents the regularization coefficient; L(A) represents the distance penalty value of the training observation point A.
6. The method according to claim 4, characterized in that The step of determining a predicted time series data set corresponding to the time series data set to be predicted based on the multi-output Gaussian process regression model and the target time series data set includes: For each time series data to be predicted in the time series data set to be predicted, determining predicted time series data corresponding to the time series data to be predicted based on the multi-output Gaussian process regression model and the target time series data set; The predicted time series data set is determined based on the predicted time series data corresponding to each of the time series data to be predicted.
7. The method according to claim 6, characterized in that The multi-output Gaussian process regression model is expressed as: Among them, f(x*) represents the predicted time series data at x* of the time series data to be predicted; P represents the time series data set; Q represents the time series observation data set; Expressed as the predicted mean value at the time series data x* to be predicted; K M (P,P) represents the covariance matrix of the time series data set; Represented as the transposed matrix of the covariance matrix of the time series dataset; δ M It is represented as the noise covariance matrix of the time series data set; δ* is represented as the predicted covariance value of the time series data x* to be predicted; K M (x*,x*) represents the covariance matrix of the time series data x* to be predicted; K M* It is represented as the covariance matrix between the time series data set and the time series data x* to be predicted.
8. A data prediction device based on Bayesian optimization and multi-output Gaussian process regression, characterized in that: include: Data sampling module, used to obtain historical time series data sets; and using a Bayesian optimization sampling model to sample the historical time series data set to obtain a target time series data set; wherein the amount of data in the target time series data set is less than the amount of data in the historical time series data set; The data prediction module is used to obtain a time series data set to be predicted; and determine a predicted time series data set corresponding to the time series data set to be predicted based on a multi-output Gaussian process regression model and the target time series data set.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.