# namjoonsuh/timeautodiff architecture

> Architecture diagram of the GitHub repository namjoonsuh/timeautodiff, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/namjoonsuh/timeautodiff
- Repository: https://github.com/namjoonsuh/timeautodiff
- Video tour (about a minute): https://gitdiagram.com/namjoonsuh/timeautodiff/video

## Overview

TimeAutoDiff is a time-series modeling repository centered on evaluating imputation and forecasting. Its visible workflow prepares and windows data, then evaluation code configures and runs TimeAutoDiff alongside comparison models. The model has separate VAE and diffusion components, with shared encoding/preprocessing helpers. The tree also contains a distinct BenchPOTS dataset toolbox. Evidence is limited to the README, source index references, and sampled excerpts; unsampled capabilities and links are not inferred beyond those references.

Main entry points: [`dataprovider_pypots.py`](https://github.com/namjoonsuh/timeautodiff/blob/main/dataprovider_pypots.py) (Window and mask data), [`Evaluation/ImputeEval.py`](https://github.com/namjoonsuh/timeautodiff/blob/main/Evaluation/ImputeEval.py) (Imputation evaluation), [`Evaluation/ForecastEval.py`](https://github.com/namjoonsuh/timeautodiff/blob/main/Evaluation/ForecastEval.py) (Forecast evaluation), [`VAE.py`](https://github.com/namjoonsuh/timeautodiff/blob/main/VAE.py) (VAE representation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_prepare["Encoding and parsing<br/>[process_edited.py]"]
  node_provider["Window and mask data"]
  node_provider_base["Data preparation helpers<br/>[dataprovider.py]"]
end

subgraph group_model["TimeAutoDiff model"]
  node_vae["VAE representation<br/>[VAE.py]"]
  node_diff["Diffusion model<br/>[DIFF.py]"]
end

subgraph group_evaluation["Evaluation"]
  node_impute["Imputation evaluation<br/>[ImputeEval.py]"]
  node_forecast["Forecast evaluation<br/>[ForecastEval.py]"]
  node_metrics["Evaluation metrics<br/>[Metrics.py]"]
  node_correl["Correlation analysis<br/>[correl.py]"]
  node_predictive["Predictive metrics"]
end

subgraph group_benchpots["BenchPOTS datasets"]
  node_dataset["Dataset loaders"]
end

node_user(("Researcher"))
node_rawdata["Time-series data"]

node_user -.->|"runs imputation"| node_impute
node_user -.->|"runs forecasting"| node_forecast
node_rawdata -.->|"prepares windows"| node_provider
node_provider -.->|"uses helpers"| node_provider_base
node_provider -.->|"uses encoders"| node_prepare
node_impute -->|"uses prepared data"| node_provider
node_forecast -->|"uses prepared data"| node_provider
node_impute -->|"imports model"| node_vae
node_impute -->|"imports model"| node_diff
node_forecast -->|"imports model"| node_vae
node_forecast -->|"imports model"| node_diff
node_vae -->|"uses encoders"| node_prepare
node_diff -->|"uses helpers"| node_prepare
node_user -.->|"loads datasets"| node_dataset

click node_dataset "https://github.com/namjoonsuh/timeautodiff/tree/main/BenchPOTS/benchpots/datasets"
click node_prepare "https://github.com/namjoonsuh/timeautodiff/blob/main/process_edited.py"
click node_provider "https://github.com/namjoonsuh/timeautodiff/blob/main/dataprovider_pypots.py"
click node_provider_base "https://github.com/namjoonsuh/timeautodiff/blob/main/dataprovider.py"
click node_vae "https://github.com/namjoonsuh/timeautodiff/blob/main/VAE.py"
click node_diff "https://github.com/namjoonsuh/timeautodiff/blob/main/DIFF.py"
click node_impute "https://github.com/namjoonsuh/timeautodiff/blob/main/Evaluation/ImputeEval.py"
click node_forecast "https://github.com/namjoonsuh/timeautodiff/blob/main/Evaluation/ForecastEval.py"
click node_metrics "https://github.com/namjoonsuh/timeautodiff/blob/main/Evaluation/Metrics.py"
click node_correl "https://github.com/namjoonsuh/timeautodiff/blob/main/Evaluation/correl.py"
click node_predictive "https://github.com/namjoonsuh/timeautodiff/blob/main/Evaluation/predictive_metrics.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_prepare,node_provider,node_provider_base toneBlue
class node_vae,node_diff toneAmber
class node_impute,node_forecast,node_metrics,node_correl,node_predictive toneMint
class node_dataset toneRose
class node_user,node_rawdata toneIndigo
```

## Components

### Data preparation

- [Encoding and parsing](https://github.com/namjoonsuh/timeautodiff/blob/main/process_edited.py): `process_edited.py`
- [Window and mask data](https://github.com/namjoonsuh/timeautodiff/blob/main/dataprovider_pypots.py): `dataprovider_pypots.py`
- [Data preparation helpers](https://github.com/namjoonsuh/timeautodiff/blob/main/dataprovider.py): `dataprovider.py`

### TimeAutoDiff model

- [VAE representation](https://github.com/namjoonsuh/timeautodiff/blob/main/VAE.py): `VAE.py`
- [Diffusion model](https://github.com/namjoonsuh/timeautodiff/blob/main/DIFF.py): `DIFF.py`

### Evaluation

- [Imputation evaluation](https://github.com/namjoonsuh/timeautodiff/blob/main/Evaluation/ImputeEval.py): `Evaluation/ImputeEval.py`
- [Forecast evaluation](https://github.com/namjoonsuh/timeautodiff/blob/main/Evaluation/ForecastEval.py): `Evaluation/ForecastEval.py`
- [Evaluation metrics](https://github.com/namjoonsuh/timeautodiff/blob/main/Evaluation/Metrics.py): `Evaluation/Metrics.py`
- [Correlation analysis](https://github.com/namjoonsuh/timeautodiff/blob/main/Evaluation/correl.py): `Evaluation/correl.py`
- [Predictive metrics](https://github.com/namjoonsuh/timeautodiff/blob/main/Evaluation/predictive_metrics.py): `Evaluation/predictive_metrics.py`

### BenchPOTS datasets

- [Dataset loaders](https://github.com/namjoonsuh/timeautodiff/tree/main/BenchPOTS/benchpots/datasets): `BenchPOTS/benchpots/datasets`

### Other components

- **Researcher**
- **Time-series data**

## Connections

- Researcher → Imputation evaluation: runs imputation
- Researcher → Forecast evaluation: runs forecasting
- Time-series data → Window and mask data: prepares windows
- Window and mask data → Data preparation helpers: uses helpers (evidence: `dataprovider_pypots.py`)
- Window and mask data → Encoding and parsing: uses encoders (evidence: `dataprovider_pypots.py`)
- Imputation evaluation → Window and mask data: uses prepared data (evidence: `Evaluation/ImputeEval.py`)
- Forecast evaluation → Window and mask data: uses prepared data (evidence: `Evaluation/ForecastEval.py`)
- Imputation evaluation → VAE representation: imports model (evidence: `Evaluation/ImputeEval.py`)
- Imputation evaluation → Diffusion model: imports model (evidence: `Evaluation/ImputeEval.py`)
- Forecast evaluation → VAE representation: imports model (evidence: `Evaluation/ForecastEval.py`)
- Forecast evaluation → Diffusion model: imports model (evidence: `Evaluation/ForecastEval.py`)
- VAE representation → Encoding and parsing: uses encoders (evidence: `VAE.py`)
- Diffusion model → Encoding and parsing: uses helpers (evidence: `DIFF.py`)
- Researcher → Dataset loaders: loads datasets
