Sovereign 8s.is mirror of standardgalactic/Concrete-strength-prediction
  • Python 88.1%
  • JavaScript 5.4%
  • CSS 3.7%
  • HTML 2.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-06-18 11:44:22 -04:00
data first version of concrete-strenght-prediction 2024-11-15 19:24:27 +02:00
make_visuals add more visuals 2025-10-09 11:17:46 +03:00
saved add residual diagnostics 2026-06-18 11:44:22 -04:00
static add gui and webapp 2025-10-05 13:17:38 +03:00
.gitignore remove images.html 2025-02-24 22:18:03 +02:00
app.py features updated 2025-10-09 10:30:48 +03:00
feature_importance.py features updated 2025-10-09 10:30:48 +03:00
gui.py features updated 2025-10-09 10:30:48 +03:00
model-training.py address new comments 2026-06-18 11:40:40 -04:00
preprocessing.py features updated 2025-10-09 10:30:48 +03:00
README.md add readme 2025-10-05 13:52:22 +03:00
requirements.txt address new comments 2026-06-18 11:40:40 -04:00
residual_analysis.py address new comments 2026-06-18 11:40:40 -04:00
statistical_analysis.py add more visuals 2025-10-09 11:17:46 +03:00
test.py add gui and webapp 2025-10-05 13:17:38 +03:00
visualization.py add more visuals 2025-10-09 11:17:46 +03:00

Concrete Strength Prediction

This project provides a machine learning solution for predicting the compressive strength of concrete mixtures based on their composition and age. It includes:

  • Model training scripts for building and evaluating regression models.
  • A modern desktop GUI for interactive predictions.
  • A FastAPI backend for web-based or API access.

Project Structure

concrete-strenght-prediction/
│
├── app.py                # FastAPI backend for predictions
├── gui.py                # PyQt5 desktop GUI application
├── model-training.py     # Model training and evaluation script
├── preprocessing.py      # Feature engineering and preprocessing functions
├── requirements.txt      # Python dependencies
├── saved/
│   ├── models/           # Trained model files (.joblib)
│   ├── assets/           # Evaluation plots, SHAP explanations, etc.
│   └── preprocessing/    # Encoders (if any)
├── data/
│   └── Concrete_Data.xls # Raw dataset
└── static/
    └── index.html        # Frontend for FastAPI (if used)

Installation

  1. Clone the repository:

    git clone https://github.com/Ahmed-Hereiz/Concrete-strength-prediction.git
    cd concrete-strenght-prediction
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Prepare the dataset:

    • Place Concrete_Data.xls in the data/ directory.

Model Training

To train and evaluate the models:

python model-training.py
  • This will preprocess the data, train several regression models, save them in saved/models/, and generate evaluation plots and SHAP explanations in saved/assets/.

Using the Desktop GUI

The GUI allows interactive prediction of concrete strength:

python gui.py
  • Adjust mixture parameters using sliders.
  • Select a prediction model.
  • View predicted strength and feature details.

Requirements: PyQt5 (installed via requirements.txt).

Using the FastAPI Backend

Start the API server:

python app.py
  • The API will be available at http://localhost:8000.
  • The main page (if static/index.html exists) is served at /.
  • Prediction endpoint: POST /predict

Requirements

  • Python 3.7+
  • See requirements.txt for all dependencies (scikit-learn, pandas, numpy, PyQt5, fastapi, uvicorn, lightgbm, shap, etc.)

Notes

  • Models must be trained before using the GUI or API (saved/models/ must exist).
  • Feature engineering is handled via preprocessing.py.
  • SHAP explanations and evaluation plots are generated for model interpretability.