jerewy commited on
Commit
c730800
·
verified ·
1 Parent(s): 702fe68

Update README.md

Browse files

# Smart Inventory Advisor for Retail Sales

This repository contains a machine learning project that analyzes retail sales data to provide actionable inventory management recommendations. The primary goal is to help a store owner identify which products to restock and how many units to order, based on a data-driven sales forecast.

This project was developed for the Datathon Nexus Crew.

## Project Overview

The project follows a complete machine learning workflow:

1. **Exploratory Data Analysis (EDA):** Initial analysis to understand trends, patterns, and relationships within the data.

2. **Preprocessing & Feature Engineering:** Cleaning the data, converting categorical features to numerical values, and creating new time-based features from dates.

3. **Model Training & Tuning:** Building a `RandomForestRegressor` to predict actual `Units Sold`. The model was tuned using `RandomizedSearchCV` to improve its reliability and prevent overfitting.

4. **Actionable Recommendations:** Using the trained model to create a "Smart Inventory Advisor" that generates a prioritized list of products that need to be reordered.

## Model Description

The core of this project is a **Random Forest Regressor** (`scikit-learn`) trained to forecast the number of units sold (`Sales`) for a given product. It uses a variety of features to make its predictions, including:

* **Inventory & Order Data:** `Inventory Level`, `Units Ordered`

* **Pricing Factors:** `Price`, `Discount`, `Competitor Price`

* **Promotional & Environmental Factors:** `Holiday/Promotion`, `Weather`, `Seasonality`

* **Categorical Information:** `Product Category`, `Region`

* **Time-based Features:** `DayOfWeek`, `Month`, `Day`

## How It Works: The Smart Inventory Advisor

The final output is a "Store Owner's Action Plan." This tool automates the following process:

1. **Analyzes All Products:** It iterates through every unique product in the dataset.

2. **Forecasts Future Sales:** For each product, it predicts the expected sales for the next 30 days.

3. **Calculates a Reorder Point:** It determines the stock level at which a reorder is necessary (based on a 7-day supply).

4. **Generates an Action Plan:** It creates a simple table showing only the products that are below their reorder point and require immediate attention.

This provides a clear, data-driven to-do list that helps a business owner focus on the most critical inventory needs to maximize sales and prevent stockouts.

Files changed (1) hide show
  1. README.md +195 -1
README.md CHANGED
@@ -16,4 +16,198 @@ tags:
16
  - retail
17
  - demand-forecasting
18
  - inventory-management
19
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  - retail
17
  - demand-forecasting
18
  - inventory-management
19
+ ---
20
+ # Model Card for Model ID
21
+
22
+ <!-- Provide a quick summary of what the model is/does. -->
23
+
24
+ This modelcard aims to be a base template for new models. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md?plain=1).
25
+
26
+ ## Model Details
27
+
28
+ ### Model Description
29
+
30
+ <!-- Provide a longer summary of what this model is. -->
31
+
32
+
33
+
34
+ - **Developed by:** [More Information Needed]
35
+ - **Funded by [optional]:** [More Information Needed]
36
+ - **Shared by [optional]:** [More Information Needed]
37
+ - **Model type:** [More Information Needed]
38
+ - **Language(s) (NLP):** [More Information Needed]
39
+ - **License:** [More Information Needed]
40
+ - **Finetuned from model [optional]:** [More Information Needed]
41
+
42
+ ### Model Sources [optional]
43
+
44
+ <!-- Provide the basic links for the model. -->
45
+
46
+ - **Repository:** [More Information Needed]
47
+ - **Paper [optional]:** [More Information Needed]
48
+ - **Demo [optional]:** [More Information Needed]
49
+
50
+ ## Uses
51
+
52
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
53
+
54
+ ### Direct Use
55
+
56
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
57
+
58
+ [More Information Needed]
59
+
60
+ ### Downstream Use [optional]
61
+
62
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
63
+
64
+ [More Information Needed]
65
+
66
+ ### Out-of-Scope Use
67
+
68
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
69
+
70
+ [More Information Needed]
71
+
72
+ ## Bias, Risks, and Limitations
73
+
74
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
75
+
76
+ [More Information Needed]
77
+
78
+ ### Recommendations
79
+
80
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
81
+
82
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
83
+
84
+ ## How to Get Started with the Model
85
+
86
+ Use the code below to get started with the model.
87
+
88
+ [More Information Needed]
89
+
90
+ ## Training Details
91
+
92
+ ### Training Data
93
+
94
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
95
+
96
+ [More Information Needed]
97
+
98
+ ### Training Procedure
99
+
100
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
101
+
102
+ #### Preprocessing [optional]
103
+
104
+ [More Information Needed]
105
+
106
+
107
+ #### Training Hyperparameters
108
+
109
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
110
+
111
+ #### Speeds, Sizes, Times [optional]
112
+
113
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
114
+
115
+ [More Information Needed]
116
+
117
+ ## Evaluation
118
+
119
+ <!-- This section describes the evaluation protocols and provides the results. -->
120
+
121
+ ### Testing Data, Factors & Metrics
122
+
123
+ #### Testing Data
124
+
125
+ <!-- This should link to a Dataset Card if possible. -->
126
+
127
+ [More Information Needed]
128
+
129
+ #### Factors
130
+
131
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
132
+
133
+ [More Information Needed]
134
+
135
+ #### Metrics
136
+
137
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
138
+
139
+ [More Information Needed]
140
+
141
+ ### Results
142
+
143
+ [More Information Needed]
144
+
145
+ #### Summary
146
+
147
+
148
+
149
+ ## Model Examination [optional]
150
+
151
+ <!-- Relevant interpretability work for the model goes here -->
152
+
153
+ [More Information Needed]
154
+
155
+ ## Environmental Impact
156
+
157
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
158
+
159
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
160
+
161
+ - **Hardware Type:** [More Information Needed]
162
+ - **Hours used:** [More Information Needed]
163
+ - **Cloud Provider:** [More Information Needed]
164
+ - **Compute Region:** [More Information Needed]
165
+ - **Carbon Emitted:** [More Information Needed]
166
+
167
+ ## Technical Specifications [optional]
168
+
169
+ ### Model Architecture and Objective
170
+
171
+ [More Information Needed]
172
+
173
+ ### Compute Infrastructure
174
+
175
+ [More Information Needed]
176
+
177
+ #### Hardware
178
+
179
+ [More Information Needed]
180
+
181
+ #### Software
182
+
183
+ [More Information Needed]
184
+
185
+ ## Citation [optional]
186
+
187
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
188
+
189
+ **BibTeX:**
190
+
191
+ [More Information Needed]
192
+
193
+ **APA:**
194
+
195
+ [More Information Needed]
196
+
197
+ ## Glossary [optional]
198
+
199
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
200
+
201
+ [More Information Needed]
202
+
203
+ ## More Information [optional]
204
+
205
+ [More Information Needed]
206
+
207
+ ## Model Card Authors [optional]
208
+
209
+ [More Information Needed]
210
+
211
+ ## Model Card Contact
212
+
213
+ [More Information Needed]