All Projects → shinjayne → cnn-rnn-bitcoin

shinjayne / cnn-rnn-bitcoin

Licence: other
Reusable CNN and RNN model doing time series binary classification

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to cnn-rnn-bitcoin

Tsai
Time series Timeseries Deep Learning Pytorch fastai - State-of-the-art Deep Learning with Time Series and Sequences in Pytorch / fastai
Stars: ✭ 407 (+1353.57%)
Mutual labels:  time-series, rnn
Wavetorch
🌊 Numerically solving and backpropagating through the wave equation
Stars: ✭ 387 (+1282.14%)
Mutual labels:  time-series, rnn
ECGClassifier
CNN, RNN, and Bayesian NN classification for ECG time-series (using TensorFlow in Swift and Python)
Stars: ✭ 53 (+89.29%)
Mutual labels:  time-series, rnn
Time Attention
Implementation of RNN for Time Series prediction from the paper https://arxiv.org/abs/1704.02971
Stars: ✭ 52 (+85.71%)
Mutual labels:  time-series, rnn
Ad examples
A collection of anomaly detection methods (iid/point-based, graph and time series) including active learning for anomaly detection/discovery, bayesian rule-mining, description for diversity/explanation/interpretability. Analysis of incorporating label feedback with ensemble and tree-based detectors. Includes adversarial attacks with Graph Convolutional Network.
Stars: ✭ 641 (+2189.29%)
Mutual labels:  time-series, rnn
Rgan
Recurrent (conditional) generative adversarial networks for generating real-valued time series data.
Stars: ✭ 480 (+1614.29%)
Mutual labels:  time-series, rnn
ConvLSTM-PyTorch
ConvLSTM/ConvGRU (Encoder-Decoder) with PyTorch on Moving-MNIST
Stars: ✭ 202 (+621.43%)
Mutual labels:  time-series, rnn
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 (+2003.57%)
Mutual labels:  time-series, rnn
Rnn Time Series Anomaly Detection
RNN based Time-series Anomaly detector model implemented in Pytorch.
Stars: ✭ 718 (+2464.29%)
Mutual labels:  time-series, rnn
Kaggle Web Traffic
1st place solution
Stars: ✭ 1,641 (+5760.71%)
Mutual labels:  time-series, rnn
IndRNN pytorch
Independently Recurrent Neural Networks (IndRNN) implemented in pytorch.
Stars: ✭ 112 (+300%)
Mutual labels:  rnn
PlotTwist
PlotTwist - a web app for plotting and annotating time-series data
Stars: ✭ 21 (-25%)
Mutual labels:  time-series
Shapley regressions
Statistical inference on machine learning or general non-parametric models
Stars: ✭ 37 (+32.14%)
Mutual labels:  time-series
microprediction
If you can measure it, consider it predicted
Stars: ✭ 158 (+464.29%)
Mutual labels:  time-series
tf-ran-cell
Recurrent Additive Networks for Tensorflow
Stars: ✭ 16 (-42.86%)
Mutual labels:  rnn
5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8
RNN-LSTM that learns passwords from a starting list
Stars: ✭ 35 (+25%)
Mutual labels:  rnn
Matrix-Profile
A Java library for Matrix Profile
Stars: ✭ 14 (-50%)
Mutual labels:  time-series
DrowsyDriverDetection
This is a project implementing Computer Vision and Deep Learning concepts to detect drowsiness of a driver and sound an alarm if drowsy.
Stars: ✭ 82 (+192.86%)
Mutual labels:  rnn
notebooks
Code examples for pyFTS
Stars: ✭ 40 (+42.86%)
Mutual labels:  time-series
modeltime.ensemble
Time Series Ensemble Forecasting
Stars: ✭ 65 (+132.14%)
Mutual labels:  time-series

CNN / RNN time series classification model


Abstract

Reusable CNN and RNN model doing time series binary classification

Watch run.py ,utils.py, models.py for detail code

Run run.py to use model

  • to run cnn : python3 run.py --model="cnn" --gen_png=True
  • to run rnn : python3 run.py --model="rnn"
  • to use saved model : python3 run.py --model="cnn" --ckptfile="./ckpt/cnn2.py" so on ...

Can compare the accuracy of CNN and RNN doing time series binary classification

Dependancies

  1. python Version: 3.5.3
  2. numpy Version: 1.13.0
  3. tensorflow Version: 1.2.1
  4. matplotlib Version: 2.0.2

Dataset

The dataset I used.

Bitcoin Ticker Data

  • 1 minite
  • korbit
  • btc_krw
  • last, volume
  • from 2016.06.28 to 2017.07.14

You can change dataset and train and test easily.

CNN model

Inspired by this paper

Change 30 minite time series data into 2-d graph and save it into .png file.

Convert .png file into numpy array, for example [50,50,4] (imgsize = 50*50, channel = 4).

Put that numpy array into CNN model and train .

CNN model predicts whether data goes up or down after 5 minite .

I applied this model into Bitcoin Ticker Data.

x_data of CNN model

x_data

RNN model

Just simple RNN model

input : 30 minite time seies data

predicts : whether data goes up or down after 5 minite

Key Features

1. reusable

You can save trained variables and reuse it easily.

Just use option flag.

If you reuse trained variables, it automatically calculate accuracy on validation set.

$ python3 run.py --name="cnn1reuse" --model="cnn" --ckptfile="./ckpt/cnn1.ckpt"

2. visualize filters (CNN)

You can visuaize CNN model filters easily by running visualize_weight.py

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