It provide a python API to evaluate node embedding on multi-label classification with LIBLINEAR.
Run with the following procedures:
- compile the code:
sh make.sh
2a) normalize node embedding:
./norm -input emb.txt -output emb.bin -binary 1
2b) binarize node embedding (without normalization):
./to_binary -input emb.txt -output emb.bin
Format of emb.txt:
10312(number of nodes) 128(embedding dimension)
1(node id) 0.3000 0.4000 ...
2 0.5000 0.6000 ...
...
- evaluate:
python2 test.py --emb emb.bin --vocab vocab.txt --label label.txt --portion 0.1
Format of vocab.txt:
1(node id)
2
...
Format of label.txt:
1(node id) 1(group id)
1 2
2 1
...