Skip to content

Commit e06e9de

Browse files
authored
Merge pull request #1319 from vedhcet-07/Retail-Price-Prediction-Model
Retail price prediction Model
2 parents 5368199 + 87d67e0 commit e06e9de

File tree

8 files changed

+971
-0
lines changed

8 files changed

+971
-0
lines changed
33.6 KB
Loading
24.9 KB
Loading
43.1 KB
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Retail Price Optimization Machine Learning Model
2+
3+
This repository contains a machine learning model for retail price optimization. The model predicts the optimal selling price of a product based on various factors such as historical sales data, competitor prices, product features, customer ratings, and more. The model is designed to help retailers maximize revenue by dynamically adjusting prices in real-time.
4+
5+
## Table of Contents
6+
7+
- [Project Overview](#project-overview)
8+
- [Dataset](#dataset)
9+
- [Model](#model)
10+
- [Requirements](#requirements)
11+
12+
- [Results](#results)
13+
14+
## Project Overview
15+
16+
In highly competitive retail markets, setting the right price for products is crucial to maximizing profits while remaining competitive. This model leverages machine learning to provide dynamic, real-time price recommendations based on historical data and product characteristics.
17+
18+
### Key Features:
19+
- Automatically optimizes product prices based on past sales, competitor prices, product ratings, and stock levels.
20+
- Supports real-time price adjustments to maximize revenue and profit margins.
21+
- Includes a regression-based approach using models like **Random Forest** and **XGBoost** for prediction.
22+
23+
## Dataset
24+
25+
The dataset contains the following key features:
26+
- **Cost_Price**: The retailer's cost for the product.
27+
- **Historical_Sales**: Number of units sold in the past.
28+
- **Discount_Offered**: Discounts applied to the product.
29+
- **Competitor_Price**: The price offered by competitors for similar products.
30+
- **Rating**: Customer ratings of the product.
31+
- **Stock_Available**: Number of units currently in stock.
32+
- **Category**: Product categories, such as Electronics, Fashion, Home Decor, etc.
33+
34+
Each product is represented by a unique combination of these features, and the target variable is the **Selling_Price**.
35+
36+
## Model
37+
38+
The model used in this project is a **RandomForestRegressor**, but other regression models (like **XGBoost** or **Linear Regression**) can also be used.
39+
40+
### Key Steps:
41+
1. **Data Preprocessing**: Handle missing values, convert categorical variables to dummy/one-hot encoding, and normalize features.
42+
2. **Model Training**: Train the model on historical sales and product data.
43+
3. **Prediction**: Use the model to predict optimal prices for new products.
44+
4. **Evaluation**: Evaluate model performance using RMSE, MAE, and R² score.
45+
46+
## Requirements
47+
48+
To run this project, you need the following libraries:
49+
50+
```bash
51+
- Python 3.7+
52+
- pandas
53+
- numpy
54+
- scikit-learn
55+
- seaborn
56+
- matplotlib
57+
- joblib
58+
```
59+
Install the dependencies using:
60+
61+
```bash
62+
pip install -r requirements.txt
63+
64+
```
65+
### Results
66+
The model is evaluated using the following metrics:
67+
68+
- **Root Mean Squared Error (RMSE):** Measures the average magnitude of errors in predictions.
69+
- **Mean Absolute Error (MAE):** Measures the average of the absolute errors.
70+
- **R² Score:** Measures the proportion of variance in the dependent variable that the independent variables explain.
71+
72+
You can also visualize the results using various plots (predicted vs actual prices, error distribution).

0 commit comments

Comments
 (0)