All Projects → khuangaf → Cryptocurrencyprediction

khuangaf / Cryptocurrencyprediction

Licence: mit
Predict Cryptocurrency Price with Deep Learning

Projects that are alternatives of or similar to Cryptocurrencyprediction

Gdax Orderbook Ml
Application of machine learning to the Coinbase (GDAX) orderbook
Stars: ✭ 60 (-86.75%)
Mutual labels:  bitcoin, jupyter-notebook, lstm, gru
Cryptocurrency Price Prediction
Cryptocurrency Price Prediction Using LSTM neural network
Stars: ✭ 271 (-40.18%)
Mutual labels:  bitcoin, cryptocurrency, jupyter-notebook, lstm
Deeplearning tutorials
The deeplearning algorithms implemented by tensorflow
Stars: ✭ 1,580 (+248.79%)
Mutual labels:  jupyter-notebook, cnn, lstm
Load forecasting
Load forcasting on Delhi area electric power load using ARIMA, RNN, LSTM and GRU models
Stars: ✭ 160 (-64.68%)
Mutual labels:  jupyter-notebook, lstm, gru
Natural Language Processing With Tensorflow
Natural Language Processing with TensorFlow, published by Packt
Stars: ✭ 222 (-50.99%)
Mutual labels:  jupyter-notebook, cnn, lstm
End To End Sequence Labeling Via Bi Directional Lstm Cnns Crf Tutorial
Tutorial for End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF
Stars: ✭ 87 (-80.79%)
Mutual labels:  jupyter-notebook, cnn, lstm
Pytorch Pos Tagging
A tutorial on how to implement models for part-of-speech tagging using PyTorch and TorchText.
Stars: ✭ 96 (-78.81%)
Mutual labels:  jupyter-notebook, cnn, lstm
Screenshot To Code
A neural network that transforms a design mock-up into a static website.
Stars: ✭ 13,561 (+2893.6%)
Mutual labels:  jupyter-notebook, cnn, lstm
Qa Rankit
QA - Answer Selection (Rank candidate answers for a given question)
Stars: ✭ 30 (-93.38%)
Mutual labels:  jupyter-notebook, cnn, lstm
Pytorch Seq2seq
Tutorials on implementing a few sequence-to-sequence (seq2seq) models with PyTorch and TorchText.
Stars: ✭ 3,418 (+654.53%)
Mutual labels:  jupyter-notebook, lstm, gru
Rnn Notebooks
RNN(SimpleRNN, LSTM, GRU) Tensorflow2.0 & Keras Notebooks (Workshop materials)
Stars: ✭ 48 (-89.4%)
Mutual labels:  jupyter-notebook, lstm, gru
Image Captioning
Image Captioning using InceptionV3 and beam search
Stars: ✭ 290 (-35.98%)
Mutual labels:  jupyter-notebook, cnn, lstm
Keras basic
keras를 이용한 딥러닝 기초 학습
Stars: ✭ 39 (-91.39%)
Mutual labels:  jupyter-notebook, cnn, lstm
Pytorch Learners Tutorial
PyTorch tutorial for learners
Stars: ✭ 97 (-78.59%)
Mutual labels:  jupyter-notebook, cnn, lstm
Neural Networks
All about Neural Networks!
Stars: ✭ 34 (-92.49%)
Mutual labels:  jupyter-notebook, cnn, lstm
Lidc nodule detection
lidc nodule detection with CNN and LSTM network
Stars: ✭ 187 (-58.72%)
Mutual labels:  jupyter-notebook, cnn, lstm
Tensorflow Tutorial
Some interesting TensorFlow tutorials for beginners.
Stars: ✭ 893 (+97.13%)
Mutual labels:  jupyter-notebook, cnn, lstm
Neural Image Captioning
Implementation of Neural Image Captioning model using Keras with Theano backend
Stars: ✭ 12 (-97.35%)
Mutual labels:  jupyter-notebook, cnn, lstm
Pytorch Sentiment Analysis
Tutorials on getting started with PyTorch and TorchText for sentiment analysis.
Stars: ✭ 3,209 (+608.39%)
Mutual labels:  jupyter-notebook, cnn, lstm
Cryptocurrency Analysis Python
Open-Source Tutorial For Analyzing and Visualizing Cryptocurrency Data
Stars: ✭ 278 (-38.63%)
Mutual labels:  bitcoin, cryptocurrency, jupyter-notebook

Deep Learning for Cryptocurrency Price Prediction

Introduction

This repo makes use of the state-of-art Deep Learning algorithm to predict the price of Bitcoin, which has the potential to generalize to other cryptocurrency. It leverages models such as CNN and RNN implemented by Keras running on top of Tensorflow. You can find more detailed illustration in this blog post.

Getting Started

To run this repo, be sure to install the following environment and library:

  1. Python 2.7
  2. Tensorflow=1.2.0
  3. Keras=2.1.1
  4. Pandas=0.20.3
  5. Numpy=1.13.3
  6. h5py=2.7.0
  7. sklearn=0.19.1

File Illustration

There are currently three different models:

  1. LSTM.py
  2. GRU.py
  3. CNN.py (1 dimensional CNN)

The validation result is plotted in:

  1. Plot_LSTM.ipynb
  2. Plot_GRU.ipynb
  3. Plot_CNN.ipynb

Data is collected from poloniex and parse to h5py file:

  1. DataCollection.ipynb
  2. PastSampler.ipynb

Run

To run the prediction model, select one of the model. For instance,

python CNN.py

To run iPython file, you need to run jupyter notebook

jupyter notebook

Be sure to run DataCollection.ipynb and PastSampler.ipynb first to create database for training models.

Input & Output & Loss

The input consists of a list of past Bitcoin data with step size of 256. The output is the predicted value of the future data with step size of 16. Note that since the data is ticked every five minutes, the input data spans over the past 1280 minutes, while the output cover the future 80 minutes. The datas are scaled with MinMaxScaler provided by sklearn over the entire dataset. The loss is defined as Mean Square Error (MSE).

Result

Model #Layers Activation Validation Loss Test Loss (Scale Inverted)
CNN 2 ReLU 0.00029 114308
CNN 2 Leaky ReLU 0.00029 115525
CNN 3 ReLU 0.00029 201718
CNN 3 Leaky ReLU 0.00028 108700
CNN 4 ReLU 0.00030 117947
CNN 4 Leaky ReLU 0.03217 12356304
LSTM 1 tanh + ReLU 0.00007 26649
LSTM 1 tanh + Leaky ReLU 0.00004 15364
GRU 1 tanh + ReLU 0.00004 17667
GRU 1 tanh + Leaky ReLU 0.00004 15474
Baseline (Lag) - - - 19122
Linear Regression - - - 19789

Each row of the above table is the model that derives the best validation loss from the total 100 training epochs. From the above result, we can observe that LeakyReLU always seems to yield better loss compared to regular ReLU. However, 4-layered CNN with Leaky ReLU as activation function creates a large validation loss, this can due to wrong deployment of model which might require re-validation. CNN model can be trained very fast (2 seconds/ epoch with GPU), with slightly worse performance than LSTM and GRU. The best model seems to be LSTM with tanh and Leaky ReLU as activation function, though 3-layered CNN seems to be better in capturing local temporal dependency of data.

LSTM with tanh and Leaky ReLu as activation function.

3-layered CNN with Leaky ReLu as activation function.

Baseline

Linear Regression

Update

Regularization has been done, which can be viewed in PlotRegularization.ipynb.

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].