# wenxing99/rpedr architecture

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

- Interactive diagram: https://gitdiagram.com/wenxing99/rpedr
- Repository: https://github.com/wenxing99/rpedr

## Overview

This is a small research implementation of random-projection ensemble dimension reduction for high-dimensional regression. Its main workflow applies repeated low-dimensional projections, fits a base regression model, selects projections by empirical performance, and aggregates them into dimension-reduction directions. The documented follow-on algorithms estimate CMS dimension or apply the main algorithm twice. The README also identifies simulation and real-data analyses. Source excerpts were unavailable, so relationships below rely on the README; implementation details beyond it are omitted.

Main entry points: [`RPEDR.R`](https://github.com/wenxing99/rpedr/blob/main/RPEDR.R) (RPEDR), [`RPEDR_dim_est.R`](https://github.com/wenxing99/rpedr/blob/main/RPEDR_dim_est.R) (CMS dimension estimate), [`RPEDR_double.R`](https://github.com/wenxing99/rpedr/blob/main/RPEDR_double.R) (Double application), [`simulation_example.R`](https://github.com/wenxing99/rpedr/blob/main/simulation_example.R) (Simulation example)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_methods["Reduction methods"]
  node_rpedr["RPEDR<br/>[RPEDR.R]"]
  node_projection["Random projections<br/>[RPEDR.R]"]
  node_base_fit["Base regression fits<br/>[RPEDR.R]"]
  node_selection["Projection selection<br/>[RPEDR.R]"]
  node_directions["Reduction directions<br/>[RPEDR.R]"]
  node_dim_est["CMS dimension estimate<br/>[RPEDR_dim_est.R]"]
  node_double["Double application<br/>[RPEDR_double.R]"]
end

subgraph group_evaluation["Research analyses"]
  node_simulation["Simulation example"]
  node_real_data["Real-data analyses"]
end

node_researcher(("Researcher"))

node_researcher -->|"runs"| node_rpedr
node_rpedr -->|"applies"| node_projection
node_rpedr -->|"fits models"| node_base_fit
node_rpedr -->|"selects"| node_selection
node_rpedr -->|"aggregates by SVD"| node_directions
node_dim_est -->|"uses output"| node_rpedr
node_double -->|"applies twice"| node_rpedr
node_researcher -->|"runs example"| node_simulation
node_researcher -->|"reproduces analyses"| node_real_data

click node_rpedr "https://github.com/wenxing99/rpedr/blob/main/RPEDR.R"
click node_projection "https://github.com/wenxing99/rpedr/blob/main/RPEDR.R"
click node_base_fit "https://github.com/wenxing99/rpedr/blob/main/RPEDR.R"
click node_selection "https://github.com/wenxing99/rpedr/blob/main/RPEDR.R"
click node_directions "https://github.com/wenxing99/rpedr/blob/main/RPEDR.R"
click node_dim_est "https://github.com/wenxing99/rpedr/blob/main/RPEDR_dim_est.R"
click node_double "https://github.com/wenxing99/rpedr/blob/main/RPEDR_double.R"
click node_simulation "https://github.com/wenxing99/rpedr/blob/main/simulation_example.R"
click node_real_data "https://github.com/wenxing99/rpedr/tree/main/Real_Data"

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_rpedr,node_projection,node_base_fit,node_selection,node_directions,node_dim_est,node_double toneBlue
class node_simulation,node_real_data toneAmber
class node_researcher toneIndigo
```

## Components

### Reduction methods

- [RPEDR](https://github.com/wenxing99/rpedr/blob/main/RPEDR.R): `RPEDR.R`
- [Random projections](https://github.com/wenxing99/rpedr/blob/main/RPEDR.R): `RPEDR.R`
- [Base regression fits](https://github.com/wenxing99/rpedr/blob/main/RPEDR.R): `RPEDR.R`
- [Projection selection](https://github.com/wenxing99/rpedr/blob/main/RPEDR.R): `RPEDR.R`
- [Reduction directions](https://github.com/wenxing99/rpedr/blob/main/RPEDR.R): `RPEDR.R`
- [CMS dimension estimate](https://github.com/wenxing99/rpedr/blob/main/RPEDR_dim_est.R): `RPEDR_dim_est.R`
- [Double application](https://github.com/wenxing99/rpedr/blob/main/RPEDR_double.R): `RPEDR_double.R`

### Research analyses

- [Simulation example](https://github.com/wenxing99/rpedr/blob/main/simulation_example.R): `simulation_example.R`
- [Real-data analyses](https://github.com/wenxing99/rpedr/tree/main/Real_Data): `Real_Data`

### Other components

- **Researcher**

## Connections

- Researcher → RPEDR: runs (evidence: `README.md`)
- RPEDR → Random projections: applies (evidence: `README.md`)
- RPEDR → Base regression fits: fits models (evidence: `README.md`)
- RPEDR → Projection selection: selects (evidence: `README.md`)
- RPEDR → Reduction directions: aggregates by SVD (evidence: `README.md`)
- CMS dimension estimate → RPEDR: uses output (evidence: `README.md`)
- Double application → RPEDR: applies twice (evidence: `README.md`)
- Researcher → Simulation example: runs example (evidence: `README.md`)
- Researcher → Real-data analyses: reproduces analyses (evidence: `README.md`)
