VeloVAE benchmark on dyngen data#

Notebook benchmarks velocity and latent time inference using VeloVAE on dyngen-generated data.

Library imports#

import velovae as vv

import numpy as np
import pandas as pd
import torch

import anndata as ad
import scvelo as scv

from rgv_tools import DATA_DIR
from rgv_tools.benchmarking import get_velocity_correlation
/home/icb/yifan.chen/miniconda3/envs/regvelo-py310-velovae/lib/python3.10/site-packages/velovae/model/model_util.py:12: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)
  from tqdm.autonotebook import trange

General settings#

scv.settings.verbosity = 3

Constants#

torch.manual_seed(0)
np.random.seed(0)
DATASET = "dyngen"
COMPLEXITY = "complexity_1"
SAVE_DATA = True
if SAVE_DATA:
    (DATA_DIR / DATASET / COMPLEXITY / "results").mkdir(parents=True, exist_ok=True)
    (DATA_DIR / DATASET / COMPLEXITY / "processed" / "velovae_vae").mkdir(parents=True, exist_ok=True)
SAVE_DATASETS = True
if SAVE_DATASETS:
    (DATA_DIR / DATASET / COMPLEXITY / "trained_velovae").mkdir(parents=True, exist_ok=True)

Define functions#

Velocity pipeline#

velocity_correlation = []

cnt = 0
for filename in (DATA_DIR / DATASET / COMPLEXITY / "processed").iterdir():
    if filename.suffix != ".zarr":
        continue

    print(f"Run {cnt}, file {filename}.")
    adata = ad.io.read_zarr(filename)

    try:
        vae = vv.VAE(adata, tmax=20, dim_z=5, device="cuda:0")
        config = {}
        vae.train(adata, config=config, plot=False, embed="pca")

        simulation_id = int(filename.stem.removeprefix("simulation_"))
        # Output velocity to adata object
        vae.save_anndata(
            adata,
            "vae",
            DATA_DIR / DATASET / COMPLEXITY / "processed" / "velovae_vae",
            file_name=f"velovae_{simulation_id}.h5ad",
        )

        adata.layers["velocity"] = adata.layers["vae_velocity"].copy()

        # save data
        adata.write_zarr(DATA_DIR / DATASET / COMPLEXITY / "trained_velovae" / f"trained_{simulation_id}.zarr")

        velocity_correlation.append(
            get_velocity_correlation(
                ground_truth=adata.layers["true_velocity"], estimated=adata.layers["velocity"], aggregation=np.mean
            )
        )

    except Exception as e:  # noqa: BLE001
        # Append np.nan in case of an error and optionally log the error
        print(f"An error occurred: {e}")
        velocity_correlation.append(np.nan)

    cnt += 1
