FranKGraphBench 0.0.1a0__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. FranKGraphBench-0.0.1a0.dist-info/LICENSE +201 -0
  2. FranKGraphBench-0.0.1a0.dist-info/METADATA +189 -0
  3. FranKGraphBench-0.0.1a0.dist-info/RECORD +70 -0
  4. FranKGraphBench-0.0.1a0.dist-info/WHEEL +6 -0
  5. FranKGraphBench-0.0.1a0.dist-info/entry_points.txt +3 -0
  6. FranKGraphBench-0.0.1a0.dist-info/top_level.txt +2 -0
  7. data_integration/__init__.py +47 -0
  8. data_integration/__main__.py +4 -0
  9. data_integration/dataset.py +270 -0
  10. data_integration/dataset2class.py +34 -0
  11. data_integration/datasets/__init__.py +0 -0
  12. data_integration/datasets/amazon.py +140 -0
  13. data_integration/datasets/book-crossing.py +98 -0
  14. data_integration/datasets/douban-movie.py +75 -0
  15. data_integration/datasets/lastfm.py +215 -0
  16. data_integration/datasets/movielens.py +375 -0
  17. data_integration/datasets/steam.py +98 -0
  18. data_integration/datasets/worker.py +31 -0
  19. data_integration/datasets/yelp.py +156 -0
  20. framework/__init__.py +17 -0
  21. framework/__main__.py +4 -0
  22. framework/dataloader/__init__.py +0 -0
  23. framework/dataloader/dataloader.py +52 -0
  24. framework/dataloader/dataset/__init__.py +0 -0
  25. framework/dataloader/dataset/dataset.py +38 -0
  26. framework/dataloader/edge_splitter/__init__.py +0 -0
  27. framework/dataloader/edge_splitter/edge_splitter.py +163 -0
  28. framework/dataloader/graph/__init__.py +0 -0
  29. framework/dataloader/graph/graph.py +314 -0
  30. framework/dataloader/graph/node.py +80 -0
  31. framework/dataloader/preprocess/__init__.py +0 -0
  32. framework/dataloader/preprocess/methods.py +47 -0
  33. framework/evaluator/__init__.py +0 -0
  34. framework/evaluator/metric.py +39 -0
  35. framework/evaluator/metric2class.py +10 -0
  36. framework/evaluator/metrics/__init__.py +0 -0
  37. framework/evaluator/metrics/map.py +33 -0
  38. framework/evaluator/metrics/ndcg.py +49 -0
  39. framework/experiment.py +120 -0
  40. framework/recommender/__init__.py +0 -0
  41. framework/recommender/model2class.py +46 -0
  42. framework/recommender/models/__init__.py +0 -0
  43. framework/recommender/models/complEx/__init__.py +0 -0
  44. framework/recommender/models/complEx/model.py +193 -0
  45. framework/recommender/models/deep_walk_based/__init__.py +0 -0
  46. framework/recommender/models/deep_walk_based/model.py +149 -0
  47. framework/recommender/models/distMult/__init__.py +0 -0
  48. framework/recommender/models/distMult/model.py +187 -0
  49. framework/recommender/models/ePHEN/__init__.py +0 -0
  50. framework/recommender/models/ePHEN/model.py +159 -0
  51. framework/recommender/models/rESCAL/__init__.py +0 -0
  52. framework/recommender/models/rESCAL/model.py +184 -0
  53. framework/recommender/models/rotatE/__init__.py +0 -0
  54. framework/recommender/models/rotatE/model.py +195 -0
  55. framework/recommender/models/transD/__init__.py +0 -0
  56. framework/recommender/models/transD/model.py +190 -0
  57. framework/recommender/models/transE/__init__.py +0 -0
  58. framework/recommender/models/transE/model.py +194 -0
  59. framework/recommender/models/transH/__init__.py +0 -0
  60. framework/recommender/models/transH/model.py +193 -0
  61. framework/recommender/models/transR/__init__.py +0 -0
  62. framework/recommender/models/transR/model.py +190 -0
  63. framework/recommender/models/tuckER/__init__.py +0 -0
  64. framework/recommender/models/tuckER/model.py +199 -0
  65. framework/recommender/recommender.py +32 -0
  66. framework/recommender/utils/__init__.py +0 -0
  67. framework/recommender/utils/walker.py +185 -0
  68. framework/reporter/__init__.py +0 -0
  69. framework/reporter/report.py +101 -0
  70. framework/utils.py +10 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,189 @@
1
+ Metadata-Version: 2.1
2
+ Name: FranKGraphBench
3
+ Version: 0.0.1a0
4
+ Summary: pip install package for frankgraphbench.
5
+ Home-page: https://github.com/AKSW/frankgraphbench/tree/master/
6
+ Author: Paulo do Carmo and Alvaro Lopes
7
+ Author-email: paulo.carmo@htwk-leipzig.de
8
+ License: Apache-2.0
9
+ Classifier: License :: OSI Approved :: Apache Software License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: gensim
14
+ Requires-Dist: joblib
15
+ Requires-Dist: networkx
16
+ Requires-Dist: numpy
17
+ Requires-Dist: pandas
18
+ Requires-Dist: python-dateutil
19
+ Requires-Dist: pytz
20
+ Requires-Dist: PyYAML
21
+ Requires-Dist: scikit-learn
22
+ Requires-Dist: scipy
23
+ Requires-Dist: six
24
+ Requires-Dist: smart-open
25
+ Requires-Dist: threadpoolctl
26
+ Requires-Dist: tqdm
27
+ Requires-Dist: tzdata
28
+ Requires-Dist: pykeen
29
+ Requires-Dist: torch ==2.1.2
30
+ Requires-Dist: py-cpuinfo
31
+ Requires-Dist: gputil
32
+ Requires-Dist: psutil
33
+ Requires-Dist: sentence-transformers
34
+ Requires-Dist: graph-walker
35
+ Requires-Dist: isodate ==0.6.1
36
+ Requires-Dist: Levenshtein ==0.21.0
37
+ Requires-Dist: pyparsing ==3.0.9
38
+ Requires-Dist: python-Levenshtein ==0.21.0
39
+ Requires-Dist: rapidfuzz ==3.0.0
40
+ Requires-Dist: rdflib ==6.3.2
41
+ Requires-Dist: SPARQLWrapper ==2.0.0
42
+ Requires-Dist: thefuzz ==0.19.0
43
+ Requires-Dist: tzdata ==2023.3
44
+ Requires-Dist: beautifulsoup4
45
+
46
+ # FranKGraphBench: Knowledge Graph Aware Recommender Systems Framework for Benchmarking
47
+
48
+ The FranKGraphBench is a framework to allow KG Aware RSs to be benchmarked in a reproducible and easy to implement manner.
49
+ It was first created on Google Summer of Code 2023 for Data Integration between DBpedia and some standard RS datasets in a reproducible framework.
50
+
51
+ Check the [docs](https://frankgraphbench.readthedocs.io/en/latest/index.html) for more information.
52
+
53
+ * This repository was first created for Data Integration between DBpedia and some standard Recommender Systems datasets and a framework for reproducible experiments. For more info, check the [project proposal](https://github.com/AlvaroJoseLopes/GSoC-2023) and the project progress with weekly (as possible) [updates](https://github.com/AKSW/frankgraphbench/wiki).
54
+
55
+ # Data Integration Usage
56
+ Install the required packages using python [virtualenv](https://docs.python.org/3/library/venv.html), using:
57
+
58
+ ```shell
59
+ python3 -m venv venv_data_integration/
60
+ source venv_data_integration/bin/activate
61
+ pip3 install -r requirements_data_integration.txt
62
+ ```
63
+
64
+ Install the full dataset using bash scripts located at `datasets/`:
65
+
66
+ ```shell
67
+ cd datasets
68
+ bash ml-100k.sh # Downloaded at `datasets/ml-100k` folder
69
+ bash ml-1m.sh # Downloaded at `datasets/ml-1m` folder
70
+ ```
71
+
72
+ ## Usage
73
+ ```shell
74
+ python3 data_integration.py [-h] -d DATASET -i INPUT_PATH -o OUTPUT_PATH [-ci] [-cu] [-cr] [-cs] [-map] [-w]
75
+ ```
76
+
77
+ Arguments:
78
+ - **-h:** Shows the help message.
79
+ - **-d:** Name of a supported dataset. It will be the same name of the folder created by the bash script provided for the dataset. For now, check `data_integration/dataset2class.py` to see the supported ones.
80
+ - **-i:** Input path where the full dataset is placed.
81
+ - **-o:** Output path where the integrated dataset will be placed.
82
+ - **-ci:** Use this flag if you want to convert item data.
83
+ - **-cu:** Use this flag if you want to convert user data.
84
+ - **-cr:** Use this flag if you want to convert rating data.
85
+ - **-cs:** Use this flag if you want to convert social link data.
86
+ - **-map:** Use this flag if you want to map dataset items with DBpedia. At least the item data should be already converted.
87
+ - **-w:** Choose the number of workers(threads) to be used for parallel queries.
88
+
89
+ Usage Example:
90
+
91
+ ```shell
92
+ python3 data_integration.py -d 'ml-100k' -i 'datasets/ml-100k' -o 'datasets/ml-100k/processed' \
93
+ -ci -cu -cr -map -w 8
94
+ ```
95
+
96
+ Check [Makefile](Makefile) for more examples.
97
+
98
+ ## Supported datasets
99
+
100
+ | Dataset | #items matched | #items |
101
+ |---------|---------------|---|
102
+ |[MovieLens-100k](https://grouplens.org/datasets/movielens/100k/)|1462|1681|
103
+ |[MovieLens-1M](https://grouplens.org/datasets/movielens/1m/)|3356|3883|
104
+ |[LastFM-hetrec-2011](https://grouplens.org/datasets/hetrec-2011/)|11815|17632|
105
+ |[Douban-Movie-Short-Comments-Dataset](https://www.kaggle.com/datasets/utmhikari/doubanmovieshortcomments/data)|---|28|douban-movie|
106
+ |[Yelp-Dataset](https://www.yelp.com/dataset/download)|---|150348|yelp|
107
+ |[Amazon-Video-Games-5](https://nijianmo.github.io/amazon/index.html)|---|21106|amazon-video_games-5|
108
+
109
+ # Framework for reproducible experiments usage
110
+ Install the require packages using python [virtualenv](https://docs.python.org/3/library/venv.html), using:
111
+
112
+ ```shell
113
+ python3 -m venv venv_framework/
114
+ source venv_framework/bin/activate
115
+ pip3 install -r requirements_framework.txt
116
+ ```
117
+
118
+ ## Usage
119
+
120
+ ```shell
121
+ python3 framework.py -c 'config_files/test.yml'
122
+ ```
123
+ Arguments:
124
+ - **-c:** Experiment configuration file path.
125
+
126
+ The experiment config file should be a .yaml file like this:
127
+
128
+ ```yaml
129
+ experiment:
130
+ dataset:
131
+ name: ml-100k
132
+ item:
133
+ path: datasets/ml-100k/processed/item.csv
134
+ extra_features: [movie_year, movie_title]
135
+ user:
136
+ path: datasets/ml-100k/processed/user.csv
137
+ extra_features: [gender, occupation]
138
+ ratings:
139
+ path: datasets/ml-100k/processed/rating.csv
140
+ timestamp: True
141
+ enrich:
142
+ map_path: datasets/ml-100k/processed/map.csv
143
+ enrich_path: datasets/ml-100k/processed/enriched.csv
144
+ remove_unmatched: False
145
+ properties:
146
+ - type: subject
147
+ grouped: True
148
+ sep: "::"
149
+ - type: director
150
+ grouped: True
151
+ sep: "::"
152
+
153
+ preprocess:
154
+ - method: filter_kcore
155
+ parameters:
156
+ k: 20
157
+ iterations: 1
158
+ target: user
159
+
160
+ split:
161
+ seed: 42
162
+ test:
163
+ method: k_fold
164
+ k: 2
165
+ level: 'user'
166
+
167
+
168
+ models:
169
+ - name: deepwalk_based
170
+ config:
171
+ save_weights: True
172
+ parameters:
173
+ walk_len: 10
174
+ p: 1.0
175
+ q: 1.0
176
+ n_walks: 50
177
+ embedding_size: 64
178
+ epochs: 1
179
+
180
+ evaluation:
181
+ k: 5
182
+ relevance_threshold: 3
183
+ metrics: [MAP, nDCG]
184
+
185
+ report:
186
+ file: 'experiment_results/ml100k_enriched/run1.csv'
187
+ ```
188
+
189
+ See the [config_files/](/config_files/) directory for more examples.
@@ -0,0 +1,70 @@
1
+ data_integration/__init__.py,sha256=x3eh4cRQSiiZNeIvVo5UVeoTgDWBhsY0klrMkXmcUIk,2505
2
+ data_integration/__main__.py,sha256=qkvm2rn7aqJbghtAGGXDsw67sbha2RM9GYBhGBu4g_s,84
3
+ data_integration/dataset.py,sha256=JlAhmIm3E-xDEcvXkQXd0V2P6-19kW5JS82hlfodsO8,9954
4
+ data_integration/dataset2class.py,sha256=m2SdFDpQ2JFONK7GyUj_usA2XZ86dFd95FNZ0ewvt6o,834
5
+ data_integration/datasets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ data_integration/datasets/amazon.py,sha256=2MQb_ZXGK6Gjw8R8wlfws_hlkpqRI_QZFX1i8zHJtlo,5403
7
+ data_integration/datasets/book-crossing.py,sha256=jEzLYGi7FT4ysgWN_tmufILgQ6riTzfktHg6xz-eEnM,3677
8
+ data_integration/datasets/douban-movie.py,sha256=4A402rwJzM33jF42bxI_wycFYN18eD8UDoWRqFJi7WY,2693
9
+ data_integration/datasets/lastfm.py,sha256=Ro0-6M0R6ZaPx1_d9nwzw54eSGpucZpo-pTbH90xK5U,8579
10
+ data_integration/datasets/movielens.py,sha256=sdGwSCdwXRL4GAcV4Cc428B3O-Dg9OSObWrHP-Ew2-A,13971
11
+ data_integration/datasets/steam.py,sha256=CGO9p4PW2EbFiFKN2bFIi3s8EKN9LpwPzHfF1MebeR0,3620
12
+ data_integration/datasets/worker.py,sha256=IJ4-FmX6Y_Pe0uHp57591rlzHOS_xM0WdR01MhYN0sQ,1075
13
+ data_integration/datasets/yelp.py,sha256=RlOiZvRZxSbvfT05d_wqL3ELGV8zhe26Vlw_OzlNprc,6063
14
+ framework/__init__.py,sha256=ReEsL7-MoA3UjCH3kLtKJywq_6BzmOAJ4a12AG4j6Z8,518
15
+ framework/__main__.py,sha256=Ft0oM50z9vFrCFjoIeYyIVMkYgp3SkdOCArx8Ygx1Jw,70
16
+ framework/experiment.py,sha256=pKfvL8VNLmzqOCdyZBi9Vb80dPu2yoMailVTwly9gfQ,4615
17
+ framework/utils.py,sha256=TE9PvcTBUEBdkFqFwpJKE2O9ZH7zFHnbhXZsj3X71r4,255
18
+ framework/dataloader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ framework/dataloader/dataloader.py,sha256=sRmhWQEt6VMoJzuEKBVfNQcIwIkRFi8mtt1RmWXp3-E,2107
20
+ framework/dataloader/dataset/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
+ framework/dataloader/dataset/dataset.py,sha256=q-UpdS2LHX5pXPjRiKaR8C-Vb9TfuWL_eReYOT8NAiI,1107
22
+ framework/dataloader/edge_splitter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
+ framework/dataloader/edge_splitter/edge_splitter.py,sha256=wxTUsB4pH2geriSFiTl10qN9zrc9lYEnEHMuVqjYdGE,6035
24
+ framework/dataloader/graph/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
+ framework/dataloader/graph/graph.py,sha256=n0TilMzQ0LsIsE5UU7GQrndjKfy379imkDmd-ww7sA8,12544
26
+ framework/dataloader/graph/node.py,sha256=8YJJI-vM5W4eWj134cSAmNsgUBxi2MjAIH0eHjCvwf0,1972
27
+ framework/dataloader/preprocess/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
+ framework/dataloader/preprocess/methods.py,sha256=xxtmQoctp7jkzivT4rJj8kANAqWkBOJvLi9IbJ_BNEo,1457
29
+ framework/evaluator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
+ framework/evaluator/metric.py,sha256=Pfl31nKmcZbchxQm4JGAX9wkQJDLL7kjnwyXUD4pFOA,1560
31
+ framework/evaluator/metric2class.py,sha256=xv8TrzFKM6bTdcvTmXGlN9mN3gROLep_GHyz7zKmFkc,187
32
+ framework/evaluator/metrics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
+ framework/evaluator/metrics/map.py,sha256=IQdz-Gnq93hqWQSkooEA96TKHdETdQzVJUGE27eo6uA,1107
34
+ framework/evaluator/metrics/ndcg.py,sha256=eNjgZ6g3DXDWOOwaKEU57B4etWs6Bs5iqrb4ffwCxPY,1638
35
+ framework/recommender/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
+ framework/recommender/model2class.py,sha256=RrAYp1kea2JzWfi8JNOpp18kc6R-9QE6aJKiGgAq-6w,1037
37
+ framework/recommender/recommender.py,sha256=EL53qCN9u7Zj0abBnjsN6B3VehjYHQDGCc9kmoahCrI,1235
38
+ framework/recommender/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
+ framework/recommender/models/complEx/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
+ framework/recommender/models/complEx/model.py,sha256=uCu4d3eXegUtBYhbK4o2dTaZMPvV7vhrQ2neD814TV4,7479
41
+ framework/recommender/models/deep_walk_based/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
+ framework/recommender/models/deep_walk_based/model.py,sha256=MyJAkVndtvDdYOcjdvJTAZPac8CEW0YlzoOEdABrP1c,5400
43
+ framework/recommender/models/distMult/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
+ framework/recommender/models/distMult/model.py,sha256=uD0lY-aF2I8wiJn__PkJVNn8VoLlnNi2LYaoSMsZVNE,7115
45
+ framework/recommender/models/ePHEN/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
+ framework/recommender/models/ePHEN/model.py,sha256=n9rXpMzTJhLtKm4cQGIQc6asz7smhxXX7SVTTfWVKZw,6323
47
+ framework/recommender/models/rESCAL/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
+ framework/recommender/models/rESCAL/model.py,sha256=74qKoOBop7bYPV-Vf2lymKKqiF4rX1M_aorqCMeMAjk,6915
49
+ framework/recommender/models/rotatE/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
+ framework/recommender/models/rotatE/model.py,sha256=Y8adL3jqnoISrMwN1lkyCJyAGpQ7YjFGbOszYU8PnZo,7698
51
+ framework/recommender/models/transD/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
+ framework/recommender/models/transD/model.py,sha256=ntPzCu9sxuYj4w7ef7YZhq0wj8SHp783opaE0-R0knM,7328
53
+ framework/recommender/models/transE/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
+ framework/recommender/models/transE/model.py,sha256=KwbXvSmKR3VHYhnU8nPlR7QE89S8sIXtAJyzWqCLyLU,7450
55
+ framework/recommender/models/transH/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
+ framework/recommender/models/transH/model.py,sha256=iDIVHcTuTaQcmn_Tb4MEY4KrV9nZioOwn6KLmLzQTiU,7513
57
+ framework/recommender/models/transR/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
+ framework/recommender/models/transR/model.py,sha256=Hd1nLPYscltTBTPrvBdCUIjmKXM07Iy9D5dQwX2oOCE,7364
59
+ framework/recommender/models/tuckER/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
+ framework/recommender/models/tuckER/model.py,sha256=ZEk2innTsljJTFKsbQC2UtG5wRVNJNyN5qVaanTacgM,7843
61
+ framework/recommender/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
+ framework/recommender/utils/walker.py,sha256=hj00ML1ZooVV8qcCon2rhnfKYa_FYHuyuFtOLQ-fCaw,5603
63
+ framework/reporter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
+ framework/reporter/report.py,sha256=8YlQpd_gdbldXQZUYR0OgyGQFa3Onko7X044ktXy48k,3831
65
+ FranKGraphBench-0.0.1a0.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
66
+ FranKGraphBench-0.0.1a0.dist-info/METADATA,sha256=-LXoOcURZVo-5fsrHbScZhKEEKDZelAE6LZKil8ZiGU,6382
67
+ FranKGraphBench-0.0.1a0.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
68
+ FranKGraphBench-0.0.1a0.dist-info/entry_points.txt,sha256=cXDIJ8OHjypcsMfYc41oCtAvsSBjsRMWz5d6LSjuCOA,103
69
+ FranKGraphBench-0.0.1a0.dist-info/top_level.txt,sha256=RoD7dhJJkBgu0NKFQ1k_mY6wU05S65SE0gLx3jg9dI8,27
70
+ FranKGraphBench-0.0.1a0.dist-info/RECORD,,
@@ -0,0 +1,6 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.43.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py2-none-any
5
+ Tag: py3-none-any
6
+
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ data_integration = data_integration:data_integration
3
+ framework = framework:framework
@@ -0,0 +1,2 @@
1
+ data_integration
2
+ framework
@@ -0,0 +1,47 @@
1
+ import argparse
2
+ import importlib
3
+
4
+ from data_integration.dataset2class import dataset2class
5
+
6
+ __version__ = "0.0.1-alpha"
7
+ __author__ = "Paulo do Carmo and Alvaro Lopes"
8
+
9
+ def get_dataset_class(dataset):
10
+ module_name = f'data_integration.{dataset2class[dataset]["submodule"]}'
11
+ class_name = dataset2class[dataset]['class']
12
+ return module_name, class_name
13
+
14
+ def data_integration():
15
+ parser = argparse.ArgumentParser(
16
+ description="Script for Data Integration between DBpedia and some standard Recommender System datasets."
17
+ )
18
+
19
+ parser.add_argument('-d', '--dataset', type=str, required=True, help='Choose a supported RS dataset.')
20
+ parser.add_argument('-i', '--input_path', type=str, required=True, help='Path where the dataset is located.')
21
+ parser.add_argument('-o', '--output_path', type=str, required=True, help='Path where the processed dataset will be placed.')
22
+ parser.add_argument('-ci', '--convert_item', action='store_true', help='Use this flag if you want to convert item data.')
23
+ parser.add_argument('-cu', '--convert_user', action='store_true', help='Use this flag if you want to convert user data.')
24
+ parser.add_argument('-cr', '--convert_rating', action='store_true', help='Use this flag if you want to convert rating data.')
25
+ parser.add_argument('-cs', '--convert_social', action='store_true', help='Use this flag if you want to convert social links data.')
26
+ parser.add_argument('-map', '--map_URIs', action='store_true', help='Use this flag if you want to map dataset items with DBpedia.')
27
+ parser.add_argument('-enrich', '--enrich_data', action='store_true', help='Use this flag if you want to enrich dataset with DBpedia.')
28
+ parser.add_argument('-w', '--n_workers', type=int, default=1, help='Choose the number of workers(threads) to be used for parallel queries.')
29
+
30
+
31
+ args = parser.parse_args()
32
+ module_name, class_name = get_dataset_class(args.dataset)
33
+ dataset = getattr(importlib.import_module(module_name), class_name)
34
+ dataset = dataset(args.input_path, args.output_path, n_workers=args.n_workers)
35
+
36
+ if args.convert_item:
37
+ dataset.convert_item_data()
38
+ if args.convert_user:
39
+ dataset.convert_user_data()
40
+ if args.convert_rating:
41
+ dataset.convert_rating_data()
42
+ if args.convert_social:
43
+ dataset.convert_social_data()
44
+ if args.map_URIs:
45
+ dataset.map_URIs()
46
+ if args.enrich_data:
47
+ dataset.enrich_data()
@@ -0,0 +1,4 @@
1
+ from . import data_integration
2
+
3
+ if __name__ == '__main__':
4
+ data_integration()