Skip to main content

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.

Metadata

Release files for DeepRetail 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DeepRetail 0.0.9
File Size Uploaded
DeepRetail-0.0.9.tar.gz 77.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for DeepRetail 0.0.9
File Interpreter ABI Platform
DeepRetail-0.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 162.3 kB

Release files / DeepRetail-0.0.9.tar.gz

Download URL DeepRetail-0.0.9.tar.gz
Size 77.1 kB
Tags Source
SHA-256 checksum
How to use checksums
264c9f8bdc046e789122c5d3d40b4993e9d3491ba0416442e4be525d0c84d9a8
BLAKE2b-256 checksum
How to use checksums
58d9700e87df679c34769232f3d031c13131e5b56e2a1ded5618cc91bd13c615
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.6

Release files / DeepRetail-0.0.9-py3-none-any.whl

Download URL DeepRetail-0.0.9-py3-none-any.whl
Size 85.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42201e9e07d70ecf644f09098ef97c0b507f8c20b4de9f30027593bcf0defb84
BLAKE2b-256 checksum
How to use checksums
4fc3baa76001e0bb2df804aae7502b544e8b5ac4e099ad3dda3e26fde72a01c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.6

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page