Run 0, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_29.zarr.
Estimating ODE parameters...
Detected 347 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
KS-test result: [1. 1. 1.]
Assign cluster 1 to repressive
Initial induction: 245, repression: 117/362
Learning Rate based on Data Sparsity: 0.0003
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.164
Average Set Size: 19
*********     Round 1: Early Stop Triggered at epoch 1191.    *********
Change in noise variance: 0.0419
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1233.    *********
Change in noise variance: 0.0041
Change in x0: 0.1819
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1250.    *********
Change in noise variance: 0.0002
Change in x0: 0.1166
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1297.    *********
Change in noise variance: 0.0000
Change in x0: 0.0842
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1378.    *********
Change in noise variance: 0.0000
Change in x0: 0.0746
*********             Velocity Refinement Round 6             *********
Stage 2: Early Stop Triggered at round 5.
*********              Finished. Total Time =   0 h :  1 m : 47 s             *********
Final: Train ELBO = 654.883,	Test ELBO = 673.499
Run 1, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_14.zarr.
Estimating ODE parameters...
Detected 594 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.48, 0.8228239539949498), (0.52, 0.3684353137855576)
KS-test result: [0. 1. 1.]
Initial induction: 484, repression: 180/664
Learning Rate based on Data Sparsity: 0.0001
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.135
Average Set Size: 21
Change in noise variance: 0.0454
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1666.    *********
Change in noise variance: 0.0104
Change in x0: 0.3318
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1695.    *********
Change in noise variance: 0.0040
Change in x0: 0.1521
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1781.    *********
Change in noise variance: 0.0003
Change in x0: 0.0980
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1823.    *********
Change in noise variance: 0.0000
Change in x0: 0.0849
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 1830.    *********
Change in noise variance: 0.0000
Change in x0: 0.0753
*********             Velocity Refinement Round 7             *********
Stage 2: Early Stop Triggered at round 6.
*********              Finished. Total Time =   0 h :  1 m : 59 s             *********
Final: Train ELBO = 1142.203,	Test ELBO = 1116.971
Run 2, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_24.zarr.
Estimating ODE parameters...
Detected 461 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.59, 0.7142859350405649), (0.41, 0.232624469824922)
(0.52, 0.8547149661103973), (0.48, 0.31938394948827814)
KS-test result: [0. 0. 1.]
Initial induction: 431, repression: 295/726
Learning Rate based on Data Sparsity: 0.0000
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********       Stage 1: Early Stop Triggered at epoch 11.       *********
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.025
Average Set Size: 21
*********     Round 1: Early Stop Triggered at epoch 20.    *********
Change in noise variance: 0.2642
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 29.    *********
Change in noise variance: 0.0016
Change in x0: 0.6228
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 38.    *********
Change in noise variance: 0.0016
Change in x0: 0.4855
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 47.    *********
Change in noise variance: 0.0026
Change in x0: 0.4046
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 56.    *********
Change in noise variance: 0.0012
Change in x0: 0.3558
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 65.    *********
Change in noise variance: 0.0011
Change in x0: 0.3274
*********             Velocity Refinement Round 7             *********
*********     Round 7: Early Stop Triggered at epoch 72.    *********
Change in noise variance: 0.0010
Change in x0: 0.2973
*********             Velocity Refinement Round 8             *********
*********     Round 8: Early Stop Triggered at epoch 79.    *********
Change in noise variance: 0.0003
Change in x0: 0.2888
*********             Velocity Refinement Round 9             *********
Stage 2: Early Stop Triggered at round 8.
*********              Finished. Total Time =   0 h :  0 m :  8 s             *********
Final: Train ELBO = -31128.336,	Test ELBO = -31582.387
Run 3, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_28.zarr.
Estimating ODE parameters...
Detected 535 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.39, 0.3808448852305928), (0.61, 0.852512757686449)
(0.46, 0.3875805469813231), (0.54, 0.7668672821296293)
KS-test result: [0. 0. 1.]
Initial induction: 374, repression: 190/564
Learning Rate based on Data Sparsity: 0.0002
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.007
Average Set Size: 23
Change in noise variance: 0.0395
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1847.    *********
Change in noise variance: 0.0096
Change in x0: 0.2670
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 2104.    *********
Change in noise variance: 0.0036
Change in x0: 0.1643
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 2213.    *********
Change in noise variance: 0.0018
Change in x0: 0.1284
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 2364.    *********
Change in noise variance: 0.0004
Change in x0: 0.0907
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 2376.    *********
Change in noise variance: 0.0000
Change in x0: 0.0838
*********             Velocity Refinement Round 7             *********
Stage 2: Early Stop Triggered at round 6.
*********              Finished. Total Time =   0 h :  2 m : 32 s             *********
Final: Train ELBO = 1098.636,	Test ELBO = 1062.302
Run 4, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_6.zarr.
Estimating ODE parameters...
Detected 537 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.62, 0.8793261681749559), (0.38, 0.26633114834984656)
(0.47, 0.7331318775651423), (0.53, 0.2511832966547218)
(0.47, 0.2994057734262461), (0.53, 0.8553113871195344)
KS-test result: [0. 0. 0.]
Initial induction: 404, repression: 343/747
Learning Rate based on Data Sparsity: 0.0000
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.024
Average Set Size: 20
Change in noise variance: 0.2037
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1512.    *********
Change in noise variance: 0.0084
Change in x0: 0.7214
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1528.    *********
Change in noise variance: 0.0040
Change in x0: 0.5676
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1547.    *********
Change in noise variance: 0.0035
Change in x0: 0.4990
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1566.    *********
Change in noise variance: 0.0042
Change in x0: 0.4276
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 1595.    *********
Change in noise variance: 0.0011
Change in x0: 0.3162
*********             Velocity Refinement Round 7             *********
*********     Round 7: Early Stop Triggered at epoch 1611.    *********
Change in noise variance: 0.0008
Change in x0: 0.2840
*********             Velocity Refinement Round 8             *********
*********     Round 8: Early Stop Triggered at epoch 1618.    *********
Change in noise variance: 0.0000
Change in x0: 0.2915
*********             Velocity Refinement Round 9             *********
Stage 2: Early Stop Triggered at round 8.
*********              Finished. Total Time =   0 h :  1 m : 47 s             *********
Final: Train ELBO = -1432.376,	Test ELBO = -1487.912
Run 5, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_21.zarr.
Estimating ODE parameters...
Detected 398 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.49, 0.2987033192902373), (0.51, 0.7362158867554179)
KS-test result: [1. 1. 0.]
Initial induction: 334, repression: 127/461
Learning Rate based on Data Sparsity: 0.0001
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.114
Average Set Size: 25
Change in noise variance: 0.0569
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1676.    *********
Change in noise variance: 0.0147
Change in x0: 0.4295
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1742.    *********
Change in noise variance: 0.0055
Change in x0: 0.2779
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1771.    *********
Change in noise variance: 0.0025
Change in x0: 0.1631
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1783.    *********
Change in noise variance: 0.0011
Change in x0: 0.0995
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 1804.    *********
Change in noise variance: 0.0003
Change in x0: 0.0861
*********             Velocity Refinement Round 7             *********
*********     Round 7: Early Stop Triggered at epoch 1815.    *********
Change in noise variance: 0.0000
Change in x0: 0.0890
*********             Velocity Refinement Round 8             *********
Stage 2: Early Stop Triggered at round 7.
*********              Finished. Total Time =   0 h :  1 m : 55 s             *********
Final: Train ELBO = 632.827,	Test ELBO = 593.622
Run 6, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_15.zarr.
Estimating ODE parameters...
Detected 404 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.62, 0.8595902088131244), (0.38, 0.34409679076346833)
(0.53, 0.3502039273194398), (0.47, 0.8163727115188388)
KS-test result: [0. 1. 0.]
Initial induction: 300, repression: 144/444
Learning Rate based on Data Sparsity: 0.0002
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.220
Average Set Size: 21
*********     Round 1: Early Stop Triggered at epoch 1352.    *********
Change in noise variance: 0.0521
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1429.    *********
Change in noise variance: 0.0083
Change in x0: 0.2646
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1495.    *********
Change in noise variance: 0.0010
Change in x0: 0.1430
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1609.    *********
Change in noise variance: 0.0000
Change in x0: 0.1098
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1665.    *********
Change in noise variance: 0.0000
Change in x0: 0.0940
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 1681.    *********
Change in noise variance: 0.0000
Change in x0: 0.0764
*********             Velocity Refinement Round 7             *********
*********     Round 7: Early Stop Triggered at epoch 1697.    *********
Change in noise variance: 0.0000
Change in x0: 0.0643
*********             Velocity Refinement Round 8             *********
*********     Round 8: Early Stop Triggered at epoch 1704.    *********
Change in noise variance: 0.0000
Change in x0: 0.0651
*********             Velocity Refinement Round 9             *********
Stage 2: Early Stop Triggered at round 8.
*********              Finished. Total Time =   0 h :  1 m : 48 s             *********
Final: Train ELBO = 557.378,	Test ELBO = 551.038
Run 7, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_9.zarr.
Estimating ODE parameters...
Detected 335 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.48, 0.37222433101870206), (0.52, 0.7806380011489331)
KS-test result: [1. 0. 1.]
Initial induction: 263, repression: 97/360
Learning Rate based on Data Sparsity: 0.0003
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.143
Average Set Size: 19
*********     Round 1: Early Stop Triggered at epoch 1302.    *********
Change in noise variance: 0.0255
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1351.    *********
Change in noise variance: 0.0049
Change in x0: 0.2328
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1358.    *********
Change in noise variance: 0.0005
Change in x0: 0.1610
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1407.    *********
Change in noise variance: 0.0000
Change in x0: 0.1327
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1436.    *********
Change in noise variance: 0.0000
Change in x0: 0.1027
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 1462.    *********
Change in noise variance: 0.0000
Change in x0: 0.0815
*********             Velocity Refinement Round 7             *********
*********     Round 7: Early Stop Triggered at epoch 1531.    *********
Change in noise variance: 0.0000
Change in x0: 0.0733
*********             Velocity Refinement Round 8             *********
Stage 2: Early Stop Triggered at round 7.
*********              Finished. Total Time =   0 h :  1 m : 37 s             *********
Final: Train ELBO = 459.266,	Test ELBO = 449.352
Run 8, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_12.zarr.
Estimating ODE parameters...
Detected 387 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.59, 0.8421974990559944), (0.41, 0.31546207430654916)
(0.58, 0.7390920693790617), (0.42, 0.1625623840425744)
(0.42, 0.2930600982138266), (0.58, 0.8332787740830282)
KS-test result: [0. 0. 0.]
Initial induction: 310, repression: 205/515
Learning Rate based on Data Sparsity: 0.0000
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 5, test iteration: 8
*********       Stage 1: Early Stop Triggered at epoch 10.       *********
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.037
Average Set Size: 17
*********     Round 1: Early Stop Triggered at epoch 19.    *********
Change in noise variance: 0.1936
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 28.    *********
Change in noise variance: 0.0023
Change in x0: 0.7023
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 37.    *********
Change in noise variance: 0.0007
Change in x0: 0.5262
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 46.    *********
Change in noise variance: 0.0000
Change in x0: 0.4196
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 55.    *********
Change in noise variance: 0.0000
Change in x0: 0.4146
*********             Velocity Refinement Round 6             *********
Stage 2: Early Stop Triggered at round 5.
*********              Finished. Total Time =   0 h :  0 m :  5 s             *********
Final: Train ELBO = -27358.754,	Test ELBO = -28505.131
Run 9, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_19.zarr.
Estimating ODE parameters...
Detected 244 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.46, 0.3700403220994146), (0.54, 0.8355761602987493)
(0.60, 0.33766490672002036), (0.40, 0.7567183237756051)
KS-test result: [0. 1. 0.]
Initial induction: 164, repression: 102/266
Learning Rate based on Data Sparsity: 0.0002
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********       Stage 1: Early Stop Triggered at epoch 961.       *********
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.184
Average Set Size: 18
*********     Round 1: Early Stop Triggered at epoch 1225.    *********
Change in noise variance: 0.0385
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1339.    *********
Change in noise variance: 0.0067
Change in x0: 0.2580
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1375.    *********
Change in noise variance: 0.0008
Change in x0: 0.1442
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1419.    *********
Change in noise variance: 0.0000
Change in x0: 0.0971
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1481.    *********
Change in noise variance: 0.0000
Change in x0: 0.0885
*********             Velocity Refinement Round 6             *********
Stage 2: Early Stop Triggered at round 5.
*********              Finished. Total Time =   0 h :  1 m : 31 s             *********
Final: Train ELBO = 365.056,	Test ELBO = 356.861
Run 10, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_4.zarr.
Estimating ODE parameters...
Detected 454 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.59, 0.8009445508520957), (0.41, 0.36772632850943016)
KS-test result: [1. 0. 1.]
Initial induction: 368, repression: 111/479
Learning Rate based on Data Sparsity: 0.0003
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.065
Average Set Size: 19
*********     Round 1: Early Stop Triggered at epoch 1256.    *********
Change in noise variance: 0.0416
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1355.    *********
Change in noise variance: 0.0024
Change in x0: 0.2478
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1407.    *********
Change in noise variance: 0.0004
Change in x0: 0.1373
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1414.    *********
Change in noise variance: 0.0000
Change in x0: 0.1096
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1445.    *********
Change in noise variance: 0.0000
Change in x0: 0.1031
*********             Velocity Refinement Round 6             *********
Stage 2: Early Stop Triggered at round 5.
*********              Finished. Total Time =   0 h :  1 m : 33 s             *********
Final: Train ELBO = 909.189,	Test ELBO = 917.505
Run 11, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_13.zarr.
Estimating ODE parameters...
Detected 502 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
KS-test result: [1. 1. 1.]
Assign cluster 0 to repressive
Initial induction: 315, repression: 199/514
Learning Rate based on Data Sparsity: 0.0004
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.127
Average Set Size: 19
*********     Round 1: Early Stop Triggered at epoch 1362.    *********
Change in noise variance: 0.0470
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1486.    *********
Change in noise variance: 0.0043
Change in x0: 0.2202
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1523.    *********
Change in noise variance: 0.0005
Change in x0: 0.1088
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1570.    *********
Change in noise variance: 0.0000
Change in x0: 0.0795
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 2031.    *********
Change in noise variance: 0.0000
Change in x0: 0.0610
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 2065.    *********
Change in noise variance: 0.0000
Change in x0: 0.1082
*********             Velocity Refinement Round 7             *********
Stage 2: Early Stop Triggered at round 6.
*********              Finished. Total Time =   0 h :  2 m : 10 s             *********
Final: Train ELBO = 1062.135,	Test ELBO = 1038.165
Run 12, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_2.zarr.
Estimating ODE parameters...
Detected 424 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.63, 0.7924425318102936), (0.37, 0.25047287353531905)
(0.32, 0.39095042714182476), (0.68, 0.9377617670621354)
(0.51, 0.35416668477069335), (0.49, 0.8927600435275674)
KS-test result: [0. 0. 0.]
Initial induction: 431, repression: 259/690
Learning Rate based on Data Sparsity: 0.0000
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.028
Average Set Size: 21
*********     Round 1: Early Stop Triggered at epoch 1009.    *********
Change in noise variance: 0.2019
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1018.    *********
Change in noise variance: 0.0068
Change in x0: 0.9346
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1027.    *********
Change in noise variance: 0.0025
Change in x0: 0.6240
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1036.    *********
Change in noise variance: 0.0014
Change in x0: 0.4430
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1043.    *********
Change in noise variance: 0.0009
Change in x0: 0.3600
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 1050.    *********
Change in noise variance: 0.0000
Change in x0: 0.2929
*********             Velocity Refinement Round 7             *********
*********     Round 7: Early Stop Triggered at epoch 1057.    *********
Change in noise variance: 0.0000
Change in x0: 0.2684
*********             Velocity Refinement Round 8             *********
*********     Round 8: Early Stop Triggered at epoch 1064.    *********
Change in noise variance: 0.0000
Change in x0: 0.2134
*********             Velocity Refinement Round 9             *********
*********     Round 9: Early Stop Triggered at epoch 1071.    *********
Change in noise variance: 0.0000
Change in x0: 0.2112
*********             Velocity Refinement Round 10             *********
Stage 2: Early Stop Triggered at round 9.
*********              Finished. Total Time =   0 h :  1 m : 13 s             *********
Final: Train ELBO = -1478.288,	Test ELBO = -1538.980
Run 13, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_16.zarr.
Estimating ODE parameters...
Detected 481 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
KS-test result: [1. 1. 1.]
Assign cluster 1 to repressive
Initial induction: 325, repression: 211/536
Learning Rate based on Data Sparsity: 0.0002
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********       Stage 1: Early Stop Triggered at epoch 729.       *********
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.069
Average Set Size: 20
Change in noise variance: 0.0514
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1525.    *********
Change in noise variance: 0.0086
Change in x0: 0.2753
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1859.    *********
Change in noise variance: 0.0018
Change in x0: 0.1641
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1908.    *********
Change in noise variance: 0.0011
Change in x0: 0.1540
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1972.    *********
Change in noise variance: 0.0003
Change in x0: 0.1131
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 2159.    *********
Change in noise variance: 0.0000
Change in x0: 0.1023
*********             Velocity Refinement Round 7             *********
*********     Round 7: Early Stop Triggered at epoch 2445.    *********
Change in noise variance: 0.0000
Change in x0: 0.0898
*********             Velocity Refinement Round 8             *********
*********     Round 8: Early Stop Triggered at epoch 2641.    *********
Change in noise variance: 0.0000
Change in x0: 0.0932
*********             Velocity Refinement Round 9             *********
Stage 2: Early Stop Triggered at round 8.
*********              Finished. Total Time =   0 h :  2 m : 44 s             *********
Final: Train ELBO = 1187.731,	Test ELBO = 1172.693
Run 14, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_1.zarr.
Estimating ODE parameters...
Detected 345 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
KS-test result: [1. 1. 1.]
Assign cluster 1 to repressive
Initial induction: 232, repression: 136/368
Learning Rate based on Data Sparsity: 0.0004
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********       Stage 1: Early Stop Triggered at epoch 989.       *********
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.033
Average Set Size: 21
*********     Round 1: Early Stop Triggered at epoch 1208.    *********
Change in noise variance: 0.0488
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1290.    *********
Change in noise variance: 0.0030
Change in x0: 0.2512
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1311.    *********
Change in noise variance: 0.0003
Change in x0: 0.1324
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1683.    *********
Change in noise variance: 0.0000
Change in x0: 0.0933
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1847.    *********
Change in noise variance: 0.0000
Change in x0: 0.1614
*********             Velocity Refinement Round 6             *********
Stage 2: Early Stop Triggered at round 5.
*********              Finished. Total Time =   0 h :  1 m : 56 s             *********
Final: Train ELBO = 710.677,	Test ELBO = 692.182
Run 15, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_18.zarr.
Estimating ODE parameters...
Detected 327 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.51, 0.3274513378440137), (0.49, 0.8157796920163066)
KS-test result: [1. 1. 0.]
Initial induction: 264, repression: 100/364
Learning Rate based on Data Sparsity: 0.0002
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********       Stage 1: Early Stop Triggered at epoch 914.       *********
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.031
Average Set Size: 20
Change in noise variance: 0.0569
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1518.    *********
Change in noise variance: 0.0049
Change in x0: 0.2009
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1917.    *********
Change in noise variance: 0.0007
Change in x0: 0.1196
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 2044.    *********
Change in noise variance: 0.0000
Change in x0: 0.1261
*********             Velocity Refinement Round 5             *********
Stage 2: Early Stop Triggered at round 4.
*********              Finished. Total Time =   0 h :  2 m :  7 s             *********
Final: Train ELBO = 840.124,	Test ELBO = 827.789
Run 16, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_5.zarr.
Estimating ODE parameters...
Detected 262 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
KS-test result: [1. 1. 1.]
Assign cluster 1 to repressive
Initial induction: 182, repression: 100/282
Learning Rate based on Data Sparsity: 0.0003
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********       Stage 1: Early Stop Triggered at epoch 601.       *********
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.227
Average Set Size: 20
*********     Round 1: Early Stop Triggered at epoch 1045.    *********
Change in noise variance: 0.0318
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1059.    *********
Change in noise variance: 0.0019
Change in x0: 0.4882
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1078.    *********
Change in noise variance: 0.0017
Change in x0: 0.1529
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1099.    *********
Change in noise variance: 0.0003
Change in x0: 0.0886
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1305.    *********
Change in noise variance: 0.0000
Change in x0: 0.2280
*********             Velocity Refinement Round 6             *********
Stage 2: Early Stop Triggered at round 5.
*********              Finished. Total Time =   0 h :  1 m : 22 s             *********
Final: Train ELBO = 262.477,	Test ELBO = 261.926
Run 17, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_10.zarr.
Estimating ODE parameters...
Detected 306 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.44, 0.21427183785803913), (0.56, 0.8053766111264617)
(0.65, 0.8997967816308998), (0.35, 0.35802780150367175)
KS-test result: [0. 1. 0.]
Initial induction: 379, repression: 169/548
Learning Rate based on Data Sparsity: 0.0000
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.029
Average Set Size: 20
*********     Round 1: Early Stop Triggered at epoch 1009.    *********
Change in noise variance: 0.2133
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1018.    *********
Change in noise variance: 0.0067
Change in x0: 0.7306
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1027.    *********
Change in noise variance: 0.0089
Change in x0: 0.5376
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1036.    *********
Change in noise variance: 0.0057
Change in x0: 0.4030
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1043.    *********
Change in noise variance: 0.0064
Change in x0: 0.3287
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 1050.    *********
Change in noise variance: 0.0031
Change in x0: 0.2895
*********             Velocity Refinement Round 7             *********
*********     Round 7: Early Stop Triggered at epoch 1057.    *********
Change in noise variance: 0.0031
Change in x0: 0.2429
*********             Velocity Refinement Round 8             *********
*********     Round 8: Early Stop Triggered at epoch 1064.    *********
Change in noise variance: 0.0017
Change in x0: 0.2363
*********             Velocity Refinement Round 9             *********
*********     Round 9: Early Stop Triggered at epoch 1071.    *********
Change in noise variance: 0.0014
Change in x0: 0.2246
*********             Velocity Refinement Round 10             *********
*********     Round 10: Early Stop Triggered at epoch 1078.    *********
Change in noise variance: 0.0008
Change in x0: 0.2162
*********             Velocity Refinement Round 11             *********
Stage 2: Early Stop Triggered at round 10.
*********              Finished. Total Time =   0 h :  1 m : 13 s             *********
Final: Train ELBO = -1537.967,	Test ELBO = -1512.033
Run 18, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_8.zarr.
Estimating ODE parameters...
Detected 397 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
KS-test result: [1. 1. 1.]
Assign cluster 0 to repressive
Initial induction: 295, repression: 167/462
Learning Rate based on Data Sparsity: 0.0003
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.038
Average Set Size: 20
*********     Round 1: Early Stop Triggered at epoch 1459.    *********
Change in noise variance: 0.0892
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1600.    *********
Change in noise variance: 0.0031
Change in x0: 0.2566
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1821.    *********
Change in noise variance: 0.0007
Change in x0: 0.1425
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1865.    *********
Change in noise variance: 0.0000
Change in x0: 0.1244
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1916.    *********
Change in noise variance: 0.0000
Change in x0: 0.0953
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 1923.    *********
Change in noise variance: 0.0000
Change in x0: 0.0927
*********             Velocity Refinement Round 7             *********
Stage 2: Early Stop Triggered at round 6.
*********              Finished. Total Time =   0 h :  2 m :  1 s             *********
Final: Train ELBO = 1106.349,	Test ELBO = 1071.547
Run 19, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_11.zarr.
Estimating ODE parameters...
Detected 346 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.59, 0.8267164296804612), (0.41, 0.36831379905588)
KS-test result: [1. 0. 1.]
Initial induction: 291, repression: 86/377
Learning Rate based on Data Sparsity: 0.0002
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.125
Average Set Size: 18
*********     Round 1: Early Stop Triggered at epoch 1132.    *********
Change in noise variance: 0.0286
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1239.    *********
Change in noise variance: 0.0029
Change in x0: 0.2223
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1278.    *********
Change in noise variance: 0.0002
Change in x0: 0.1391
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1312.    *********
Change in noise variance: 0.0000
Change in x0: 0.1183
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1344.    *********
Change in noise variance: 0.0000
Change in x0: 0.1031
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 1366.    *********
Change in noise variance: 0.0000
Change in x0: 0.0939
*********             Velocity Refinement Round 7             *********
Stage 2: Early Stop Triggered at round 6.
*********              Finished. Total Time =   0 h :  1 m : 28 s             *********
Final: Train ELBO = 550.957,	Test ELBO = 563.557
Run 20, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_27.zarr.
Estimating ODE parameters...
Detected 320 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.39, 0.28728312975125536), (0.61, 0.8005818061651941)
KS-test result: [0. 1. 1.]
Initial induction: 289, repression: 92/381
Learning Rate based on Data Sparsity: 0.0002
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.036
Average Set Size: 20
Change in noise variance: 0.0573
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1536.    *********
Change in noise variance: 0.0049
Change in x0: 0.2369
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1585.    *********
Change in noise variance: 0.0007
Change in x0: 0.1714
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1681.    *********
Change in noise variance: 0.0000
Change in x0: 0.1328
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1827.    *********
Change in noise variance: 0.0000
Change in x0: 0.1237
*********             Velocity Refinement Round 6             *********
Stage 2: Early Stop Triggered at round 5.
*********              Finished. Total Time =   0 h :  1 m : 54 s             *********
Final: Train ELBO = 775.249,	Test ELBO = 746.095
Run 21, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_23.zarr.
Estimating ODE parameters...
Detected 326 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.51, 0.7911187894111076), (0.49, 0.37965464284669165)
KS-test result: [1. 1. 0.]
Initial induction: 264, repression: 95/359
Learning Rate based on Data Sparsity: 0.0003
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.137
Average Set Size: 19
*********     Round 1: Early Stop Triggered at epoch 1182.    *********
Change in noise variance: 0.0355
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1253.    *********
Change in noise variance: 0.0048
Change in x0: 0.2276
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1272.    *********
Change in noise variance: 0.0002
Change in x0: 0.1262
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1321.    *********
Change in noise variance: 0.0000
Change in x0: 0.1141
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1375.    *********
Change in noise variance: 0.0000
Change in x0: 0.1160
*********             Velocity Refinement Round 6             *********
Stage 2: Early Stop Triggered at round 5.
*********              Finished. Total Time =   0 h :  1 m : 28 s             *********
Final: Train ELBO = 580.190,	Test ELBO = 578.865
Run 22, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_17.zarr.
Estimating ODE parameters...
Detected 410 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
KS-test result: [1. 1. 1.]
Assign cluster 1 to repressive
Initial induction: 284, repression: 166/450
Learning Rate based on Data Sparsity: 0.0004
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********       Stage 1: Early Stop Triggered at epoch 929.       *********
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.085
Average Set Size: 21
Change in noise variance: 0.0638
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1563.    *********
Change in noise variance: 0.0052
Change in x0: 0.2409
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1650.    *********
Change in noise variance: 0.0008
Change in x0: 0.1132
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1742.    *********
Change in noise variance: 0.0000
Change in x0: 0.0787
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1943.    *********
Change in noise variance: 0.0000
Change in x0: 0.0693
*********             Velocity Refinement Round 6             *********
Stage 2: Early Stop Triggered at round 5.
*********              Finished. Total Time =   0 h :  2 m :  2 s             *********
Final: Train ELBO = 1014.536,	Test ELBO = 966.167
Run 23, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_30.zarr.
Estimating ODE parameters...
Detected 404 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.64, 0.7874540650534966), (0.36, 0.30795453403738815)
(0.67, 0.8559480355355736), (0.33, 0.3295921295742867)
KS-test result: [0. 0. 1.]
Initial induction: 337, repression: 128/465
Learning Rate based on Data Sparsity: 0.0000
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.018
Average Set Size: 20
*********     Round 1: Early Stop Triggered at epoch 1251.    *********
Change in noise variance: 0.0485
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1260.    *********
Change in noise variance: 0.0175
Change in x0: 0.2811
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1291.    *********
Change in noise variance: 0.0027
Change in x0: 0.2276
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1313.    *********
Change in noise variance: 0.0011
Change in x0: 0.2062
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1320.    *********
Change in noise variance: 0.0012
Change in x0: 0.1882
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 1346.    *********
Change in noise variance: 0.0013
Change in x0: 0.1566
*********             Velocity Refinement Round 7             *********
*********     Round 7: Early Stop Triggered at epoch 1353.    *********
Change in noise variance: 0.0010
Change in x0: 0.1529
*********             Velocity Refinement Round 8             *********
*********     Round 8: Early Stop Triggered at epoch 1374.    *********
Change in noise variance: 0.0009
Change in x0: 0.1473
*********             Velocity Refinement Round 9             *********
Stage 2: Early Stop Triggered at round 8.
*********              Finished. Total Time =   0 h :  1 m : 29 s             *********
Final: Train ELBO = -42.097,	Test ELBO = -73.044
Run 24, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_22.zarr.
Estimating ODE parameters...
Detected 393 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.66, 0.7192424805256069), (0.34, 0.29799031256004654)
KS-test result: [0. 1. 1.]
Initial induction: 333, repression: 89/422
Learning Rate based on Data Sparsity: 0.0004
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.007
Average Set Size: 22
Change in noise variance: 0.0448
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1804.    *********
Change in noise variance: 0.0019
Change in x0: 0.2063
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1886.    *********
Change in noise variance: 0.0012
Change in x0: 0.1165
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1975.    *********
Change in noise variance: 0.0001
Change in x0: 0.0673
*********             Velocity Refinement Round 5             *********
Change in noise variance: 0.0000
Change in x0: 0.0614
*********             Velocity Refinement Round 6             *********
Stage 2: Early Stop Triggered at round 5.
*********              Finished. Total Time =   0 h :  2 m : 33 s             *********
Final: Train ELBO = 880.964,	Test ELBO = 824.267
Run 25, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_25.zarr.
Estimating ODE parameters...
Detected 453 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.52, 0.28603679504748397), (0.48, 0.7673497264953757)
(0.37, 0.33761410289326726), (0.63, 0.8504461451142085)
KS-test result: [0. 1. 0.]
Initial induction: 369, repression: 209/578
Learning Rate based on Data Sparsity: 0.0000
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.009
Average Set Size: 22
Change in noise variance: 0.2083
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1537.    *********
Change in noise variance: 0.0041
Change in x0: 0.6915
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1788.    *********
Change in noise variance: 0.0026
Change in x0: 0.5278
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1795.    *********
Change in noise variance: 0.0023
Change in x0: 0.4290
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1907.    *********
Change in noise variance: 0.0020
Change in x0: 0.3418
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 1916.    *********
Change in noise variance: 0.0021
Change in x0: 0.2783
*********             Velocity Refinement Round 7             *********
*********     Round 7: Early Stop Triggered at epoch 1997.    *********
Change in noise variance: 0.0012
Change in x0: 0.2489
*********             Velocity Refinement Round 8             *********
*********     Round 8: Early Stop Triggered at epoch 2004.    *********
Change in noise variance: 0.0004
Change in x0: 0.2845
*********             Velocity Refinement Round 9             *********
Stage 2: Early Stop Triggered at round 8.
*********              Finished. Total Time =   0 h :  2 m :  9 s             *********
Final: Train ELBO = -1099.729,	Test ELBO = -1089.002
Run 26, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_20.zarr.
Estimating ODE parameters...
Detected 280 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
KS-test result: [1. 1. 1.]
Assign cluster 2 to repressive
Initial induction: 201, repression: 88/289
Learning Rate based on Data Sparsity: 0.0004
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.121
Average Set Size: 19
*********     Round 1: Early Stop Triggered at epoch 1356.    *********
Change in noise variance: 0.0621
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1578.    *********
Change in noise variance: 0.0037
Change in x0: 0.1781
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1700.    *********
Change in noise variance: 0.0006
Change in x0: 0.0946
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1722.    *********
Change in noise variance: 0.0000
Change in x0: 0.0771
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1738.    *********
Change in noise variance: 0.0000
Change in x0: 0.0671
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 1905.    *********
Change in noise variance: 0.0000
Change in x0: 0.0601
*********             Velocity Refinement Round 7             *********
Stage 2: Early Stop Triggered at round 6.
*********              Finished. Total Time =   0 h :  1 m : 59 s             *********
Final: Train ELBO = 630.029,	Test ELBO = 576.957
Run 27, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_7.zarr.
Estimating ODE parameters...
Detected 347 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.35, 0.3338688963765141), (0.65, 0.8501683610682383)
(0.43, 0.26033194504377993), (0.57, 0.7905961327414116)
KS-test result: [0. 1. 0.]
Initial induction: 340, repression: 141/481
Learning Rate based on Data Sparsity: 0.0000
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.035
Average Set Size: 20
*********     Round 1: Early Stop Triggered at epoch 1336.    *********
Change in noise variance: 0.0607
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1432.    *********
Change in noise variance: 0.0273
Change in x0: 0.4293
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1524.    *********
Change in noise variance: 0.0050
Change in x0: 0.3344
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1591.    *********
Change in noise variance: 0.0027
Change in x0: 0.3130
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1613.    *********
Change in noise variance: 0.0015
Change in x0: 0.2213
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 1705.    *********
Change in noise variance: 0.0008
Change in x0: 0.1638
*********             Velocity Refinement Round 7             *********
*********     Round 7: Early Stop Triggered at epoch 1727.    *********
Change in noise variance: 0.0000
Change in x0: 0.1423
*********             Velocity Refinement Round 8             *********
*********     Round 8: Early Stop Triggered at epoch 1759.    *********
Change in noise variance: 0.0000
Change in x0: 0.1224
*********             Velocity Refinement Round 9             *********
*********     Round 9: Early Stop Triggered at epoch 1766.    *********
Change in noise variance: 0.0000
Change in x0: 0.1141
*********             Velocity Refinement Round 10             *********
Stage 2: Early Stop Triggered at round 9.
*********              Finished. Total Time =   0 h :  1 m : 53 s             *********
Final: Train ELBO = -180.317,	Test ELBO = -170.590
Run 28, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_3.zarr.
Estimating ODE parameters...
Detected 148 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
(0.41, 0.7019526186807664), (0.59, 0.16143693643502346)
KS-test result: [1. 0. 1.]
Initial induction: 137, repression: 71/208
Learning Rate based on Data Sparsity: 0.0000
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********       Stage 1: Early Stop Triggered at epoch 7.       *********
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.029
Average Set Size: 21
*********     Round 1: Early Stop Triggered at epoch 346.    *********
Change in noise variance: 0.2637
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 353.    *********
Change in noise variance: 0.0223
Change in x0: 0.4232
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 380.    *********
Change in noise variance: 0.0057
Change in x0: 0.2945
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 424.    *********
Change in noise variance: 0.0026
Change in x0: 0.2017
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 433.    *********
Change in noise variance: 0.0010
Change in x0: 0.1395
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 562.    *********
Change in noise variance: 0.0000
Change in x0: 0.1259
*********             Velocity Refinement Round 7             *********
*********     Round 7: Early Stop Triggered at epoch 569.    *********
Change in noise variance: 0.0000
Change in x0: 0.1153
*********             Velocity Refinement Round 8             *********
*********     Round 8: Early Stop Triggered at epoch 628.    *********
Change in noise variance: 0.0000
Change in x0: 0.1059
*********             Velocity Refinement Round 9             *********
Stage 2: Early Stop Triggered at round 8.
*********              Finished. Total Time =   0 h :  0 m : 37 s             *********
Final: Train ELBO = -25130.842,	Test ELBO = -26236.967
Run 29, file /ictstr01/groups/ml01/workspace/yifan.chen/regvelo_reproducibility/data/dyngen/complexity_1/processed/simulation_26.zarr.
Estimating ODE parameters...
Detected 470 velocity genes.
Estimating the variance...
Initialization using the steady-state and dynamical models.
Reinitialize the regular ODE parameters based on estimated global latent time.
3 clusters detected based on gene co-expression.
KS-test result: [1. 1. 1.]
Assign cluster 1 to repressive
Initial induction: 324, repression: 170/494
Learning Rate based on Data Sparsity: 0.0003
--------------------------- Train a VeloVAE ---------------------------
*********        Creating Training/Validation Datasets        *********
*********                      Finished.                      *********
*********                 Creating optimizers                 *********
*********                      Finished.                      *********
*********                    Start training                   *********
*********                      Stage  1                       *********
Total Number of Iterations Per Epoch: 6, test iteration: 10
*********                      Stage  2                       *********
*********             Velocity Refinement Round 1             *********
Percentage of Invalid Sets: 0.003
Average Set Size: 25
*********     Round 1: Early Stop Triggered at epoch 1292.    *********
Change in noise variance: 0.0211
*********             Velocity Refinement Round 2             *********
*********     Round 2: Early Stop Triggered at epoch 1678.    *********
Change in noise variance: 0.0043
Change in x0: 0.2580
*********             Velocity Refinement Round 3             *********
*********     Round 3: Early Stop Triggered at epoch 1745.    *********
Change in noise variance: 0.0016
Change in x0: 0.2539
*********             Velocity Refinement Round 4             *********
*********     Round 4: Early Stop Triggered at epoch 1846.    *********
Change in noise variance: 0.0009
Change in x0: 0.1582
*********             Velocity Refinement Round 5             *********
*********     Round 5: Early Stop Triggered at epoch 1927.    *********
Change in noise variance: 0.0000
Change in x0: 0.1175
*********             Velocity Refinement Round 6             *********
*********     Round 6: Early Stop Triggered at epoch 1936.    *********
Change in noise variance: 0.0000
Change in x0: 0.0949
*********             Velocity Refinement Round 7             *********
*********     Round 7: Early Stop Triggered at epoch 1957.    *********
Change in noise variance: 0.0000
Change in x0: 0.0793
*********             Velocity Refinement Round 8             *********
*********     Round 8: Early Stop Triggered at epoch 1974.    *********
Change in noise variance: 0.0000
Change in x0: 0.0667
*********             Velocity Refinement Round 9             *********
*********     Round 9: Early Stop Triggered at epoch 2005.    *********
Change in noise variance: 0.0000
Change in x0: 0.0651
*********             Velocity Refinement Round 10             *********
Stage 2: Early Stop Triggered at round 9.
*********              Finished. Total Time =   0 h :  2 m :  7 s             *********
Final: Train ELBO = 799.182,	Test ELBO = 770.955

Data saving#

pd.DataFrame({"velocity": velocity_correlation})
velocity
0 0.155481
1 0.202144
2 0.012057
3 -0.004354
4 0.002382
5 0.126935
6 0.097688
7 0.153123
8 0.006757
9 0.182454
10 0.149677
11 0.019388
12 0.030392
13 0.097076
14 0.073556
15 0.048111
16 0.008874
17 0.040939
18 0.150214
19 0.189872
20 0.131745
21 0.161824
22 0.036252
23 0.079695
24 0.056756
25 0.003183
26 -0.074424
27 0.079029
28 0.044476
29 -0.023441
if SAVE_DATA:
    pd.DataFrame({"velocity": velocity_correlation}).to_parquet(
        path=DATA_DIR / DATASET / COMPLEXITY / "results" / "velovae_vae_correlation.parquet"
    )