# delax09/machinelearninggrd architecture

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

- Interactive diagram: https://gitdiagram.com/delax09/machinelearninggrd
- Repository: https://github.com/delax09/machinelearninggrd

## Overview

##### Project type and purpose
- This is a Machine Learning research/analysis project organized as a collection of Jupyter notebooks.
- Purpose: ingest raw data (CSV + Excel), apply a sequence of “filter”/preprocessing steps, train and evaluate sequence-based neural models (RNN, LSTM, GRU), then produce consolidated results.

##### File structure
- Top-level data sources:
- dataset_elpino.csv
- CIE-9.xlsx, CIE-10.xlsx, Tablas maestras bases GRD.xlsx
- Preprocessing notebooks: Filtro1(...).ipynb through Filtro10.ipynb (various filtering or feature-engineering stages; one notebook includes oversampling)
- Model notebooks:
- RNN.ipynb, LSTM.ipynb, GRU.ipynb (train each architecture separately)
- TotalRNN.ipynb, TotalLSTM.ipynb, TotalGRU.ipynb (aggregate results or retrain on full dataset)
- Reporting/summary: RedNeuronal.ipynb (likely consolidates metrics)

##### README
- Confirms: “all the code used in the report” → this repo is a linear pipeline of data → preprocess → model → report

##### Main components & their interactions
a. Data Sources (CSV/Excel)
b. Data Ingestion & Preprocessing Pipeline (Filtro1 → … → Filtro10)
c. Model Training
– RNN Model
– LSTM Model
– GRU Model
d. Model Aggregation/Evaluation (TotalRNN, TotalLSTM, TotalGRU)
e. Reporting / Visualization (RedNeuronal.ipynb)
f. Environment / Dependencies (Python, Jupyter, pandas, NumPy, TensorFlow/Keras or PyTorch, scikit-learn)

##### Relationships & data flow
- From Cleaned Data → each Model Training component in parallel (RNN, LSTM, GRU)
- From each trained model → Aggregation/Evaluation notebooks
- Aggregator → Reporting/Visualization component
- Optionally, include an iterative feedback loop from Evaluation → Preprocessing (to tune filters)

##### Architectural patterns & design principles
- Pipeline pattern: a linear sequence of data transformations (Filtro1 → Filtro10)
- Modular experimentation: separate notebooks per model type to isolate hyperparameter tuning
- Separation of concerns: data, modeling, evaluation, and reporting live in distinct components

