MultiWay

Multiway API Reference

Functions

MultiCenter(Z, mode = 1)

Acquires the mean of the specified mode in Z and returns a transform that will remove those means from any future data.

(T::MultiCenter)(Z; inverse = false)

Centers data in Tensor Z mode-wise according to learned centers in MultiCenter object T.

MultiScale(Z, mode = 1)

Acquires the standard deviations of the specified mode in Z and returns a transform that will scale by those standard deviations from any future data.

(T::MultiScale)(Z; inverse = false)

Scales data in Tensor Z mode-wise according to learned standard deviations in MultiScale object T.

MultilinearPLS(Y, X; Factors = minimum(size(X)) - 2,
                     tolerance = 1e-8, maxiters = 200 )

Performs a Multilinear PLS regression from X and Y tensors. The number of Factors, convergence tolerance, and the maxiters(maximum iterations) may be set.

Method returns a MultilinearPLS object.

Notes: - Only Y orders < 2 are currently supported. - X order must be >= 2 - X orders > 3 are currently unreviewed. Please contribute!

Bro, Rasmus. (1996), Multiway calibration. Multilinear PLS. J. Chemometrics, 10: 47-61. doi:10.1002/(SICI)1099-128X(199601)10:1<47::AID-CEM400>3.0.CO;2-C

(M::MultilinearPLS)( X; Factors = M.Factors )

Applies a Multilinear PLS regression object to new X data with a prescribed number of Factors. Method returns a matrix of the calibrated size Y.

Bro, Rasmus. (1996), Multiway calibration. Multilinear PLS. J. Chemometrics, 10: 47-61. doi:10.1002/(SICI)1099-128X(199601)10:1<47::AID-CEM400>3.0.CO;2-C

HOOI( X; Factors = 1, maxiters = 100, init = :HOSVD, tolerance = 1e-9 )

Performs multiway PCA aka Higher Order SVD aka Tucker, etc via the Higher Order Orthogonal Iteration (HOOI) of tensors.

Returns a MultilinearPCA object containing (Core Tensor, Basis Tensors, Explained Variance)

Lieven De Lathauwer, Bart De Moor, and Joos Van-dewalle. A multilinear singular value decomposition. SIAM J. Matrix Anal. Appl., 2000.

HOSVD(X; Factors = 2)

Performs multilinear PCA aka Higher Order SVD aka Tucker, etc. The number of factors decomposed can be a scalar (repeated across all modes) or a vector/tuple for each mode.

Returns a MultilinearPCA object containing (Core Tensor, Basis Tensors, Explained Variance)

Tucker, L. R. (1964). "The extension of factor analysis to three-dimensional matrices". In N. Frederiksen and H. Gulliksen (Eds.), Contributions to Mathematical Psychology. New York: Holt, Rinehart and Winston: 109–127.

MultiNorm(T)

Computes the equivalent of the Froebinius norm on a tensor T. Returns a scalar.

TensorProduct(A, B, IndexA, IndexB; RemoveSingularModes = true,
                    SizeA = size(A), SizeB = size(B) )

Computes the tensor product of tensors A & B across their respective indices.

Note: This is primairily an method for internal use to the library, but feel free to use it for your own needs.

Unfold( Z::Array )

Unfolds a tensor into a 2-tensor.