# renormsolCP: Scaling of the Candecomp/Parafac solution In ThreeWay: Three-Way Component Analysis

## Description

Scales the Candecomp/Parafac solution producing two component matrices normalized to unit sum of squares (and compensating this scaling in the remaining component matrix).

## Usage

 `1` ``` renormsolCP(A, B, C, mode) ```

## Arguments

 `A` Component matrix for the `A`-mode `B` Component matrix for the `B`-mode `C` Component matrix for the `C`-mode `mode` Scaling option (1 if scaling for B- and C-modes, 2 if scaling for A- and C-modes, 3 if scaling for A- and B-modes)

## Value

A list including the following components:

 `A` Component matrix for the `A`-mode after normalization `B` Component matrix for the `B`-mode after normalization `C` Component matrix for the `C`-mode after normalization

## Author(s)

Maria Antonietta Del Ferraro mariaantonietta.delferraro@yahoo.it
Henk A.L. Kiers h.a.l.kiers@rug.nl
Paolo Giordani paolo.giordani@uniroma1.it

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17``` ```data(TV) TVdata=TV[[1]] # permutation of the modes so that the A-mode refers to students TVdata <- permnew(TVdata, 16, 15, 30) TVdata <- permnew(TVdata, 15, 30, 16) # CP solution TVcp <- CPfuncrep(TVdata, 30, 16, 15, 2, 1, 1, 1, 0, 1e-6, 10000) # sums of squares of A, B and C sum(TVcp\$A^2) sum(TVcp\$B^2) sum(TVcp\$C^2) # Renormalization by scaling B- and C-modes TVcpScalBC <- renormsolCP(TVcp\$A, TVcp\$B, TVcp\$C, 1) # sums of squares of A, B and C after renormalization sum(TVcpScalBC\$A^2) sum(TVcpScalBC\$B^2) sum(TVcpScalBC\$C^2) ```

ThreeWay documentation built on May 2, 2019, 9:20 a.m.