powered by
Calculate gradient of PARAFAC model.
parafac_gradient(x, Tensor)
Gradient of the PARAFAC model.
Vector of fitted loadings generated by the PARAFAC algorithm, can also be a Fac object
input data
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)
Run the code above in your browser using DataLab