You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -583,65 +583,72 @@ and where the (huge) $m \times m $ matrix $X^{+}$ is the Moore-Penrose generaliz
583
583
Think about the singular value decomposition
584
584
585
585
$$
586
-
X = \tilde U \tilde \Sigma \tilde V^T
586
+
X = U \Sigma V^T
587
587
$$
588
588
589
-
where $\tilde U$ is $m \times r$, $\tilde \Sigma$ is an $r \times r$ diagonal matrix, and $\tilde V^T$ is an $r \times \tilde n$ matrix.
589
+
where $U$ is $m \times p$, $\Sigma$ is a $p \times p$ diagonal matrix, and $ V^T$ is a $p \times \tilde n$ matrix.
590
+
591
+
Here $p$ is the rank of $X$, where necessarily $p \leq \tilde n$.
590
592
591
593
592
594
We could compute the generalized inverse $X^+$ by using
593
595
as
594
596
595
597
$$
596
-
X^{+} = \tilde V \tilde \Sigma^{-1} \tilde U^T
598
+
X^{+} = V \Sigma^{-1} U^T
597
599
$$
598
600
599
-
where the matrix $\tilde \Sigma^{-1}$ is constructed by replacing each non-zero element of $\tilde \Sigma$ with $\sigma_j^{-1}$.
601
+
where the matrix $\Sigma^{-1}$ is constructed by replacing each non-zero element of $ \Sigma$ with $\sigma_j^{-1}$.
600
602
601
603
The idea behind **dynamic mode decomposition** is to construct an approximation that
602
604
603
605
* sidesteps computing the generalized inverse $X^{+}$
604
606
605
-
* retains only the largest $\tilde r< < r$ eigenvalues and associated eigenvectors of $\tilde U$ and $\tilde V^T$
606
-
607
-
* constructs an $m \times \tilde r$ matrix $\Phi$ that captures effects on all $m$ variables of $\tilde r$ dynamic modes that are associated with the $\tilde r$ largest singular values
607
+
* constructs an $m \times r$ matrix $\Phi$ that captures effects on all $m$ variables of $r < < p$ dynamic modes that are associated with the $r$ largest singular values
608
608
609
-
* uses $\Phi$ and powers of $\tilde r$ leading singular values to forecast *future* $X_t$'s
609
+
610
+
* uses $\Phi$ and powers of $r$ singular values to forecast *future* $X_t$'s
610
611
611
612
The magic of **dynamic mode decomposition** is that we accomplish this without ever computing the regression coefficients $A = X' X^{+}$.
612
613
613
614
To construct a DMD, we deploy the following steps:
614
615
615
616
616
-
* As described above, though it would be costly, we could compute $A$ by solving
617
+
* As described above, though it would be costly, we could compute an $m \times m$ matrix $A$ by solving
617
618
618
619
$$
619
-
A = X' V \Sigma^{-1} U^T
620
+
A = X' V \Sigma^{-1} U^T
620
621
$$ (eq:bigAformula)
622
+
623
+
621
624
622
625
But we won't do that.
626
+
627
+
We'll first compute the $r$ largest singular values of $X$.
628
+
629
+
We'll form matrices $\tilde V, \tilde U$ corresponding to those $r$ singular values.
630
+
623
631
624
-
The matrix $A$ is $m \times m$.
625
632
626
633
627
-
We'll the instead work with a reduced-order system of dimension $\tilde r$ by forming an $\tilde r \times \tilde r$ transition matrix
634
+
We'll then construct a reduced-order system of dimension $r$ by forming an $r \times r$ transition matrix
628
635
$\tilde A$ defined by
629
636
630
637
$$
631
638
\tilde A = \tilde U^T A \tilde U
632
639
$$ (eq:tildeA_1)
633
640
634
-
The $\tilde A$ matrix governs the dynamics of the $\tilde r \times 1$ vector $\tilde x_t $
641
+
The $\tilde A$ matrix governs the dynamics of an $r \times 1$ vector $\tilde X_t $
635
642
according to
636
643
637
644
$$
638
-
\tilde x_{t+1} = \tilde A \tilde x_t
645
+
\tilde X_{t+1} = \tilde A \tilde X_t
639
646
$$
640
647
641
-
where an approximation to the original $m \times 1$ vector $x_t$ can be acquired from
648
+
where an approximation to (i.e., a projection of) the original $m \times 1$ vector $X_t$ can be acquired from inverting
642
649
643
650
$$
644
-
x_t = \tilde U \tilde x_t
651
+
X_t = \tilde U \tilde X_t
645
652
$$
646
653
647
654
From equation {eq}`eq:tildeA_1` and {eq}`eq:bigAformula` it follows that
@@ -660,35 +667,108 @@ To construct a DMD, we deploy the following steps:
660
667
661
668
$$
662
669
\tilde A W = W \Lambda
663
-
$$
670
+
$$ (eq:tildeAeigen)
664
671
665
-
where $\Lambda$ is a $\tilde r \times \tilde r$ diagonal matrix of eigenvalues and the columns of $W$ are corresponding eigenvectors
666
-
of $\tilde A$. Both $\Lambda$ and $W$ are $\tilde r \times \tilde r$ matrices.
672
+
where $\Lambda$ is a $r \times r$ diagonal matrix of eigenvalues and the columns of $W$ are corresponding eigenvectors
673
+
of $\tilde A$. Both $\Lambda$ and $W$ are $r \times r$ matrices.
667
674
668
-
* Construct the $m \times \tilde r$ matrix
675
+
* Construct the $m \times r$ matrix
669
676
670
677
$$
671
-
\Phi = X' V \Sigma^{-1} W
678
+
\Phi = X' \tilde V \tilde \Sigma^{-1} W
672
679
$$ (eq:Phiformula)
673
680
674
681
675
682
676
-
Let $\Phi^{+}$ be a generalized inverse of $\Phi$; $\Phi^{+}$ is an $\tilde r \times m$ matrix.
683
+
We can construct an $r \times m$ matrix generalized inverse $\Phi^{+}$ of $\Phi$.
684
+
685
+
686
+
* We interrupt the flow with a digression at this point
687
+
688
+
689
+
* notice that from formula {eq}`eq:Phiformula`, we have
690
+
691
+
$$
692
+
\begin{aligned}
693
+
A \Phi & = (X' \tilde V \tilde \Sigma^{-1} \tilde U^T) (X' \tilde V \tilde \Sigma^{-1} W) \cr
694
+
& = X' \tilde V \Sigma^{-1} \tilde A W \cr
695
+
& = X' \tilde V \tilde \Sigma^{-1} W \Lambda \cr
696
+
& = \Phi \Lambda
697
+
\end{aligned}
698
+
$$ (eq:APhiLambda)
699
+
700
+
701
+
702
+
703
+
677
704
678
705
* Define an initial vector $b$ of dominant modes by
679
706
680
707
$$
681
708
b= \Phi^{+} X_1
709
+
$$ (eq:bphieqn)
710
+
711
+
where evidently $b$ is an $r \times 1$ vector.
712
+
713
+
(Since it involves smaller matrices, formula {eq}`eq:beqnsmall` below is a computationally more efficient way to compute $b$)
714
+
715
+
* Then define _projected data_ $\hat X_1$ by
716
+
717
+
$$
718
+
\tilde X_1 = \Phi b
719
+
$$ (eq:X1proj)
720
+
721
+
* It follows that
722
+
723
+
$$
724
+
\tilde U \tilde X_1 = X' \tilde V \tilde \Sigma^{-1} W b
725
+
$$
726
+
727
+
and
728
+
729
+
$$
730
+
\tilde X_1 = \tilde U^T X' \tilde V \tilde \Sigma^{-1} W b
731
+
$$
732
+
733
+
* Recall that $ \tilde A = \tilde U^T X' \tilde V \tilde \Sigma^{-1}$ so that
734
+
735
+
$$
736
+
\tilde X_1 = \tilde A W b
682
737
$$
738
+
739
+
and therefore, by the eigendecomposition {eq}`eq:tildeAeigen` of $\tilde A$, we have
740
+
741
+
$$
742
+
\tilde X_1 = W \Lambda b
743
+
$$
744
+
745
+
* Therefore,
683
746
684
-
where evidently $b$ is an $\tilde r \times 1$ vector.
747
+
$$
748
+
b = ( W \Lambda)^{-1} \tilde X_1
749
+
$$ (eq:beqnsmall)
750
+
751
+
which is computationally more efficient than equation {eq}`eq:bphieqn`.
752
+
753
+
754
+
755
+
### Putting Things Together
685
756
686
-
With $\Lambda, \Phi, \Phi^{+}$ in hand, our least-squares fitted dynamics fitted to the $\tilde r$ dominant modes
757
+
With $\Lambda, \Phi, \Phi^{+}$ in hand, our least-squares fitted dynamics fitted to the $r$ modes
687
758
are governed by
688
759
689
760
$$
690
-
X_{t+1} = \Phi \Lambda \Phi^{+} X_t
761
+
X_{t+1} = \Phi \Lambda \Phi^{+} X_t .
762
+
$$ (eq:Xdynamicsapprox)
763
+
764
+
But by virtue of equation {eq}`eq:APhiLambda`, it follows that **if we had kept $r = p$**, this equation would be equivalent with
765
+
691
766
$$
767
+
X_{t+1} = A X_t .
768
+
$$ (eq:Xdynamicstrue)
769
+
770
+
When $r << p $, equation {eq}`eq:Xdynamicsapprox` is an approximation (of reduced order $r$) to the $X$ dynamics in equation
771
+
{eq}`eq:Xdynamicstrue`.
692
772
693
773
694
774
Conditional on $X_t$, we construct forecasts $\check X_{t+j} $ of $X_{t+j}, j = 1, 2, \ldots, $ from
@@ -698,25 +778,12 @@ $$
698
778
$$
699
779
700
780
701
-
### Useful Connections
702
-
703
-
From formula {eq}`eq:Phiformula`, notice that
704
-
705
-
$$
706
-
\begin{aligned}
707
-
A \Phi & = (X' \tilde V \tilde \Sigma^{-1} \tilde U^T) (X' \tilde V \tilde \Sigma^{-1} W) \cr
708
-
& = X' \tilde V \Sigma^{-1} \tilde A W \cr
709
-
& = X' \tilde V \tilde \Sigma^{-1} W \Lambda \cr
710
-
& = \Phi \Lambda
711
-
\end{aligned}
712
-
$$
713
-
714
781
715
782
716
783
## Reduced-order VAR
717
784
718
785
DMD is a natural tool for estimating a **reduced order vector autoregression**,
719
-
an object that we define in terms of the populations regression equation
786
+
an object that we define in terms of the population regression equation
0 commit comments