# dvkjain/sea_project architecture

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

- Interactive diagram: https://gitdiagram.com/dvkjain/sea_project
- Repository: https://github.com/dvkjain/sea_project

## Overview

Sea is a terminal data utility and neural-network workflow tool. Users invoke commands to preview, clean, plot, or split supported datasets, or train and evaluate regression/classification models. The ML path loads feature and target columns, applies scaling and optional target encoding, fits or tunes a model, saves its preprocessing metadata with it, and later reuses that metadata for evaluation. The graph preserves README capabilities; unsampled modules are represented only where documented, and edges reflect shown calls or documented command behavior.

Main entry points: [`sea/cli.py`](https://github.com/dvkjain/sea_project/blob/main/sea/cli.py) (Command router), [`sea/ml/train_command.py`](https://github.com/dvkjain/sea_project/blob/main/sea/ml/train_command.py) (Training command), [`sea/ml/evaluate_command.py`](https://github.com/dvkjain/sea_project/blob/main/sea/ml/evaluate_command.py) (Evaluation command), [`sea/ml/regression_model.py`](https://github.com/dvkjain/sea_project/blob/main/sea/ml/regression_model.py) (Regression model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI entry"]
  node_cli_entry["Command router<br/>[cli.py]"]
end

subgraph group_data["Dataset operations"]
  node_read["Preview data<br/>[read_command.py]"]
  node_clean["Clean data<br/>[clean_command.py]"]
  node_split["Split dataset<br/>[split_command.py]"]
end

subgraph group_visual["Visualization"]
  node_plot["Plot data<br/>[plot_command.py]"]
end

subgraph group_ml["Model workflow"]
  node_train["Training command<br/>[train_command.py]"]
  node_loader["Feature loader<br/>[data_utils.py]"]
  node_base_model["Shared model prep<br/>[base_model.py]"]
  node_regression["Regression model"]
  node_classification["Classification model"]
  node_evaluate["Evaluation command"]
end

node_user(("Terminal user"))
node_dataset["Dataset file"]
node_config["YAML config"]
node_model_artifact["Saved model"]

node_user -->|"invokes"| node_cli_entry
node_cli_entry -->|"routes to"| node_read
node_cli_entry -->|"routes to"| node_clean
node_cli_entry -->|"routes to"| node_plot
node_cli_entry -->|"routes to"| node_split
node_cli_entry -->|"routes to"| node_train
node_cli_entry -->|"routes to"| node_evaluate
node_dataset -->|"read by"| node_read
node_dataset -->|"read by"| node_clean
node_clean -->|"writes cleaned data"| node_dataset
node_dataset -->|"read by"| node_split
node_split -->|"writes partitions"| node_dataset
node_dataset -->|"read by"| node_plot
node_dataset -->|"training input"| node_train
node_config -->|"configures"| node_train
node_train -->|"constructs"| node_regression
node_train -->|"constructs"| node_classification
node_regression -->|"extends"| node_base_model
node_classification -->|"extends"| node_base_model
node_base_model -->|"loads data"| node_loader
node_regression -->|"saves model"| node_model_artifact
node_classification -->|"saves model"| node_model_artifact
node_model_artifact -->|"loaded for evaluation"| node_evaluate
node_dataset -->|"test input"| node_evaluate
node_evaluate -->|"loads test data"| node_loader

click node_cli_entry "https://github.com/dvkjain/sea_project/blob/main/sea/cli.py"
click node_read "https://github.com/dvkjain/sea_project/blob/main/sea/read_command.py"
click node_clean "https://github.com/dvkjain/sea_project/blob/main/sea/clean_command.py"
click node_split "https://github.com/dvkjain/sea_project/blob/main/sea/ml/split_command.py"
click node_plot "https://github.com/dvkjain/sea_project/blob/main/sea/plot_command.py"
click node_train "https://github.com/dvkjain/sea_project/blob/main/sea/ml/train_command.py"
click node_loader "https://github.com/dvkjain/sea_project/blob/main/sea/ml/data_utils.py"
click node_base_model "https://github.com/dvkjain/sea_project/blob/main/sea/ml/base_model.py"
click node_regression "https://github.com/dvkjain/sea_project/blob/main/sea/ml/regression_model.py"
click node_classification "https://github.com/dvkjain/sea_project/blob/main/sea/ml/classification_model.py"
click node_evaluate "https://github.com/dvkjain/sea_project/blob/main/sea/ml/evaluate_command.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_cli_entry,node_user toneBlue
class node_read,node_clean,node_split toneAmber
class node_plot toneMint
class node_train,node_loader,node_base_model,node_regression,node_classification,node_evaluate toneRose
class node_dataset,node_config,node_model_artifact toneIndigo
```

## Components

### CLI entry

- [Command router](https://github.com/dvkjain/sea_project/blob/main/sea/cli.py): `sea/cli.py`

### Dataset operations

- [Preview data](https://github.com/dvkjain/sea_project/blob/main/sea/read_command.py): `sea/read_command.py`
- [Clean data](https://github.com/dvkjain/sea_project/blob/main/sea/clean_command.py): `sea/clean_command.py`
- [Split dataset](https://github.com/dvkjain/sea_project/blob/main/sea/ml/split_command.py): `sea/ml/split_command.py`

### Visualization

- [Plot data](https://github.com/dvkjain/sea_project/blob/main/sea/plot_command.py): `sea/plot_command.py`

### Model workflow

- [Training command](https://github.com/dvkjain/sea_project/blob/main/sea/ml/train_command.py): `sea/ml/train_command.py`
- [Feature loader](https://github.com/dvkjain/sea_project/blob/main/sea/ml/data_utils.py): `sea/ml/data_utils.py`
- [Shared model prep](https://github.com/dvkjain/sea_project/blob/main/sea/ml/base_model.py): `sea/ml/base_model.py`
- [Regression model](https://github.com/dvkjain/sea_project/blob/main/sea/ml/regression_model.py): `sea/ml/regression_model.py`
- [Classification model](https://github.com/dvkjain/sea_project/blob/main/sea/ml/classification_model.py): `sea/ml/classification_model.py`
- [Evaluation command](https://github.com/dvkjain/sea_project/blob/main/sea/ml/evaluate_command.py): `sea/ml/evaluate_command.py`

### Other components

- **Terminal user**
- **Dataset file**
- **YAML config**
- **Saved model**

## Connections

- Terminal user → Command router: invokes (evidence: `README.md`)
- Command router → Preview data: routes to (evidence: `sea/cli.py`)
- Command router → Clean data: routes to (evidence: `sea/cli.py`)
- Command router → Plot data: routes to (evidence: `sea/cli.py`)
- Command router → Split dataset: routes to (evidence: `sea/cli.py`)
- Command router → Training command: routes to (evidence: `sea/cli.py`)
- Command router → Evaluation command: routes to (evidence: `sea/cli.py`)
- Dataset file → Preview data: read by (evidence: `sea/read_command.py`)
- Dataset file → Clean data: read by (evidence: `sea/clean_command.py`)
- Clean data → Dataset file: writes cleaned data (evidence: `sea/clean_command.py`)
- Dataset file → Split dataset: read by (evidence: `sea/ml/split_command.py`)
- Split dataset → Dataset file: writes partitions (evidence: `sea/ml/split_command.py`)
- Dataset file → Plot data: read by (evidence: `sea/plot_command.py`)
- Dataset file → Training command: training input (evidence: `README.md`)
- YAML config → Training command: configures (evidence: `sea/ml/train_command.py`)
- Training command → Regression model: constructs (evidence: `sea/ml/train_command.py`)
- Training command → Classification model: constructs (evidence: `sea/ml/train_command.py`)
- Regression model → Shared model prep: extends (evidence: `sea/ml/regression_model.py`)
- Classification model → Shared model prep: extends (evidence: `sea/ml/classification_model.py`)
- Shared model prep → Feature loader: loads data (evidence: `sea/ml/base_model.py`)
- Regression model → Saved model: saves model (evidence: `sea/ml/regression_model.py`)
- Classification model → Saved model: saves model (evidence: `sea/ml/classification_model.py`)
- Saved model → Evaluation command: loaded for evaluation (evidence: `README.md`)
- Dataset file → Evaluation command: test input (evidence: `README.md`)
- Evaluation command → Feature loader: loads test data (evidence: `sea/ml/evaluate_command.py`)
