Previous topic

Quantics Tensor Train Matrices

Next topic

Spectral Tensor Train

This Page

Weighted Tensor Train Vectors

class TensorToolbox.core.WTTvec(A, W, store_location='', store_object=None, store_freq=1, store_overwrite=False, multidim_point=None)

Constructor of multidimensional tensor in Weighted Tensor Train format [3]

Parameters:
  • A (Candecomp,ndarray,TT,TensorWrapper) – Available input formats are Candecomp, full tensor in numpy.ndarray, Tensor Train structure (list of cores), or a Tensor Wrapper.
  • W (list) – list of 1-dimensional ndarray containing the weights for each dimension.
  • store_location (string) – Store computed values during construction on the specified file path. The stored values are ttcross_Jinit and the values used in the TensorWrapper. This permits a restart from already computed values. If empty string nothing is done. (method==’ttcross’)
  • store_object (string) – Object to be stored (default are the tensor wrapper and ttcross_Jinit)
  • store_freq (int) – storage frequency. store_freq==1 stores intermediate values at every iteration. The program stores data every store_freq internal iterations. If store_object is a SpectralTensorTrain, then store_freq determines the number of seconds every which to store values.
  • multidim_point (int) – If the object A returns a multidimensional array, then this can be used to define which point to apply ttcross to.
apply_weights_on_data()

Apply the weights on the input data A

build(eps=1e-10, method='svd', rs=None, fix_rank=False, Jinit=None, delta=0.0001, maxit=100, mv_eps=1e-06, mv_maxit=100, kickrank=None)

Common interface for the construction of the approximation.

Parameters:
  • eps (float) – [default == 1e-10] For method==’svd’: precision with which to approximate the input tensor. For method==’ttcross’: TT-rounding tolerance for rank-check.
  • method (string) – ‘svd’ use singular value decomposition to construct the TT representation [3], ‘ttcross’ use low rank skeleton approximation to construct the TT representation [4], ‘ttdmrg’ uses Tensor Train Renormalization Cross to construct the TT representation [5][6], ‘ttdmrgcross’ uses ‘ttdmrg’ with ‘ttcross’ approximation of supercores
  • rs (list) – list of integer ranks of different cores. If None then the incremental TTcross approach will be used. (method==’ttcross’)
  • fix_rank (bool) – determines whether the rank is allowed to be increased (method==’ttcross’)
  • Jinit (list) – list of list of integers containing the r starting columns in the lowrankapprox routine for each core. If None then pick them randomly. (method==’ttcross’)
  • delta (float) – accuracy parameter in the TT-cross routine (method==’ttcross’). It is the relative error in Frobenious norm between two successive iterations.
  • maxit (int) – maximum number of iterations in the lowrankapprox routine (method==’ttcross’)
  • mv_eps (float) – accuracy parameter for each usage of the maxvol algorithm (method==’ttcross’)
  • mv_maxit (int) – maximum number of iterations in the maxvol routine (method==’ttcross’)
  • fix_rank – Whether the rank is allowed to increase
  • kickrank (int) – rank overshooting for ‘ttdmrg’
remove_weights_from_data()

Removes the weights from the input data A