GithubHelp home page GithubHelp logo

yforecasting / deepretail Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 4.72 MB

Python package on deep learning AI and machine learning for Retail

License: GNU General Public License v3.0

Python 14.97% Jupyter Notebook 85.03%

deepretail's Introduction

DeepRetail

Downloads

Python package on deep learning AI and machine learning for Retail

This package is developed by the AI team at VIVES University of Applied Sciences and is used in our research on demand forecasting.


Getting started

Installation

  1. Install python3.7+

  2. Create a virtual env where you want to install:

    $> python3 -m venv retailanalytics
    
  3. Activate the environment

    $> source retailanalytics/bin/activate
    
  4. Install the package with pip

    $> pip install DeepRetail
    

Use hierarchical modelling

import pandas as pd
from DeepRetail.transformations.formats import transaction_df
from DeepRetail.forecasting.statistical import StatisticalForecaster

# Load
df = pd.read_csv('daily_data.csv', index_col=0)

# Get a sample 
sampled_df = df.sample(20)

# Convert to transaction
t_df = transaction_df(sampled_df)

# Define the parameters
freq = 'M'
h = 4
holdout = True
cv = 2
models = ['ETS', 'Naive']

# Convert columns to datetime
sampled_df.columns = pd.to_datetime(sampled_df.columns)

# Resample columns to montly frequency
sampled_df = sampled_df.resample('M', axis=1).sum()

# Define the forecaster
forecaster = StatisticalForecaster(models = models, freq = freq)

# Fit the forecaster
forecaster.fit(sampled_df, format = 'pivoted')

# Predict
forecast_df = forecaster.predict(h = h, cv = cv, holdout = holdout)
forecast_df.head()

Contributing

Contribution is welcomed!

Start by reviewing the contribution guidelines. After that, take a look at a good first issue.

Disclaimer

DeepRetail is an open-source package. We do our best to make this package robust and stable, but we do not take liability for any errors or instability.

Support

The AI team at VIVES University of Applied Sciences builds and maintains DeepRetail to make it simple and accessible. We are using this software in our research on demand forecasting. A special thanks to Ruben Vanhecke and Filotas Theodosiou for their contribution. The maintenance workflow can be found here.

deepretail's People

Watchers

 avatar  avatar

Forkers

filtheo

deepretail's Issues

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.