This repository implements efficient numerical algorithm for Alternating Least Squares (ALS) in CP and Tucker decompositions, Pairwise perturbation algorithm for CP-ALS as well as fast Nonlinear Least Squares (NLS) for CP decomposition.
It also implements Alternating Mahalanobis Distance Minimization and hybrid updates for CP decomposition
This repository implements everything in Python, and is compatible with both Numpy backend, which allows fast seaquential running, and Cyclops Tensor Framework backend, which allows fast distributed parallism.
Run
pip install -r requirements.txt
to install necessary packages.
Run all tests with
# sudo pip install nose
nosetests -v tests/*.py
Run
python run_als.py -h
to see the existing input arguments and their functions.
Run
python tests.py
to test some simple CP runs.
Run
python run_nls.py -h
to see existing input arguments and their functions with default values
python mahalanobis.py -h
to see existing input arguments and their functions with default values
The comparison in contraction ALS and GN CG iteration is done using Contraction.py file. Run
python Contraction.py -h
to see existing input arguments
The file Convprob.py can be used to compare the convergence probability of different methods. Run
python Convprob.py -h
to see input arguments with their functions and default values
For now visdom can fetch all the csv files following the particular format and plot them.
Go to the Visdom folder then execute the following commands:
visdom -port XXXXX
python visdom_pull_server.py -port XXXXX