Practical overview
When it fits
Use it when a Python workflow needs reconstruction-error signals for time-series anomaly analysis or compact latent representations for downstream analysis.
Who it is for
- Developers building time-series reconstruction or anomaly-analysis workflows.
- Analysts seeking latent representations of time-series sequences for downstream work.
Documented uses
- Preprocess and normalize time-series data, replacing NaN values with zero.
- Fit an LSTM variational autoencoder to time-series input.
- Retrieve reconstructed sequences and squared reconstruction errors.
- Reduce sequences to latent-space representations for further analysis.
Requirements & limits
- The documented preprocessing helper normalizes input and replaces NaN values with zero.
- The model example supports stateful mode, while the documented default is stateless.
- The README returns squared reconstruction error but does not define thresholds or an evaluation procedure.
- The repository is Python-based, references TensorFlow's Adam optimizer, and specifies an MIT license.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Fit the model and obtain reconstruction errors
Prepare time-series input, fit the LSTM variational autoencoder, and retrieve reconstructed data with squared errors.
Before you start
- Python environment with the library installed using the README's pip command.
- A time-series dataframe prepared as 3D input shaped by timesteps and dimensions.
Steps
Install from the documented Git repository with the command below.
pip install --upgrade git+https://github.com/Danyleb/Lstm-Variational-Auto-encoder.gitImport
LSTM_Var_AutoencoderandpreprocessfromLstmVAE.Call
preprocess(df)to normalize the dataframe and replace NaN values with zero, then reshape it to(-1, timesteps, n_dim).Create the model and call
fitwith the data and training parameters.Call
vae.reconstruct(df, get_error=True)to obtain reconstructed data and squared reconstruction error.
Expected outcome
Reconstructed time-series data and squared reconstruction errors that can be considered as an anomaly-scoring signal.
Guide limitations
- The README does not specify anomaly thresholds or evaluation procedures.
- The example references
tf.train.AdamOptimizerbut does not document a TensorFlow version or installation command.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 19 November 2026
- Original website title
- TimyadNyda/Variational-Lstm-Autoencoder · Official homepage title · retained in its source language

