Steel Surface Fault Classification (Random Forest)
This repository contains a trained Random Forest model and its preprocessing pipeline for steel surface fault classification.
π¦ Files
rf_fault_model.pklβ Trained Random Forest classifierpreprocessor.pklβ ColumnTransformer with RobustScaler
π§ Model Overview
- Algorithm: Random Forest Classifier
- Target: Multiclass steel surface fault type
- Preprocessing:
- Robust scaling for numerical features
- Binary features passed through unchanged
- Hyperparameter tuning: GridSearchCV (5-fold, f1_macro)
π How to Load and Use
import joblib
import pandas as pd
# Load files
model = joblib.load("rf_fault_model.pkl")
preprocessor = joblib.load("preprocessor.pkl")
# Example input (raw features)
sample = pd.DataFrame([{
"X_Minimum": 42,
"X_Maximum": 184,
"Y_Minimum": 23,
"Y_Maximum": 256,
"TypeOfSteel_A300": 1,
"TypeOfSteel_A400": 0
}])
# Preprocess + predict
sample_processed = preprocessor.transform(sample)
prediction = model.predict(sample_processed)
print("Predicted fault class:", prediction)
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support