Learn R Programming

ThreeWay (version 1.1.3)

renormsolT3: Renormalization of the Tucker3 (and Tucker2) solution

Description

Renormalizes the Tucker3 solution producing a core normalized to unit sum of squares (and compensating the core normalization in the component matrices).

Usage

renormsolT3(A, B, C, G, mode)

Arguments

A
Component matrix for the A-mode
B
Component matrix for the B-mode
C
Component matrix for the C-mode
G
Matricized core array (frontal slices)
mode
Renormalization option (1 if renormalization with respect to A-mode, 2 if renormalization with respect to B-mode, 3 if renormalization with respect to C-mode)

Value

A list including the following components:
A
Component matrix for the A-mode after normalization of the core
B
Component matrix for the B-mode after normalization of the core
C
Component matrix for the C-mode after normalization of the core
H
Normalized matricized core array (frontal slices)

Examples

Run this code
data(Bus)
# labels for Bus data
laba <- rownames(Bus)
labb <- substr(colnames(Bus)[1:5], 1, 1)
labc <- substr(colnames(Bus)[seq(1,ncol(Bus),5)], 3, 8)
# T3 solution
BusT3 <- T3funcrep(Bus, 7, 5, 37, 2, 2, 2, 0, 1e-6)
# sums of squares of A and core
sum(BusT3$A^2)
sum(BusT3$H^2)
# Renormalization with respect to the A-mode
BusT3rA <- renormsolT3(BusT3$A, BusT3$B, BusT3$C, BusT3$H,1)
# sums of squares of A and core after renormalization
sum(BusT3rA$A^2)
sum(BusT3rA$H^2)

Run the code above in your browser using DataLab