frobenius.cor: Calculate Frobenius correlations of the component matrices

Description Usage Arguments Details Value See Also Examples

Description

Function calculates Frobenius correlations between grouped matrices from the SSA matrix decomposition

Usage

1
frobenius.cor(x, groups, ...)

Arguments

x

input SSA object, supposed to be of class ‘ossa’

groups

list of numeric vectors, indices of elementary matrix components in the SSA matrix decomposition

...

further arguments passed to decompose

Details

Function computes matrix of Frobenius correlations between grouped matrices from the SSA matrix decomposition. For group I = {i_1, …, i_s} the group matrix is defined as X_i = sum_{i in I} (sigma_i U_i (V_i)^T).

Frobenius correlation of two matrices is defined as follows:

fcor (Z, Y) = <Z, Y>_F / (||Z||_F ||Y||_F)).

Frobenius correlation is a measure of Frobenius orthogonality of the components. If grouped matrices are correlated then the w-correlations of the corresponding reconstructed series is not relevant measure of separability (and one should use owcor instead). Also, if the elementary matrices X_i = sigma_i U_i (V_i)^T of the decomposition are not F-orthogonal, then σ_i do not reflect their true contributions into the matrix decomposition.

This function normally should be used only for object of class ‘ossa’. Otherwise it always returns identical matrix (for disjoint groups).

Value

Object of type 'wcor.matrix'.

See Also

wcor, owcor, iossa.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Separation of two mixed sine-waves with equal amplitudes
N <- 150
L <- 70
omega1 <- 1/5
omega2 <- 1/10

v <- sin(2*pi*omega1 * (1:N)) + sin(2*pi*omega2 * (1:N))
s <- ssa(v, L)
fs <- fossa(s, nested.groups = 1:4, gamma = 100)

# Decomposition is F-orthogonal
plot(frobenius.cor(fs, groups = 1:4), main = "F-correlation matrix")

plot(wcor(s, groups = 1:4))
plot(wcor(fs, groups = 1:4))


# Separate two non-separable sine series with different amplitudes

N <- 150
L <- 70

omega1 <- 0.07
omega2 <- 0.0675

F <- 2*sin(2*pi*omega1 * (1:N)) + 2*sin(2*pi*omega2 * (1:N))
s <- ssa(F, L)
ios <- iossa(s, nested.groups = list(1:2, 3:4),
             kappa = NULL, maxiter = 1000, tol = 1e-5)

plot(reconstruct(ios, groups = ios$iossa.groups))
summary(ios)

# Decomposition is really oblique
plot(frobenius.cor(ios, groups = 1:4), main = "F-correlation matrix")

plot(wcor(ios, groups = 1:4))
plot(owcor(ios, groups = list(1:2, 3:4)), main = "Oblique W-correlation matrix")




data(USUnemployment)
unempl.male <- USUnemployment[, "MALE"]

s <- ssa(unempl.male)
ios <- iossa(s, nested.groups = list(c(1:4, 7:11), c(5:6, 12:13)))
summary(ios)

# W-cor matrix before IOSSA and w-cor matrix after it
plot(wcor(s, groups = 1:30))
plot(wcor(ios, groups = 1:30))

# Confirmation of the indicated max value in the above warning
plot(frobenius.cor(ios, groups = 1:30), main = "F-correlation matrix")


Search within the Rssa package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.