parafac_gradient {parafac4microbiome} | R Documentation |
Calculate gradient of PARAFAC model.
Description
Calculate gradient of PARAFAC model.
Usage
parafac_gradient(x, Tensor)
Arguments
x |
Vector of fitted loadings generated by the PARAFAC algorithm, can also be a Fac object |
Tensor |
input data |
Value
Gradient of the PARAFAC model.
Examples
A = array(rnorm(108*2), c(108,2))
B = array(rnorm(100*2), c(100,2))
C = array(rnorm(10*2), c(10,2))
X = reinflateTensor(A, B, C)
init = initializePARAFAC(X, 2)
g = parafac_gradient(init, X)
[Package parafac4microbiome version 1.0.3 Index]