Acesso para os resultados experimentais: Aqui
Convert the dataset csv file to a network graph.pkl using networkx. The network will be stored in datasets.
--edges
edges.csvis the name of your csv file.
--sep
\tdelimiter of columns. Default parameter.
--output
graph.pklis the name of the network.
python dataset.py --edges datasets/edges.csv --output graph.pklor
python dataset.py --edges datasets/edges.csv --sep=';' --output graph.pkl
Methods to create embeddings.
Obs: Default parameters are omitted.
--method
- Node2Vec
- DeepWalk
- Metapath2Vec
- LINE
- NetMF
--input
graph.pklis the name of your network file.
--output
name_embedding.csvis the name of your embedding file. Embedding will be stored inembeddings.
Implementation of paper node2vec: Scalable Feature Learning for Networks by Grover. A and Leskovec, J. Paper code
python main.py --method 1 --input datasets/graph.pkl --output node2vec_embedding.csv --embedding_dim 128 --p 1.5 --q 2.
Implementation of paper DeepWalk: Online Learning of Social Representations by Perozzi B, et al. Paper code
python main.py --method 2 --input datasets/graph.pkl --output deepwalk_embedding.csv --embedding_dim 128.
Implementation of paper metapath2vec: Scalable Representation Learning for Heterogeneous Networks by Dong, Y, et al. Paper code
python main.py --method 3 --input datasets/graph.pkl --output meta_embedding.csv --embedding_dim 128 --care_type 1 --epochs 100 --negative_samples 3or
python main.py --method 3 --input datasets/graph.pkl --output meta_embedding.csv --embedding_dim 128 --care_type 0 --epochs 100 --negative_samples 3.
Implementation of paper LINE: Large-scale Information Network Embedding_ by Tang, J, et al. Paper code
python main.py --method 4 --input datasets/graph.pkl --output line_embedding.csv --embedding_dim 128 --proximity 'first-order'or
python main.py --method 4 --input datasets/graph.pkl --output line_embedding.csv --embedding_dim 128 --proximity 'second-order'.
Implementation of paper Network Embedding as Matrix Factorization: Unifying DeepWalk, LINE, PTE, and node2vec by Qiu J, et al. Paper code
python main.py --method 5 --input datasets/graph.pkl --output netmf_embedding.csv --embedding_dim 128 --smallor
python main.py --method 5 --input datasets/graph.pkl --output netmf_embedding.csv --embedding_dim 128 --large --window 10 --rank 1024.