Skip to content

kuanglab/LowrankTLP

Repository files navigation

LowrankTLP

MATLAB implementation

We provide MATLAB codes for LowrankTLP algorithm in the following files:

  • LowrankTLP_Task1.m: LowrankTLP with known multi-relations as inputs.
  • LowrankTLP_Task2.m: LowrankTLP with pairwise relations as inputs.
  • greedy_select_topK_idx.m: an eignevalue selection algorithm for LowrankTLP.
  • simulation.m: a drive file to test LowrankTLP and baseline methods on a simulation dataset.

Parallel scalable implementation

We implemented a parallel version of LowrankTLP using SPLATT1 library for parallel shared-memory tensor operations to increase the scalability by a large magnitude. We included SPLATT version 1.1.1 in our package, but it can also be obtained from here.

In order to install it, run the following command, once inside the SPLATT folder:

$ ./configure && make

You can run it using the following command:

$ ./SPLATT/build/Linux-x86_64/bin/lowrank_bin <Y0_path> <num_modes> <eigvec_prefix_path> <eigvals_path> <output_path>

Where the parameters are the following:

  • Y0_path: Path to the tensor Y0. The file should have the same format as this example.
  • num_modes: Number of modes in the tensor.
  • eigvec_prefix_path: Prefix of the path to the eigenvectors files. If your tensor has 4 modes, you will need 4 eigenvectors file, let's say, example/Q1.txt, ..., example/Q4.txt. Therefore, you should provide example/Q as the eigvec_prefix_path parameter. Each file should contain a matrix whose columns are separated by space character, and one row per line. Eigenvectors are the columns of the file.
  • eigvals_path: Path to a file containing the eigenvalues, separated by space character.
  • output_path: Path to the output file.

Example:

$ ./SPLATT/build/Linux-x86_64/bin/lowrank_bin ./tmp/S.tns 10 ./tmp/q ./tmp/e.txt ./tmp/output.txt

References

This work has been published in Li, Zhuliu, Raphael Petegrosso, Shaden Smith, David Sterling, George Karypis, and Rui Kuang. "Scalable label propagation for multi-relational learning on the tensor product of graphs." IEEE Transactions on Knowledge and Data Engineering 34, no. 12 (2021): 5964-5978.

1: Smith, Shaden, and George Karypis. "SPLATT: The Surprisingly ParalleL spArse Tensor Toolkit." (2016).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published