Downloads · 30 days
0
ManishTK44/predictive-maintenance-model
predictive-maintenance-model is a machine learning model from ManishTK44. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains a tuned XGBoost model and Streamlit app to predict early warning states for engine health using sensor inputs. The project emphasizes reproducibility, rubric alignment, and evaluator-friendly…
Downloads · 30 days
0
Access
Public
Updated Nov 23, 2025
Repo size
396 KB
Likes
0
Public
Click a slice to open those files.
.pkl396 KB · 99%
From the Hugging Face model README
This repository contains a tuned XGBoost model and Streamlit app to predict early warning states for engine health using sensor inputs. The project emphasizes reproducibility, rubric alignment, and evaluator-friendly documentation.
pip install -r requirements.txtstreamlit run app.pyStandardScaler from scikit-learn.scaler.pkl and committed to the repo.scaler.pkl to transform inputs before prediction.xgb_model_final.pkl in the model repo.predict_proba(...)[0][1].xgb_threshold.txt and applied:
prob >= threshold else "Normal".import joblib
from huggingface_hub import hf_hub_download
# Load model
model_path = hf_hub_download(
repo_id="ManishTK44/predictive-maintenance-model",
filename="xgb_model_final.pkl",
repo_type="model"
)
model = joblib.load(model_path)
# Load threshold
threshold_path = hf_hub_download(
repo_id="ManishTK44/predictive-maintenance-model",
filename="xgb_threshold.txt",
repo_type="model"
)
with open(threshold_path, "r") as f:
threshold = float(f.read().split("=")[-1].strip())
📝 Notes
Data and splits are versioned on Hugging Face for reproducibility.
Parameters, thresholds, and evaluation artifacts are logged in the notebook.
Confusion matrices and classification reports are included for clarity.
1. Raw sensor inputs are collected via sliders.
2. Inputs are transformed using `scaler.pkl`.
3. The model (`xgb_model_final.pkl`) computes the probability of a warning state.
4. Threshold (`xgb_threshold.txt`) is applied to classify **Normal** vs **Warning**.