# orfeld415/navis architecture

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

- Interactive diagram: https://gitdiagram.com/orfeld415/navis
- Repository: https://github.com/orfeld415/navis

## Overview

NAVIS trains and evaluates a temporal node-property predictor: it loads temporal data, updates per-node label memory from interaction batches, predicts labels at successive label times, and reports ranking metrics. Its ranking regularizer is a separate runtime component. The link2node scripts transform four source datasets into weighted edge lists and normalized node-label files. No README was provided; edges reflect only the shown excerpts, so unsampled training details are not inferred.

Main entry points: [`NAVIS/navis.py`](https://github.com/orfeld415/navis/blob/main/NAVIS/navis.py) (Train and evaluate), [`link2node/make_flights.py`](https://github.com/orfeld415/navis/blob/main/link2node/make_flights.py) (Flights converter), [`link2node/make_unvote.py`](https://github.com/orfeld415/navis/blob/main/link2node/make_unvote.py) (UN vote converter), [`link2node/make_uslegis.py`](https://github.com/orfeld415/navis/blob/main/link2node/make_uslegis.py) (USLegis converter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navis["NAVIS prediction"]
  node_runner["Train and evaluate<br/>[navis.py]"]
  node_memory["Label memory<br/>[navis.py]"]
  node_regularizer["Ranking regularizer<br/>[regularization.py]"]
end

subgraph group_prep["Dataset preparation"]
  node_flights["Flights converter<br/>[make_flights.py]"]
  node_unvote["UN vote converter<br/>[make_unvote.py]"]
  node_uslegis["USLegis converter<br/>[make_uslegis.py]"]
  node_wiki["Wiki converter<br/>[make_wiki.py]"]
end

node_tgb[("Temporal dataset")]
node_evaluator["Metric evaluator"]
node_sourcefiles["Source datasets"]
node_outputs["Edge and label CSVs"]

node_runner -->|"updates and predicts"| node_memory
node_runner -->|"configures"| node_regularizer
node_runner -->|"loads and gets labels"| node_tgb
node_runner -->|"evaluates predictions"| node_evaluator
node_flights -->|"reads Flights.csv"| node_sourcefiles
node_flights -->|"writes edge and label CSVs"| node_outputs
node_unvote -->|"reads UNvote.csv"| node_sourcefiles
node_unvote -->|"writes edge and label CSVs"| node_outputs
node_uslegis -->|"reads USLegis.csv"| node_sourcefiles
node_uslegis -->|"writes edge and label CSVs"| node_outputs
node_wiki -->|"reads wiki CSV"| node_sourcefiles
node_wiki -->|"writes edge and label CSVs"| node_outputs

click node_runner "https://github.com/orfeld415/navis/blob/main/NAVIS/navis.py"
click node_memory "https://github.com/orfeld415/navis/blob/main/NAVIS/navis.py"
click node_regularizer "https://github.com/orfeld415/navis/blob/main/NAVIS/regularization.py"
click node_flights "https://github.com/orfeld415/navis/blob/main/link2node/make_flights.py"
click node_unvote "https://github.com/orfeld415/navis/blob/main/link2node/make_unvote.py"
click node_uslegis "https://github.com/orfeld415/navis/blob/main/link2node/make_uslegis.py"
click node_wiki "https://github.com/orfeld415/navis/blob/main/link2node/make_wiki.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_runner,node_memory,node_regularizer toneBlue
class node_flights,node_unvote,node_uslegis,node_wiki,node_tgb toneAmber
class node_evaluator,node_sourcefiles,node_outputs toneIndigo
```

## Components

### NAVIS prediction

- [Train and evaluate](https://github.com/orfeld415/navis/blob/main/NAVIS/navis.py): `NAVIS/navis.py`
- [Label memory](https://github.com/orfeld415/navis/blob/main/NAVIS/navis.py): `NAVIS/navis.py`
- [Ranking regularizer](https://github.com/orfeld415/navis/blob/main/NAVIS/regularization.py): `NAVIS/regularization.py`

### Dataset preparation

- [Flights converter](https://github.com/orfeld415/navis/blob/main/link2node/make_flights.py): `link2node/make_flights.py`
- [UN vote converter](https://github.com/orfeld415/navis/blob/main/link2node/make_unvote.py): `link2node/make_unvote.py`
- [USLegis converter](https://github.com/orfeld415/navis/blob/main/link2node/make_uslegis.py): `link2node/make_uslegis.py`
- [Wiki converter](https://github.com/orfeld415/navis/blob/main/link2node/make_wiki.py): `link2node/make_wiki.py`

### Other components

- **Temporal dataset**
- **Metric evaluator**
- **Source datasets**
- **Edge and label CSVs**

## Connections

- Train and evaluate → Label memory: updates and predicts (evidence: `NAVIS/navis.py`)
- Train and evaluate → Ranking regularizer: configures (evidence: `NAVIS/navis.py`)
- Train and evaluate → Temporal dataset: loads and gets labels (evidence: `NAVIS/navis.py`)
- Train and evaluate → Metric evaluator: evaluates predictions (evidence: `NAVIS/navis.py`)
- Flights converter → Source datasets: reads Flights.csv (evidence: `link2node/make_flights.py`)
- Flights converter → Edge and label CSVs: writes edge and label CSVs (evidence: `link2node/make_flights.py`)
- UN vote converter → Source datasets: reads UNvote.csv (evidence: `link2node/make_unvote.py`)
- UN vote converter → Edge and label CSVs: writes edge and label CSVs (evidence: `link2node/make_unvote.py`)
- USLegis converter → Source datasets: reads USLegis.csv (evidence: `link2node/make_uslegis.py`)
- USLegis converter → Edge and label CSVs: writes edge and label CSVs (evidence: `link2node/make_uslegis.py`)
- Wiki converter → Source datasets: reads wiki CSV (evidence: `link2node/make_wiki.py`)
- Wiki converter → Edge and label CSVs: writes edge and label CSVs (evidence: `link2node/make_wiki.py`)
