MCPcopy Create free account
hub / github.com/Modulus-Labs/RockyBot / process_hdw_no_context_task

Function process_hdw_no_context_task

pytorch-model/process_dataset.py:380–401  ·  view source on GitHub ↗

No-context dataset which asks network to regress future ETH prices, given a snapshot of current prices. Also cuts the last three columns (BTC prices in the future) from data_features.

(idx_to_field_data, idx_to_field_labels, data_features, labels)

Source from the content-addressed store, hash-verified

378
379
380def process_hdw_no_context_task(idx_to_field_data, idx_to_field_labels, data_features, labels):
381 """
382 No-context dataset which asks network to regress future ETH prices, given
383 a snapshot of current prices.
384
385 Also cuts the last three columns (BTC prices in the future) from data_features.
386 """
387
388 # --- Cuts BTC prices in the future from features ---
389 data_features = np.transpose(np.transpose(data_features)[:-3])
390 idx_to_field_data = idx_to_field_data[:-3]
391
392 # --- Doing a 10 to 1 (non-random) split ---
393 split_idx = int(len(data_features) * 9 / 10)
394
395 # --- Extract elements ---
396 val_features = data_features[split_idx:]
397 val_labels = labels[split_idx:]
398 train_features = data_features[:split_idx]
399 train_labels = labels[:split_idx]
400
401 return train_features, train_labels, val_features, val_labels, idx_to_field_data, idx_to_field_labels
402
403
404def process_hour_day_week_task(idx_to_field_data, idx_to_field_labels, data_features, labels):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected