Skip to content

Commit fe12863

Browse files
committed
fixed some stock price prediction bug
1 parent 4af2c5f commit fe12863

File tree

1 file changed

+0
-8
lines changed
  • machine-learning/stock-prediction

1 file changed

+0
-8
lines changed

machine-learning/stock-prediction/train.py

-8
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,9 @@
1616
if not os.path.isdir("data"):
1717
os.mkdir("data")
1818

19-
# load the CSV file from disk (dataset) if it already exists (without downloading)
20-
if os.path.isfile(ticker_data_filename):
21-
ticker = pd.read_csv(ticker_data_filename)
22-
2319
# load the data
2420
data = load_data(ticker, N_STEPS, lookup_step=LOOKUP_STEP, test_size=TEST_SIZE, feature_columns=FEATURE_COLUMNS)
2521

26-
if not os.path.isfile(ticker_data_filename):
27-
# save the CSV file (dataset)
28-
data["df"].to_csv(ticker_data_filename)
29-
3022
# construct the model
3123
model = create_model(N_STEPS, loss=LOSS, units=UNITS, cell=CELL, n_layers=N_LAYERS,
3224
dropout=DROPOUT, optimizer=OPTIMIZER)

0 commit comments

Comments
 (0)