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.
Experience the deployed application here:
https://salespredictionusingpython-gvlpjvcqtb5l3yje4msxwq.streamlit.app
Source Code:
https://github.com/Naina137/Sales_Prediction_Using_Python
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.
- 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
- Python
- Pandas
- NumPy
- Scikit-learn
- Matplotlib
- Streamlit
- Joblib
- Multiple Linear Regression
| Metric | Value |
|---|---|
| Algorithm | Multiple Linear Regression |
| R² Score | 0.899 |
| Deployment | Streamlit |
The Streamlit application provides an interactive interface where users can enter TV, Radio, and Newspaper advertising budgets and instantly receive predicted sales.
This regression plot illustrates the relationship between advertising expenditure and actual sales, helping visualize the linear trend learned by the model.
This chart highlights the contribution of each advertising feature (TV, Radio, and Newspaper) to the sales prediction model.
The heatmap displays the correlation between advertising channels and sales, helping identify the strongest relationships among features.
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.
The residual plot displays the prediction errors. Randomly distributed residuals around zero indicate that the model fits the data effectively without significant bias.
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!





