Zixing-GOU commited on
Commit
cd1081d
·
verified ·
1 Parent(s): aa540bf

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -77
README.md CHANGED
@@ -1,77 +1,3 @@
1
- # TEG-DB
2
-
3
- This is a dataset benchmark, which contains many datasets with rich textual edges.
4
-
5
- ## File Structure
6
-
7
- - dataset_name/
8
- - raw/
9
- dataset.pkl: The processed graph data in '.pkl' format.
10
-
11
- - processed/
12
-
13
- download_data.sh: Script to download the raw data.
14
-
15
- data_processing.py: Script to process original data into 'pkl' format
16
-
17
- instructions.txt: Instructions on how to use the scripts.
18
-
19
- - embeddings/
20
- text_embeddings.pt: Text embeddings generated from the raw data.
21
- ## Usage loading raw data
22
- ```python
23
- import pickle
24
- with open('data/raw/dataset.pkl', 'rb') as f:
25
- data = pickle.load(f)
26
- ```
27
- ## Generate graph data
28
- Users can also generate graph data according to their own needs, either by utilizing the data processing methods provided or by creating their own graph data based on them.
29
-
30
- ### Data download
31
- ```bash
32
- bash dataset_name/processed/download_data.sh
33
- ```
34
- ### Data processing
35
- ```bash
36
- python dataset_name/processed/dataset_processing.py
37
- ```
38
- ## Graph structure and attribute
39
-
40
- - User-Book Reviews Networks(Goodreads-):
41
-
42
- text_nodes = nodes class.Users can access this attribute to obtain the type of each node in the homogeneous graph. There are three types of nodes: user, book, and genres (with a total of ten types
43
- nodes_text = The summary of each books
44
- edge_index = Contains the node index pairs for all edges.
45
- text_edges = The reviews between users and books, which means edges textual information
46
- - Citation Networks
47
-
48
- text_nodes = The titles of papers.
49
- text_node_labels = The category of each paper.
50
- edge_index = Contains the node index pairs for all edges
51
- text_edges = Citation information. such as citation contexts, citation paragraph, etc.
52
-
53
- - Shopping Networks(Amazon-)
54
-
55
- text_nodes = nodes class.Users can access this attribute to obtain the type of each node in the homogeneous graph. There are two types of nodes: users and asins(product)
56
- edge_index = Contains the node index pairs for all edges.
57
- text_edges = The reviews between users and products
58
- node_texts = The summary of the product.
59
- text_node_labels = The category of the product
60
- - Social Networks(Reddit and Twitter)
61
-
62
- Twitter:
63
-
64
- text_nodes = The text for user nodes is "user", and the text for tweet nodes is the actual tweet content.
65
- text_edges = The text for user-user edges is the tweet content, and the text for user-tweet edges is an empty string.
66
- node_labels = Contains the labels for all nodes. User nodes are labeled as -1, and tweet nodes are labeled with their event IDs (e.g., 1 and 2).
67
- edge_labels = Contains the labels for all edges. User-user edges are labeled with the event ID of the tweet (e.g., 1 and 2), and user-tweet edges are labeled as -1.
68
- edge_index = Contains the node index pairs for all edges.
69
- Reddit
70
-
71
- text_nodes = The text for subreddit nodes is the name of the subreddit, and the text for user nodes is the user flair.
72
- text_edges = The text for subreddit-user edges is the reddit comments.
73
- node_labels = Contains the labels for all nodes. Subreddit nodes are labeled as -1, and user nodes are labeled by whether they are a moderator for any Reddit community (0 or 1).
74
- edge_score_labels = Contains the scores for all edges. The score for a comment is upvotes minus downvotes.
75
- edge_special_labels = Contains the binary labels for all edges. A common comment is labeled as 0, and a distinguished comment (sent by a moderator of a community) is labeled as 1.
76
- edge_index = Contains the node index pairs for all edges.
77
-
 
1
+ ---
2
+ license: mit
3
+ ---