# fahad3166/temporal-scmvc-p2 architecture

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

- Interactive diagram: https://gitdiagram.com/fahad3166/temporal-scmvc-p2
- Repository: https://github.com/fahad3166/temporal-scmvc-p2

## Overview

Temporal SCMVC is a research implementation for multi-view time-series clustering. Its principal workflow is to select a supported sensor dataset and views, load temporal windows, train a reconstruction-plus-contrastive model with a temporal backbone, and assess clustering quality. The repository also contains local-window training variants and preprocessing-index audit utilities. The graph follows README-described capabilities, but sampled source is incomplete, so uncertain evaluation and audit wiring is omitted.

Main entry points: [`temporal_scmvc/train_temporal_tcn.py`](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/train_temporal_tcn.py) (TCN experiment), [`temporal_scmvc/train_wisdm_temporal_local.py`](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/train_wisdm_temporal_local.py) (Local-window training), [`temporal_scmvc/train_temporal_lstm.py`](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/train_temporal_lstm.py) (LSTM experiment), [`temporal_scmvc/train_temporal_mlp.py`](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/train_temporal_mlp.py) (MLP experiment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Temporal data"]
  node_datasets["UCI datasets"]
  node_har_loader["HAR loader"]
  node_mhealth_loader["MHEALTH loader"]
  node_pamap_loader["PAMAP2 loader"]
  node_wisdm_loader["WISDM loader"]
  node_sampling["Sample selection<br/>[sampling.py]"]
end

subgraph group_learning["Model training"]
  node_tcn_runner["TCN experiment"]
  node_lstm_runner["LSTM experiment"]
  node_mlp_runner["MLP experiment"]
  node_local_runner["Local-window training"]
  node_tcn_model["TCN model"]
  node_temporal_model["Temporal model"]
  node_lstm_model["LSTM model"]
  node_contrastive_loss["Contrastive objective<br/>[loss2.py]"]
end

subgraph group_assessment["Evaluation and audit"]
  node_metrics["Clustering metrics<br/>[metric.py]"]
  node_index_audit["Index audit<br/>[save_indices.py]"]
end

node_researcher(("Researcher"))

node_researcher -->|"starts experiment"| node_tcn_runner
node_datasets -->|"provides files"| node_har_loader
node_datasets -->|"provides files"| node_mhealth_loader
node_datasets -->|"provides files"| node_pamap_loader
node_datasets -->|"provides files"| node_wisdm_loader
node_tcn_runner -->|"loads dataset"| node_har_loader
node_tcn_runner -->|"loads dataset"| node_mhealth_loader
node_tcn_runner -->|"loads dataset"| node_pamap_loader
node_tcn_runner -->|"loads dataset"| node_wisdm_loader
node_tcn_runner -->|"instantiates"| node_tcn_model
node_tcn_runner -->|"creates objective"| node_contrastive_loss
node_lstm_runner -->|"instantiates"| node_lstm_model
node_mlp_runner -->|"instantiates"| node_temporal_model
node_local_runner -->|"runs model"| node_temporal_model
node_local_runner -->|"uses objective"| node_contrastive_loss
node_researcher -->|"starts experiment"| node_lstm_runner
node_researcher -->|"starts experiment"| node_mlp_runner
node_researcher -.->|"starts variant"| node_local_runner
node_researcher -.->|"audits indices"| node_index_audit

click node_har_loader "https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/dataloader_har_temporal.py"
click node_mhealth_loader "https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/dataloader_mhealth_temporal.py"
click node_pamap_loader "https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/dataloader_pamap_temporal.py"
click node_wisdm_loader "https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/dataloader_wisdm_temporal.py"
click node_tcn_runner "https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/train_temporal_tcn.py"
click node_lstm_runner "https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/train_temporal_lstm.py"
click node_mlp_runner "https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/train_temporal_mlp.py"
click node_local_runner "https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/train_wisdm_temporal_local.py"
click node_tcn_model "https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/network_temporal_tcn.py"
click node_temporal_model "https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/network_temporal.py"
click node_lstm_model "https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/network_temporal_lstm.py"
click node_contrastive_loss "https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/loss2.py"
click node_metrics "https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/metric.py"
click node_index_audit "https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/save_indices.py"
click node_sampling "https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/sampling.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_datasets,node_har_loader,node_mhealth_loader,node_pamap_loader,node_wisdm_loader,node_sampling toneBlue
class node_tcn_runner,node_lstm_runner,node_mlp_runner,node_local_runner,node_tcn_model,node_temporal_model,node_lstm_model,node_contrastive_loss toneAmber
class node_metrics,node_index_audit toneMint
class node_researcher toneIndigo
```

## Components

### Temporal data

- **UCI datasets**
- [HAR loader](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/dataloader_har_temporal.py): `temporal_scmvc/dataloader_har_temporal.py`
- [MHEALTH loader](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/dataloader_mhealth_temporal.py): `temporal_scmvc/dataloader_mhealth_temporal.py`
- [PAMAP2 loader](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/dataloader_pamap_temporal.py): `temporal_scmvc/dataloader_pamap_temporal.py`
- [WISDM loader](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/dataloader_wisdm_temporal.py): `temporal_scmvc/dataloader_wisdm_temporal.py`
- [Sample selection](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/sampling.py): `temporal_scmvc/sampling.py`

### Model training

- [TCN experiment](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/train_temporal_tcn.py): `temporal_scmvc/train_temporal_tcn.py`
- [LSTM experiment](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/train_temporal_lstm.py): `temporal_scmvc/train_temporal_lstm.py`
- [MLP experiment](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/train_temporal_mlp.py): `temporal_scmvc/train_temporal_mlp.py`
- [Local-window training](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/train_wisdm_temporal_local.py): `temporal_scmvc/train_wisdm_temporal_local.py`
- [TCN model](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/network_temporal_tcn.py): `temporal_scmvc/network_temporal_tcn.py`
- [Temporal model](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/network_temporal.py): `temporal_scmvc/network_temporal.py`
- [LSTM model](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/network_temporal_lstm.py): `temporal_scmvc/network_temporal_lstm.py`
- [Contrastive objective](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/loss2.py): `temporal_scmvc/loss2.py`

### Evaluation and audit

- [Clustering metrics](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/metric.py): `temporal_scmvc/metric.py`
- [Index audit](https://github.com/fahad3166/temporal-scmvc-p2/blob/main/temporal_scmvc/save_indices.py): `temporal_scmvc/save_indices.py`

### Other components

- **Researcher**

## Connections

- Researcher → TCN experiment: starts experiment
- UCI datasets → HAR loader: provides files
- UCI datasets → MHEALTH loader: provides files
- UCI datasets → PAMAP2 loader: provides files
- UCI datasets → WISDM loader: provides files
- TCN experiment → HAR loader: loads dataset
- TCN experiment → MHEALTH loader: loads dataset
- TCN experiment → PAMAP2 loader: loads dataset
- TCN experiment → WISDM loader: loads dataset
- TCN experiment → TCN model: instantiates
- TCN experiment → Contrastive objective: creates objective
- LSTM experiment → LSTM model: instantiates
- MLP experiment → Temporal model: instantiates
- Local-window training → Temporal model: runs model
- Local-window training → Contrastive objective: uses objective
- Researcher → LSTM experiment: starts experiment
- Researcher → MLP experiment: starts experiment
- Researcher → Local-window training: starts variant
- Researcher → Index audit: audits indices
