Random Forest regression model predicting product-level sales for a retail chain — achieving R²=0.93 — deployed as a Flask REST API on HuggingFace Spaces.
| Metric | Score |
|---|---|
| R² (test) | 0.93 |
| Model | Random Forest Regressor |
| Deployment | HuggingFace Spaces (Flask REST API) |
- Analyzes historical sales data across product categories, outlet types, and item attributes
- Engineers features (MRP buckets, outlet age, item visibility normalization)
- Trains and tunes a Random Forest model
- Exposes predictions via a REST API endpoint
- Model: Random Forest Regressor (scikit-learn)
- Feature Engineering: Pandas, NumPy
- API: Flask
- Deployment: HuggingFace Spaces
- Visualization: Matplotlib, Seaborn
| File | Description |
|---|---|
superkart_sales_forecasting.ipynb |
Full EDA + model training notebook |
Full_Code_SuperKart_Model_Deployment_Notebook.ipynb |
Flask API deployment notebook |
SuperKart.csv |
Training dataset |
Item MRP, outlet type, outlet establishment year, item visibility, item weight — identified via feature importance analysis.
POST /predict
Content-Type: application/json
{
"Item_MRP": 249.0,
"Outlet_Type": "Supermarket Type1",
"Outlet_Age": 14,
"Item_Visibility": 0.05
}Response: { "predicted_sales": 2847.3 }
Regression modeling, hyperparameter tuning, feature engineering, model serialization, REST API development, cloud deployment