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 classifier
  • preprocessor.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)
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support