Skip to content

decisionintelligence/TimeMAR

Repository files navigation

TimeMAR

muti-scale

Stage 0: Environment Setup

The code has been tested in the following environment:

Package Version
Python 3.8
PyTorch 2.5.1
CUDA 12.1
PyTorch Geometric 2.6.1
TensorFlow 2.13.1
NumPy 1.24.3

Install

# Create and activate the environment
conda create -n timemar python=3.10 -y
conda activate timemar

# Install dependencies
pip install -r requirements.txt

Stage 1: Train VQ-VAE

The trained model checkpoints will be saved in a directory such as log/vq_stock/version_0/checkpoints.

python train_vqvae.py

Stage 2: Train Autoregressive (AR) Model

Set the path to the trained VQ-VAE model in the load_dir field of the configuration file configs/train_var_stock.yaml.

python train_ar.py

Stage 3: Manually Generate Data

Specify the path to the trained VQ-VAE model in the var_path: load_dir field of configs/train_sample_stock.yaml. The generated data will be saved in a directory like output/stock/generated_samples/24/.

python sample.py

Stage 4: Evaluation

Evaluate the quality of the generated data.

Pass the path to the generated data as the second argument to the eval() function in eval.py.

# Inside eval.py
eval("stock", "output/stock/generated_samples/24/20xx-xx-xx_xx-xx-xx/manual_generate.npy")

python eval.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages