yasirapunsith commited on
Commit
388cbc4
·
1 Parent(s): 9484329

comment debug codes

Browse files
Files changed (1) hide show
  1. handler.py +9 -9
handler.py CHANGED
@@ -165,11 +165,11 @@ def cluster_windows(predicted_patterns , probability_threshold, window_size,eps
165
 
166
  for pattern, group in df.groupby('Chart Pattern'):
167
  centers = group['Center'].values.reshape(-1, 1)
168
- print("centers: ", centers)
169
 
170
  if min_center < max_center:
171
  norm_centers = (centers - min_center) / (max_center - min_center)
172
- print("Norm Center: ",norm_centers)
173
  else:
174
  norm_centers = np.ones_like(centers)
175
 
@@ -177,7 +177,7 @@ def cluster_windows(predicted_patterns , probability_threshold, window_size,eps
177
  print("DBSCAN \n", db)
178
  group['Cluster'] = db.labels_
179
  cluster_labled_windows.append(group)
180
- print(cluster_labled_windows)
181
 
182
  for cluster_id, cluster_group in group[group['Cluster'] != -1].groupby('Cluster'):
183
  expanded_dates = []
@@ -328,10 +328,10 @@ class EndpointHandler:
328
  # For now, if the model *needs* clean data, this implicitly is a "bad input" if NaNs appear.
329
  # If your model handles NaNs gracefully, then this is just a warning.
330
 
331
- # Print head after all processing to see the final DataFrame state
332
- print("\n--- HANDLER: OHLC Data after all input processing ---")
333
- print(ohlc_data.head().to_string())
334
- print("--- END HANDLER DEBUG ---")
335
 
336
  except Exception as e:
337
  print(f"Error processing input data: {e}")
@@ -389,8 +389,8 @@ class EndpointHandler:
389
  print("Predicted patterns dataframe is empty")
390
  continue
391
 
392
- print("Predicted Patterns intermediate")
393
- print(predicted_patterns)
394
 
395
  # Pass eps and min_samples from handler's state
396
  cluster_labled_windows_df , interseced_clusters_df = cluster_windows(
 
165
 
166
  for pattern, group in df.groupby('Chart Pattern'):
167
  centers = group['Center'].values.reshape(-1, 1)
168
+ # print("centers: ", centers)
169
 
170
  if min_center < max_center:
171
  norm_centers = (centers - min_center) / (max_center - min_center)
172
+ # print("Norm Center: ",norm_centers)
173
  else:
174
  norm_centers = np.ones_like(centers)
175
 
 
177
  print("DBSCAN \n", db)
178
  group['Cluster'] = db.labels_
179
  cluster_labled_windows.append(group)
180
+ # print(cluster_labled_windows)
181
 
182
  for cluster_id, cluster_group in group[group['Cluster'] != -1].groupby('Cluster'):
183
  expanded_dates = []
 
328
  # For now, if the model *needs* clean data, this implicitly is a "bad input" if NaNs appear.
329
  # If your model handles NaNs gracefully, then this is just a warning.
330
 
331
+ # # Print head after all processing to see the final DataFrame state
332
+ # print("\n--- HANDLER: OHLC Data after all input processing ---")
333
+ # print(ohlc_data.head().to_string())
334
+ # print("--- END HANDLER DEBUG ---")
335
 
336
  except Exception as e:
337
  print(f"Error processing input data: {e}")
 
389
  print("Predicted patterns dataframe is empty")
390
  continue
391
 
392
+ # print("Predicted Patterns intermediate")
393
+ # print(predicted_patterns)
394
 
395
  # Pass eps and min_samples from handler's state
396
  cluster_labled_windows_df , interseced_clusters_df = cluster_windows(