# raggi-21/hardness-prediction-in-heas architecture

> Architecture diagram of the GitHub repository raggi-21/hardness-prediction-in-heas, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/raggi-21/hardness-prediction-in-heas
- Repository: https://github.com/raggi-21/hardness-prediction-in-heas

## Overview

#### Purpose
This repository is an experimental machine-learning workflow for predicting High Entropy Alloy (HEA) hardness from alloy composition/features. It is an earlier, notebook-driven version focused on trying classical regression models rather than a packaged application or deployed service.

#### Entry Points and Execution Model
The project has no source package, CLI, API, or application runtime. Work is executed interactively through Jupyter notebooks:
- `ML_Hardness_model_train.ipynb` — primary model-training workflow.
- `HARD_HEA PREDICTOR.ipynb` — likely interactive prediction/inference workflow.
- `FEATURE_SELECTION.ipynb` — feature-analysis and selection workflow.

Notebook cell ordering, in-memory variables, and locally available datasets/models are therefore important execution dependencies.

#### Data Preparation and Feature Engineering
The workflow transforms HEA composition/material descriptors into model-ready features used to estimate hardness. Feature selection is separated into its own experimental stage:
- `FEATURE_SELECTION.ipynb`
- `ML_Hardness_model_train.ipynb`

This boundary suggests selected feature subsets or rankings are inputs to subsequent model training, though no persisted artifact locations are visible in the repository tree.

#### Model Training and Evaluation
Classical ML prediction models are trained and compared in the central experimentation notebook:
- `ML_Hardness_model_train.ipynb`

The primary control flow is: load material-property data → prepare/select features → fit candidate regression models → evaluate predicted versus measured hardness. This notebook is the closest equivalent to the project’s training entry point.

#### Prediction / Inference
A separate notebook provides the user-facing prediction stage:
- `HARD_HEA PREDICTOR.ipynb`

Its expected role is to accept HEA feature/composition inputs and apply a trained model to produce a hardness estimate. Because no serialized model files appear in the tree, inference may depend on models recreated in notebook state, externally stored artifacts, or manual model transfer from training.

#### Architecture Boundaries and Dependencies
The repository boundary is intentionally narrow: notebooks plus project documentation:
- `README.md`
- `FEATURE_SELECTION.ipynb`
- `ML_Hardness_model_train.ipynb`
- `HARD_HEA PREDICTOR.ipynb`

There is no visible database, web frontend, cloud infrastructure, CI pipeline, requirements file, or model artifact registry. Material datasets, Python package versions, trained-model persistence, and reproducible environment setup are external or implicit dependencies. The key architectural risk is reproducibility: feature selection, training, and prediction are split across interactive notebooks without visible versioned interfaces or persisted contracts.