##### Essential elements
- Components: Data Ingestion, Preprocessing, Models (RNN/LSTM/GRU), Aggregator, Reporter

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Sources
    subgraph "Data Sources"
        DS1["dataset_elpino.csv"]:::datasource
        DS2["CIE-9.xlsx"]:::datasource
        DS3["CIE-10.xlsx"]:::datasource
        DS4["Tablas maestras bases GRD.xlsx"]:::datasource
    end

    %% Preprocessing Pipeline
    subgraph "Preprocessing Pipeline"
        F1["Filtro1(146101).ipynb"]:::preprocess
        F2["Filtro2(146121).ipynb"]:::preprocess
        F3["Filtro3(146131).ipynb"]:::preprocess
        F4["Filtro4(158171).ipynb"]:::preprocess
        F5["Filtro5(134161).ipynb"]:::preprocess
        F6["Filtro6(071141).ipynb"]:::preprocess
        F7["Filtro7(044153).ipynb"]:::preprocess
        F8["Filtro8(061131).ipynb"]:::preprocess
        F9["Filtro9(041023).ipynb"]:::preprocess
        F9o["Filtro9(041023) oversampling.ipynb"]:::preprocess
        F10["Filtro10(146102).ipynb"]:::preprocess
    end

    %% Model Training
    subgraph "Model Training"
        M1["RNN.ipynb"]:::model
        M2["LSTM.ipynb"]:::model
        M3["GRU.ipynb"]:::model
    end

    %% Aggregation / Evaluation
    subgraph "Aggregation / Evaluation"
        A1["TotalRNN.ipynb"]:::agg
        A2["TotalLSTM.ipynb"]:::agg
        A3["TotalGRU.ipynb"]:::agg
        A4["TotalRN.ipynb"]:::agg
    end

    %% Reporting / Visualization
    R["RedNeuronal.ipynb"]:::report

    %% Environment / Dependencies
    Env["README.md"]:::doc

    %% Connections
    DS1 --> F1
    DS2 --> F1
    DS3 --> F1
    DS4 --> F1

    F1 --> F2 --> F3 --> F4 --> F5 --> F6 --> F7 --> F8 --> F9 --> F9o --> F10

    F10 --> M1
    F10 --> M2
    F10 --> M3

    M1 --> A1
    M2 --> A2
    M3 --> A3
    M1 --> A4

    A1 --> R
    A2 --> R
    A3 --> R
    A4 --> R

    %% Iterative feedback loop
    A1 -.-> F1
    A2 -.-> F1
    A3 -.-> F1
    A4 -.-> F1

    %% Click Events
    click DS1 "https://github.com/delax09/machinelearninggrd/blob/main/dataset_elpino.csv"
    click DS2 "https://github.com/delax09/machinelearninggrd/blob/main/CIE-9.xlsx"
    click DS3 "https://github.com/delax09/machinelearninggrd/blob/main/CIE-10.xlsx"
    click DS4 "https://github.com/delax09/machinelearninggrd/blob/main/Tablas maestras bases GRD.xlsx"

    click F1 "https://github.com/delax09/machinelearninggrd/blob/main/Filtro1(146101).ipynb"
    click F2 "https://github.com/delax09/machinelearninggrd/blob/main/Filtro2(146121).ipynb"
    click F3 "https://github.com/delax09/machinelearninggrd/blob/main/Filtro3(146131).ipynb"
    click F4 "https://github.com/delax09/machinelearninggrd/blob/main/Filtro4(158171).ipynb"
    click F5 "https://github.com/delax09/machinelearninggrd/blob/main/Filtro5(134161).ipynb"
    click F6 "https://github.com/delax09/machinelearninggrd/blob/main/Filtro6(071141).ipynb"
    click F7 "https://github.com/delax09/machinelearninggrd/blob/main/Filtro7(044153).ipynb"
    click F8 "https://github.com/delax09/machinelearninggrd/blob/main/Filtro8(061131).ipynb"
    click F9 "https://github.com/delax09/machinelearninggrd/blob/main/Filtro9(041023).ipynb"
    click F9o "https://github.com/delax09/machinelearninggrd/blob/main/Filtro9(041023) oversampling.ipynb"
    click F10 "https://github.com/delax09/machinelearninggrd/blob/main/Filtro10(146102).ipynb"

    click M1 "https://github.com/delax09/machinelearninggrd/blob/main/RNN.ipynb"
    click M2 "https://github.com/delax09/machinelearninggrd/blob/main/LSTM.ipynb"
    click M3 "https://github.com/delax09/machinelearninggrd/blob/main/GRU.ipynb"

    click A1 "https://github.com/delax09/machinelearninggrd/blob/main/TotalRNN.ipynb"
    click A2 "https://github.com/delax09/machinelearninggrd/blob/main/TotalLSTM.ipynb"
    click A3 "https://github.com/delax09/machinelearninggrd/blob/main/TotalGRU.ipynb"
    click A4 "https://github.com/delax09/machinelearninggrd/blob/main/TotalRN.ipynb"

    click R "https://github.com/delax09/machinelearninggrd/blob/main/RedNeuronal.ipynb"
    click Env "https://github.com/delax09/machinelearninggrd/blob/main/README.md"

    %% Styles
    classDef datasource fill:#cfe2f3,stroke:#6fa8dc,stroke-width:2px;
    classDef preprocess fill:#d9ead3,stroke:#93c47d,stroke-width:2px;
    classDef model fill:#f9cb9c,stroke:#e69138,stroke-width:2px,stroke-dasharray: 5 5;
    classDef agg fill:#d9d2e9,stroke:#8e7cc3,stroke-width:2px,shape:diamond;
    classDef report fill:#e7e6e6,stroke:#999999,stroke-width:2px,shape:hexagon;
    classDef doc fill:#f2f2f2,stroke:#b7b7b7,stroke-width:2px,shape:rect;
    class R doc;
```
