diff --git a/paper/Divilkovskiy2024SourceSpace_en.aux b/paper/Divilkovskiy2024SourceSpace_en.aux index bd68476..bab56d1 100644 --- a/paper/Divilkovskiy2024SourceSpace_en.aux +++ b/paper/Divilkovskiy2024SourceSpace_en.aux @@ -47,41 +47,43 @@ \newlabel{fig:fig5}{{\caption@xref {fig:fig5}{ on input line 257}}{6}{Pairwise correlation between time series as the distance function}{figure.caption.2}{}} \@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Function $||\hat {\mathbf {\Sigma }}_{t+1} - \bar {\mathbf {\Sigma }}_{t+1}||_2^2$ for following series: $(1, 3)$ and $(2, 4)$. Minumums: (3; 4) is desired and (-1; 0) is alternative.\relax }}{6}{figure.caption.2}\protected@file@percent } \citation{mikhalevich2024methodsnonconvexoptimization} -\@writefile{toc}{\contentsline {section}{\numberline {6}Algorithm for recovering time series values in case of accurate prediction of the matrix}{8}{section.6}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {6}Algorithm for reconstructing time series values in case of accurate prediction of the matrix}{8}{section.6}\protected@file@percent } +\citation{HIGHAM1988103} \@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Prediction recovery in case of accurate prediction of correlation matrix $\mathbf {\Sigma }$. $T=20$, $T^\prime =10$\relax }}{9}{figure.caption.3}\protected@file@percent } \newlabel{fig:fig3}{{3}{9}{Prediction recovery in case of accurate prediction of correlation matrix $\mathbf {\Sigma }$. $T=20$, $T^\prime =10$\relax }{figure.caption.3}{}} -\@writefile{toc}{\contentsline {section}{\numberline {7}Algorithm for recovering time series values in case of inaccurate matrix prediction}{9}{section.7}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {7}Algorithm for reconstructing time series values in case of inaccurate matrix prediction}{9}{section.7}\protected@file@percent } \citation{zhou2021informer} -\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces Prediction recovery in case of inaccurate correlation matrix $\mathbf {\Sigma }$ prediction. In addition to the prediction error caused by noise in the correlation matrix a new type of error is added. When selecting a set, it is possible that the diameter is minimised not at the right set, as this is only a necessary condition, but not a sufficient one.\relax }}{10}{figure.caption.4}\protected@file@percent } -\newlabel{fig:fig4}{{4}{10}{Prediction recovery in case of inaccurate correlation matrix $\mathbf {\Sigma }$ prediction. In addition to the prediction error caused by noise in the correlation matrix a new type of error is added. When selecting a set, it is possible that the diameter is minimised not at the right set, as this is only a necessary condition, but not a sufficient one.\relax }{figure.caption.4}{}} +\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces Prediction reconstruction in case of inaccurate correlation matrix $\mathbf {\Sigma }$ prediction. In addition to the prediction error caused by noise in the correlation matrix a new type of error is added. When selecting a set, it is possible that the diameter is minimised not at the right set, as this is only a necessary condition, but not a sufficient one.\relax }}{10}{figure.caption.4}\protected@file@percent } +\newlabel{fig:fig4}{{4}{10}{Prediction reconstruction in case of inaccurate correlation matrix $\mathbf {\Sigma }$ prediction. In addition to the prediction error caused by noise in the correlation matrix a new type of error is added. When selecting a set, it is possible that the diameter is minimised not at the right set, as this is only a necessary condition, but not a sufficient one.\relax }{figure.caption.4}{}} \@writefile{toc}{\contentsline {section}{\numberline {8}Experiment}{10}{section.8}\protected@file@percent } \@writefile{toc}{\contentsline {paragraph}{Synthetic data.}{10}{section*.5}\protected@file@percent } \@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces Loss on synthetic data\relax }}{10}{table.caption.6}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces Synthetic data recovery plot at $K=10$, Additional noise $\mathcal {N}(0, 0.05)$. \textbf {MAE: 0.116, MSE: 0.025}\relax }}{11}{figure.caption.7}\protected@file@percent } -\newlabel{fig:fig6}{{5}{11}{Synthetic data recovery plot at $K=10$, Additional noise $\mathcal {N}(0, 0.05)$. \textbf {MAE: 0.116, MSE: 0.025}\relax }{figure.caption.7}{}} +\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces Synthetic data reconstruction plot at $K=10$, Additional noise $\mathcal {N}(0, 0.05)$. \textbf {MAE: 0.116, MSE: 0.025}\relax }}{11}{figure.caption.7}\protected@file@percent } +\newlabel{fig:fig6}{{5}{11}{Synthetic data reconstruction plot at $K=10$, Additional noise $\mathcal {N}(0, 0.05)$. \textbf {MAE: 0.116, MSE: 0.025}\relax }{figure.caption.7}{}} \@writefile{toc}{\contentsline {paragraph}{Electricity Transformer Temperature}{11}{section*.8}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {6}{\ignorespaces ETTh1 data recovery plot at $K=10$, Additional Noise $\mathcal {N}(0, 0.05)$. \textbf {MAE: 0.096, MSE: 0.019}\relax }}{11}{figure.caption.9}\protected@file@percent } -\newlabel{fig:fig7}{{6}{11}{ETTh1 data recovery plot at $K=10$, Additional Noise $\mathcal {N}(0, 0.05)$. \textbf {MAE: 0.096, MSE: 0.019}\relax }{figure.caption.9}{}} +\@writefile{lof}{\contentsline {figure}{\numberline {6}{\ignorespaces ETTh1 data reconstruction plot at $K=10$, Additional Noise $\mathcal {N}(0, 0.05)$. \textbf {MAE: 0.096, MSE: 0.019}\relax }}{11}{figure.caption.9}\protected@file@percent } +\newlabel{fig:fig7}{{6}{11}{ETTh1 data reconstruction plot at $K=10$, Additional Noise $\mathcal {N}(0, 0.05)$. \textbf {MAE: 0.096, MSE: 0.019}\relax }{figure.caption.9}{}} \bibdata{references} \bibcite{boyd2017multiperiod}{{1}{}{{}}{{}}} \bibcite{MDS}{{2}{}{{}}{{}}} \bibcite{SSA}{{3}{}{{}}{{}}} -\bibcite{LSTM}{{4}{}{{}}{{}}} -\bibcite{MulticorrelatedQuadratic}{{5}{}{{}}{{}}} -\bibcite{jadon2022comprehensive}{{6}{}{{}}{{}}} -\bibcite{liu2022pyraformer}{{7}{}{{}}{{}}} -\bibcite{mikhalevich2024methodsnonconvexoptimization}{{8}{}{{}}{{}}} -\bibcite{Biosignals}{{9}{}{{}}{{}}} -\bibcite{puchkin2023sharper}{{10}{}{{}}{{}}} +\bibcite{HIGHAM1988103}{{4}{}{{}}{{}}} +\bibcite{LSTM}{{5}{}{{}}{{}}} +\bibcite{MulticorrelatedQuadratic}{{6}{}{{}}{{}}} +\bibcite{jadon2022comprehensive}{{7}{}{{}}{{}}} +\bibcite{liu2022pyraformer}{{8}{}{{}}{{}}} +\bibcite{mikhalevich2024methodsnonconvexoptimization}{{9}{}{{}}{{}}} +\bibcite{Biosignals}{{10}{}{{}}{{}}} \@writefile{lot}{\contentsline {table}{\numberline {2}{\ignorespaces Loss on ETTh1 data\relax }}{12}{table.caption.10}\protected@file@percent } \@writefile{toc}{\contentsline {section}{\numberline {9}Conclusion}{12}{section.9}\protected@file@percent } -\bibcite{inbook}{{11}{}{{}}{{}}} -\bibcite{NIPS2017_3f5ee243}{{12}{}{{}}{{}}} -\bibcite{wu2021autoformer}{{13}{}{{}}{{}}} -\bibcite{zhang2023crossformer}{{14}{}{{}}{{}}} -\bibcite{haoyietal-informerEx-2023}{{15}{}{{}}{{}}} -\bibcite{haoyietal-informer-2021}{{16}{}{{}}{{}}} -\bibcite{zhou2021informer}{{17}{}{{}}{{}}} +\bibcite{puchkin2023sharper}{{11}{}{{}}{{}}} +\bibcite{inbook}{{12}{}{{}}{{}}} +\bibcite{NIPS2017_3f5ee243}{{13}{}{{}}{{}}} +\bibcite{wu2021autoformer}{{14}{}{{}}{{}}} +\bibcite{zhang2023crossformer}{{15}{}{{}}{{}}} +\bibcite{haoyietal-informerEx-2023}{{16}{}{{}}{{}}} +\bibcite{haoyietal-informer-2021}{{17}{}{{}}{{}}} +\bibcite{zhou2021informer}{{18}{}{{}}{{}}} \bibstyle{plain} \providecommand\NAT@force@numbers{}\NAT@force@numbers \gdef \@abspage@last{13} diff --git a/paper/Divilkovskiy2024SourceSpace_en.bbl b/paper/Divilkovskiy2024SourceSpace_en.bbl index 9740103..2238a80 100644 --- a/paper/Divilkovskiy2024SourceSpace_en.bbl +++ b/paper/Divilkovskiy2024SourceSpace_en.bbl @@ -15,6 +15,11 @@ James~B. Elsner and Anastasios~A. Tsonis. \newblock Singular spectrum analysis: A new tool in time series analysis. \newblock 1996. +\bibitem{HIGHAM1988103} +Nicholas~J. Higham. +\newblock Computing a nearest symmetric positive semidefinite matrix. +\newblock {\em Linear Algebra and its Applications}, 103:103--118, 1988. + \bibitem{LSTM} Sepp Hochreiter and Jürgen Schmidhuber. \newblock Long short-term memory. diff --git a/paper/Divilkovskiy2024SourceSpace_en.blg b/paper/Divilkovskiy2024SourceSpace_en.blg index bdca06e..18de575 100644 --- a/paper/Divilkovskiy2024SourceSpace_en.blg +++ b/paper/Divilkovskiy2024SourceSpace_en.blg @@ -7,45 +7,45 @@ Warning--empty journal in MDS Warning--empty booktitle in SSA Warning--empty publisher in inbook Warning--can't use both volume and number fields in haoyietal-informer-2021 -You've used 17 entries, +You've used 18 entries, 2118 wiz_defined-function locations, - 588 strings with 7126 characters, -and the built_in function-call counts, 6168 in all, are: -= -- 534 -> -- 419 + 596 strings with 7277 characters, +and the built_in function-call counts, 6450 in all, are: += -- 563 +> -- 426 < -- 4 -+ -- 163 -- -- 145 -* -- 444 -:= -- 1044 -add.period$ -- 48 -call.type$ -- 17 -change.case$ -- 119 ++ -- 166 +- -- 147 +* -- 462 +:= -- 1092 +add.period$ -- 51 +call.type$ -- 18 +change.case$ -- 123 chr.to.int$ -- 0 -cite$ -- 21 -duplicate$ -- 206 -empty$ -- 445 -format.name$ -- 145 -if$ -- 1266 +cite$ -- 22 +duplicate$ -- 217 +empty$ -- 471 +format.name$ -- 147 +if$ -- 1326 int.to.chr$ -- 0 -int.to.str$ -- 17 -missing$ -- 13 -newline$ -- 83 -num.names$ -- 36 -pop$ -- 164 +int.to.str$ -- 18 +missing$ -- 14 +newline$ -- 88 +num.names$ -- 38 +pop$ -- 166 preamble$ -- 1 -purify$ -- 103 +purify$ -- 106 quote$ -- 0 -skip$ -- 161 +skip$ -- 168 stack$ -- 0 -substring$ -- 219 -swap$ -- 46 +substring$ -- 245 +swap$ -- 47 text.length$ -- 4 text.prefix$ -- 0 top$ -- 0 -type$ -- 66 +type$ -- 70 warning$ -- 4 -while$ -- 43 -width$ -- 19 -write$ -- 169 +while$ -- 46 +width$ -- 20 +write$ -- 180 (There were 4 warnings) diff --git a/paper/Divilkovskiy2024SourceSpace_en.out b/paper/Divilkovskiy2024SourceSpace_en.out index cb95a6e..25a1218 100644 --- a/paper/Divilkovskiy2024SourceSpace_en.out +++ b/paper/Divilkovskiy2024SourceSpace_en.out @@ -3,7 +3,7 @@ \BOOKMARK [1][-]{section.3}{\376\377\000A\000l\000g\000o\000r\000i\000t\000h\000m\000\040\000i\000n\000\040\000c\000a\000s\000e\000\040\000o\000f\000\040\000p\000r\000e\000d\000i\000c\000t\000i\000n\000g\000\040\000a\000\040\000s\000i\000n\000g\000l\000e\000\040\000d\000i\000s\000t\000a\000n\000c\000e\000\040\000m\000a\000t\000r\000i\000x}{}% 3 \BOOKMARK [1][-]{section.4}{\376\377\000E\000x\000i\000s\000t\000e\000n\000c\000e\000\040\000o\000f\000\040\000s\000e\000v\000e\000r\000a\000l\000\040\000v\000a\000l\000u\000e\000s\000\040\000o\000f\000\040\000a\000\040\000s\000e\000r\000i\000e\000s\000\040\000s\000a\000t\000i\000s\000f\000y\000i\000n\000g\000\040\000s\000a\000m\000e\000\040\000d\000i\000s\000t\000a\000n\000c\000e\000\040\000m\000a\000t\000r\000i\000x}{}% 4 \BOOKMARK [1][-]{section.5}{\376\377\000P\000a\000i\000r\000w\000i\000s\000e\000\040\000c\000o\000r\000r\000e\000l\000a\000t\000i\000o\000n\000\040\000b\000e\000t\000w\000e\000e\000n\000\040\000t\000i\000m\000e\000\040\000s\000e\000r\000i\000e\000s\000\040\000a\000s\000\040\000t\000h\000e\000\040\000d\000i\000s\000t\000a\000n\000c\000e\000\040\000f\000u\000n\000c\000t\000i\000o\000n}{}% 5 -\BOOKMARK [1][-]{section.6}{\376\377\000A\000l\000g\000o\000r\000i\000t\000h\000m\000\040\000f\000o\000r\000\040\000r\000e\000c\000o\000v\000e\000r\000i\000n\000g\000\040\000t\000i\000m\000e\000\040\000s\000e\000r\000i\000e\000s\000\040\000v\000a\000l\000u\000e\000s\000\040\000i\000n\000\040\000c\000a\000s\000e\000\040\000o\000f\000\040\000a\000c\000c\000u\000r\000a\000t\000e\000\040\000p\000r\000e\000d\000i\000c\000t\000i\000o\000n\000\040\000o\000f\000\040\000t\000h\000e\000\040\000m\000a\000t\000r\000i\000x}{}% 6 -\BOOKMARK [1][-]{section.7}{\376\377\000A\000l\000g\000o\000r\000i\000t\000h\000m\000\040\000f\000o\000r\000\040\000r\000e\000c\000o\000v\000e\000r\000i\000n\000g\000\040\000t\000i\000m\000e\000\040\000s\000e\000r\000i\000e\000s\000\040\000v\000a\000l\000u\000e\000s\000\040\000i\000n\000\040\000c\000a\000s\000e\000\040\000o\000f\000\040\000i\000n\000a\000c\000c\000u\000r\000a\000t\000e\000\040\000m\000a\000t\000r\000i\000x\000\040\000p\000r\000e\000d\000i\000c\000t\000i\000o\000n}{}% 7 +\BOOKMARK [1][-]{section.6}{\376\377\000A\000l\000g\000o\000r\000i\000t\000h\000m\000\040\000f\000o\000r\000\040\000r\000e\000c\000o\000n\000s\000t\000r\000u\000c\000t\000i\000n\000g\000\040\000t\000i\000m\000e\000\040\000s\000e\000r\000i\000e\000s\000\040\000v\000a\000l\000u\000e\000s\000\040\000i\000n\000\040\000c\000a\000s\000e\000\040\000o\000f\000\040\000a\000c\000c\000u\000r\000a\000t\000e\000\040\000p\000r\000e\000d\000i\000c\000t\000i\000o\000n\000\040\000o\000f\000\040\000t\000h\000e\000\040\000m\000a\000t\000r\000i\000x}{}% 6 +\BOOKMARK [1][-]{section.7}{\376\377\000A\000l\000g\000o\000r\000i\000t\000h\000m\000\040\000f\000o\000r\000\040\000r\000e\000c\000o\000n\000s\000t\000r\000u\000c\000t\000i\000n\000g\000\040\000t\000i\000m\000e\000\040\000s\000e\000r\000i\000e\000s\000\040\000v\000a\000l\000u\000e\000s\000\040\000i\000n\000\040\000c\000a\000s\000e\000\040\000o\000f\000\040\000i\000n\000a\000c\000c\000u\000r\000a\000t\000e\000\040\000m\000a\000t\000r\000i\000x\000\040\000p\000r\000e\000d\000i\000c\000t\000i\000o\000n}{}% 7 \BOOKMARK [1][-]{section.8}{\376\377\000E\000x\000p\000e\000r\000i\000m\000e\000n\000t}{}% 8 \BOOKMARK [1][-]{section.9}{\376\377\000C\000o\000n\000c\000l\000u\000s\000i\000o\000n}{}% 9 diff --git a/paper/Divilkovskiy2024SourceSpace_en.pdf b/paper/Divilkovskiy2024SourceSpace_en.pdf index b9b90e7..a5c1d65 100644 Binary files a/paper/Divilkovskiy2024SourceSpace_en.pdf and b/paper/Divilkovskiy2024SourceSpace_en.pdf differ diff --git a/paper/Divilkovskiy2024SourceSpace_en.synctex.gz b/paper/Divilkovskiy2024SourceSpace_en.synctex.gz index 75b1004..c4c54d4 100644 Binary files a/paper/Divilkovskiy2024SourceSpace_en.synctex.gz and b/paper/Divilkovskiy2024SourceSpace_en.synctex.gz differ diff --git a/paper/Divilkovskiy2024SourceSpace_en.tex b/paper/Divilkovskiy2024SourceSpace_en.tex index 5e9e921..509e9f7 100644 --- a/paper/Divilkovskiy2024SourceSpace_en.tex +++ b/paper/Divilkovskiy2024SourceSpace_en.tex @@ -84,7 +84,7 @@ \maketitle \begin{abstract} - We are researching the problem of pointwise forecasting of a set of time series with high covariance and high variance. To solve this problem we propose considering the space of pairwise distances between time series. In this space the pairwise distance matrix is predicted and then the time series values at the next time moment are reconstructed using the known matrix. In this paper we propose several methods for recovering a prediction in time series space from a known pairwise distance matrix. We show the existence of multiple time series values satisfying the same pairwise distance matrix. We propose two algorithms based on the use of matrices constructed over different time intervals using pairwise correlation. Also, the paper derives an explicit view of the recovered values through the pairwise correlation matrix. In addition, we derive an evaluation of the quality of the reconstruction when noise is added to the pairwise distance matrices. The novelty of the method is that the prediction is not done in the original space, but in the space of pairwise distances. + We are researching the problem of pointwise forecasting of a set of time series with high covariance and high variance. To solve this problem we propose considering the space of pairwise distances between time series. In this space the pairwise distance matrix is predicted and then the time series values at the next time moment are reconstructed using the known matrix. In this paper we propose several methods for reconstruction a prediction in time series space from a known pairwise distance matrix. We show the existence of multiple time series values satisfying the same pairwise distance matrix. We propose two algorithms based on the use of matrices constructed over different time intervals using pairwise correlation. Also, the paper derives an explicit view of the reconstructed values through the pairwise correlation matrix. In addition, we derive an evaluation of the quality of the reconstruction when noise is added to the pairwise distance matrices. The novelty of the method is that the prediction is not done in the original space, but in the space of pairwise distances. \end{abstract} @@ -99,7 +99,7 @@ \section{Introduction} Several recent studies \cite{haoyietal-informer-2021} \cite{haoyietal-informerEx-2023} \cite{wu2021autoformer} \cite{liu2022pyraformer} are based on usage of popular transformer-based models. They were originally proposed for the natural language processing problems, such as translation and text-completion \cite{NIPS2017_3f5ee243}. However, since many language problems dealing with text as a sequence in time, same approaches may be used for time series predicting. Crossformer \cite{zhang2023crossformer} model uses cross-dimensional dependency, however it does not explicitly model distance function between time series. - Further, we study conditions on the distance function between rows under which there is a way to recover the values of time series. The insufficiency of one matrix to recover the answer is proved. Two methods using several matrices are proposed for the case of accurate forecast and for the case of forecast with non-zero noise. Also, we propose a reconstruction algorithm based on two theorems about the explicit formula of the result in time series space using pairwise correlation as a function of pairwise distance between rows. Mean Squared Error and Mean Absolute Error are used as quality criteria. It is shown in the article \cite{jadon2022comprehensive} that they are the most suitable for the task of time series forecasting. + Further, we study conditions on the distance function between rows under which there is a way to reconstruct the values of time series. The insufficiency of one matrix to reconstruct the answer is proved. Two methods using several matrices are proposed for the case of accurate forecast and for the case of forecast with non-zero noise. Also, we propose a reconstruction algorithm based on two theorems about the explicit formula of the result in time series space using pairwise correlation as a function of pairwise distance between rows. Mean Squared Error and Mean Absolute Error are used as quality criteria. It is shown in the article \cite{jadon2022comprehensive} that they are the most suitable for the task of time series forecasting. \section{Formulation of the problem of pointwise forecasting of a set of time series} @@ -140,7 +140,7 @@ \section{Algorithm in case of predicting a single distance matrix} \section{Existence of several values of a series satisfying same distance matrix} -The existence of several solutions to the minimization problem described above is the central problem we consider in this paper. In this section we show that using one matrix constructed by an arbitrary metric it is possible to recover several different values of the series at the next moment of time. A solution to this problem in the case of using pairwise correlation as a function of distance between certain time series is proposed in the next section. +The existence of several solutions to the minimization problem described above is the central problem we consider in this paper. In this section we show that using one matrix constructed by an arbitrary metric it is possible to reconstruct several different values of the series at the next moment of time. A solution to this problem in the case of using pairwise correlation as a function of distance between certain time series is proposed in the next section. Consider the reconstruction of the prediction from the matrix $\mathbf{\Sigma}_{t+1}$ to time series space, where $\mathbf{\Sigma}_{t+1}$ is the matrix of pairwise distances corresponding to the multivariate series $\mathbf{x}=[\mathbf{x_1}, \ldots, \mathbf{x_{t+1}}]$. @@ -163,11 +163,11 @@ \section{Existence of several values of a series satisfying same distance matrix \label{fig:fig1} \end{figure} -However, even using other metrics does not get rid of the problem. This results in the inability to use the classical Multidimentional Scaling \cite{MDS} algorithm to recover the response to the source time series space. This algorithm is often used to recover objects from their pairwise distances. Metric MDS Algorithm \cite{inbook} may be used if distances are not euclidean. +However, even using other metrics does not get rid of the problem. This results in the inability to use the classical Multidimentional Scaling \cite{MDS} algorithm to reconstruct the result to the source time series space. This algorithm is often used to reconstruct objects from their pairwise distances. Metric MDS Algorithm \cite{inbook} may be used if distances are not euclidean. -In the theorem below we show that usage of only one matrix is insufficient for the problem of recovering values of time series. +In the theorem below we show that usage of only one matrix is insufficient for the problem of reconstructing values of time series. -\textbf{Theorem 1.} \textit{For any metric $\rho$ defined in the time series space $\mathbb{R}^t$ there is more than one way to recover the original time series from the pairwise distance matrix constructed by the given metric.} +\textbf{Theorem 1.} \textit{For any metric $\rho$ defined in the time series space $\mathbb{R}^t$ there is more than one way to reconstruct the original time series from the pairwise distance matrix constructed by the given metric.} \textbf{Note 1}. This statement does not use information about the first $t-1$ values of the series. In fact, the series in this case can be thought of as a point in $\mathbb{R}^t$ space. The usage of information about the previous moments of time is considered after this section. @@ -184,7 +184,7 @@ \section{Existence of several values of a series satisfying same distance matrix Now consider the same problem, in addition to the matrix $\mathbf{\Sigma}_{t+1}$ using the value of the time series before the time moment $t$: $\mathbf{X}=[\mathbf{x_1}, \ldots, \mathbf{x_{t}}]$. The problem is reformulated as follows: -There are $n$ objects in $\mathbb{R}^{t+1}$, their first $t$ coordinates are known. We also know the distance matrix $\mathbf{\Sigma}_{t+1} \in \mathbb{R}^{(t+1) \times (t+1)}$. It is required to recover the ($t+1$)'th coordinate of each of the objects. In time series terms, the ($t+1$)'th coordinate is the value of each of the series at that moment in time. +There are $n$ objects in $\mathbb{R}^{t+1}$, their first $t$ coordinates are known. We also know the distance matrix $\mathbf{\Sigma}_{t+1} \in \mathbb{R}^{(t+1) \times (t+1)}$. It is required to calculate the ($t+1$)'th coordinate of each of the objects. In time series terms, the ($t+1$)'th coordinate is the value of each of the series at that moment in time. \section{Pairwise correlation between time series as the distance function} @@ -248,7 +248,7 @@ \section{Pairwise correlation between time series as the distance function} \end{align*} $$ \blacksquare $$ -\textbf{Corollary. (A trivial method for obtaining a pair of possible answers.)} This theorem shows that using pairwise correlation as a distance function gives at most \textit{two} different answers when recovering. Moreover, having obtained one, one can explicitly find the second one. Then, to find both possible answers, it is proposed to apply any non-convex optimisation method to find at least one of the minimum of the function. Therefore with the formula above we are able to find another minimum. +\textbf{Corollary. (A trivial method for obtaining a pair of possible answers.)} This theorem shows that using pairwise correlation as a distance function gives at most \textit{two} different answers when reconstructing. Moreover, having obtained one, we can explicitly find the second one. Then, to find both possible answers, it is proposed to apply any non-convex optimisation method to find at least one of the minimum of the function. Therefore with the formula above we are able to find another minimum. \begin{figure}[H] \centering @@ -294,7 +294,7 @@ \section{Pairwise correlation between time series as the distance function} Denote \[\mathbf{A} = (\bar{\mathbf{x}}_{t+1}-\boldsymbol{\mu}_t)(\bar{\mathbf{x}}_{t+1}-\boldsymbol{\mu}_t)^\intercal = \left(\bar{\mathbf{\Sigma}}_{t+1} - \frac{t}{t+1} \cdot \mathbf{\Sigma}_t \right) \cdot \frac{(t+1)^2}{t}.\] The rank of the matrix ($\hat{\mathbf{x}}_{t+1}-\boldsymbol{\mu}_t)(\hat{\mathbf{x}}_{t+1}-\boldsymbol{\mu}_t)^\intercal$ is 1, and since the desired minimum is 0, it turns out that the rank of the matrix $\mathbf{A}$ is also 1. - \item From the previous paragraph, the matrix $\mathbf{A}$ has rank 1. Let us write the singular value decomposition. \[ + \item From the previous paragraph, the matrix $\mathbf{A}$ has rank 1. Consider the singular value decomposition. \[ \mathbf{A} = \sum_{i=1}^{1} \lambda_i \mathbf{u}_i \mathbf{v}_i^\intercal = \lambda_1 \mathbf{u}_1 \mathbf{v}_1^\intercal. \] On the other hand, $\mathbf{A} = (\bar{\mathbf{x}}_{t+1}-\boldsymbol{\mu}_t)(\bar{\mathbf{x}}_{t+1}-\boldsymbol{\mu}_t)^\intercal$. Then, \[ @@ -307,23 +307,26 @@ \section{Pairwise correlation between time series as the distance function} This theorem allows us to find both minimums of a function much faster than with standard non-convex optimisation methods \cite{mikhalevich2024methodsnonconvexoptimization}. -\section{Algorithm for recovering time series values in case of accurate prediction of the matrix} +\section{Algorithm for reconstructing time series values in case of accurate prediction of the matrix} -Theorems 2 and 3 show that using a single pairwise correlation matrix and information about the first $t$ moments of time allows us to obtain a \textit{pair} of possible values after recovery. In this section, we propose a method to select the true value from the obtained \textit{pair} $\mathbf{\Sigma}_{t+1}$ \textit{predicted accurately}. +Theorems 2 and 3 show that using a \textit{single} pairwise correlation matrix and information about the first $t$ moments of time allows us to obtain a \textit{pair} of possible values after recovery. In this section, we propose a method to select the true value from the obtained \textit{pair} $\mathbf{\Sigma}_{t+1}$ \textit{predicted accurately}. -The algorithm described below is based on the use of \textit{two} predicted matrices corresponding to different intervals of time. Two different values $T, T^\prime$ are chosen. Two matrices are predicted: +The algorithm described below is based on the use of \textit{two} predicted matrices corresponding to different subsegments of time. Two different values $T, T^\prime$ are chosen. Two matrices are predicted: -First $\mathbf{\Sigma}_{t+1}^1$ pairwise correlation matrix for the multivariate time series $\mathbf{x}$ at time moments from $t-T+2$ to $t+1$ (in total $T$ values). +First matrix $\mathbf{\Sigma}_{t+1}^1$ pairwise correlation matrix for the multivariate time series $\mathbf{x}$ at time moments from $t-T+2$ to $t+1$ (in total $T$ values). -Second $\mathbf{\Sigma}_{t+1}^2$ pairwise correlation matrix for the multivariate time series $\mathbf{x}$ at time moments from $t-T‘+2$ to $t+1$ (in total $T^\prime$ values). +Second matrix $\mathbf{\Sigma}_{t+1}^2$ pairwise correlation matrix for the multivariate time series $\mathbf{x}$ at time moments from $t-T‘+2$ to $t+1$ (in total $T^\prime$ values). -Hence, when we reconstruct answers from these matrices, we obtain two pairs of answers, each of which is a candidate for the true answer. At the same time, a true answer exists in each of the pairs. It is suggested to take the answer from the intersection. We does not consider the case when the intersection size is 2, since the probability of this situation is 0 when using continuous values. +Hence, when we reconstruct answers from these matrices, we obtain two pairs of answers, each of which is a candidate for the true answer. At the same time, a true answer exists in each of the pairs. We suggest to take the answer from the intersection. We does not consider the case when the intersection size is 2, since the probability of this situation is 0 when using continuous values. Algorithm scheme: \begin{enumerate} \item Take $T$ and $T^\prime: T \neq T'$. - \item For $T$ and $T^\prime$ perform the above algorithm and obtain the answer sets: \[ [\hat{\mathbf{x}}_{t+1}^1, \hat{\mathbf{x}'}_{t+1}^1], [\hat{\mathbf{x}}_{t+1}^2, \hat{\mathbf{x}'}_{t+1}^2].\] + \item For $T$ and $T^\prime$ perform the above algorithm and obtain the answer sets: + \begin{gather*} + [\hat{\mathbf{x}}_{t+1}^1, \hat{\mathbf{x}}^{\prime 1}_{t+1}],\\ [\hat{\mathbf{x}}_{t+1}^2, \hat{\mathbf{x}}^{\prime 2}_{t+1}]. + \end{gather*} \item Find the answer that lies in the intersection. In real data, the probability of matching sets of answers is 0, just as it is in synthetic data with random noise added. \end{enumerate} @@ -336,26 +339,26 @@ \section{Algorithm for recovering time series values in case of accurate predict \label{fig:fig3} \end{figure} -\section{Algorithm for recovering time series values in case of inaccurate matrix prediction} +\section{Algorithm for reconstructing time series values in case of inaccurate matrix prediction} The problem with the above algorithm is that if the prediction is inaccurate, there may be no intersection. This happens because the error in each of the predicted matrices is different. For this, the following algorithm is proposed to amortise the error: -Instead of two values of $T$ and $T^\prime$, $K$ values are taken. -Next, each matrix is reduced to the nearest positive semi-definite matrix. -Then we get $K$ sets of answers: +Instead of two values of $T$ and $T^\prime$, we propose take $K$ values. We get $K$ matrices with some noise that came from inaccuracy in prediction. Thus, each matrix is reduced to the nearest positive semi-definite matrix. Algorithm is explained in \cite{HIGHAM1988103}. +Then, for each value algorithm for obtaining the pair of possible answers is applied. +We get $K$ sets of answers: \begin{gather*} [\hat{\mathbf{x}}_{t+1}^1, \hat{\mathbf{x}}^{\prime 1}_{t+1}],\\ [\hat{\mathbf{x}}_{t+1}^2, \hat{\mathbf{x}}^{\prime 2}_{t+1}],\\ \vdots \\ [\hat{\mathbf{x}}_{t+1}^K, \hat{\mathbf{x}}^{\prime K}_{t+1}]. \end{gather*} -Then we propose to search through $2^K$ sets of answers and choose the set in which the diameter is minimal. The diameter of set is calculated as maximum Euclidean distance between two different points in set. It is a \textit{necessary} condition for the actual answer. In other words, the one that is the intersection of all pairs of answers. In the case of an accurate prediction, the diameter of such a set will always be zero. +Then we propose to search through $2^K$ sets of answers and choose the set in which the diameter is minimal. The diameter of set is calculated as maximum Euclidean distance between two different points in set. It is a \textit{necessary} condition for the actual answer. In the case of an accurate prediction, the diameter of such a set will always be zero. -The asymptotic complexity of this recovery will be $O(2^K \times K \times N)$ $+$ the complexity of the minimum search algorithm used. +The asymptotic complexity of this reconstruction will be $O(2^K \times K \times N)$ $+$ the complexity of the minimum search algorithm used. \begin{figure}[H] \centering \includegraphics[width=\textwidth]{NonIdealRecovery.eps} - \caption{Prediction recovery in case of inaccurate correlation matrix $\mathbf{\Sigma}$ prediction. In addition to the prediction error caused by noise in the correlation matrix a new type of error is added. When selecting a set, it is possible that the diameter is minimised not at the right set, as this is only a necessary condition, but not a sufficient one.} + \caption{Prediction reconstruction in case of inaccurate correlation matrix $\mathbf{\Sigma}$ prediction. In addition to the prediction error caused by noise in the correlation matrix a new type of error is added. When selecting a set, it is possible that the diameter is minimised not at the right set, as this is only a necessary condition, but not a sufficient one.} \label{fig:fig4} \end{figure} @@ -365,7 +368,7 @@ \section{Experiment} \paragraph{Synthetic data.}\ -The table below shows the error values after recovery under different conditions. Generated data consisting of a combination of noisy sines and cosines are used. +The table below shows the error values after reconstruction the time series values under different conditions. Generated data consisting of a combination of noisy sines and cosines is used. \begin{table}[!h] \def\arraystretch{2.3} @@ -385,7 +388,7 @@ \section{Experiment} \begin{figure}[H] \centering \includegraphics[width=\textwidth]{synthetic_time_series_K10N005.eps} - \caption{Synthetic data recovery plot at $K=10$, Additional noise $\mathcal{N}(0, 0.05)$. \textbf{MAE: 0.116, MSE: 0.025}} + \caption{Synthetic data reconstruction plot at $K=10$, Additional noise $\mathcal{N}(0, 0.05)$. \textbf{MAE: 0.116, MSE: 0.025}} \label{fig:fig6} \end{figure} @@ -396,7 +399,7 @@ \section{Experiment} \begin{figure}[H] \centering \includegraphics[width=\textwidth]{ETT_time_series_K10N005.eps} - \caption{ETTh1 data recovery plot at $K=10$, Additional Noise $\mathcal{N}(0, 0.05)$. \textbf{MAE: 0.096, MSE: 0.019}} + \caption{ETTh1 data reconstruction plot at $K=10$, Additional Noise $\mathcal{N}(0, 0.05)$. \textbf{MAE: 0.096, MSE: 0.019}} \label{fig:fig7} \end{figure} @@ -418,11 +421,11 @@ \section{Experiment} In all cases, using more different values of $T$ predictably gave the highest accuracy. However, for $K > 15$ the algorithm becomes too computationally complex due to the exponential dependence on $K$. \section{Conclusion} -The paper investigates an approach to time series forecasting using a pairwise correlation matrix between series. It is shown that the use of only one matrix leads to the existence of a pair of possible answers~--- the values of the series at the next moment of time. An explicit formula for computing one answer through the other is derived, which allows the problem to be solved using nonconvex optimisation. Moreover, an explicit form of the pair of answers via the singular value decomposition of the pairwise correlation matrix is derived. Two algorithms are proposed to identify the desired answer from a pair of possible answers. The first one relies on the exact prediction of the pairwise correlation matrix. The second one admits the presence of an error in the prediction, but it is more computationally demanding. +The paper investigates an approach to time series forecasting using a pairwise correlation matrix between series. It is shown that the use of only one matrix leads to the existence of a pair of possible values of the series at the next moment of time. An explicit formula for computing one answer through the other is derived, which allows the problem to be solved using non-convex optimisation. Moreover, an explicit form of the pair of answers via the singular value decomposition of the pairwise correlation matrix is derived. Two algorithms are proposed to identify the desired answer from a pair of possible answers. The first one relies on the exact prediction of the pairwise correlation matrix. The second one admits the presence of an error in the prediction, but it is more computationally demanding. The future development of the study is to find a way to predict the pairwise correlation matrix with high accuracy. Using basic regression models give insufficiently accurate results. In such a prediction, errors are often made by incorrectly selecting the set of answers from Algorithm 2. -Also, the side of development can be the estimation of the error radius when recovering the value of time series from the matrix of pair correlations. In addition, it makes sense to consider other functions of pairwise distance as a metric. +Also, the side of development can be the estimation of the error radius when reconstructing the value of time series from the matrix of pair correlations. In addition, it makes sense to consider other functions of pairwise distance as a metric. \bibliography{references} \bibliographystyle{plain} diff --git a/paper/references.bib b/paper/references.bib index 34788f3..22f2a99 100644 --- a/paper/references.bib +++ b/paper/references.bib @@ -47,6 +47,19 @@ @inbook{inbook doi = {10.1007/978-3-030-76974-1_10} } +@article{HIGHAM1988103, + title = {Computing a nearest symmetric positive semidefinite matrix}, + journal = {Linear Algebra and its Applications}, + volume = {103}, + pages = {103-118}, + year = {1988}, + issn = {0024-3795}, + doi = {https://doi.org/10.1016/0024-3795(88)90223-6}, + url = {https://www.sciencedirect.com/science/article/pii/0024379588902236}, + author = {Nicholas J. Higham}, + abstract = {The nearest symmetric positive semidefinite matrix in the Frobenius norm to an arbitrary real matrix A is shown to be (B + H)/2, where H is the symmetric polar factor of B=(A + AT)/2. In the 2-norm a nearest symmetric positive semidefinite matrix, and its distance δ2(A) from A, are given by a computationally challenging formula due to Halmos. We show how the bisection method can be applied to this formula to compute upper and lower bounds for δ2(A) differing by no more than a given amount. A key ingredient is a stable and efficient test for positive definiteness, based on an attempted Choleski decomposition. For accurate computation of δ2(A) we formulate the problem as one of zero finding and apply a hybrid Newton-bisection algorithm. Some numerical difficulties are discussed and illustrated by example.} +} + @article{MDS, author = {Davison, Mark and Sireci, Stephen}, year = {2012},