Datasets:

Modalities:
Text
Languages:
English
Libraries:
Datasets
License:
asahi417 commited on
Commit
79543d6
1 Parent(s): 4fc5cc4
Files changed (3) hide show
  1. README.md +15 -0
  2. data/stats.predicate_size.csv +5 -0
  3. stats.py +6 -0
README.md CHANGED
@@ -42,6 +42,8 @@ We first remove triples that contain either of subject or object with the occurr
42
  Then, we reduce the number triples in each predicate to be less than `max predicate`.
43
  If the number of triples in a predicate is higher than `max predicate`, we choose top-`max predicate` triples in terms of the frequency of the subject and the object.
44
 
 
 
45
  | min entity/max predicate | 10 | 25 | 50 | 100 |
46
  |-------------------------|-----|------|------|------|
47
  | 1 | 6,052 | 12,295 | 20,602 | 33,206 |
@@ -49,8 +51,21 @@ If the number of triples in a predicate is higher than `max predicate`, we choos
49
  | 3 | 4,986 | 10,093 | 16,599 | 26,151 |
50
  | 4 | 4,640 | 9,384 | 15,335 | 24,075 |
51
 
 
 
 
 
 
 
 
 
 
 
 
52
  <img src="https://huggingface.co/datasets/relbert/t_rex/resolve/main/data/stats.entity_distribution.png" alt="" width="500" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
53
 
 
 
54
  <img src="https://huggingface.co/datasets/relbert/t_rex/resolve/main/data/stats.predicate_distribution.png" alt="" width="500" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
55
 
56
 
 
42
  Then, we reduce the number triples in each predicate to be less than `max predicate`.
43
  If the number of triples in a predicate is higher than `max predicate`, we choose top-`max predicate` triples in terms of the frequency of the subject and the object.
44
 
45
+ - number of triples in each configuration
46
+
47
  | min entity/max predicate | 10 | 25 | 50 | 100 |
48
  |-------------------------|-----|------|------|------|
49
  | 1 | 6,052 | 12,295 | 20,602 | 33,206 |
 
51
  | 3 | 4,986 | 10,093 | 16,599 | 26,151 |
52
  | 4 | 4,640 | 9,384 | 15,335 | 24,075 |
53
 
54
+ - number of predicates in each configuration
55
+
56
+ | min entity / max predicate | 10 | 25 | 50 | 100 |
57
+ |-----------------------------:|-----:|-----:|-----:|------:|
58
+ | 1 | 818 | 818 | 818 | 818 |
59
+ | 2 | 726 | 726 | 726 | 726 |
60
+ | 3 | 665 | 665 | 665 | 665 |
61
+ | 4 | 614 | 614 | 614 | 614 |
62
+
63
+ - distribution of entities
64
+
65
  <img src="https://huggingface.co/datasets/relbert/t_rex/resolve/main/data/stats.entity_distribution.png" alt="" width="500" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
66
 
67
+ - distribution of predicates
68
+
69
  <img src="https://huggingface.co/datasets/relbert/t_rex/resolve/main/data/stats.predicate_distribution.png" alt="" width="500" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
70
 
71
 
data/stats.predicate_size.csv ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ min entity / max predicate,10,25,50,100
2
+ 1,818,818,818,818
3
+ 2,726,726,726,726
4
+ 3,665,665,665,665
5
+ 4,614,614,614,614
stats.py CHANGED
@@ -102,6 +102,12 @@ if __name__ == '__main__':
102
  df_size.index.name = "min entity / max predicate"
103
  df_size.to_csv("data/stats.data_size.csv")
104
  print(df_size.to_markdown())
 
 
 
 
 
 
105
 
106
  # plot predicate distribution
107
  df_p = pd.DataFrame([dict(enumerate(sorted(p.values(), reverse=True))) for p in p_dist_full]).T
 
102
  df_size.index.name = "min entity / max predicate"
103
  df_size.to_csv("data/stats.data_size.csv")
104
  print(df_size.to_markdown())
105
+ df_size = pd.DataFrame(
106
+ [{"min entity": mef, "max predicate": mpf, "freq": len(x)} for x, (mef, mpf) in zip(p_dist_full, candidates)])
107
+ df_size = df_size.pivot(index="min entity", columns="max predicate", values="freq")
108
+ df_size.index.name = "min entity / max predicate"
109
+ df_size.to_csv("data/stats.predicate_size.csv")
110
+ print(df_size.to_markdown())
111
 
112
  # plot predicate distribution
113
  df_p = pd.DataFrame([dict(enumerate(sorted(p.values(), reverse=True))) for p in p_dist_full]).T