Multi-change-point threshold ARMA model with exogenous input and its Bayesian analysis method
By constructing an MB-TARMAX time series model that takes into account time, domain change points and exogenous factors, and using Bayesian analysis method, the problem of poor fitting of existing models on time series data is solved, achieving more efficient information mining and fitting effects.
Patent Information
- Application Number
- CN202111541215.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-16
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2041-12-16
AI Technical Summary
When existing time series models are difficult to effectively deal with, the influence of domain change points and exogenous factors, resulting in poor fitting effect on time series data.
A multi-point threshold ARMA model containing exogenous input and its Bayesian analysis method are proposed. By constructing the MB-TARMAX time series model, considering the time and value domain change points, and combining exogenous factors, Bayesian analysis method is used to obtain the estimated value of model parameters.
This method can more effectively mine the information contained in the time series, reveal the development laws of the system, and improve the fitting effect of time series data.
Smart Images

Figure CN114266196B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a multi-change point threshold ARMA model containing exogenous input and a Bayesian analysis method thereof. Background Art
[0002] Time series refers to a set of data arranged in chronological order, and is an important type of complex data object. As a form of data in databases, it is widely present in various large-scale commercial, medical, power and social science databases, such as stock prices, various exchange rates, sales volume, product production capacity, weather data, etc. A large amount of time series data truly records all the important information of its corresponding system at each moment. If we can improve some efficient data processing methods and find the relationship between each time series, it will greatly improve people's understanding and understanding of such systems, and then implement effective prediction and control, such as: national economic macro-control, regional comprehensive development planning, enterprise management, market potential prediction, meteorological forecast, hydrological forecast, earthquake precursor forecast, crop pest and disease disaster forecast and environmental pollution control. For such data, the appropriate model is an important method to mine the implicit information.
[0003] At present, the research on linear time series models has been relatively mature and widely used in the economic field, such as the autoregressive moving average model (ARMA). In practice, due to the existence of change points in the value domain, time series usually appear nonlinear, and nonlinear models have also been developed, such as TAR and TARMA. However, the complex development law of the system causes the time series to also have change points in the time domain, and will be affected by exogenous factors. Therefore, the MB-TARMAX model that considers the change points in the time and value domain and the influence of exogenous factors has certain research value and application prospects. Summary of the invention
[0004] In order to solve the above problems, a MB-TARMAX model is provided which takes into account the time and range change points and the influence of external factors. The present invention adopts the following technical solutions:
[0005] The present invention provides a multi-change point threshold ARMA model with exogenous input and a Bayesian analysis method thereof, which is characterized by comprising the following steps: step S1, constructing an MB-TARMAX time series model based on the ARMA model; step S2, collecting two groups of time series data with certain correlation, and performing data preprocessing on the two groups of time series data; step S3, rearranging the preprocessed time series data according to the change points of the time domain and the change points of the value range in turn, dividing the preprocessed time series data into different state spaces of different time periods to generate rearranged samples; step S4, obtaining the likelihood function of the MB-TARMAX time series model according to the rearranged samples, and converting the likelihood function into a matrix in the form of an array; step S5, based on the prior distribution of all unknown parameters of the MB-TARMAX time series model, obtain the joint prior distribution of all unknown parameters, and obtain the joint posterior distribution of all unknown parameters according to the Bayesian theorem combined with the likelihood function; step S6, based on the joint posterior distribution, obtain the fully conditional posterior distribution of all unknown parameters and the corresponding fully conditional posterior distribution form; step S7, for different fully conditional posterior distribution forms, sample all unknown parameters by Gibbs algorithm and Metropolis-Hastings algorithm to obtain sampled values, and use the sampled values for statistical calculation to obtain the estimated values of the parameters of the MB-TARMAX time series model.
[0006] The multi-change point threshold ARMA model with exogenous input and the Bayesian analysis method thereof provided by the present invention may also have such technical features, wherein the MB-TARMAX time series model is:
[0007]
[0008]
[0009] In the formula, y t is the explained time series, x t is an exogenous factor, that is, t The relevant time series, r ij is with x t The relevant range change points, is the change point in the time domain, are the coefficients of the model.
[0010] The multi-change point threshold ARMA model with exogenous input and the Bayesian analysis method thereof provided by the present invention may also have such technical features, wherein the rearrangement is as follows: the change points in the time domain divide the time series data into several segments in time, and the change points in the value range divide the time series data into several segments in the value range.
[0011] The multi-change point threshold ARMA model with exogenous input and the Bayesian analysis method thereof provided by the present invention may also have such a technical feature, wherein, in step S5, all unknown parameters are independent of each other, the joint prior distribution is the product of the prior distributions of the parameters, the calculation formula of the joint posterior distribution is approximated, the denominator is normalized, and is omitted as a constant term:
[0012]
[0013] Where evidenced is a normalized constant term.
[0014] The multi-change point threshold ARMA model with exogenous input and the Bayesian analysis method thereof provided by the present invention may also have such a technical feature, wherein step S7 includes the following sub-steps: step S7-1, setting initial values and a total number of iterations M for all unknown parameters; step S7-2, for the standard form of full conditional posterior distribution, at the mth sampling, sampling a sample value from the standard posterior distribution and accepting it with a 100% probability; step S7-3, for the non-standard form of full conditional posterior distribution, sampling from the distribution The candidate value r * , and calculate the acceptance probability a=min(1,p(r * ) / p(r (m-1) )), randomly select a candidate value from the uniform distribution U(0,1) and compare it with the acceptance probability a to determine whether to accept the candidate value:
[0015]
[0016] In the formula, r (m) 、r (m-1) They are the mth and m-1th sampling values respectively; step S7-4, taking the sampling values obtained in step S7-2 and step S7-3 as sample values and making final convergence, that is, a part of the sampling values are used as the combustion period, and the remaining sampling values are used for statistical calculation.
[0017] Function and Effect of the Invention
[0018] According to the multi-change point threshold ARMA model with exogenous input and the Bayesian analysis method thereof of the present invention, firstly, an MB-TARMAX time series model is constructed based on the ARMA model, and the time series data is rearranged according to the time domain change points and the value range change points, thereby obtaining the likelihood function of the model; then, the joint prior distribution of all unknown parameters of the model is obtained, and the joint posterior distribution of all unknown parameters is obtained according to the Bayesian theorem combined with the likelihood function; finally, the full conditional posterior distribution is obtained based on the joint posterior distribution, and all unknown parameters are sampled for different full conditional posterior distribution forms to obtain sampling values, and the estimated values of the parameters of the MB-TARMAX time series model are obtained according to the statistical calculation of the sampling values.
[0019] The multi-change point threshold ARMA model with exogenous input and the Bayesian analysis method thereof of the present invention can fully mine the information contained in the time series and reveal the development law of the system (the main body of the observable time series) because a time series model that considers both the value range change point and the time domain change point is constructed. At the same time, because the present invention considers the influence of exogenous factors, the fitting effect of the time series data is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flow chart of a multi-change point threshold ARMA model with exogenous input and a Bayesian analysis method thereof in an embodiment of the present invention;
[0021] Figure 2 is a schematic diagram of time domain change point sampling results in an embodiment of the present invention;
[0022] Figure 3 Schematic diagram of the range change point sampling results in an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the multi-change point threshold ARMA model with exogenous input and the Bayesian analysis method thereof are specifically described below in conjunction with the embodiments and drawings.
[0024] <Example>
[0025] Figure 1 It is a flow chart of a multi-change point threshold ARMA model with exogenous input and a Bayesian analysis method thereof in an embodiment of the present invention.
[0026] like Figure 1 As shown, the multi-change point threshold ARMA model with exogenous input and its Bayesian analysis method include the following steps:
[0027] Step S1, constructing an MB-TARMAX time series model based on the ARMA model.
[0028] In this embodiment, the MB-TARMAX time series model is:
[0029]
[0030]
[0031] In the formula, y t is the explained time series, x t is an exogenous factor, that is, t The relevant time series, r ij is with x t The relevant range change points, is the change point in the time domain, are the coefficients of the model.
[0032] Step S2, collecting two sets of time series data with certain correlation, and performing data preprocessing on the two sets of time series data.
[0033] Step S3, rearrange the preprocessed time series data according to the change points of the time domain and the change points of the value range in turn, and divide the preprocessed time series data into different state spaces of different time periods to generate rearranged samples.
[0034] Among them, the change point of the time domain divides the time series data into several segments in time. In each time period, the change point of the value range is a variable related to the exogenous input, and the change point of the value range divides the time series data into several segments in the value range.
[0035] Step S4, obtaining the likelihood function of the MB-TARMAX time series model according to the rearranged samples, and converting the likelihood function into a matrix form.
[0036] In this embodiment, the residual of the MB-TARMAX time series model is estimated to ensure that the likelihood function of the model is linear with respect to the parameters. Specifically:
[0037] Firstly, the residuals of the long autoregressive model are used as the estimated values of the residuals of the MB-TARMAX time series model, and the residuals of the long autoregressive model are obtained by the least squares method. At the same time, the accuracy of the residuals is improved through a finite number of iterations.
[0038] Among them, the order of the long autoregressive model is greater than the sum of the orders of this model, that is: p+l+q
[0039] In the formula, p is the order of the autoregressive term of this model, l is the order of the exogenous factor term, and q is the order of the moving average term.
[0040] Step S5, based on the prior distribution of all unknown parameters of the MB-TARMAX time series model, obtain the joint prior distribution of all unknown parameters, and obtain the joint posterior distribution of all unknown parameters according to the Bayesian theorem combined with the likelihood function.
[0041] Among them, all unknown parameters are independent of each other, and the joint prior distribution is the product of the prior distributions of each parameter.
[0042] The calculation formula of the joint posterior distribution is approximated, the denominator is normalized and omitted as a constant term:
[0043]
[0044] Where evidenced is a normalized constant term.
[0045] Step S6, based on the joint posterior distribution, obtain the fully conditional posterior distribution of all unknown parameters and the corresponding fully conditional posterior distribution form.
[0046] Step S7, for different full conditional posterior distribution forms, all unknown parameters are sampled by Gibbs algorithm and Metropolis-Hastings algorithm to obtain sampled values, and the sampled values are used for statistical calculation to obtain estimated values of the parameters of the MB-TARMAX time series model.
[0047] In this embodiment, based on the fully conditional posterior distribution of the time domain change point and the range change point, the values of the time domain change point and the range change point are estimated by the Monte Carlo Markov chain method. Specifically:
[0048] This step S7 includes the following sub-steps:
[0049] Step S7-1, setting initial values and a total number of iterations M for all unknown parameters;
[0050] Step S7-2, for the standard form of the full conditional posterior distribution, at the mth sampling, a sample value is sampled from the standard posterior distribution and accepted with 100% probability;
[0051] Step S7-3, for the non-standard form of the fully conditional posterior distribution, from the distribution r (m) ~N(r (m-1) ,σ r 2 ) in the sample candidate value r * ,in, The value of determines the sampling efficiency and calculates the acceptance probability a=min(1,p(r * ) / p(r (m -1))), randomly select a candidate value from the uniform distribution and compare it with the acceptance probability a to determine whether to accept the candidate value:
[0052]
[0053] In the formula, r (m) 、r (m-1) are the sampling values of the mth and m-1th times respectively;
[0054] Step S7-4, taking the sampling values obtained in the above steps S7-2 and S7-3 as sample values and making final convergence, that is, taking a part of the sampling values as the combustion period and the remaining sampling values for statistical calculation.
[0055] In this embodiment, the effectiveness of the multi-change point threshold ARMA model with exogenous input and its Bayesian analysis method are verified. Specifically:
[0056] Randomly construct a set of time series data (containing 600 points) x t , set the time domain change point and value domain change point respectively: T b =200 and r1=0.3, r2=0.5, and generate the time series y according to the MB-TARMAX time series model t , and use the method of this embodiment to search for time domain change points and value domain change points.
[0057] Figure 2 is a schematic diagram of the time domain change point sampling result in an embodiment of the present invention, Figure 3 Schematic diagram of the range change point sampling results in an embodiment of the present invention.
[0058] like Figure 2 and Figure 3 As shown, the sampling values of the time domain change points are concentrated at 196, while the sampling values of the value range change points are concentrated around 0.3 and 0.5, respectively, which are close to the time domain change points and value range change points set in the experiment.
[0059] Example Function and Effect
[0060] According to the multi-change point threshold ARMA model with exogenous input and the Bayesian analysis method thereof provided in this embodiment, firstly, an MB-TARMAX time series model is constructed based on the ARMA model, and the time series data is rearranged according to the time domain change points and the value range change points, thereby obtaining the likelihood function of the model; then, the joint prior distribution of all unknown parameters of the model is obtained, and the joint posterior distribution of all unknown parameters is obtained according to the Bayesian theorem combined with the likelihood function; finally, the full conditional posterior distribution is obtained based on the joint posterior distribution, and the Monte Carlo Markov chain sampling method is applied under the Bayesian framework for different full conditional posterior distribution forms to conveniently obtain the estimated values of all unknown parameters of the model.
[0061] In the embodiment, since a time series model is constructed that considers both the value domain change point and the time domain change point, the information contained in the time series can be fully mined to reveal the development law of the system. At the same time, since the time series model considers the influence of exogenous factors, the fitting effect of the time series data is improved.
[0062] The above embodiments are only used to illustrate specific implementation modes of the present invention, and the present invention is not limited to the description scope of the above embodiments.
Claims
1. A multi-change point threshold ARMA model with exogenous input and its Bayesian analysis method, characterized in that: The following steps are involved: Step S1, constructing a MB-TARMAX time series model based on the ARMA model; Step S2, collecting two sets of time series data with certain correlation, and performing data preprocessing on the two sets of time series data; Step S3, rearranging the preprocessed time series data according to the change points of the time domain and the change points of the value range in turn, dividing the preprocessed time series data into different state spaces of different time periods to generate rearranged samples; Step S4, obtaining the likelihood function of the MB-TARMAX time series model according to the rearranged samples, and converting the likelihood function into a matrix form; Step S5, based on the prior distribution of all unknown parameters of the MB-TARMAX time series model, obtain the joint prior distribution of all the unknown parameters, and obtain the joint posterior distribution of all the unknown parameters according to the Bayesian theorem combined with the likelihood function; Step S6, based on the joint posterior distribution, obtaining the fully conditional posterior distribution of all the unknown parameters and the corresponding fully conditional posterior distribution form; Step S7, for different forms of the fully conditional posterior distribution, all the unknown parameters are sampled by the Gibbs algorithm and the Metropolis-Hastings algorithm to obtain sampled values, and the sampled values are used for statistical calculation to obtain the estimated values of the parameters of the MB-TARMAX time series model, Wherein, the MB-TARMAX time series model is: In the formula, y t is the explained time series, x t is an exogenous factor, that is, t The relevant time series, r ij is with x t The relevant range change points, is the change point in the time domain, are the coefficients of the model.
2. The multi-change point threshold ARMA model with exogenous input and the Bayesian analysis method thereof according to claim 1, characterized in that: in, The rearrangement is: The change points in the time domain divide the time series data into several segments in time. The change points of the value range divide the time series data into several segments in the value range.
3. The multi-change point threshold ARMA model with exogenous input and the Bayesian analysis method thereof according to claim 1, characterized in that: in, In step S5, all the unknown parameters are independent of each other. The joint prior distribution is the product of the prior distributions of the parameters. The calculation formula of the joint posterior distribution is approximated, the denominator is normalized and omitted as a constant term: Where evidenced is a normalized constant term.
4. The multi-change point threshold ARMA model with exogenous input and the Bayesian analysis method thereof according to claim 1, Features: Wherein, the step S7 includes the following sub-steps: Step S7-1, setting initial values and a total number of iterations M for all the unknown parameters; Step S7-2, for the full conditional posterior distribution form in the standard form, at the mth sampling, a sample value is sampled from the standard posterior distribution and accepted with 100% probability; Step S7-3, for the non-standard form of the fully conditional posterior distribution form, from the distribution The candidate value r * , and calculate the acceptance probability a=min(1,p(r * ) / p(r (m-1) )), randomly select a candidate value from the uniform distribution U(0,1) and compare it with the acceptance probability a to determine whether to accept the candidate value: In the formula, r (m) 、r (m-1) are the sampling values of the mth and m-1th times respectively; Step S7-4, taking the sampling values obtained in step S7-2 and step S7-3 as sample values and making final convergence, that is, taking a part of the sampling values as the combustion period and the remaining sampling values for statistical calculation.
Citation Information
Patent Citations
Bayesian estimation method for outputting time-varying structural modal parameters only
CN107844627A
Corn disease and insect pest early warning analysis method based on Bayesian network
CN110807561A