# hzavadil98/uit_fys-8603 architecture

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

- Interactive diagram: https://gitdiagram.com/hzavadil98/uit_fys-8603
- Repository: https://github.com/hzavadil98/uit_fys-8603

## Overview

This is a research codebase combining breast-cancer image classification experiments, synthetic image data, and multiview statistical analysis. The intended ML workflow is to prepare views, train a model, and produce predictions and evaluation metrics; the tree identifies training entrypoints, but their wiring was not sampled, so those links are omitted. The statistical packages provide separate PCA, MCCA, and AJIVE analyses. There is no README, and unsampled modules are represented only where their paths and roles are clear from the tree.

Main entry points: [`train_synt.py`](https://github.com/hzavadil98/uit_fys-8603/blob/main/train_synt.py) (Synthetic training), [`src/Dataloaders/Synthetic_2v.py`](https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Dataloaders/Synthetic_2v.py) (Two-view image dataset), [`train_elements.py`](https://github.com/hzavadil98/uit_fys-8603/blob/main/train_elements.py) (Element training), [`python_packages/mvdr/ajive/ajive_fun.py`](https://github.com/hzavadil98/uit_fys-8603/blob/main/python_packages/mvdr/ajive/ajive_fun.py) (AJIVE analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cancer["Cancer ML"]
  node_train2["Two-view training<br/>[train_2v1b.py]"]
  node_train4["Four-view training<br/>[train_4v2b.py]"]
  node_trainf["Feature training<br/>[train_4vf.py]"]
  node_breastdata["Breast cancer data<br/>[Breast_Cancer.py]"]
  node_patientdata["Patient cancer data<br/>[Patient_Cancer.py]"]
  node_viewdata["View cancer data<br/>[View_Cancer.py]"]
  node_twoimage["Two-view models"]
  node_separate["Separate-view models"]
  node_cancermodel["Multiview cancer models"]
  node_mirai["MIRAI pretrained model"]
end

subgraph group_synthetic["Synthetic Data"]
  node_syntheticentry["Synthetic training<br/>[train_synt.py]"]
  node_syntheticdata["Two-view image dataset<br/>[Synthetic_2v.py]"]
  node_elementdataset["Element datasets<br/>[classes.py]"]
  node_elementtrain["Element training<br/>[train_elements.py]"]
  node_synthetictraining["Synthetic data generation<br/>[Synthetic_2v.py]"]
end

subgraph group_multiview["Multiview Analysis"]
  node_ajive["AJIVE analysis<br/>[ajive_fun.py]"]
  node_mcca["MCCA analysis<br/>[mcca.py]"]
  node_jive["JIVE analysis<br/>[AJIVE.py]"]
  node_divas["DIVAS bridge<br/>[py_divas.py]"]
end

subgraph group_statistics["Statistical Tools"]
  node_pca["PCA<br/>[PCA.py]"]
  node_rank["Rank selection<br/>[rank_selection.py]"]
  node_angles["Subspace comparisons"]
end

node_researcher(("Researcher"))
node_rdivas["R DIVAS package"]

node_researcher -->|"runs"| node_train2
node_researcher -->|"runs"| node_train4
node_researcher -->|"runs"| node_trainf
node_researcher -->|"runs"| node_syntheticentry
node_researcher -->|"runs"| node_elementtrain
node_researcher -->|"analyzes views"| node_ajive
node_researcher -->|"analyzes views"| node_mcca
node_researcher -->|"analyzes views"| node_jive
node_researcher -->|"fits components"| node_pca
node_researcher -->|"runs analysis"| node_divas
node_divas -.->|"calls"| node_rdivas
node_syntheticentry -->|"uses dataset"| node_syntheticdata
node_syntheticdata -->|"generates images"| node_synthetictraining
node_elementtrain -->|"uses datasets"| node_elementdataset
node_pca -->|"selects rank"| node_rank
node_ajive -->|"compares subspaces"| node_angles

click node_train2 "https://github.com/hzavadil98/uit_fys-8603/blob/main/train_2v1b.py"
click node_train4 "https://github.com/hzavadil98/uit_fys-8603/blob/main/train_4v2b.py"
click node_trainf "https://github.com/hzavadil98/uit_fys-8603/blob/main/train_4vf.py"
click node_breastdata "https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Dataloaders/Breast_Cancer.py"
click node_patientdata "https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Dataloaders/Patient_Cancer.py"
click node_viewdata "https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Dataloaders/View_Cancer.py"
click node_twoimage "https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Models/Two_view_grey_models.py"
click node_separate "https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Models/Separate_view_models.py"
click node_cancermodel "https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Models/Multiview_cancer_models.py"
click node_mirai "https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Models/mirai_pretrained.py"
click node_syntheticentry "https://github.com/hzavadil98/uit_fys-8603/blob/main/train_synt.py"
click node_syntheticdata "https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Dataloaders/Synthetic_2v.py"
click node_elementdataset "https://github.com/hzavadil98/uit_fys-8603/blob/main/elements/elements/classes.py"
click node_elementtrain "https://github.com/hzavadil98/uit_fys-8603/blob/main/train_elements.py"
click node_ajive "https://github.com/hzavadil98/uit_fys-8603/blob/main/python_packages/mvdr/ajive/ajive_fun.py"
click node_mcca "https://github.com/hzavadil98/uit_fys-8603/blob/main/python_packages/mvdr/mcca/mcca.py"
click node_jive "https://github.com/hzavadil98/uit_fys-8603/blob/main/python_packages/jive/AJIVE.py"
click node_divas "https://github.com/hzavadil98/uit_fys-8603/blob/main/src/py_divas.py"
click node_pca "https://github.com/hzavadil98/uit_fys-8603/blob/main/python_packages/ya_pca/PCA.py"
click node_rank "https://github.com/hzavadil98/uit_fys-8603/blob/main/python_packages/ya_pca/rank_selection/rank_selection.py"
click node_angles "https://github.com/hzavadil98/uit_fys-8603/blob/main/python_packages/mvdr/principal_angles.py"
click node_synthetictraining "https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Dataloaders/Synthetic_2v.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_train2,node_train4,node_trainf,node_breastdata,node_patientdata,node_viewdata,node_twoimage,node_separate,node_cancermodel,node_mirai toneBlue
class node_syntheticentry,node_syntheticdata,node_elementdataset,node_elementtrain,node_synthetictraining toneAmber
class node_ajive,node_mcca,node_jive,node_divas toneMint
class node_pca,node_rank,node_angles toneRose
class node_researcher,node_rdivas toneIndigo
```

## Components

### Cancer ML

- [Two-view training](https://github.com/hzavadil98/uit_fys-8603/blob/main/train_2v1b.py): `train_2v1b.py`
- [Four-view training](https://github.com/hzavadil98/uit_fys-8603/blob/main/train_4v2b.py): `train_4v2b.py`
- [Feature training](https://github.com/hzavadil98/uit_fys-8603/blob/main/train_4vf.py): `train_4vf.py`
- [Breast cancer data](https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Dataloaders/Breast_Cancer.py): `src/Dataloaders/Breast_Cancer.py`
- [Patient cancer data](https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Dataloaders/Patient_Cancer.py): `src/Dataloaders/Patient_Cancer.py`
- [View cancer data](https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Dataloaders/View_Cancer.py): `src/Dataloaders/View_Cancer.py`
- [Two-view models](https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Models/Two_view_grey_models.py): `src/Models/Two_view_grey_models.py`
- [Separate-view models](https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Models/Separate_view_models.py): `src/Models/Separate_view_models.py`
- [Multiview cancer models](https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Models/Multiview_cancer_models.py): `src/Models/Multiview_cancer_models.py`
- [MIRAI pretrained model](https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Models/mirai_pretrained.py): `src/Models/mirai_pretrained.py`

### Synthetic Data

- [Synthetic training](https://github.com/hzavadil98/uit_fys-8603/blob/main/train_synt.py): `train_synt.py`
- [Two-view image dataset](https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Dataloaders/Synthetic_2v.py): `src/Dataloaders/Synthetic_2v.py`
- [Element datasets](https://github.com/hzavadil98/uit_fys-8603/blob/main/elements/elements/classes.py): `elements/elements/classes.py`
- [Element training](https://github.com/hzavadil98/uit_fys-8603/blob/main/train_elements.py): `train_elements.py`
- [Synthetic data generation](https://github.com/hzavadil98/uit_fys-8603/blob/main/src/Dataloaders/Synthetic_2v.py): `src/Dataloaders/Synthetic_2v.py`

### Multiview Analysis

- [AJIVE analysis](https://github.com/hzavadil98/uit_fys-8603/blob/main/python_packages/mvdr/ajive/ajive_fun.py): `python_packages/mvdr/ajive/ajive_fun.py`
- [MCCA analysis](https://github.com/hzavadil98/uit_fys-8603/blob/main/python_packages/mvdr/mcca/mcca.py): `python_packages/mvdr/mcca/mcca.py`
- [JIVE analysis](https://github.com/hzavadil98/uit_fys-8603/blob/main/python_packages/jive/AJIVE.py): `python_packages/jive/AJIVE.py`
- [DIVAS bridge](https://github.com/hzavadil98/uit_fys-8603/blob/main/src/py_divas.py): `src/py_divas.py`

### Statistical Tools

- [PCA](https://github.com/hzavadil98/uit_fys-8603/blob/main/python_packages/ya_pca/PCA.py): `python_packages/ya_pca/PCA.py`
- [Rank selection](https://github.com/hzavadil98/uit_fys-8603/blob/main/python_packages/ya_pca/rank_selection/rank_selection.py): `python_packages/ya_pca/rank_selection/rank_selection.py`
- [Subspace comparisons](https://github.com/hzavadil98/uit_fys-8603/blob/main/python_packages/mvdr/principal_angles.py): `python_packages/mvdr/principal_angles.py`

### Other components

- **Researcher**
- **R DIVAS package**

## Connections

- Researcher → Two-view training: runs
- Researcher → Four-view training: runs
- Researcher → Feature training: runs
- Researcher → Synthetic training: runs
- Researcher → Element training: runs
- Researcher → AJIVE analysis: analyzes views
- Researcher → MCCA analysis: analyzes views
- Researcher → JIVE analysis: analyzes views
- Researcher → PCA: fits components
- Researcher → DIVAS bridge: runs analysis
- DIVAS bridge → R DIVAS package: calls
- Synthetic training → Two-view image dataset: uses dataset
- Two-view image dataset → Synthetic data generation: generates images
- Element training → Element datasets: uses datasets
- PCA → Rank selection: selects rank
- AJIVE analysis → Subspace comparisons: compares subspaces
