# vcovo/enthalpy-prediction architecture

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

- Interactive diagram: https://gitdiagram.com/vcovo/enthalpy-prediction
- Repository: https://github.com/vcovo/enthalpy-prediction

## Overview

##### Main Components

a. Data Layer:
- It to a data processing component that generates the processed dataset
- Specialized datasets (octene and nonyne isomers) as separate data stores

b. Processing Pipeline:
- Feature engineering/selection flow

c. Model Training Layer:
- Split into two parallel tracks for SVR and ANN
- Grid search components for both models
- Model persistence (saving) functionality

d. Evaluation & Analysis Layer:
- Error estimation components for both models
- Sensitivity analysis module
- Results storage for grid search and analysis

##### Component Relationships

**Raw Data → Data Processing → Processed Data**
- ↓
- Model Training (Parallel)
- /                    \
- SVR                    ANN
- /                        \
- Grid Search                Grid Search
- /
- /
- Error Estimation & Analysis
- ↓
- Inference/Prediction Module

##### Technical Details

- Input formats: Excel (.xlsx) and CSV files
- Model storage formats: .sav for SVR, .h5 for ANN
- Key hyperparameters for both models (as noted in README)
- Python environment dependencies

##### Additional Elements

- Version information for critical dependencies
- Validation/testing workflow with 10-fold cross-validation
- Where sensitivity analysis fits in the pipeline

##### Key Workflows to Highlight

a. Training Workflow:
**Data → Processing → Grid Search → Model Selection → Final Model**

b. Inference Workflow:
**Input Data → Processed Features → Model Inference → Prediction**

Remember to include a note about the project's academic nature and its connection to the published paper, as this context is important for understanding the design choices.

This system design should effectively communicate both the research nature of the project and its practical implementation details to other engineers who might need to work with or extend the codebase.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Data_Layer
        RawData[("Raw Data")]:::data
        ProcData[("Processed Data")]:::data
        SpecData[("Specialized Datasets")]:::data
    end

    subgraph Processing_Pipeline
        DataPrep["Data Preprocessing"]:::process
        FeatEng["Feature Engineering"]:::process
    end

    subgraph Model_Training
        direction TB
        subgraph SVR_Track
            SVRImpl["SVR Implementation"]:::model
            SVRGrid["SVR Grid Search"]:::model
            SVRModel[("SVR Model File")]:::storage
        end
        
        subgraph ANN_Track
            ANNImpl["ANN Implementation"]:::model
            ANNGrid["ANN Grid Search"]:::model
            ANNModel[("ANN Model File")]:::storage
        end
    end

    subgraph Evaluation
        ErrorSVR["SVR Error Estimation"]:::eval
        ErrorANN["ANN Error Estimation"]:::eval
        SensAnalysis["Sensitivity Analysis"]:::eval
        Results[("Results Storage")]:::storage
    end

    subgraph Inference
        InferMod["Inference Module"]:::process
    end

    %% Relationships
    RawData --> DataPrep
    DataPrep --> ProcData
    DataPrep --> FeatEng
    FeatEng --> SVRImpl
    FeatEng --> ANNImpl
    
    SVRImpl --> SVRGrid
    SVRGrid --> SVRModel
    SVRModel --> ErrorSVR
    
    ANNImpl --> ANNGrid
    ANNGrid --> ANNModel
    ANNModel --> ErrorANN
    
    ErrorSVR --> Results
    ErrorANN --> Results
    ErrorSVR --> SensAnalysis
    ErrorANN --> SensAnalysis
    SensAnalysis --> Results
    
    SVRModel --> InferMod
    ANNModel --> InferMod
    
    %% Styling
    classDef data fill:#3498db,stroke:#2980b9,color:white
    classDef process fill:#2ecc71,stroke:#27ae60,color:white
    classDef model fill:#e67e22,stroke:#d35400,color:white
    classDef eval fill:#9b59b6,stroke:#8e44ad,color:white
    classDef storage fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Click Events
    click RawData "https://github.com/vcovo/enthalpy-prediction/blob/master/data/dataset_complete.xlsx"
    click ProcData "https://github.com/vcovo/enthalpy-prediction/blob/master/data/dataset_processed.csv"
    click SpecData "https://github.com/vcovo/enthalpy-prediction/tree/master/data"
    click DataPrep "https://github.com/vcovo/enthalpy-prediction/blob/master/scripts/process_dataset.py"
    click SVRImpl "https://github.com/vcovo/enthalpy-prediction/blob/master/scripts/final_model_svr.py"
    click ANNImpl "https://github.com/vcovo/enthalpy-prediction/blob/master/scripts/final_model_ann.py"
    click SVRModel "https://github.com/vcovo/enthalpy-prediction/blob/master/models/final_SVR_model.sav"
    click ANNModel "https://github.com/vcovo/enthalpy-prediction/blob/master/models/final_ANN_model.h5"
    click ErrorSVR "https://github.com/vcovo/enthalpy-prediction/blob/master/scripts/error_estimation_svr.py"
    click ErrorANN "https://github.com/vcovo/enthalpy-prediction/blob/master/scripts/error_estimation_ann.py"
    click SensAnalysis "https://github.com/vcovo/enthalpy-prediction/blob/master/scripts/sensitivity_analysis.py"
    click Results "https://github.com/vcovo/enthalpy-prediction/tree/master/results"
    click InferMod "https://github.com/vcovo/enthalpy-prediction/blob/master/scripts/inference.py"
```
