Skip to content

Instantly share code, notes, and snippets.

View victorbergelin's full-sized avatar

Victor Bergelin victorbergelin

View GitHub Profile
@victorbergelin
victorbergelin / keras_prediction.py
Created August 1, 2016 15:08 — forked from Nemitek/keras_prediction.py
Predicting sequences of vectors (regression) in Keras using RNN - LSTM (original by danielhnyk.cz) - fixed for Keras 0.2.0
import pandas as pd
from random import random
flow = (list(range(1,10,1)) + list(range(10,1,-1)))*1000
pdata = pd.DataFrame({"a":flow, "b":flow})
pdata.b = pdata.b.shift(9)
data = pdata.iloc[10:] * random() # some noise
import numpy as np