# soumit0702/ds-intern-assignment-soumit_saha architecture

> Architecture diagram of the GitHub repository soumit0702/ds-intern-assignment-soumit_saha, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/soumit0702/ds-intern-assignment-soumit_saha
- Repository: https://github.com/soumit0702/ds-intern-assignment-soumit_saha

## Overview

##### Project Type and Purpose
- This is a **data-science / machine-learning** project.
- Its goal is to ingest time-series sensor data from a CSV, perform exploratory analysis, build and evaluate a regression model predicting equipment energy consumption, and produce reports and recommendations.

##### File Structure
- Top level:
- `data/` → raw dataset (data.csv)
- `docs/` → data_description.md (feature documentation)
- `Smart_Factory_Energy_Prediction_Challenge_final_notebook.ipynb` → main EDA, preprocessing, modeling notebook
- `Documentation_of_work.pdf` → final report
- `README.md` → project overview and instructions
- No backend services or frontend; the work lives in notebooks and scripts.

##### Main Components
a. **Data Layer**
- Raw Data Store (data/data.csv)
- Data Description Document (docs/data_description.md)
b. **Processing Environment**
- Jupyter Notebook Kernel (Python environment with pandas, scikit-learn, matplotlib/seaborn)
- EDA Module
- Preprocessing & Feature Engineering Module
- Model Training Module
- Model Evaluation Module
c. **Artifacts & Reports**
- Final Model Object (in-memory or serialized)
- Visualizations & Metrics (charts, performance tables)
- Written Deliverables:
- Notebook (.ipynb)
- PDF Report (Documentation_of_work.pdf)
- Any exportable Python scripts (if extracted)
d. **External Dependencies**
- Python packages (pandas, numpy, scikit-learn, matplotlib, seaborn)
- Potential external weather API (not implemented but could be noted as future extension)

##### Architectural Patterns & Design Principles
- **Linear pipeline** (data ingestion → transform → train → evaluate)
- **Modular decomposition** within the notebook: separate sections for EDA, preprocessing, modeling.
- Emphasis on reproducibility: all steps contained in a single notebook that can be rerun end to end.
- Clear separation of concerns: Data docs vs. code vs. final deliverable.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Layer
    subgraph "Data Layer"
        RawData[(“data/data.csv”)]:::dataStore
        DataDesc["docs/data_description.md"]:::docs
    end

    %% Processing Environment
    subgraph "Notebook Environment"
        Notebook["Interactive Notebook Environment"]:::notebook
        EDA["EDA Module"]:::processing
        Preprocessing["Preprocessing & Feature Engineering Module"]:::processing
        ModelTraining["Model Training Module"]:::processing
        ModelEval["Model Evaluation Module"]:::processing
    end

    %% Artifacts & Reports
    subgraph "Artifacts & Reports"
        FinalModel["Final Model Object"]:::artifact
        Visualizations["Visualizations & Metrics"]:::artifact
        Deliverables["Exportable Scripts"]:::artifact
        NotebookFile["Smart_Factory_Energy_Prediction_Challenge_final_notebook.ipynb"]:::deliverable
        PDFReport["Documentation_of_work.pdf"]:::deliverable
        README["README.md"]:::deliverable
    end

    %% Data Flow
    RawData -->|"reads CSV"| EDA
    DataDesc -->|"guides EDA"| EDA
    EDA -->|"cleaned features"| Preprocessing
    DataDesc -->|"guides Preprocessing"| Preprocessing
    Preprocessing -->|"features"| ModelTraining
    ModelTraining -->|"trained model"| ModelEval
    ModelEval -->|"model metrics"| FinalModel
    ModelEval -->|"charts & tables"| Visualizations
    ModelEval -->|"export results"| Deliverables
    ModelEval --> NotebookFile
    ModelEval --> PDFReport
    ModelEval --> README

    %% Interactive Links
    Notebook <-->|"interactive development"| EDA
    Notebook <-->|"interactive development"| Preprocessing
    Notebook <-->|"interactive development"| ModelTraining
    Notebook <-->|"interactive development"| ModelEval

    %% Click Events
    click RawData "https://github.com/soumit0702/ds-intern-assignment-soumit_saha/blob/main/data/data.csv"
    click DataDesc "https://github.com/soumit0702/ds-intern-assignment-soumit_saha/blob/main/docs/data_description.md"
    click EDA "https://github.com/soumit0702/ds-intern-assignment-soumit_saha/blob/main/Smart_Factory_Energy_Prediction_Challenge_final_notebook.ipynb"
    click Preprocessing "https://github.com/soumit0702/ds-intern-assignment-soumit_saha/blob/main/Smart_Factory_Energy_Prediction_Challenge_final_notebook.ipynb"
    click ModelTraining "https://github.com/soumit0702/ds-intern-assignment-soumit_saha/blob/main/Smart_Factory_Energy_Prediction_Challenge_final_notebook.ipynb"
    click ModelEval "https://github.com/soumit0702/ds-intern-assignment-soumit_saha/blob/main/Smart_Factory_Energy_Prediction_Challenge_final_notebook.ipynb"
    click Notebook "https://github.com/soumit0702/ds-intern-assignment-soumit_saha/blob/main/Smart_Factory_Energy_Prediction_Challenge_final_notebook.ipynb"
    click PDFReport "https://github.com/soumit0702/ds-intern-assignment-soumit_saha/blob/main/Documentation_of_work.pdf"
    click README "https://github.com/soumit0702/ds-intern-assignment-soumit_saha/blob/main/README.md"

    %% Styles
    classDef dataStore fill:#9ecae1,stroke:#3182bd,color:#000
    classDef docs fill:#c7e9c0,stroke:#31a354,color:#000
    classDef processing fill:#a1d99b,stroke:#31a354,color:#000
    classDef notebook fill:#fff7bc,stroke:#fec44f,color:#000
    classDef artifact fill:#fdae6b,stroke:#e6550d,color:#000
    classDef deliverable fill:#fc9272,stroke:#de2d26,color:#000
```
