Skip to content

Commit 2bc7a1e

Browse files
committed
Try to fix ruff
1 parent ab1f7cf commit 2bc7a1e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: machine_learning/lstm/lstm_prediction.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
make sure you set the price column on line number 21. Here we
1818
use a dataset which have the price on 3rd column.
1919
"""
20-
df = pd.read_csv("sample_data.csv", header=None)
21-
len_data = df.shape[:1][0]
20+
sample_data = pd.read_csv("sample_data.csv", header=None)
21+
len_data = sample_data.shape[:1][0]
2222
# 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)
23+
actual_data = sample_data.iloc[:, 1:2]
24+
actual_data = actual_data.to_numpy().reshape(len_data, 1)
2525
actual_data = MinMaxScaler().fit_transform(actual_data)
2626
look_back = 10
2727
forward_days = 5

0 commit comments

Comments
 (0)