Main entry points: [`ML_Hardness_model_train.ipynb`](https://github.com/raggi-21/hardness-prediction-in-heas/blob/main/ML_Hardness_model_train.ipynb) (Model training), [`HARD_HEA PREDICTOR.ipynb`](https://github.com/raggi-21/hardness-prediction-in-heas/blob/main/HARD_HEA%20PREDICTOR.ipynb) (Hardness predictor), [`FEATURE_SELECTION.ipynb`](https://github.com/raggi-21/hardness-prediction-in-heas/blob/main/FEATURE_SELECTION.ipynb) (Feature selection), [`README.md`](https://github.com/raggi-21/hardness-prediction-in-heas/blob/main/README.md) (Project documentation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_notebooks["Interactive Notebooks"]
  node_feature_selection["Feature selection<br/>analysis notebook"]
  node_training["Model training<br/>training notebook"]
  node_predictor["Hardness predictor<br/>inference notebook"]
  node_regression_models["Candidate regressors<br/>ML models"]
  node_evaluation["Hardness evaluation<br/>evaluation stage"]
  node_prediction_input["HEA input features<br/>interactive input"]
  node_hardness_estimate["Hardness estimate<br/>prediction output"]
end

subgraph group_external["External / Implicit Dependencies"]
  node_material_data[("HEA material-property data<br/>external dataset")]
  node_python_environment["Python ML environment<br/>external runtime"]
  node_trained_model["Trained model state<br/>implicit artifact"]
end

node_readme["Project documentation<br/>[README.md]"]
node_feature_set["Selected features<br/>in-memory contract"]

node_material_data -->|"analyzes"| node_feature_selection
node_material_data -->|"loads"| node_training
node_python_environment -.->|"executes in"| node_feature_selection
node_python_environment -.->|"executes in"| node_training
node_python_environment -.->|"executes in"| node_predictor
node_feature_selection -->|"selects"| node_feature_set
node_feature_set -.->|"guides features"| node_training
node_training -->|"fits and compares"| node_regression_models
node_regression_models -->|"produces predictions"| node_evaluation
node_material_data -->|"provides measured hardness"| node_evaluation
node_training -.->|"creates"| node_trained_model
node_prediction_input -->|"provides features"| node_predictor
node_trained_model -.->|"applies"| node_predictor
node_predictor -->|"outputs"| node_hardness_estimate
node_readme -.->|"documents"| node_training

click node_readme "https://github.com/raggi-21/hardness-prediction-in-heas/blob/main/README.md"
click node_feature_selection "https://github.com/raggi-21/hardness-prediction-in-heas/blob/main/FEATURE_SELECTION.ipynb"
click node_training "https://github.com/raggi-21/hardness-prediction-in-heas/blob/main/ML_Hardness_model_train.ipynb"
click node_predictor "https://github.com/raggi-21/hardness-prediction-in-heas/blob/main/HARD_HEA%20PREDICTOR.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_feature_selection,node_training,node_predictor,node_regression_models,node_evaluation,node_prediction_input,node_hardness_estimate toneBlue
class node_material_data,node_python_environment,node_trained_model toneAmber
class node_readme,node_feature_set toneNeutral
```

## Components

### Interactive Notebooks

Notebook state and cell order are execution dependencies.

- [Feature selection](https://github.com/raggi-21/hardness-prediction-in-heas/blob/main/FEATURE_SELECTION.ipynb): analysis notebook · Selects or ranks composition and material descriptors. · `FEATURE_SELECTION.ipynb`
- [Model training](https://github.com/raggi-21/hardness-prediction-in-heas/blob/main/ML_Hardness_model_train.ipynb): training notebook · Primary workflow for regression experiments and evaluation. · `ML_Hardness_model_train.ipynb`
- [Hardness predictor](https://github.com/raggi-21/hardness-prediction-in-heas/blob/main/HARD_HEA%20PREDICTOR.ipynb): inference notebook · Interactive hardness-estimation workflow. · `HARD_HEA PREDICTOR.ipynb`
- **Candidate regressors**: ML models · Classical regression models are fitted and compared.
- **Hardness evaluation**: evaluation stage · Compares predicted and measured hardness.
- **HEA input features**: interactive input
- **Hardness estimate**: prediction output

### External / Implicit Dependencies

Datasets, environments, and model artifacts are not versioned here.

- **HEA material-property data**: external dataset · Composition, descriptors, and measured hardness inputs.
- **Python ML environment**: external runtime · Package versions and runtime setup are implicit.
- **Trained model state**: implicit artifact · Model serialization or registry is not visible.

### Other components

- [Project documentation](https://github.com/raggi-21/hardness-prediction-in-heas/blob/main/README.md): documentation · `README.md`
- **Selected features**: in-memory contract · No visible persisted feature-ranking or subset artifact.

## Connections

- HEA material-property data → Feature selection: analyzes
- HEA material-property data → Model training: loads
- Python ML environment → Feature selection: executes in
- Python ML environment → Model training: executes in
- Python ML environment → Hardness predictor: executes in
- Feature selection → Selected features: selects
- Selected features → Model training: guides features
- Model training → Candidate regressors: fits and compares
- Candidate regressors → Hardness evaluation: produces predictions
- HEA material-property data → Hardness evaluation: provides measured hardness
- Model training → Trained model state: creates
- HEA input features → Hardness predictor: provides features
- Trained model state → Hardness predictor: applies
- Hardness predictor → Hardness estimate: outputs
- Project documentation → Model training: documents
