This project focuses on building a predictive model using historical sales data to forecast future trends. A Linear Regression model was developed to analyze sales patterns and predict future sales.
- Build a predictive model to forecast sales trends.
- Clean and preprocess historical datasets.
- Perform feature engineering.
- Evaluate model performance.
- Visualize actual and predicted values.
- Generate business insights.
- Dataset: Sample Superstore Sales
- Records: 8,399
- Features: 23 columns
- Order Date
- Sales
- Profit
- Discount
- Order Quantity
- Unit Price
- Shipping Cost
- Python
- Pandas
- NumPy
- Matplotlib
- Seaborn
- Scikit-learn
- Jupyter Notebook / Google Colab
- Checked for missing values.
- Removed duplicate records.
Extracted:
- Year
- Month
- Day
from the Order Date column.
Implemented a Linear Regression model to predict sales.
Performance was evaluated using:
- Mean Absolute Error (MAE)
- Root Mean Squared Error (RMSE)
- R² Score
| Metric | Value |
|---|---|
| MAE | 713.86 |
| RMSE | 1376.18 |
| R² Score | 0.8567 |
The model explains approximately 85.67% of the variance in sales, indicating good predictive performance.
- Actual vs Predicted Sales
- Scatter Plot of Actual and Predicted Values
- Sales are influenced by order quantity, unit price, discount, and profit.
- Historical data can be used to forecast future trends.
- Predictive analytics supports data-driven decision-making.
- Data Cleaning
- Data Preprocessing
- Exploratory Data Analysis (EDA)
- Feature Engineering
- Linear Regression
- Model Evaluation
- Predictive Analytics
- Data Visualization
A Linear Regression model was developed using historical sales data to forecast future sales trends. The model achieved an R² score of 85.67%, demonstrating strong predictive capability and the effectiveness of machine learning techniques in supporting business decision-making.
R Venkata Ramana