Learn R Programming

SuperPCA (version 0.4.0)

Parafac: Performs parafac factorization via ALS

Description

Performs parafac factorization via ALS

Usage

Parafac(Y, R)

Arguments

Y

Array of dimension m1*m2*...*mK

R

Desired rank of the factorization. Defalust is all columns(range=1:R)

Value

list with components

U:

List of basis vectors for parafac factorization, U[k]: mk*R for k=1,...,K. Columns of U[K] have norm 1 for k>1.

SqError:

Vector of squared error for the approximation at each iteration (should be non-increasing)

Examples

Run this code
# NOT RUN {
A <- array(stats::rnorm(100*10*10), dim=c(100,10,10))
Parafac(A,4)
# }

Run the code above in your browser using DataLab