We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab1f7cf commit 2bc7a1eCopy full SHA for 2bc7a1e
machine_learning/lstm/lstm_prediction.py
@@ -17,11 +17,11 @@
17
make sure you set the price column on line number 21. Here we
18
use a dataset which have the price on 3rd column.
19
"""
20
- df = pd.read_csv("sample_data.csv", header=None)
21
- len_data = df.shape[:1][0]
+ sample_data = pd.read_csv("sample_data.csv", header=None)
+ len_data = sample_data.shape[:1][0]
22
# If you're using some other dataset input the target column
23
- actual_data = df.iloc[:, 1:2]
24
- actual_data = actual_data.values.reshape(len_data, 1)
+ actual_data = sample_data.iloc[:, 1:2]
+ actual_data = actual_data.to_numpy().reshape(len_data, 1)
25
actual_data = MinMaxScaler().fit_transform(actual_data)
26
look_back = 10
27
forward_days = 5
0 commit comments