Skip to content

Python API to evaluate performance of network embedding on node classification with LIBLINEAR, following DeepWalk and LINE

Notifications You must be signed in to change notification settings

ShawXh/Evaluate-Embedding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Evaluate

It provide a python API to evaluate node embedding on multi-label classification with LIBLINEAR.

How to run

Run with the following procedures:

  1. 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 ...
...
  1. 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
...

About

Python API to evaluate performance of network embedding on node classification with LIBLINEAR, following DeepWalk and LINE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published