# dinhlocnguyen14/dudoanvono architecture

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

- Interactive diagram: https://gitdiagram.com/dinhlocnguyen14/dudoanvono
- Repository: https://github.com/dinhlocnguyen14/dudoanvono

## Overview

This repository implements the data-preparation and validation-baseline stage of a credit-card default prediction project, not the later model-training stages. The principal workflow downloads and verifies the UCI workbook, validates and splits it, fits preprocessing on Train, generates Train-only EDA, and evaluates a constant-prevalence baseline on Val. The graph separates these domain stages and the shared metrics layer. Later models and analyses are documented as planned, not implemented. Evidence is limited to the README and sampled source excerpts.

Main entry points: [`run_all.py`](https://github.com/dinhlocnguyen14/dudoanvono/blob/main/run_all.py) (Pipeline runner), [`data/download_data.py`](https://github.com/dinhlocnguyen14/dudoanvono/blob/main/data/download_data.py) (Workbook downloader), [`src/data_prep.py`](https://github.com/dinhlocnguyen14/dudoanvono/blob/main/src/data_prep.py) (Schema validation), [`src/eda.py`](https://github.com/dinhlocnguyen14/dudoanvono/blob/main/src/eda.py) (Train-only EDA)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_acquisition["Data acquisition"]
  node_downloader["Workbook downloader<br/>[download_data.py]"]
  node_workbook["Raw workbook"]
end

subgraph group_preparation["Data preparation"]
  node_runner["Pipeline runner<br/>[run_all.py]"]
  node_ingestion["Schema validation<br/>[data_prep.py]"]
  node_splitting["Stratified splitting<br/>[data_prep.py]"]
  node_cleaning["Feature cleaning<br/>[data_prep.py]"]
  node_preprocessing["Train-fit preprocessing<br/>[data_prep.py]"]
end

subgraph group_analysis["Analysis and evaluation"]
  node_eda["Train-only EDA<br/>[eda.py]"]
  node_baseline["Prevalence baseline<br/>[run_all.py]"]
  node_metrics["Binary metrics<br/>[evaluate.py]"]
  node_artifacts["Pipeline artifacts<br/>[run_all.py]"]
end

node_operator(("Project operator"))
node_uci[("UCI dataset")]

node_operator -->|"runs"| node_runner
node_runner -->|"calls"| node_downloader
node_downloader -->|"downloads"| node_uci
node_downloader -->|"writes"| node_workbook
node_runner -->|"reads and validates"| node_ingestion
node_runner -->|"calls"| node_splitting
node_runner -->|"calls"| node_cleaning
node_runner -->|"fits and transforms"| node_preprocessing
node_runner -->|"generates"| node_eda
node_runner -->|"scores Val"| node_baseline
node_runner -->|"calls"| node_metrics
node_runner -->|"writes"| node_artifacts

click node_runner "https://github.com/dinhlocnguyen14/dudoanvono/blob/main/run_all.py"
click node_downloader "https://github.com/dinhlocnguyen14/dudoanvono/blob/main/data/download_data.py"
click node_ingestion "https://github.com/dinhlocnguyen14/dudoanvono/blob/main/src/data_prep.py"
click node_splitting "https://github.com/dinhlocnguyen14/dudoanvono/blob/main/src/data_prep.py"
click node_cleaning "https://github.com/dinhlocnguyen14/dudoanvono/blob/main/src/data_prep.py"
click node_preprocessing "https://github.com/dinhlocnguyen14/dudoanvono/blob/main/src/data_prep.py"
click node_eda "https://github.com/dinhlocnguyen14/dudoanvono/blob/main/src/eda.py"
click node_baseline "https://github.com/dinhlocnguyen14/dudoanvono/blob/main/run_all.py"
click node_metrics "https://github.com/dinhlocnguyen14/dudoanvono/blob/main/src/evaluate.py"
click node_artifacts "https://github.com/dinhlocnguyen14/dudoanvono/blob/main/run_all.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_downloader,node_workbook toneBlue
class node_runner,node_ingestion,node_splitting,node_cleaning,node_preprocessing,node_uci toneAmber
class node_eda,node_baseline,node_metrics,node_artifacts toneMint
class node_operator toneIndigo
```

## Components

### Data acquisition

- [Workbook downloader](https://github.com/dinhlocnguyen14/dudoanvono/blob/main/data/download_data.py): `data/download_data.py`
- **Raw workbook**

### Data preparation

- [Pipeline runner](https://github.com/dinhlocnguyen14/dudoanvono/blob/main/run_all.py): `run_all.py`
- [Schema validation](https://github.com/dinhlocnguyen14/dudoanvono/blob/main/src/data_prep.py): `src/data_prep.py`
- [Stratified splitting](https://github.com/dinhlocnguyen14/dudoanvono/blob/main/src/data_prep.py): `src/data_prep.py`
- [Feature cleaning](https://github.com/dinhlocnguyen14/dudoanvono/blob/main/src/data_prep.py): `src/data_prep.py`
- [Train-fit preprocessing](https://github.com/dinhlocnguyen14/dudoanvono/blob/main/src/data_prep.py): `src/data_prep.py`

### Analysis and evaluation

- [Train-only EDA](https://github.com/dinhlocnguyen14/dudoanvono/blob/main/src/eda.py): `src/eda.py`
- [Prevalence baseline](https://github.com/dinhlocnguyen14/dudoanvono/blob/main/run_all.py): `run_all.py`
- [Binary metrics](https://github.com/dinhlocnguyen14/dudoanvono/blob/main/src/evaluate.py): `src/evaluate.py`
- [Pipeline artifacts](https://github.com/dinhlocnguyen14/dudoanvono/blob/main/run_all.py): `run_all.py`

### Other components

- **Project operator**
- **UCI dataset**

## Connections

- Project operator → Pipeline runner: runs (evidence: `README.md`)
- Pipeline runner → Workbook downloader: calls (evidence: `run_all.py`)
- Workbook downloader → UCI dataset: downloads (evidence: `data/download_data.py`)
- Workbook downloader → Raw workbook: writes (evidence: `data/download_data.py`)
- Pipeline runner → Schema validation: reads and validates (evidence: `run_all.py`)
- Pipeline runner → Stratified splitting: calls (evidence: `run_all.py`)
- Pipeline runner → Feature cleaning: calls (evidence: `run_all.py`)
- Pipeline runner → Train-fit preprocessing: fits and transforms (evidence: `run_all.py`)
- Pipeline runner → Train-only EDA: generates (evidence: `run_all.py`)
- Pipeline runner → Prevalence baseline: scores Val (evidence: `run_all.py`)
- Pipeline runner → Binary metrics: calls (evidence: `run_all.py`)
- Pipeline runner → Pipeline artifacts: writes (evidence: `run_all.py`)
