Skip to content

Instantly share code, notes, and snippets.

View ranpelta's full-sized avatar

Ran Pelta ranpelta

View GitHub Profile
df = pd.read_pickle(r'C:\..........\data.pkl') # read data
y_col='y' # define y variable, i.e., what we want to predict
print(df.shape) # print the number of rows anc columns
df.head()
# import packages
import pandas as pd
import numpy as np
import keras
import matplotlib.pyplot as plt
from sklearn.preprocessing import MinMaxScaler
from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()
from keras.preprocessing.sequence import TimeseriesGenerator
from keras.models import Sequential
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ranpelta
ranpelta / import_packages.py
Created July 17, 2020 12:16
import pakcages keras rnn example
# import packages
import pandas as pd
import numpy as np
import keras
import matplotlib.pyplot as plt
from sklearn.preprocessing import MinMaxScaler
from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()
from keras.preprocessing.sequence import TimeseriesGenerator
from keras.models import Sequential