ensign.cp_decomp.cp_apr_pqnr

cp_apr_pqnr(sptensor, rank, out_dir=None, seed=0, max_outer_iter=100, max_inner_iter=10, stop_tol=0.0001, mem_limit_gb=2, output_init_guess=False, load_balance=0, verbose=False, gen_backtrack=False)[source]

Performs a CP decomposition using alternating Poisson regression (APR) with projected quasi-Newton row (PQNR) subproblem. [1]

Parameters
sptensorSPTensor or str

Tensor to decompose. If sptensor is of type str, it should contain a path to a directory containing an SPTensor or directly to a tensor_data.txt file.

rankint

Rank of the decomposition.

out_dirstr

Path to directory where decomposition results will be written. If not set, the decomposition will not be written to disk.

Returns
decompCPDecomp

Results of the decomposition.

Other Parameters
seedint, optional

Random seed used to initialize decomposition. Default value is 0.

max_outer_iterint, optional

Maximum iterations before stopping decomposition. Default value is 200.

max_inner_iterint, optional

Maximum inner iterations per outer iteration. Default value is 10.

stop_tolfloat, optional

Minimum change in KKT violation required for convergence. Default value is 1.0e-4.

mem_limit_gbint, optional

Maximum memory used during decomposition, in GiB. Default value is 2.

output_init_guessbool, optional

Write the initial guess of decomposition to out_dir/input_<mode_id>.txt Default value is False.

load_balanceint, optional

The load balancing technique to use for parallel execution. ensign.constants.NO_LOAD_BALANCE (default) is no load balancing, ensign.constants.LOAD_BALANCE is standard load balancing, and ensign.constants.LOAD_BALANCE_UNSORTED is unsorted load balancing.

verbosebool, optional

Output verbose decomposition progress to out_dir/output.txt Default value is False.

gen_backtrackbool, optional

Output component-wise backtracking information to out_dir/cpd_backtrack.txt Default value is False.

Raises
Exception

If there is a problem performing the decomposition.

See also

ensign.cp_decomp.CPDecomp

CP decomposition class

ensign.sptensor.SPTensor

Sparse tensor class

References

1

Hansen, S., Plantenga, T., Kolda, T., “Newton-based Optimization for Kullback-Leibler Nonnegative Tensor Factorizations,” Optimization Methods and Software 30(5), pp. 1002-1029, 2015.