# ayoushmanb/hypergraph_subgraph architecture

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

- Interactive diagram: https://gitdiagram.com/ayoushmanb/hypergraph_subgraph
- Repository: https://github.com/ayoushmanb/hypergraph_subgraph

## Overview

##### Project type and purpose
- The goal is to run simulation experiments, apply testing routines on real-world hypergraph data, compute summary statistics, and generate publication-ready figures.

##### File structure
- Top-level artifacts:
- hypergraph_subgraph.Rproj (RStudio project)
- README.md
- .gitignore
- Directories by function:
- real_data: holds input RData files and real-data testing scripts
– data_collection: raw RData splits (train/test/all) for multiple datasets (emi, jasa, jcgs, movie)
– hypergraph_testing: R scripts that test two-star and type-2 clustering on real data
– sparse_graphon_testing: scripts for sparse-graphon based tests
– summary-stat-supp.R: summary statistics on real data
- simulation: scripts to run various simulation experiments (colorless triangles, type-2/3 clustering, two-stars)
- figures: output PDFs of histograms, density plots, hypothesis-test images
- No “frontend/backend”—it’s a data pipeline. Primary architectural choice: modular R scripts organized by stage (data collection, simulation, testing, visualization).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Data Layer
    subgraph "Data Layer"
        RealData["Real Data Collection"]:::data
    end

    %% Simulation Layer
    subgraph "Simulation Layer"
        Simulation["Simulation Engine"]:::process
    end

    %% Analysis & Testing Layer
    subgraph "Analysis & Testing Layer"
        RealDataTesting["Real-Data Testing"]:::process
        SparseGraphonTesting["Sparse-Graphon Testing"]:::process
        SummaryStats["Summary Statistics Computation"]:::process
    end

    %% Visualization Layer
    subgraph "Visualization Layer"
        Visualization["Figures Output"]:::output
    end

    %% Environment & Configuration
    subgraph "Environment & Configuration"
        RProj["RStudio Project (.Rproj)"]:::env
        Readme["README.md"]:::env
        Gitignore[".gitignore"]:::env
    end

    %% Data Flows
    RealData -->|".RData"| RealDataTesting
    RealData -->|".RData"| SparseGraphonTesting
    Simulation -->|"synthetic data"| RealDataTesting
    Simulation -->|"synthetic data"| SparseGraphonTesting
    RealDataTesting -->|"results"| SummaryStats
    SparseGraphonTesting -->|"results"| SummaryStats
    SummaryStats -->|"stats"| RealData
    SummaryStats -->|"stats"| Visualization
    RealDataTesting -->|"plots data"| Visualization
    SparseGraphonTesting -->|"plots data"| Visualization

    %% Environment connections
    RProj -.-> RealData
    RProj -.-> Simulation
    RProj -.-> RealDataTesting
    RProj -.-> SparseGraphonTesting
    RProj -.-> SummaryStats
    RProj -.-> Visualization

    %% Click Events
    click RealData "https://github.com/ayoushmanb/hypergraph_subgraph/tree/main/real_data/data_collection"
    click Simulation "https://github.com/ayoushmanb/hypergraph_subgraph/tree/main/simulation"
    click RealDataTesting "https://github.com/ayoushmanb/hypergraph_subgraph/tree/main/real_data/hypergraph_testing"
    click SparseGraphonTesting "https://github.com/ayoushmanb/hypergraph_subgraph/tree/main/real_data/sparse_graphon_testing"
    click SummaryStats "https://github.com/ayoushmanb/hypergraph_subgraph/blob/main/real_data/real-data-summary-stat-comp.R"
    click SummaryStats "https://github.com/ayoushmanb/hypergraph_subgraph/blob/main/real_data/summary-stat-supp.R"
    click Visualization "https://github.com/ayoushmanb/hypergraph_subgraph/tree/main/figures"
    click RProj "https://github.com/ayoushmanb/hypergraph_subgraph/blob/main/hypergraph_subgraph.Rproj"
    click Readme "https://github.com/ayoushmanb/hypergraph_subgraph/blob/main/README.md"
    click Gitignore "https://github.com/ayoushmanb/hypergraph_subgraph/blob/main/.gitignore"

    %% Styles
    classDef data fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef process fill:#98FB98,stroke:#333,stroke-width:1px
    classDef output fill:#FFA500,stroke:#333,stroke-width:1px
    classDef env fill:#D3D3D3,stroke:#333,stroke-width:1px
```
