哪个数学性质解释了这个矩阵运算
该代码的输出 我的问题不是关于Python代码,而是与线性代数或矩阵属性(如加法、分配)相关。
如何
X = X0 append/Concat X1
(X.Transpose Multiply X) result same of (X0.Transpose Multiply X0) + (X1.Transpose Multiply X1)
在数学上解释以下运算:X1附加到X0然后存储在X中,然后将X与X转置相乘。结果是一样的 (X0.T 乘 X0) + (X1.T 乘 X1) 我给出了要执行和查看的 python 代码片段。 所以,我试图理解如何用线性代数或矩阵乘法性质来解释它。
import numpy as np
X0 = np.array([[1, 1, 1, -1, 1, -1, -1, 1, -1],
])
X1 = np.array([ [1, -1, 1, 1, -1, 1, 1, 1, 1],
])
X = np.array([ [1, 1, 1, -1, 1, -1, -1, 1, -1],
[1, -1, 1, 1, -1, 1, 1, 1, 1],
])
W_t = (X.T @ X)
W0 = (X0.T @ X0)
W1 = (X1.T @ X1)
W = W0 + W1
print(W-W_t)
Output of that code
My Question is not about python code, but related to linear algebra or Matrix properties(like additive, distributive)
How to explain the following operation mathematically
X = X0 append/Concat X1
(X.Transpose Multiply X) result same of (X0.Transpose Multiply X0) + (X1.Transpose Multiply X1)
here X1 is appended to X0 then and stored in X, then multiplied X with X transpose. the result is the same as
(X0.T Multiply X0) + (X1.T Multiply X1)
I gave the python code snippets of that to execute and see.
So, I am trying to understand, how I can explain it with linear Algebra or Matrix multiplication properties.
import numpy as np
X0 = np.array([[1, 1, 1, -1, 1, -1, -1, 1, -1],
])
X1 = np.array([ [1, -1, 1, 1, -1, 1, 1, 1, 1],
])
X = np.array([ [1, 1, 1, -1, 1, -1, -1, 1, -1],
[1, -1, 1, 1, -1, 1, 1, 1, 1],
])
W_t = (X.T @ X)
W0 = (X0.T @ X0)
W1 = (X1.T @ X1)
W = W0 + W1
print(W-W_t)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论