How chandanc5525/compositecementstrength_predictionmodel works
This repository contains a concrete-strength prediction system: a training workflow selects and saves a regression model, and a FastAPI application serves predictions through a form or JSON endpoint. The README describes a scaffolding tool, but no generator implementation appears in the supplied tree or sampled source; the diagram therefore maps the implemented prediction system. Training and serving use distinct preprocessing paths, so their scaler compatibility is not established by the excerpts.
Main entry points: main.py Training entry · data_ingestion.py Data ingestion · data_preprocessing.py Split and scale · app/main.py FastAPI routes
Components 16
Model training
- Training entry
main.py - Data ingestion
src/data_ingestion.py - Split and scale
src/data_preprocessing.py - Model candidates
src/model_builder.py - Model evaluation
src/model_evaluator.py - Model persistence
src/model_predictor.py
Prediction service
- FastAPI routes
app/main.py - Prediction input
app/schemas.py - Prediction form
app/templates/main.html - Prediction service
app/service.py
Data and artifacts
- Concrete dataset
data/raw/Concrete_Data.csv - Training parameters
params.yaml - Selected model
models/best_model.pkl - Training scaler
models/scaler.pkl
Other components
- ML engineer
- Prediction user
Connections 22
- ML engineer → Training entry: runs training
- Training entry → Data ingestion: loads data
- Data ingestion → Training parameters: reads settings
- Data ingestion → Concrete dataset: reads dataset
- Data ingestion → Training entry: returns data
- Training entry → Split and scale: prepares data
- Split and scale → Training parameters: reads settings
- Split and scale → Training scaler: writes scaler
- Split and scale → Training entry: returns splits
- Training entry → Model candidates: builds candidates
- Model candidates → Training entry: returns candidates
- Training entry → Model evaluation: evaluates candidate
- Model evaluation → Training entry: returns metrics
- Training entry → Model persistence: saves winner
- Model persistence → Selected model: writes model
- Prediction user → FastAPI routes: requests prediction
- FastAPI routes → Prediction form: renders form
- FastAPI routes → Prediction input: constructs input
- FastAPI routes → Prediction service: requests prediction
- Prediction service → Selected model: loads model
- Prediction service → Training scaler: loads scaler
- Prediction service → Prediction user: returns strength