ggfm.data.random_walk_based_corpus_construction¶
- class ggfm.data.random_walk_based_corpus_construction(data_dir, relations, alpha=0.05, path_length=1000000, path_num=450000)[source]¶
Bases:
Construct link.dat and node.dat.
- Parameters:
data_dir (str) – Data directory for loading link.dat and node.dat, also for saving output.txt, rw_train_corpus.txt and rw_valid_corpus.txt.
relations (list) – Relations for all edge types.
alpha (str, optional) – Each path will terminate sampling with a probability of alpha. (default:
0.05)path_length (int, optional) – Sampling length of each path. (default:
1000000)path_num (int, optional) – Number of sampled paths. (default:
450000)