Calculate the variation explained by a PARAFAC model.
Source:R/calculateVarExp.R
calculateVarExp.Rd
Calculate the variation explained by a PARAFAC model.
Arguments
- Fac
Fac object output from the
parafac()
function.- X
Input data of the PARAFAC model.
Examples
X = Fujita2023$data
model = parafac(X, nfac=1, nstart=1, verbose=FALSE)
calculateVarExp(model$Fac, X)
#> [1] 0.7372695