Autoencoders
We use the autoencoder introduced in [1]. We assume an orthogonal matrix $\boldsymbol{U}\in\mathbb{R}^{n\times\nu}$ ($\boldsymbol{U}^{T}\boldsymbol{U}=\boldsymbol{I}$), a polynomial $\boldsymbol{W}:\mathbb{R}^\nu\to \mathbb{R}^n$ that starts with quadratic terms up to order $d$. The encoder is the linear map $\boldsymbol{U}^T$ and the decoder is
\[\boldsymbol{W}\left(\boldsymbol{z}\right)=\boldsymbol{U}\boldsymbol{z}+\boldsymbol{W}\left(\boldsymbol{z}\right).\]
To find the autoencoder we first solve
\[\arg\min_{\boldsymbol{U},\boldsymbol{W}}\sum_{k=1}^{N}\left\Vert \boldsymbol{y}_{k}\right\Vert ^{-2}\left\Vert \boldsymbol{W}\left(\boldsymbol{U}\left(\boldsymbol{y}_{k}\right)\right)-\boldsymbol{y}_{k}\right\Vert ^{2}.\]
then solve
\[\arg\min_{\boldsymbol{S}}\sum_{k=1}^{N}\left\Vert \boldsymbol{x}_{k}\right\Vert ^{-2}\left\Vert \boldsymbol{W}\left(\boldsymbol{S}\left(\boldsymbol{U}\left(\boldsymbol{x}_{k}\right)\right)\right)-\boldsymbol{y}_{k}\right\Vert ^{2}.\]
The methods are
FoliationsManifoldsAutoencoders.AENCManifold — TypeM = AENCManifold(ndim, mdim, Sorder, Worder, orthogonal = true, field::AbstractNumbers=ℝ)Creates an autoencoder as a matrix manifold.
The parameters are
ndimthe dimansionality of the problem $\boldsymbol{F}$mdimdimensionality of the low-dimensional map $\boldsymbol{S}$Sorderpolynomial order of map $\boldsymbol{S}$Worderpolynomial order of decoder $\boldsymbol{W}$orthogonalwhether $D\boldsymbol{W}(0)$ is orthogonal to $\boldsymbol{U}$. When the data is on a manifoldtrueis the good answer.
Base.zero — MethodX = zero(M::AENCManifold)Creates a zero valued representation of an autoencoder.
FoliationsManifoldsAutoencoders.AENCIndentify — FunctionAENCIndentify(dataIN, dataOUT, Tstep, embedscales, freq, orders = (S=7,W=7))Input:
dataINis a two dimensional array, each column is an $\boldsymbol{x}_k$ value,dataOUTis a two dimensional array, each column is an $\boldsymbol{y}_k$Tstepis the time step between $\boldsymbol{x}_k$ and $\boldsymbol{y}_k$embedscales, denoted by $\boldsymbol{w}$ is a matrix applied to $\boldsymbol{x}_k$, $\boldsymbol{y}_k$, used to calculate the amplitude of a signalfreqis the frequency that the invariant foliation is calculated for.ordersis a named tuple, specifies the polynomial order of $\boldsymbol{S}$ and $\boldsymbol{W}$.
Output is a tuple with elements
- vector of instantaneous frequencies
- vector of instantaneous damping
- vector of instantaneous amplitudes
- the scaling factor that was used to fit all data into the unit ball
- uncorrected vector of instantaneous frequencies
- uncorrected vector of instantaneous damping
- uncorrected vector of instantaneous amplitudes
- 1M. Cenedese, J. Axås, B. Bäuerlein, K. Avila, and G. Haller. Data-driven modeling and prediction of non-linearizable dynamics via spectral submanifolds. Nat Commun, 13(872), 2022.