ashu316 commited on
Commit
2b0ceb5
·
verified ·
1 Parent(s): 155336d

Update utils/data_processing.py

Browse files
Files changed (1) hide show
  1. utils/data_processing.py +11 -0
utils/data_processing.py CHANGED
@@ -54,6 +54,17 @@ def get_data(dataset_name, different_new_nodes_between_val_and_test=False, rando
54
  graph_df = pd.read_csv('./data/ml_{}.csv'.format(dataset_name))
55
  edge_features = np.load('./data/ml_{}.npy'.format(dataset_name))
56
  node_features = np.load('./data/ml_{}_node.npy'.format(dataset_name))
 
 
 
 
 
 
 
 
 
 
 
57
 
58
  if randomize_features:
59
  node_features = np.random.rand(node_features.shape[0], node_features.shape[1])
 
54
  graph_df = pd.read_csv('./data/ml_{}.csv'.format(dataset_name))
55
  edge_features = np.load('./data/ml_{}.npy'.format(dataset_name))
56
  node_features = np.load('./data/ml_{}_node.npy'.format(dataset_name))
57
+
58
+
59
+ #ASHUTOSH
60
+ graph_df = graph_df.rename(columns={
61
+ 'user_id': 'u',
62
+ 'item_id': 'i',
63
+ 'ts': 'ts',
64
+ 'state_label': 'label',
65
+ # You can drop or handle the features column separately if needed
66
+ })
67
+ ###################
68
 
69
  if randomize_features:
70
  node_features = np.random.rand(node_features.shape[0], node_features.shape[1])