Skip to content

sureshmecad/Analytics-Vidhya

Repository files navigation

AV-JanataHack-Demand-Forecasting

Approach to "Analytics Vidhya JanataHack Demand Forecasting"

Hosted at: https://datahack.analyticsvidhya.com/contest/janatahack-demand-forecasting/#ProblemStatement

Solution available in jupyter notebook form.

Problem Statement:

One of the largest retail chains in the world wants to use their vast data source to build an efficient forecasting model to predict the sales for each SKU in its portfolio at its 76 different stores using historical sales data for the past 3 years on a week-on-week basis. Sales and promotional information is also available for each week - product and store wise.

However, no other information regarding stores and products are available. Can you still forecast accurately the sales values for every such product/SKU-store combination for the next 12 weeks accurately? If yes, then dive right in!

Data Description:

Variable Definition
record_ID: Unique ID for each week store sku combination
week: Starting Date of the week
store_id: Unique ID for each store (no numerical order to be assumed)
sku_id: Unique ID for each product (no numerical order to be assumed)
total_price: Sales Price of the product 
base_price: Base price of the product
is_featured_sku: Was part of the featured item of the week
is_display_sku: Product was on display at a prominent place at the store
units_sold(Target): Total Units sold for that week-store-sku combination

Approach:

  1. Considered this as a regression problem with 'units_sold' as a target
  2. Generated following new features:
    (a) Count of records per 'sku-id','store-id' and combination of both
    (b) Average units sold per 'sku-id','store-id' and combination of both
    (c) Average base-price & total-price per 'sku-id','store-id' and combination of both
    (d) Week of the year
    (e) Week number from start of data
    (f) Week of the month
    (g) Sine & Cosine transform of week number to capture cyclic nature
    (e) Price difference percent between base price & total-price
  3. Categorical Encoded 'sku-id' & 'store-id' with MEstimateEncoder()
  4. Trained the data on RandomForest & LGBM Regressor
  5. Tuned the above models

About

Hackathons, JanataHack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published