-
Notifications
You must be signed in to change notification settings - Fork 155
/
CP_factorization.tex
165 lines (151 loc) · 9.33 KB
/
CP_factorization.tex
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
\documentclass[tikz,border=0.1cm]{standalone}
\usepackage{tikz,tikz-3dplot}
\usepackage{amsmath,amsthm}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{xcolor}
\begin{document}
\newcommand{\Depth}{2}
\newcommand{\Height}{2}
\newcommand{\Width}{2}
\newcommand{\xx}{1}
\newcommand{\yy}{1}
\newcommand{\zz}{1}
\newcommand{\xd}{4.5}
\newcommand{\yd}{-0.3}
\newcommand{\ye}{1.1}
\newcommand{\zd}{1}
\begin{tikzpicture}
\coordinate (O) at (0,0,0);
\coordinate (A) at (0,\Width,0);
\coordinate (B) at (0,\Width,\Height);
\coordinate (C) at (0,0,\Height);
\coordinate (D) at (\Depth,0,0);
\coordinate (E) at (\Depth,\Width,0);
\coordinate (F) at (\Depth,\Width,\Height);
\coordinate (G) at (\Depth,0,\Height);
\draw[red!60!black,fill=red!5] (O) -- (C) -- (G) -- (D) -- cycle;% Bottom Face
\draw[red!60!black,fill=red!5] (O) -- (A) -- (E) -- (D) -- cycle;% Back Face
\draw[red!60!black,fill=red!5] (O) -- (A) -- (B) -- (C) -- cycle;% Left Face
\draw[red!60!black,fill=red!5,opacity=0.8] (D) -- (E) -- (F) -- (G) -- cycle;% Right Face
\draw[red!60!black,fill=red!5,opacity=0.6] (C) -- (B) -- (F) -- (G) -- cycle;% Front Face
\draw[red!60!black,fill=red!5,opacity=0.8] (A) -- (B) -- (F) -- (E) -- cycle;% Top Face
\coordinate (O) at (0+\xx,0+\yy,0+\zz);
\coordinate (A) at (0+\xx,0.25\Width+\yy,0+\zz);
\coordinate (B) at (0+\xx,0.25\Width+\yy,0.25\Height+\zz);
\coordinate (C) at (0+\xx,0+\yy,0.25\Height+\zz);
\coordinate (D) at (0.25\Depth+\xx,0+\yy,0+\zz);
\coordinate (E) at (0.25\Depth+\xx,0.25\Width+\yy,0+\zz);
\coordinate (F) at (0.25\Depth+\xx,0.25\Width+\yy,0.25\Height+\zz);
\coordinate (G) at (0.25\Depth+\xx,0+\yy,0.25\Height+\zz);
\draw[green!80!black,fill=green!10] (O) -- (C) -- (G) -- (D) -- cycle;% Bottom Face
\draw[green!80!black,fill=green!10] (O) -- (A) -- (E) -- (D) -- cycle;% Back Face
\draw[green!80!black,fill=green!10] (O) -- (A) -- (B) -- (C) -- cycle;% Left Face
\draw[green!40!black,fill=green!10,opacity=0.8] (D) -- (E) -- (F) -- (G) -- cycle;% Right Face
\draw[green!40!black,fill=green!10,opacity=0.6] (C) -- (B) -- (F) -- (G) -- cycle;% Front Face
\draw[green!40!black,fill=green!10,opacity=0.8] (A) -- (B) -- (F) -- (E) -- cycle;% Top Face
\draw (0.2,-1.2,0) node {\scriptsize{\color{gray}$N$}};
\draw (0.2,-0.95,0) node[rotate = 0] {{\color{gray!65}$\underbrace{\hspace{2cm}}$}};
\draw (-0.4,1,2) node[rotate = 90] {\scriptsize{\color{gray}$M$}};
\draw (-0.15,1,2) node[rotate = 270] {{\color{gray!65}$\underbrace{\hspace{2cm}}$}};
\draw (2.5,-0.2,1.4) node[rotate = 45] {\scriptsize{\color{gray}$T$}};
\draw (2.2,0,1.2) node[rotate = 45] {{\color{gray!65}$\underbrace{\hspace{1.1cm}}$}};
\draw [draw=gray!75,thick,->] (0.8,0.1,1) -- (1,0.8,1) node [right] {{\color{green!50!black}$y_{ijt}$}};
\draw (0.8,0,1) node {\scriptsize{\color{gray}$(i,j,t)$-th}};
\draw (1,-1.2,1) node {\color{black}$\mathcal{Y}\in\mathbb{R}^{M\times N\times T}$};
\draw (3,0.5,0) node[rotate = 0] {{\color{black}\LARGE{$\approx$}}};
\coordinate (O) at (0+\xd,0+\yd,0+\zd);
\coordinate (A) at (0+\xd,\Width+\yd,0+\zd);
\coordinate (B) at (0+\xd,\Width+\yd,0.25\Height+\zd);
\coordinate (C) at (0+\xd,0+\yd,0.25\Height+\zd);
\coordinate (D) at (0.5\Depth+\xd,0+\yd,0+\zd);
\coordinate (E) at (0.5\Depth+\xd,\Width+\yd,0+\zd);
\coordinate (F) at (0.5\Depth+\xd,\Width+\yd,0.25\Height+\zd);
\coordinate (G) at (0.5\Depth+\xd,0+\yd,0.25\Height+\zd);
\draw[red!60,fill=yellow!25] (O) -- (C) -- (G) -- (D) -- cycle;% Bottom Face
\draw[red!60,fill=yellow!25] (O) -- (A) -- (E) -- (D) -- cycle;% Back Face
\draw[red!60,fill=yellow!25] (O) -- (A) -- (B) -- (C) -- cycle;% Left Face
\draw[red!60,fill=yellow!25,opacity=0.8] (D) -- (E) -- (F) -- (G) -- cycle;% Right Face
\draw[red!60,fill=yellow!25,opacity=0.6] (C) -- (B) -- (F) -- (G) -- cycle;% Front Face
\draw[red!60,fill=yellow!25,opacity=0.8] (A) -- (B) -- (F) -- (E) -- cycle;% Top Face
\coordinate (O) at (0+\xd,0+\yy-0.1,0+\zd);
\coordinate (A) at (0+\xd,0.25\Width+\yy-0.1,0+\zd);
\coordinate (B) at (0+\xd,0.25\Width+\yy-0.1,0.25\Height+\zd);
\coordinate (C) at (0+\xd,0+\yy-0.1,0.25\Height+\zd);
\coordinate (D) at (0.5\Depth+\xd,0+\yy-0.1,0+\zd);
\coordinate (E) at (0.5\Depth+\xd,0.25\Width+\yy-0.1,0+\zd);
\coordinate (F) at (0.5\Depth+\xd,0.25\Width+\yy-0.1,0.25\Height+\zd);
\coordinate (G) at (0.5\Depth+\xd,0+\yy-0.1,0.25\Height+\zd);
\draw[green!80!black,fill=green!10] (O) -- (C) -- (G) -- (D) -- cycle;% Bottom Face
\draw[green!80!black,fill=green!10] (O) -- (A) -- (E) -- (D) -- cycle;% Back Face
\draw[green!80!black,fill=green!10] (O) -- (A) -- (B) -- (C) -- cycle;% Left Face
\draw[green!40!black,fill=green!10,opacity=0.8] (D) -- (E) -- (F) -- (G) -- cycle;% Right Face
\draw[green!40!black,fill=green!10,opacity=0.6] (C) -- (B) -- (F) -- (G) -- cycle;% Front Face
\draw[green!40!black,fill=green!10,opacity=0.8] (A) -- (B) -- (F) -- (E) -- cycle;% Top Face
\draw[red!60] (0.5\Depth+\xd,\Width+\yd,0.25\Height+\zd) -- (0.5\Depth+\xd,0+\yd,0.25\Height+\zd);
\draw (\xd+0.2,\yy-1.9,\zz) node {\color{black}$U\in\mathbb{R}^{M\times R}$};
\draw (\xd-0.3,\yy-0.1,\zz) node {\color{green!50!black}$\boldsymbol{u}_{i}$};
\coordinate (O) at (0+\xd+1.2,0+\ye,0+\zd);
\coordinate (A) at (0+\xd+1.2,0.5\Width+\ye,0+\zd);
\coordinate (B) at (0+\xd+1.2,0.5\Width+\ye,0.25\Height+\zd);
\coordinate (C) at (0+\xd+1.2,0+\ye,0.25\Height+\zd);
\coordinate (D) at (\Depth+\xd+1.2,0+\ye,0+\zd);
\coordinate (E) at (\Depth+\xd+1.2,0.5\Width+\ye,0+\zd);
\coordinate (F) at (\Depth+\xd+1.2,0.5\Width+\ye,0.25\Height+\zd);
\coordinate (G) at (\Depth+\xd+1.2,0+\ye,0.25\Height+\zd);
\draw[red!60,fill=blue!15] (O) -- (C) -- (G) -- (D) -- cycle;% Bottom Face
\draw[red!60,fill=blue!15] (O) -- (A) -- (E) -- (D) -- cycle;% Back Face
\draw[red!60,fill=blue!15] (O) -- (A) -- (B) -- (C) -- cycle;% Left Face
\draw[red!60,fill=blue!15,opacity=0.8] (D) -- (E) -- (F) -- (G) -- cycle;% Right Face
\draw[red!60,fill=blue!15,opacity=0.6] (C) -- (B) -- (F) -- (G) -- cycle;% Front Face
\draw[red!60,fill=blue!15,opacity=0.8] (A) -- (B) -- (F) -- (E) -- cycle;% Top Face
\coordinate (O) at (0+\xd+2.5,0+\ye,0+\zd);
\coordinate (A) at (0+\xd+2.5,0.5\Width+\ye,0+\zd);
\coordinate (B) at (0+\xd+2.5,0.5\Width+\ye,0.25\Height+\zd);
\coordinate (C) at (0+\xd+2.5,0+\ye,0.25\Height+\zd);
\coordinate (D) at (0.25\Depth+\xd+2.5,0+\ye,0+\zd);
\coordinate (E) at (0.25\Depth+\xd+2.5,0.5\Width+\ye,0+\zd);
\coordinate (F) at (0.25\Depth+\xd+2.5,0.5\Width+\ye,0.25\Height+\zd);
\coordinate (G) at (0.25\Depth+\xd+2.5,0+\ye,0.25\Height+\zd);
\draw[green!80!black,fill=green!10] (O) -- (C) -- (G) -- (D) -- cycle;% Bottom Face
\draw[green!80!black,fill=green!10] (O) -- (A) -- (E) -- (D) -- cycle;% Back Face
\draw[green!80!black,fill=green!10] (O) -- (A) -- (B) -- (C) -- cycle;% Left Face
\draw[green!40!black,fill=green!10,opacity=0.8] (D) -- (E) -- (F) -- (G) -- cycle;% Right Face
\draw[green!40!black,fill=green!10,opacity=0.6] (C) -- (B) -- (F) -- (G) -- cycle;% Front Face
\draw[green!40!black,fill=green!10,opacity=0.8] (A) -- (B) -- (F) -- (E) -- cycle;% Top Face
\draw[red!60] (0+\xd+1.2,0.5\Width+\ye,0.25\Height+\zd) -- (\Depth+\xd+1.2,0.5\Width+\ye,0.25\Height+\zd);
\draw (\xd+2.0,\yy-0.8,\zz) node {\color{black}$V\in\mathbb{R}^{N\times R}$};
\draw (\xd+2.6,\yy-0.3,\zz) node {\color{green!50!black}$\boldsymbol{v}_{j}$};
\coordinate (O) at (0+\xd+1.2,0+\ye+1.5,0+\zd);
\coordinate (A) at (0+\xd+1.2,0.25\Width+\ye+1.5,0+\zd);
\coordinate (B) at (0+\xd+1.2,0.25\Width+\ye+1.5,\Height+\zd);
\coordinate (C) at (0+\xd+1.2,0+\ye+1.5,\Height+\zd);
\coordinate (D) at (0.5\Depth+\xd+1.2,0+\ye+1.5,0+\zd);
\coordinate (E) at (0.5\Depth+\xd+1.2,0.25\Width+\ye+1.5,0+\zd);
\coordinate (F) at (0.5\Depth+\xd+1.2,0.25\Width+\ye+1.5,\Height+\zd);
\coordinate (G) at (0.5\Depth+\xd+1.2,0+\ye+1.5,\Height+\zd);
\draw[red!60,fill=red!15] (O) -- (C) -- (G) -- (D) -- cycle;% Bottom Face
\draw[red!60,fill=red!15] (O) -- (A) -- (E) -- (D) -- cycle;% Back Face
\draw[red!60,fill=red!15] (O) -- (A) -- (B) -- (C) -- cycle;% Left Face
\draw[red!60,fill=red!15,opacity=0.8] (D) -- (E) -- (F) -- (G) -- cycle;% Right Face
\draw[red!60,fill=red!15,opacity=0.6] (C) -- (B) -- (F) -- (G) -- cycle;% Front Face
\draw[red!60,fill=red!15,opacity=0.8] (A) -- (B) -- (F) -- (E) -- cycle;% Top Face
\coordinate (O) at (0+\xd+0.8,0+\yy+1.2,0+\zd);
\coordinate (A) at (0+\xd+0.8,0.25\Width+\yy+1.2,0+\zd);
\coordinate (B) at (0+\xd+0.8,0.25\Width+\yy+1.2,0.25\Height+\zd);
\coordinate (C) at (0+\xd+0.8,0+\yy+1.2,0.25\Height+\zd);
\coordinate (D) at (0.5\Depth+\xd+0.8,0+\yy+1.2,0+\zd);
\coordinate (E) at (0.5\Depth+\xd+0.8,0.25\Width+\yy+1.2,0+\zd);
\coordinate (F) at (0.5\Depth+\xd+0.8,0.25\Width+\yy+1.2,0.25\Height+\zd);
\coordinate (G) at (0.5\Depth+\xd+0.8,0+\yy+1.2,0.25\Height+\zd);
\draw[green!80!black,fill=green!10] (O) -- (C) -- (G) -- (D) -- cycle;% Bottom Face
\draw[green!80!black,fill=green!10] (O) -- (A) -- (E) -- (D) -- cycle;% Back Face
\draw[green!80!black,fill=green!10] (O) -- (A) -- (B) -- (C) -- cycle;% Left Face
\draw[green!40!black,fill=green!10,opacity=0.8] (D) -- (E) -- (F) -- (G) -- cycle;% Right Face
\draw[green!40!black,fill=green!10,opacity=0.6] (C) -- (B) -- (F) -- (G) -- cycle;% Front Face
\draw[green!40!black,fill=green!10,opacity=0.8] (A) -- (B) -- (F) -- (E) -- cycle;% Top Face
\draw[red!60] (0.5\Depth+\xd+1.2,0.25\Width+\ye+1.5,0+\zd) -- (0.5\Depth+\xd+1.2,0.25\Width+\ye+1.5,\Height+\zd);
\draw (\xd+2.5,\yy+1.3,\zz) node {\color{black}$X\in\mathbb{R}^{T\times R}$};
\draw (\xd+0.5,\yy+1.4,\zz) node {\color{green!50!black}$\boldsymbol{x}_{t}$};
\end{tikzpicture}
\end{document}