FacebookTwitter

Bitcoin Trading Anomalies & LSTM NN

By on Apr 9, 2019 in Analytics, Blockchain | 0 comments

forblog In [1]: import pandas as pd import numpy as np In [2]: data_raw = pd.read_csv('data/coinbaseUSD.csv') data_raw.shape Out[2]: (1574274, 8) In [3]: train_data_raw = data_raw[:1474273] train_data_raw.shape Out[3]: (1474273, 8) In [4]: validate_data_raw = data_raw[1474274:] validate_data_raw.shape Out[4]: (100000, 8) In [5]: feature_list = ["Volume_(BTC)"] features= len(feature_list) train_data_selected = train_data_raw[feature_list].as_matrix().astype(np.float32) validate_data_selected = validate_data_raw[feature_list].as_matrix().astype(np.float32) In [6]: %matplotlib inline import matplotlib import matplotlib.pyplot as plt from IPython.core.pylabtools import figsize figsize(16, 7) plt.plot(range(len(train_data_raw)), train_data_raw[feature_list], "go") plt.ylabel('Bitcoins') plt.xlabel('Time') plt.show()...