Skip to content

Repository files navigation

🧠 Monthly Sales Forecast with XGBoost

This repository contains an analysis of monthly sales data using machine learning and big data processing tools.

🔍 Project Overview

  • Forecast future sales using XGBoost regression
  • Visualize trends with 3-month moving averages
  • Use PySpark for scalable data preprocessing and transformation

📊 Techniques Used

  • 3-Month Moving Average: To visualize trends and reduce noise
  • XGBoost Regressor: To forecast the next 3 months of sales
  • PySpark: For efficient big data preprocessing and table joins
  • Matplotlib: For clear, annotated visualization

📁 Files

  • forecast.py — Full script for preprocessing, modeling, and plotting
  • forecast_xgb_plot.png — Output chart with actual, smoothed, and predicted values
  • monthly_sales.csv — Input dataset
  • Sales Forecast - Summary.pdf — Single-page summary of the project

🛠 Requirements

  • Python 3.8+
  • Libraries: xgboost, pandas, matplotlib, scikit-learn, pyspark

Install them using:

pip install -r requirements.txt

👤 Author

Mehmet Ozturk
📅 April 2025

About

Real-time forecasting with XGBoost, PySpark, and Moving Averages

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages