All Projects → ritchieng → Fractional_differencing_gpu

ritchieng / Fractional_differencing_gpu

Licence: mit
Rapid large-scale fractional differencing with RAPIDS to minimize memory loss while making a time series stationary. 6x-400x speed up over CPU implementation.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Fractional differencing gpu

Multilabel Timeseries Classification With Lstm
Tensorflow implementation of paper: Learning to Diagnose with LSTM Recurrent Neural Networks.
Stars: ✭ 519 (+1265.79%)
Mutual labels:  jupyter-notebook, time-series
H1st
The AI Application Platform We All Need. Human AND Machine Intelligence. Based on experience building AI solutions at Panasonic: robotics predictive maintenance, cold-chain energy optimization, Gigafactory battery mfg, avionics, automotive cybersecurity, and more.
Stars: ✭ 697 (+1734.21%)
Mutual labels:  jupyter-notebook, time-series
Trtorch
PyTorch/TorchScript compiler for NVIDIA GPUs using TensorRT
Stars: ✭ 583 (+1434.21%)
Mutual labels:  nvidia, jupyter-notebook
Data Science
Collection of useful data science topics along with code and articles
Stars: ✭ 315 (+728.95%)
Mutual labels:  jupyter-notebook, time-series
Deep Learning Time Series
List of papers, code and experiments using deep learning for time series forecasting
Stars: ✭ 796 (+1994.74%)
Mutual labels:  jupyter-notebook, time-series
Tsai
Time series Timeseries Deep Learning Pytorch fastai - State-of-the-art Deep Learning with Time Series and Sequences in Pytorch / fastai
Stars: ✭ 407 (+971.05%)
Mutual labels:  jupyter-notebook, time-series
Tsfresh
Automatic extraction of relevant features from time series:
Stars: ✭ 6,077 (+15892.11%)
Mutual labels:  jupyter-notebook, time-series
Pycaret
An open-source, low-code machine learning library in Python
Stars: ✭ 4,594 (+11989.47%)
Mutual labels:  jupyter-notebook, time-series
Pconv Keras
Unofficial implementation of "Image Inpainting for Irregular Holes Using Partial Convolutions". Try at: www.fixmyphoto.ai
Stars: ✭ 786 (+1968.42%)
Mutual labels:  nvidia, jupyter-notebook
Getting Things Done With Pytorch
Jupyter Notebook tutorials on solving real-world problems with Machine Learning & Deep Learning using PyTorch. Topics: Face detection with Detectron 2, Time Series anomaly detection with LSTM Autoencoders, Object Detection with YOLO v5, Build your first Neural Network, Time Series forecasting for Coronavirus daily cases, Sentiment Analysis with BERT.
Stars: ✭ 738 (+1842.11%)
Mutual labels:  jupyter-notebook, time-series
Sdv
Synthetic Data Generation for tabular, relational and time series data.
Stars: ✭ 360 (+847.37%)
Mutual labels:  jupyter-notebook, time-series
Fundamentals Of Deep Learning For Computer Vision Nvidia
The repository includes Notebook files and documents of the course I completed in NVIDIA Deep Learning Institute. Feel free to acess and work with the Notebooks and other files.
Stars: ✭ 16 (-57.89%)
Mutual labels:  nvidia, jupyter-notebook
Cuda Api Wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
Stars: ✭ 362 (+852.63%)
Mutual labels:  nvidia, gpu-computing
Tensorflow Lstm Regression
Sequence prediction using recurrent neural networks(LSTM) with TensorFlow
Stars: ✭ 433 (+1039.47%)
Mutual labels:  jupyter-notebook, time-series
Deltapy
DeltaPy - Tabular Data Augmentation (by @firmai)
Stars: ✭ 344 (+805.26%)
Mutual labels:  jupyter-notebook, time-series
Telemanom
A framework for using LSTMs to detect anomalies in multivariate time series data. Includes spacecraft anomaly data and experiments from the Mars Science Laboratory and SMAP missions.
Stars: ✭ 589 (+1450%)
Mutual labels:  jupyter-notebook, time-series
Es Dev Stack
An on-premises, bare-metal solution for deploying GPU-powered applications in containers
Stars: ✭ 257 (+576.32%)
Mutual labels:  nvidia, jupyter-notebook
Clojurecl
ClojureCL is a Clojure library for parallel computations with OpenCL.
Stars: ✭ 266 (+600%)
Mutual labels:  nvidia, gpu-computing
Fecon235
Notebooks for financial economics. Keywords: Jupyter notebook pandas Federal Reserve FRED Ferbus GDP CPI PCE inflation unemployment wage income debt Case-Shiller housing asset portfolio equities SPX bonds TIPS rates currency FX euro EUR USD JPY yen XAU gold Brent WTI oil Holt-Winters time-series forecasting statistics econometrics
Stars: ✭ 708 (+1763.16%)
Mutual labels:  jupyter-notebook, time-series
Awesome Ai Ml Dl
Awesome Artificial Intelligence, Machine Learning and Deep Learning as we learn it. Study notes and a curated list of awesome resources of such topics.
Stars: ✭ 831 (+2086.84%)
Mutual labels:  jupyter-notebook, time-series

