Downloads · 30 days
0
Marie-s/product-sales-prediction-lgbm
product-sales-prediction-lgbm is a tabular regression model from Marie-s. Use it for the tabular regression task on the model card, and read the license before you ship it in a product. It is set up for sklearn. The card lists the license as mit.
A LightGBM regression model that predicts product sales based on product and store attributes.
Downloads · 30 days
0
Access
Public
Updated Jun 1, 2026
Repo size
796 KB
Likes
0
Public
Click a slice to open those files.
.pkl796 KB · 99%
From the Hugging Face model README
A LightGBM regression model that predicts product sales based on product and store attributes.
| Metric | Value |
|---|---|
| R² Score | 0.8946 |
| RMSE | 290.19 |
| MAE | 115.01 |
| MAPE | 4.56% |
| RMSLE | 0.1124 |
| CV R² (5-fold) | 0.8930 ± 0.0162 |
The model uses these input features:
import joblib
import numpy as np
import pandas as pd
from huggingface_hub import hf_hub_download
# Download model
model_path = hf_hub_download(repo_id="Marie-s/product-sales-prediction-lgbm", filename="lgbm_sales_model.pkl")
model = joblib.load(model_path)
# Example prediction
sample = pd.DataFrame({
'Product_Sugar_Content': [1], # encoded
'Product_Type': [5], # encoded
'Store_Size': [1], # encoded (Medium)
'Store_Location_City_Type': [1], # encoded (Tier 2)
'Store_Type': [2], # encoded (Supermarket Type2)
'Product_Weight': [12.5],
'Product_Allocated_Area': [0.05],
'Product_MRP': [150.0],
'Store_Age': [15],
'Price_Per_Weight': [12.0],
})
prediction_log = model.predict(sample)
predicted_sales = np.expm1(prediction_log) # Reverse log transform
print(f"Predicted Sales: ${predicted_sales[0]:.2f}")
| Parameter | Value |
|---|---|
| n_estimators | 410 |
| learning_rate | 0.05 |
| num_leaves | 63 |
| max_depth | 6 |
| subsample | 0.8 |
| colsample_bytree | 0.8 |
Based on winning approaches from M5 Forecasting Competition and BigMart Sales Prediction challenges:
This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.