# olliang/time-series-forcasting-seq2seq architecture

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

- Interactive diagram: https://gitdiagram.com/olliang/time-series-forcasting-seq2seq
- Repository: https://github.com/olliang/time-series-forcasting-seq2seq

## Overview

##### Project type and purpose
- This is a data‐science/time‐series‐forecasting project implemented as a self‐contained Jupyter notebook.
- It uses a Seq2Seq (LSTM encoder–decoder) neural‐network to forecast daily restaurant visits for a Kaggle competition.

##### File structure
- Top level:
- How it works.md – narrative of model logic
- Seq2Seq (LSTM).ipynb – end‐to‐end modeling pipeline
- data/ – raw inputs (train_final.zip, test_final.csv, sample_submission.csv)
- images/ – any supporting figures
- No separate “services” or microservices—everything lives in the notebook.
- No build/deploy scripts: reproducibility is by running the notebook.

##### README for additional insights
- It outlines data files, references, and the high‐level workflow:
1. Download data
2. Run notebook
- Mentions core libraries: Python, Keras (TensorFlow backend), pandas, NumPy.

a. Components:
1. Data Ingestion
2. Data Preprocessing
3. Seq2Seq Model Construction
4. Training Loop
5. Validation & Evaluation
6. Submission Generation
7. Optional: Visualization/Reporting
b. Relationships & Data Flow:
- Raw CSV/ZIP → Ingestion
- Ingestion → Preprocessing (feature engineering, scaling)
- Preprocessed data → Model Construction & Training
- Trained model ↔ Validation set (iterate)
- Final model + test inputs → Prediction → Submission CSV
- (Optional) Model metrics → How it works.md / images
c. Architectural Patterns & Principles:
- Pipeline pattern: linear flow from raw data → final output
- Modularity: separate code cells or functions for each step
- Reproducibility: notebook cells capture dependencies and order
d. Key Technologies:
- Python runtime (3.x)
- pandas, NumPy for data handling
- Keras (TensorFlow) for LSTM Seq2Seq
- Jupyter Notebook as orchestration layer

## Diagram (Mermaid)

```mermaid
flowchart TB
    RD["Raw Data\n(train_final.zip,\ntrain_final.csv,\ntest_final.csv)"]:::data
    DI["Data Ingestion"]:::compute
    DP["Data Preprocessing"]:::compute
    MCON["Seq2Seq Model Construction"]:::compute
    TRAIN["Training Loop\n(epochs, callbacks)"]:::compute
    VAL["Validation & Evaluation"]:::compute
    SUBGEN["Submission Generation"]:::compute
    SUBOUT["Submission CSV"]:::output
    VIS["Visualization / Reporting"]:::compute
    HM["How it works.md"]:::output
    IMG["images/"]:::data

    RD -->|"raw CSV/ZIP"| DI
    DI -->|"DataFrame"| DP
    DP -->|"NumPy arrays"| MCON
    MCON -->|"model object"| TRAIN
    TRAIN -->|"trained model"| VAL
    VAL -->|"iterate metrics"| TRAIN
    VAL -->|"metrics"| VIS
    TRAIN -->|"final model + test data"| SUBGEN
    SUBGEN -->|"submission.csv"| SUBOUT
    VIS -->|"narrative"| HM
    VIS -->|"figures"| IMG

    click DI "https://github.com/olliang/time-series-forcasting-seq2seq/tree/master/data/"
    click DP "https://github.com/olliang/time-series-forcasting-seq2seq/blob/master/Seq2Seq (LSTM).ipynb"
    click MCON "https://github.com/olliang/time-series-forcasting-seq2seq/blob/master/Seq2Seq (LSTM).ipynb"
    click TRAIN "https://github.com/olliang/time-series-forcasting-seq2seq/blob/master/Seq2Seq (LSTM).ipynb"
    click VAL "https://github.com/olliang/time-series-forcasting-seq2seq/blob/master/Seq2Seq (LSTM).ipynb"
    click SUBGEN "https://github.com/olliang/time-series-forcasting-seq2seq/blob/master/Seq2Seq (LSTM).ipynb"
    click SUBOUT "https://github.com/olliang/time-series-forcasting-seq2seq/blob/master/data/sample_submission.csv"
    click HM "https://github.com/olliang/time-series-forcasting-seq2seq/blob/master/How it works.md"
    click IMG "https://github.com/olliang/time-series-forcasting-seq2seq/tree/master/images/"

    classDef data fill:#AED6F1,stroke:#1B4F72,color:#1B2631,stroke-width:2px;
    classDef compute fill:#ABEBC6,stroke:#196F3D,color:#0B5345,stroke-width:2px;
    classDef output fill:#F9E79F,stroke:#B9770E,color:#7E5109,stroke-width:2px;
```
