Sort PARAFAC components based on variance explained per component.
Source:R/utils.R
sortComponents.Rd
Sort PARAFAC components based on variance explained per component.
Arguments
- Fac
Fac object output of a parafac model
- X
Input data
Examples
X = array(rnorm(108*100*10), c(108,100,10))
model = parafac(X, 2)
#>
|
| | 0%
|
|======= | 10%
|
|============== | 20%
|
|===================== | 30%
|
|============================ | 40%
|
|=================================== | 50%
|
|========================================== | 60%
|
|================================================= | 70%
|
|======================================================== | 80%
|
|=============================================================== | 90%
|
|======================================================================| 100%
sortedFac = sortComponents(model$Fac, X)
#> Error in Fac[[1]]: subscript out of bounds