This is the implementation of Supervised Random Walks from course project in Stanford's CS224W Social and Information Network Analysis. The project report is here.
supervisedRWfunc.py contains the functions for training a Supervised Random Walks model. The power-iterative solvers for PageRank and the gradient of PageRank are implemented in this library as separate functions. The L-BFGS-B optimizer from Scipy is called to solve the optimization problem in training process.
gitRepoTrain.py implements link prediction on repository graph by training model with Supervised Random Walks. The prediction performance comparing to Unweighted random walk is written into a .json file.
userRepoRecom.py recommends repository to users by Personalized PageRank. The comparison between Supervised Random Walks based and Unweighted random walk based repository recommendation is plotted in the end.