# zubairmohd/solder-reliability-prediction architecture

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

- Interactive diagram: https://gitdiagram.com/zubairmohd/solder-reliability-prediction
- Repository: https://github.com/zubairmohd/solder-reliability-prediction

## Overview

##### Project type and purpose
- This is a standalone Python-based machine-learning pipeline whose goal is to predict solder reliability from precomputed feature arrays. It is not a web app or microservice cluster but a data-science workflow: ingest preprocessed data, train models (with leave-one-out cross-validation), evaluate, and serialize final artifacts.

##### File structure
- Top-level:
- .devcontainer/ – dev container definition for a reproducible dev environment
- data/ – raw feature arrays (.npy) for different boards/conditions
- loocv_model/ – best PyTorch model per fold from LOOCV
- saved_models/ & updated_models/ – final model artifacts in both H5 (Keras) and .pth (PyTorch) formats
- app_17.py, app_19.py, app_20.py – entry-point scripts (likely running different experiments or resuming training)
- model_utils.py – shared preprocessing, dataset loaders, training/eval helpers
- requirements.txt – Python dependencies

## Diagram (Mermaid)

```mermaid
flowchart TD
    DC["DevContainer"]:::container
    DS["Data Source<br/>(data/*.npy)"]:::datastore
    PP["Preprocessing & Utilities<br/>(model_utils.py)"]:::code
    TO["Training Orchestrator<br/>(app_17.py<br/>app_19.py<br/>app_20.py)"]:::code
    CV["Cross-Validation Engine"]:::code
    ML["ML Frameworks<br/>(PyTorch & Keras)"]:::framework
    LM["LOOCV Artifacts<br/>(loocv_model/)"]:::datastore
    FM["Final & LOOCV Model Storage<br/>(saved_models/)"]:::datastore
    UM["Updated Model Artifacts<br/>(updated_models/)"]:::datastore

    %% Top-level environment
    DC --> PP
    DC --> TO
    DC --> CV

    %% Data pipeline
    DS --> PP
    PP --> TO
    TO --> CV

    %% Framework interactions
    TO -->|"uses"| ML
    CV -->|"uses"| ML

    %% Storage outputs
    CV -->|"torch.save()"| LM
    CV -->|"export .h5/.pth"| FM
    TO -->|"update exports"| UM

    %% Click Events
    click DC "https://github.com/zubairmohd/solder-reliability-prediction/blob/main/.devcontainer/devcontainer.json"
    click DS "https://github.com/zubairmohd/solder-reliability-prediction/tree/main/data/"
    click PP "https://github.com/zubairmohd/solder-reliability-prediction/blob/main/model_utils.py"
    click TO "https://github.com/zubairmohd/solder-reliability-prediction/blob/main/app_17.py"
    click TO "https://github.com/zubairmohd/solder-reliability-prediction/blob/main/app_19.py"
    click TO "https://github.com/zubairmohd/solder-reliability-prediction/blob/main/app_20.py"
    click LM "https://github.com/zubairmohd/solder-reliability-prediction/tree/main/loocv_model/"
    click FM "https://github.com/zubairmohd/solder-reliability-prediction/tree/main/saved_models/"
    click UM "https://github.com/zubairmohd/solder-reliability-prediction/tree/main/updated_models/"

    %% Styles
    classDef container fill:#FFA500,stroke:#333,stroke-width:1px;
    classDef datastore fill:#87CEFA,stroke:#333,stroke-width:1px;
    classDef code fill:#90EE90,stroke:#333,stroke-width:1px;
    classDef framework fill:#D3D3D3,stroke:#333,stroke-width:1px;
```
