我在使用关系Ax = b的最小二乘法估计参数时遇到问题。我有x
和b
的值,而A
是一个9 x 9的矩阵,包含下面给出的未知数
A = np.array([[R,S,0,0,0,T,0,0,0],
[Q,R,S,0,0,0,T,0,0],
[0,Q,R,S,0,0,0,T,0],
[0,0,Q,R,S,0,0,0,T],
[0,0,0,Q,R,S,0,0,0],
[P,0,0,0,Q,R,S,0,0],
[0,P,0,0,0,Q,R,S,0],
[0,0,P,0,0,0,Q,R,S],
[0,0,0,P,0,0,0,Q,R]])
x = np.array([[11], [20], [13], [43], [5], [63], [72],[84], [96]])
b = np.array([[10], [2], [4], [3], [5], [1], [7],[6], [9]])
P = (W + X)
Q = (W + 2*Y)
R = (2*W - 0.1)
S = (W - X)
T = (W - 2*Y)
我需要获取W
,X
和Y
的值。
任何帮助将不胜感激