Coder Social home page Coder Social logo

analytics-vidhya's Introduction

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

analytics-vidhya's People

Contributors

sureshmecad avatar

Stargazers

Naresh Kumar avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

amritnick

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.