freegpu commited on
Commit
9e76b2e
·
verified ·
1 Parent(s): 6a24378

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -261,7 +261,7 @@ def _train_and_predict(CryptoName, Limit, Timeframe, marketType, ohlcv_timeframe
261
  print(f"Dataset created with timestep={timestep}. X_train shape: {x_train.shape}, y_train shape: {y_train.shape}, final_preds_raw shape: (1, 12, 8)")
262
 
263
  # 6. Train-Test Split
264
- x_t, x_tes, y_t, y_tes = train_test_split(x_train, y_train, test_size=0.015, shuffle=True)
265
 
266
  # 7. Tensor Conversion and move to device
267
  X_train_t = torch.tensor(x_t, dtype=torch.float32).to(device)
@@ -319,7 +319,7 @@ def run_prediction_workflow(CryptoName="BTC", Limit=500, Timeframe=12, marketTyp
319
 
320
  for attempt in range(max_retries_per_iteration):
321
  rand_limit_offset = random.randrange(-100, 101, 2)
322
- rand_timeframe_offset = random.randrange(-6, 7, 2)
323
  current_limit_for_attempt = max(100, base_limit_1 + rand_limit_offset)
324
  current_timeframe_for_attempt = max(5, base_timeframe_1 + rand_timeframe_offset)
325
 
@@ -351,7 +351,7 @@ def run_prediction_workflow(CryptoName="BTC", Limit=500, Timeframe=12, marketTyp
351
 
352
  for attempt in range(max_retries_per_iteration):
353
  rand_limit_offset = random.randrange(-100, 101, 2)
354
- rand_timeframe_offset = random.randrange(-6, 7, 2)
355
  current_limit_for_attempt = max(100, base_limit_2 + rand_limit_offset)
356
  current_timeframe_for_attempt = max(5, base_timeframe_2 + rand_timeframe_offset)
357
 
@@ -383,7 +383,7 @@ def run_prediction_workflow(CryptoName="BTC", Limit=500, Timeframe=12, marketTyp
383
 
384
  for attempt in range(max_retries_per_iteration):
385
  rand_limit_offset = random.randrange(-100, 101, 2)
386
- rand_timeframe_offset = random.randrange(-6, 7, 2)
387
  current_limit_for_attempt = max(100, base_limit_3 + rand_limit_offset)
388
  current_timeframe_for_attempt = max(5, base_timeframe_3 + rand_timeframe_offset)
389
 
 
261
  print(f"Dataset created with timestep={timestep}. X_train shape: {x_train.shape}, y_train shape: {y_train.shape}, final_preds_raw shape: (1, 12, 8)")
262
 
263
  # 6. Train-Test Split
264
+ x_t, x_tes, y_t, y_tes = train_test_split(x_train, y_train, test_size=0.015, shuffle=False)
265
 
266
  # 7. Tensor Conversion and move to device
267
  X_train_t = torch.tensor(x_t, dtype=torch.float32).to(device)
 
319
 
320
  for attempt in range(max_retries_per_iteration):
321
  rand_limit_offset = random.randrange(-100, 101, 2)
322
+ rand_timeframe_offset = random.randrange(-2, 9, 2)
323
  current_limit_for_attempt = max(100, base_limit_1 + rand_limit_offset)
324
  current_timeframe_for_attempt = max(5, base_timeframe_1 + rand_timeframe_offset)
325
 
 
351
 
352
  for attempt in range(max_retries_per_iteration):
353
  rand_limit_offset = random.randrange(-100, 101, 2)
354
+ rand_timeframe_offset = random.randrange(-2, 9, 2)
355
  current_limit_for_attempt = max(100, base_limit_2 + rand_limit_offset)
356
  current_timeframe_for_attempt = max(5, base_timeframe_2 + rand_timeframe_offset)
357
 
 
383
 
384
  for attempt in range(max_retries_per_iteration):
385
  rand_limit_offset = random.randrange(-100, 101, 2)
386
+ rand_timeframe_offset = random.randrange(-2, 9, 2)
387
  current_limit_for_attempt = max(100, base_limit_3 + rand_limit_offset)
388
  current_timeframe_for_attempt = max(5, base_timeframe_3 + rand_timeframe_offset)
389