Fractional Differencing with GPU (GFD)

This is a GPU implementation of fractional differencing (we call it GFD). It allows rapid large-scale implementation of fractional differencing to minimize memory loss while achieving stationary for time series data.

Experiment Our Code Instantly Now on Google Colaboratory

Open In Colab

Easily run the whole tutorial in a self-contained Jupyter Notebook on Google Colaboratory by pressing the button above. The whole process of including pulling all data, dependencies and running the code for GFD is contained in the notebook, allowing you to run this notebook as is.

Summary Results

Number of data points and time taken in seconds. You can easily reach such similar multipliers on Google Colab or on more powerful machines via GCP, AWS or your local servers/machines.

**** 100k 1m 10m 100m
GCP 8x vCPUs 9.18 89.62 891.24 9803.11
GCP 1x T4 GPU 1.44 1.33 3.75 29.88
GCP 1x V100 GPU 0.93 1.07 3.17 23.81
Speed-up 1x T4 vs 8x vCPUs 6.38x 67.38x 237.66x 328.08
Speed-up 1x V100 vs 8x vCPUs 9.87x 83.76x 281.15x 411.72x

Optimized Version by NVIDIA

Full credits to NVIDIA where they built on our work and further speed things up resulting in almost 10000x speed-up over a CPU implementation. You can find the more complex and less intuitive but highly performance version of GFD by NVIDIA in this notebook.

Simple GFD Function

We've created a simple function in the notebook, pass your Pandas dataframe into the function and it will return fractionally differenced time series dataframe.

Arguments

  • d: fractional differencing value, 0 means no differencing, above 1 means integer differencing, and anything between 0 to 1 is fractional differencing.
  • floor: minimum value to ignore for fixed window fractional differencing.

Notes

  • Your dataframe (df_raw) is required to have an index such that it's from lag k (oldest time) to lag 0 (latest time) from top to the bottom of the dataframe accordingly for this function to work appropriately.
    • Future: We will implement auto-fixes moving forward such that you don't have to care about the order of your dataframe, but just take in the mean time.
  • We tested for dataframes up to 100 million data points per function call (per dataframe essentially).

GPU implementation

gfd, weights = frac_diff_gpu(df_raw, d=0.5, floor=5e-5)

CPU implementation

fd, weights = frac_diff(df_raw, d=0.5, floor=5e-5)

Important Links to Presentation and Code Repository

GFD Repository Plans

  • Make GFD more efficient
    • Chunk size implementation: currently just throwing the entire chunk matching the size of the dataset's length (haha).
  • Run GFD on thousands of time series datasets, creating a grid of t-stats and time benchmarks.
  • Package GFD functions into a pip package for quick running

Release Notes

The next release will include multiple 1D blocks in a 1D grid instead of a single 1D block of 518/1024 threads. This will help users understand multiple blocks vs a single block.

Beyond the next release, we'll be moving to explain the use of more than 1 dimension blocks/grids.

Citation Reference to Repository/Presentation

If you use the code, please cite using this link alongside Prado/Hosking papers.

Credits and Special Thanks

  1. NVIDIA (Ettikan, Chris and Nick), Amazon AWS, ensemblecap.ai, and NExT++ (NUS School of Computing)
  2. Marcos Lopez de Prado for his recent push on the use of fractional differencing of which this guide is based on.
  3. Hosking for his paper in 1981 on fractional differencing.

Help Wanted

  1. Feel free to raise any issue for feedback on bugs or improvements.
  2. I'll be implementing more critical GPU-accelerated functions, we are looking for collaborators.
  3. If you find this repository useful, please star it!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].