Big Mart Sales Prediction

  • Category: Ai - Machine Learning
  • Client: Test purpose
  • Project date: 30-09-2023
  • Project URL: Click here

Portfolio detail

Machine Learning Project: Predicting Big Mart Sales

In this machine learning project, we aim to predict sales for Big Mart outlets using a dataset. The project involves the following key steps, Python libraries, and regression model:

Python Libraries Used:
  • numpy
  • pandas
  • matplotlib
  • seaborn
  • sklearn (scikit-learn)
  • xgboost
Data Loading and Exploration:
  • Loaded the dataset from 'Train.csv'.
  • Explored the dataset's shape and information.
  • Identified categorical features for preprocessing.
  • Handled missing values in the 'Item_Weight' and 'Outlet_Size' columns.
Data Analysis:
  • Performed data analysis on numerical features including 'Item_Weight', 'Item_Visibility', 'Item_MRP', and 'Item_Outlet_Sales'.
  • Visualized categorical features like 'Outlet_Establishment_Year' and 'Item_Fat_Content' using countplots.
Data Pre-processing:
  • Standardized 'Item_Fat_Content' labels ('low fat' to 'Low Fat' and 'reg' to 'Regular').
  • Applied label encoding to convert categorical features into numerical form.
Data Splitting:
  • Split the data into features (X) and target (Y).
Machine Learning Model:
  • Trained an XGBoost Regressor model for sales prediction.
Model Evaluation:
  • Evaluated the model's performance on both training and testing data using R-squared (R2) value.

This project demonstrates the process of preparing and analyzing data, building an XGBoost Regressor model, and evaluating its predictive accuracy for sales forecasting, utilizing various Python libraries for data manipulation and analysis.