CMTF

# Import statement

from hottbox.algorithms.decomposition.fusion import CMTF
class CMTF(max_iter=50, epsilon=0.01, tol=0.0001, random_state=None, verbose=False)[source]

Coupled Matrix and Tensor factorization for two Tensors of order n and 2 with respect to a specified rank.

Computed via alternating least squares (ALS)

Parameters
max_iterint

Maximum number of iteration

epsilonfloat

Threshold for the relative error of approximation.

tolfloat

Threshold for convergence of factor matrices

random_stateint
verbosebool

If True, enable verbose output

Attributes

cost

(list) A list of relative approximation errors at each iteration of the algorithm.

References

  • Acar, Evrim, Evangelos E. Papalexakis, Gozde Gurdeniz, Morten A. Rasmussen, Anders J. Lawaetz, Mathias Nilsson and Rasmus Bro. “Structure-revealing data fusion.” BMC Bioinformatics (2013).

  • Jeon, Byungsoo & Jeon, Inah & Sael, Lee & Kang, U. (2016). SCouT: Scalable coupled matrix-tensor factorization—Algorithm and discoveries. Int. Conf. Data Eng.. 811-822. 10.1109/ICDE.2016.7498292.

Methods

copy(self)

Copy of the CPD algorithm as a new object

decompose(self, tensor, mlst, rank)

Performs factorisation using ALS on the two instances of tensor

plot

property converged

Checks convergence of the CPD-ALS algorithm. Returns ——- bool

copy(self)[source]

Copy of the CPD algorithm as a new object

decompose(self, tensor, mlst, rank)[source]
Performs factorisation using ALS on the two instances of tensor

with respect to the specified rank

Parameters
tensorTensor

Multi-dimensional data to be decomposed

mlstList of Tensor

List of two-dimensional Tensor to be decomposed

ranktuple

Desired Kruskal rank for the given tensor. Should contain only one value. If it is greater then any of dimensions then random initialisation is used

Returns
(fmat_a, fmat_b, t_recon, m_recon)List(np.ndarray) or np.ndarray

fmat_a, fmat_b are the list of components obtained by applying CMTF t_recon, m_recon : The reconstructed tensor and list of matrices

property name

Name of the decomposition

Returns
decomposition_namestr