# kjason/subspacerepresentationlearning architecture

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

- Interactive diagram: https://gitdiagram.com/kjason/subspacerepresentationlearning
- Repository: https://github.com/kjason/subspacerepresentationlearning

## Overview

This repository implements sparse-array direction-of-arrival (DoA) estimation: researchers configure synthetic MRA scenarios, train covariance/subspace or gridless neural models, then compare them with classical and SDP baselines. The main training entry point coordinates datasets, model and loss selection, and the trainer; evaluation assembles selected predictors and reports performance and CRLB references. README documents additional imperfect-array experiments and invariance-aware loss studies. Edges reflect shown imports and README statements; unsampled implementation details are not inferred.

Main entry points: [`performance.py`](https://github.com/kjason/subspacerepresentationlearning/blob/main/performance.py) (Performance evaluation), [`main.py`](https://github.com/kjason/subspacerepresentationlearning/blob/main/main.py) (Training setup), [`utils.py`](https://github.com/kjason/subspacerepresentationlearning/blob/main/utils.py) (Array utilities), [`predict.py`](https://github.com/kjason/subspacerepresentationlearning/blob/main/predict.py) (Neural prediction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Experiment workflow"]
  node_training_cli["Training setup<br/>[main.py]"]
  node_data_gen[("Scenario datasets<br/>[data.py]")]
  node_shared_utils["Array utilities<br/>[utils.py]"]
end

subgraph group_learning["Neural learning"]
  node_training["Model training<br/>[train.py]"]
  node_batching["Rank sampling<br/>[batch_sampler.py]"]
  node_losses["Invariant losses<br/>[loss.py]"]
  node_networks["Neural architectures<br/>[models.py]"]
end

subgraph group_methods["DoA methods"]
  node_predict["Neural prediction<br/>[predict.py]"]
  node_doa_algorithms["DoA algorithms<br/>[DoA.py]"]
end

subgraph group_analysis["Evaluation and bounds"]
  node_evaluation["Performance evaluation<br/>[performance.py]"]
  node_crlb["CRLB bounds<br/>[crlb.py]"]
  node_results["Experiment results"]
end

subgraph group_sdp["SDP baselines"]
  node_sdp_adapters["SDP adapters<br/>[SDP.py]"]
  node_matlab_solvers["SDP formulations"]
end

node_researcher(("Researcher"))
node_matlab_cvx{{"MATLAB CVX"}}

node_researcher -->|"configures training"| node_training_cli
node_training_cli -->|"constructs datasets"| node_data_gen
node_training_cli -->|"starts training"| node_training
node_training_cli -->|"selects model"| node_networks
node_training_cli -->|"selects loss"| node_losses
node_training_cli -->|"uses helpers"| node_shared_utils
node_training -->|"uses sampler"| node_batching
node_training -->|"uses helpers"| node_shared_utils
node_researcher -->|"configures evaluation"| node_evaluation
node_evaluation -->|"generates trials"| node_data_gen
node_evaluation -->|"evaluates models"| node_predict
node_evaluation -->|"selects methods"| node_doa_algorithms
node_evaluation -->|"selects baselines"| node_sdp_adapters
node_evaluation -->|"computes bounds"| node_crlb
node_evaluation -->|"uses helpers"| node_shared_utils
node_predict -->|"runs network"| node_networks
node_predict -->|"delegates DoA"| node_doa_algorithms
node_predict -->|"preprocesses input"| node_shared_utils
node_doa_algorithms -->|"uses array geometry"| node_shared_utils
node_sdp_adapters -->|"extends predictors"| node_doa_algorithms
node_sdp_adapters -->|"invokes MATLAB"| node_matlab_cvx
node_sdp_adapters -->|"calls formulations"| node_matlab_solvers
node_matlab_solvers -.->|"solves via CVX"| node_matlab_cvx
node_evaluation -.->|"records metrics"| node_results
node_researcher -.->|"runs ICASSP experiments"| node_training_cli

click node_training_cli "https://github.com/kjason/subspacerepresentationlearning/blob/main/main.py"
click node_data_gen "https://github.com/kjason/subspacerepresentationlearning/blob/main/data.py"
click node_training "https://github.com/kjason/subspacerepresentationlearning/blob/main/train.py"
click node_batching "https://github.com/kjason/subspacerepresentationlearning/blob/main/batch_sampler.py"
click node_losses "https://github.com/kjason/subspacerepresentationlearning/blob/main/loss.py"
click node_networks "https://github.com/kjason/subspacerepresentationlearning/blob/main/models.py"
click node_predict "https://github.com/kjason/subspacerepresentationlearning/blob/main/predict.py"
click node_doa_algorithms "https://github.com/kjason/subspacerepresentationlearning/blob/main/DoA.py"
click node_shared_utils "https://github.com/kjason/subspacerepresentationlearning/blob/main/utils.py"
click node_evaluation "https://github.com/kjason/subspacerepresentationlearning/blob/main/performance.py"
click node_crlb "https://github.com/kjason/subspacerepresentationlearning/blob/main/eval/crlb.py"
click node_sdp_adapters "https://github.com/kjason/subspacerepresentationlearning/blob/main/SDP/SDP.py"
click node_matlab_solvers "https://github.com/kjason/subspacerepresentationlearning/tree/main/SDP"

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_training_cli,node_data_gen,node_shared_utils toneBlue
class node_training,node_batching,node_losses,node_networks toneAmber
class node_predict,node_doa_algorithms toneMint
class node_evaluation,node_crlb,node_results toneRose
class node_sdp_adapters,node_matlab_solvers,node_researcher,node_matlab_cvx toneIndigo
```

## Components

### Experiment workflow

- [Training setup](https://github.com/kjason/subspacerepresentationlearning/blob/main/main.py): `main.py`
- [Scenario datasets](https://github.com/kjason/subspacerepresentationlearning/blob/main/data.py): `data.py`
- [Array utilities](https://github.com/kjason/subspacerepresentationlearning/blob/main/utils.py): `utils.py`

### Neural learning

- [Model training](https://github.com/kjason/subspacerepresentationlearning/blob/main/train.py): `train.py`
- [Rank sampling](https://github.com/kjason/subspacerepresentationlearning/blob/main/batch_sampler.py): `batch_sampler.py`
- [Invariant losses](https://github.com/kjason/subspacerepresentationlearning/blob/main/loss.py): `loss.py`
- [Neural architectures](https://github.com/kjason/subspacerepresentationlearning/blob/main/models.py): `models.py`

### DoA methods

- [Neural prediction](https://github.com/kjason/subspacerepresentationlearning/blob/main/predict.py): `predict.py`
- [DoA algorithms](https://github.com/kjason/subspacerepresentationlearning/blob/main/DoA.py): `DoA.py`

### Evaluation and bounds

- [Performance evaluation](https://github.com/kjason/subspacerepresentationlearning/blob/main/performance.py): `performance.py`
- [CRLB bounds](https://github.com/kjason/subspacerepresentationlearning/blob/main/eval/crlb.py): `eval/crlb.py`
- **Experiment results**

### SDP baselines

- [SDP adapters](https://github.com/kjason/subspacerepresentationlearning/blob/main/SDP/SDP.py): `SDP/SDP.py`
- [SDP formulations](https://github.com/kjason/subspacerepresentationlearning/tree/main/SDP): `SDP`

### Other components

- **Researcher**
- **MATLAB CVX**

## Connections

- Researcher → Training setup: configures training (evidence: `README.md`)
- Training setup → Scenario datasets: constructs datasets (evidence: `main.py`)
- Training setup → Model training: starts training (evidence: `main.py`)
- Training setup → Neural architectures: selects model (evidence: `main.py`)
- Training setup → Invariant losses: selects loss (evidence: `main.py`)
- Training setup → Array utilities: uses helpers (evidence: `main.py`)
- Model training → Rank sampling: uses sampler (evidence: `train.py`)
- Model training → Array utilities: uses helpers (evidence: `train.py`)
- Researcher → Performance evaluation: configures evaluation (evidence: `README.md`)
- Performance evaluation → Scenario datasets: generates trials (evidence: `performance.py`)
- Performance evaluation → Neural prediction: evaluates models (evidence: `performance.py`)
- Performance evaluation → DoA algorithms: selects methods (evidence: `performance.py`)
- Performance evaluation → SDP adapters: selects baselines (evidence: `performance.py`)
- Performance evaluation → CRLB bounds: computes bounds (evidence: `performance.py`)
- Performance evaluation → Array utilities: uses helpers (evidence: `performance.py`)
- Neural prediction → Neural architectures: runs network (evidence: `predict.py`)
- Neural prediction → DoA algorithms: delegates DoA (evidence: `predict.py`)
- Neural prediction → Array utilities: preprocesses input (evidence: `predict.py`)
- DoA algorithms → Array utilities: uses array geometry (evidence: `DoA.py`)
- SDP adapters → DoA algorithms: extends predictors (evidence: `SDP/SDP.py`)
- SDP adapters → MATLAB CVX: invokes MATLAB (evidence: `SDP/SDP.py`)
- SDP adapters → SDP formulations: calls formulations (evidence: `SDP/SDP.py`)
- SDP formulations → MATLAB CVX: solves via CVX (evidence: `README.md`)
- Performance evaluation → Experiment results: records metrics
- Researcher → Training setup: runs ICASSP experiments (evidence: `README.md`)
