Look Before You Leap: Confirming Edge Signs in Random Walk with Restart for Personalized Node Ranking in Signed Networks
This repository provides a reference implementation of OBOE as described in the following paper:
Look Before You Leap: Confirming Edge Signs in Random Walk with Restart for Personalized Node Ranking in Signed Networks
Wonchang Lee, Yeon-Chang Lee, Dongwon Lee and Sang-Wook Kim
44th Int'l ACM SIGIR Conf. on Research and Development in Information Retrieval (ACM SIGIR 2021)
- Wonchang Lee ([email protected])
- Yeon-Chang Lee ([email protected])
- Dongwon Lee ([email protected])
- Sang-Wook Kim ([email protected])
The input files should be saved in datasets/
folder. The structure of the input file is the following:
node_id1 node_id2 sign
Node ids start from 0 to N-1 (N is the number of nodes in the graph).
The output files are saved in results/
folder.
It includes parameter and accuracies in top-k and bottom-k tasks of OBOE.
--dataset Dataset name. (default: "wiki")
--func Select a function of (extract, predict, run). (default: "run")
--p_thres Positive threshold (beta_+). (default: 1.0)
--n_thres Negative threshold (beta_-). (default: 0.6)
--c Restart probability. (default: 0.4)
--m_iter Number of maximum iterations. (default: 50)
- Extract features of train dataset.
- Predict FExtra scores between two nodes using features.
- Run OBOE using FExtra scores.
python ./src/main.py --dataset wiki --func extract
python ./src/main.py --dataset wiki --func predict
python ./src/main.py --dataset wiki --func run --p_thres 1.0 --n_thres 0.6 --c 0.4 --m_iter 50
The code has been tested running under Python 3.9.4. The required packages are as follows:
numpy == 1.20.1
pandas == 1.2.4
scikit-learn == 0.24.2
scipy == 1.6.2
tqdm == 4.59.0
We encourage you to cite our paper if you have used the code in your work. You can use the following BibTex citation:
@inproceedings{lee21sigir,
author = {Wonchang Lee and Yeon{-}Chang Lee and Dongwon Lee and Sang{-}Wook Kim},
title = {Look Before You Leap: Confirming Edge Signs in Random Walk with Restart for Personalized Node Ranking in Signed Networks},
booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval (ACM SIGIR 2021)},
year = {2021}
}