Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Sales Prediction Using Machine Learning

A Machine Learning project that predicts product sales based on advertising budgets across TV, Radio, and Newspaper channels. The project is built using Multiple Linear Regression and deployed as an interactive Streamlit web application, allowing users to enter advertising budgets and instantly receive predicted sales.


Live Demo

Experience the deployed application here:

https://salespredictionusingpython-gvlpjvcqtb5l3yje4msxwq.streamlit.app


GitHub Repository

Source Code:

https://github.com/Naina137/Sales_Prediction_Using_Python


Project Overview

This project demonstrates the complete Machine Learning workflow, including data preprocessing, exploratory data analysis, model training, evaluation, visualization, and deployment.

The trained model predicts expected product sales using advertising investments on TV, Radio, and Newspaper. The Streamlit application provides a clean and interactive interface for real-time sales prediction.


Highlights

  • Machine Learning based Sales Prediction
  • Multiple Linear Regression Model
  • Interactive Streamlit Web Application
  • Data Visualization using Matplotlib
  • Correlation Heatmap Analysis
  • Residual Error Analysis
  • Feature Importance Visualization
  • Clean and Professional User Interface

Technologies Used

  • Python
  • Pandas
  • NumPy
  • Scikit-learn
  • Matplotlib
  • Streamlit
  • Joblib

Machine Learning Algorithm

  • Multiple Linear Regression

Model Performance

Metric Value
Algorithm Multiple Linear Regression
R² Score 0.899
Deployment Streamlit

Project Screenshots

Home Page

Home Page

The Streamlit application provides an interactive interface where users can enter TV, Radio, and Newspaper advertising budgets and instantly receive predicted sales.


Actual Sales

Actual Sales

This regression plot illustrates the relationship between advertising expenditure and actual sales, helping visualize the linear trend learned by the model.


Feature Importance

Feature Importance

This chart highlights the contribution of each advertising feature (TV, Radio, and Newspaper) to the sales prediction model.


Correlation Heatmap

Correlation Heatmap

The heatmap displays the correlation between advertising channels and sales, helping identify the strongest relationships among features.


Actual vs Predicted Sales

Actual vs Predicted Sales

This visualization compares the actual sales values with the predicted sales generated by the Multiple Linear Regression model. The close alignment between both lines indicates good predictive performance.


Residual Plot

Residual Plot

The residual plot displays the prediction errors. Randomly distributed residuals around zero indicate that the model fits the data effectively without significant bias.


Project Structure

Sales_Prediction_Using_Python/
│
├── data/
│   └── Advertising.csv
│
├── models/
│   └── sales_model.pkl
│
├── notebook/
│   └── Sales_prediction.ipynb
│
├── images/
│   ├── home.png
│   ├── acutal_sales.png
│   ├── feature_importance.png
│   ├── correlation_heatmap.png
│   ├── acutal_predicated.png
│   └── Residual.png
│
├── app.py
├── requirements.txt
├── README.md
└── .gitignore
---
## Installation

Clone the repository

bash
git clone https://github.com/Naina137/Sales_Prediction_Using_Python.git


Move into the project directory

bash
cd Sales_Prediction_Using_Python


Install the required libraries

bash
pip install -r requirements.txt


Run the application

bash
streamlit run app.py

If you have any suggestions, feedback, or ideas to improve this project, feel free to open an issue or connect with me through LinkedIn.

Your feedback is always appreciated and helps improve future projects.

---

## Support

If you found this project helpful, please consider giving it a ⭐ on GitHub.

Thank you for visiting this repository!

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages