Skip to content

Commit f41e6d9

Browse files
committed
modify for bipartite network
1 parent 96d3763 commit f41e6d9

8 files changed

+719
-41
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@
55
*.exe
66

77
eigen*
8-
workspace
8+
workspace/*
9+
!cu_sample.node
10+
!cu_sample.hin
11+
!user.node

README.md

+7-23
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,13 @@ The [GSL](https://www.gnu.org/software/gsl/) package is used to generate random
1818
After installing the two packages and modifying the package paths, users may go to every folder and use the makefile to compile the codes.
1919

2020
## Data
21-
The PTE model uses a set of labeled texts for training, therefore users need to provide a text file and a label file, which contain the tokens and labels of the given texts respectively. For the text file, the i-th line contains the tokens of the i-th text, and the tokens are separated by spaces. For the label file, the number of lines is the same of the text file, and the i-th line records the label of the i-th text. We provide four examples in the data folder.
22-
23-
After model training, users can use the learned word representations to infer the embeddings of other texts. To do that, users need to provide another text file, containing the tokens of the texts to infer. The file format is the same as the text file for modeling training, where each line contains a number of tokens separated by spaces. Users can also find several examples in the data folder.
21+
#### userとcontentの2部グラフの場合
22+
- cu.node
23+
2部グラフのノードを順番に並べる
24+
- user.node
25+
userノードのみを順番に並べる
26+
- cu.hin
27+
content user 1 d と並べる
2428

2529
## Running
2630
To run the PTE model, users may directly use the example script (run.sh) we provide. In this script, we will first construct the heterogeneous text networks based on the training files. Then we will call the PTE model to learn predictive word representations, which will be further used to infer the embeddings of other text data.
27-
28-
## Contact:
29-
If you have any questions about the codes and data, please feel free to contact us.
30-
```
31-
32-
33-
```
34-
35-
## Citation
36-
```
37-
@inproceedings{tang2015pte,
38-
title={Pte: Predictive text embedding through large-scale heterogeneous text networks},
39-
author={Tang, Jian and Qu, Meng and Mei, Qiaozhu},
40-
booktitle={Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},
41-
pages={1165--1174},
42-
year={2015},
43-
organization={ACM}
44-
}
45-
```
46-

embedding

47.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)