# tanthinhdt/cbbl-2025 architecture

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

- Interactive diagram: https://gitdiagram.com/tanthinhdt/cbbl-2025
- Repository: https://github.com/tanthinhdt/cbbl-2025

## Overview

##### Project type and purpose
- This is not a web‐app or microservice suite but rather a machine‐learning experimentation/benchmarking project.
- It houses Jupyter notebooks for binary/multi‐class classification and continuous‐value regression, evaluates multiple model families (decision trees, random forests, gradient boosting, logistic/linear regression, TabPFN variants, GPT‐style models), and captures experiment outputs under various preprocessing strategies.

##### File structure
- Top‐level:
- classification/   ← Jupyter notebooks for classification experiments
- regression/       ← Jupyter notebooks for regression experiments
- results/          ← CSV outputs organized by preprocessing category
- requirements.txt  ← Python dependencies list
- Under results/ you have subfolders for each preprocessing axis (missing_values, feature_scaling, feature_encoding, dimensionality_reduction, outliers) plus a “main” folder for final model comparisons.
- There are no dedicated Python modules or services—experiments are driven directly from notebooks.

##### README
- README.md only contains the title (“# cbbl‐2025”). No architecture hints, so we infer from the directory layout that the core architecture is a data→preprocessing→modeling→results pipeline orchestrated by notebooks.

a. Main components
- Raw Data Sources (train.csv, test.csv under classification/ and regression/)
- Preprocessing Modules
- Missing‐Value Handler
- Feature Scaling
- Feature Encoding
- Outlier Detection/Handling
- Dimensionality Reduction
- Experiment Orchestration Layer (Jupyter Notebooks)
- classification notebooks
- regression notebooks
- Model Training & Evaluation Engines
- Decision Tree / Random Forest / Gradient Boosting
- (Logistic/Linear) Regression
- TabPFN v2 (standard, optimized, exp)
- GPT-style (BioGPT, GPT2, LLaMA3)
- Results Storage (results/ subfolders)
- Visualization & Reporting (images/ plus any embedded notebook charts)

b. Relationships & Data Flow
- From each Preprocessing Module → Experiment Orchestrator (classification/regression notebooks)
- Within notebooks, branch to multiple Model Engines in parallel
- Model Engines output metrics/CSV → Results Storage
- Final aggregation → Visualization layer

c. Architectural Patterns & Principles
- Modular pipeline: each preprocessing step is a reusable component
- Parallel model evaluation: notebooks spin up multiple algorithms concurrently
- Separation of concerns: data preparation, model training, and result collection are clearly partitioned

d. Key Technologies & Frameworks
- Python 3.x (see requirements.txt)
- Jupyter Notebooks as orchestrators
- scikit-learn, TabPFN library, Hugging Face Transformers (for GPT variants)
- pandas for data handling, matplotlib/seaborn for plots

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Layer
    subgraph "Data Layer"
        RD1["classification/train.csv"]:::data
        RD2["classification/test.csv"]:::data
        RD3["regression/train.csv"]:::data
        RD4["regression/test.csv"]:::data
    end

    %% Preprocessing Modules
    subgraph "Preprocessing Modules"
        PM1["Missing-Value Handler"]:::pre
        PM2["Feature Scaling"]:::pre
        PM3["Feature Encoding"]:::pre
        PM4["Dimensionality Reduction"]:::pre
        PM5["Outlier Detection/Handling"]:::pre
    end

    %% Orchestration Layer
    subgraph "Orchestration Layer (Notebooks)"
        subgraph "Classification Notebooks"
            C1["c_decision-tree.ipynb"]:::note
            C2["c_random-forests.ipynb"]:::note
            C3["c_gradient-boosting.ipynb"]:::note
            C4["c_logistic-regression.ipynb"]:::note
            C5["c_tabpfn-v2.ipynb"]:::note
            C6["c_tabpfn-v2-90.ipynb"]:::note
            C7["c_tabpfn-v2-optimized.ipynb"]:::note
            C8["c_tabpfn-v2_exp.ipynb"]:::note
        end
        subgraph "Regression Notebooks"
            R1["r_decision-tree.ipynb"]:::note
            R2["r_random-forests.ipynb"]:::note
            R3["r_gradient-boosting.ipynb"]:::note
            R4["r_linear-regression.ipynb"]:::note
            R5["r_biogpt.ipynb"]:::note
            R6["r_gpt2.ipynb"]:::note
            R7["r_llama3.ipynb"]:::note
            R8["r_tabpfn-v2.ipynb"]:::note
            R9["r_tabpfn-v2-90.ipynb"]:::note
            R10["r_tabpfn-v2-optimized.ipynb"]:::note
            R11["r_tabpfn-v2_exp.ipynb"]:::note
        end
    end

    %% Modeling Engines
    subgraph "Modeling Engines"
        M1["Decision Tree"]:::model
        M2["Random Forest"]:::model
        M3["Gradient Boosting"]:::model
        M4["(Logistic/Linear) Regression"]:::model
        M5["TabPFN Variants"]:::model
        M6["GPT-Style Models"]:::model
    end

    %% Results Storage
    subgraph "Results Storage"
        RS1["results/missing_values/"]:::result
        RS2["results/feature_scaling/"]:::result
        RS3["results/feature_encoding/"]:::result
        RS4["results/dimensionality_reduction/"]:::result
        RS5["results/outliers/"]:::result
        RS6["results/main/"]:::result
    end

    %% Visualization & Reporting
    subgraph "Visualization & Reporting"
        IMG["images/"]:::vis
    end

    %% Dependency Management
    REQ["requirements.txt"]:::aux

    %% Connections
    RD1,RD2,RD3,RD4 --> PM1
    RD1,RD2,RD3,RD4 --> PM2
    RD1,RD2,RD3,RD4 --> PM3
    RD1,RD2,RD3,RD4 --> PM4
    RD1,RD2,RD3,RD4 --> PM5

    PM1,PM2,PM3,PM4,PM5 --> C1
    PM1,PM2,PM3,PM4,PM5 --> C2
    PM1,PM2,PM3,PM4,PM5 --> C3
    PM1,PM2,PM3,PM4,PM5 --> C4
    PM1,PM2,PM3,PM4,PM5 --> C5
    PM1,PM2,PM3,PM4,PM5 --> C6
    PM1,PM2,PM3,PM4,PM5 --> C7
    PM1,PM2,PM3,PM4,PM5 --> C8

    PM1,PM2,PM3,PM4,PM5 --> R1
    PM1,PM2,PM3,PM4,PM5 --> R2
    PM1,PM2,PM3,PM4,PM5 --> R3
    PM1,PM2,PM3,PM4,PM5 --> R4
    PM1,PM2,PM3,PM4,PM5 --> R5
    PM1,PM2,PM3,PM4,PM5 --> R6
    PM1,PM2,PM3,PM4,PM5 --> R7
    PM1,PM2,PM3,PM4,PM5 --> R8
    PM1,PM2,PM3,PM4,PM5 --> R9
    PM1,PM2,PM3,PM4,PM5 --> R10
    PM1,PM2,PM3,PM4,PM5 --> R11

    C1,C2,C3,C4,C5,C6,C7,C8 --> M1
    C1,C2,C3,C4,C5,C6,C7,C8 --> M2
    C1,C2,C3,C4,C5,C6,C7,C8 --> M3
    C1,C2,C3,C4 --> M4
    C5,C6,C7,C8 --> M5

    R1,R2,R3 --> M1
    R1,R2,R3 --> M2
    R1,R2,R3 --> M3
    R4 --> M4
    R8,R9,R10,R11 --> M5
    R5,R6,R7 --> M6

    M1,M2,M3,M4,M5,M6 --> RS1
    M1,M2,M3,M4,M5,M6 --> RS2
    M1,M2,M3,M4,M5,M6 --> RS3
    M1,M2,M3,M4,M5,M6 --> RS4
    M1,M2,M3,M4,M5,M6 --> RS5

    RS1,RS2,RS3,RS4,RS5 --> RS6
    RS6 --> IMG
    IMG --> REQ

    %% Click Events
    click RD1 "https://github.com/tanthinhdt/cbbl-2025/blob/main/classification/train.csv"
    click RD2 "https://github.com/tanthinhdt/cbbl-2025/blob/main/classification/test.csv"
    click RD3 "https://github.com/tanthinhdt/cbbl-2025/blob/main/regression/train.csv"
    click RD4 "https://github.com/tanthinhdt/cbbl-2025/blob/main/regression/test.csv"

    click PM1 "https://github.com/tanthinhdt/cbbl-2025/tree/main/results/missing_values/"
    click PM2 "https://github.com/tanthinhdt/cbbl-2025/tree/main/results/feature_scaling/"
    click PM3 "https://github.com/tanthinhdt/cbbl-2025/tree/main/results/feature_encoding/"
    click PM4 "https://github.com/tanthinhdt/cbbl-2025/tree/main/results/dimensionality_reduction/"
    click PM5 "https://github.com/tanthinhdt/cbbl-2025/tree/main/results/outliers/"

    click C1 "https://github.com/tanthinhdt/cbbl-2025/blob/main/classification/c_decision-tree.ipynb"
    click C2 "https://github.com/tanthinhdt/cbbl-2025/blob/main/classification/c_random-forests.ipynb"
    click C3 "https://github.com/tanthinhdt/cbbl-2025/blob/main/classification/c_gradient-boosting.ipynb"
    click C4 "https://github.com/tanthinhdt/cbbl-2025/blob/main/classification/c_logistic-regression.ipynb"
    click C5 "https://github.com/tanthinhdt/cbbl-2025/blob/main/classification/c_tabpfn-v2.ipynb"
    click C6 "https://github.com/tanthinhdt/cbbl-2025/blob/main/classification/c_tabpfn-v2-90.ipynb"
    click C7 "https://github.com/tanthinhdt/cbbl-2025/blob/main/classification/c_tabpfn-v2-optimized.ipynb"
    click C8 "https://github.com/tanthinhdt/cbbl-2025/blob/main/classification/c_tabpfn-v2_exp.ipynb"

    click R1 "https://github.com/tanthinhdt/cbbl-2025/blob/main/regression/r_decision-tree.ipynb"
    click R2 "https://github.com/tanthinhdt/cbbl-2025/blob/main/regression/r_random-forests.ipynb"
    click R3 "https://github.com/tanthinhdt/cbbl-2025/blob/main/regression/r_gradient-boosting.ipynb"
    click R4 "https://github.com/tanthinhdt/cbbl-2025/blob/main/regression/r_linear-regression.ipynb"
    click R5 "https://github.com/tanthinhdt/cbbl-2025/blob/main/regression/r_biogpt.ipynb"
    click R6 "https://github.com/tanthinhdt/cbbl-2025/blob/main/regression/r_gpt2.ipynb"
    click R7 "https://github.com/tanthinhdt/cbbl-2025/blob/main/regression/r_llama3.ipynb"
    click R8 "https://github.com/tanthinhdt/cbbl-2025/blob/main/regression/r_tabpfn-v2.ipynb"
    click R9 "https://github.com/tanthinhdt/cbbl-2025/blob/main/regression/r_tabpfn-v2-90.ipynb"
    click R10 "https://github.com/tanthinhdt/cbbl-2025/blob/main/regression/r_tabpfn-v2-optimized.ipynb"
    click R11 "https://github.com/tanthinhdt/cbbl-2025/blob/main/regression/r_tabpfn-v2_exp.ipynb"

    click RS1 "https://github.com/tanthinhdt/cbbl-2025/tree/main/results/missing_values/"
    click RS2 "https://github.com/tanthinhdt/cbbl-2025/tree/main/results/feature_scaling/"
    click RS3 "https://github.com/tanthinhdt/cbbl-2025/tree/main/results/feature_encoding/"
    click RS4 "https://github.com/tanthinhdt/cbbl-2025/tree/main/results/dimensionality_reduction/"
    click RS5 "https://github.com/tanthinhdt/cbbl-2025/tree/main/results/outliers/"
    click RS6 "https://github.com/tanthinhdt/cbbl-2025/tree/main/results/main/"

    click IMG "https://github.com/tanthinhdt/cbbl-2025/tree/main/images/"
    click REQ "https://github.com/tanthinhdt/cbbl-2025/blob/main/requirements.txt"

    %% Styles
    classDef data fill:#cfe2f3,stroke:#1f77b4;
    classDef pre fill:#d9ead3,stroke:#2e7d32;
    classDef note fill:#e0e0e0,stroke:#616161;
    classDef model fill:#fce5cd,stroke:#e69138;
    classDef result fill:#f4cccc,stroke:#cc0000;
    classDef vis fill:#ddd9c3,stroke:#966f33;
    classDef aux fill:#eeeeee,stroke:#888888;
```
