This project predicts the number of units sold (product demand) using retail features such as product category, region, price, discount, seasonality, and holiday or promotion status. The model supports inventory planning and demand forecasting.
- Random Forest Regressor (final selected model)
- Compared with:
- Linear Regression
- Decision Tree Regressor
- Model selection is based on MAE and RMSE.
The Random Forest model learns patterns from historical sales data and predicts future demand by combining results from multiple decision trees.
- Input: Category, Region, Price, Discount, Holiday/Promotion, Seasonality
- Output: Predicted Units Sold
model.py– trains models and saves the best modelbest_model.pkl– saved trained modelapp.py– Streamlit app for local predictions
pip install -r requirements.txt
python model.py
streamlit run app.py