在下面的文章中,我们将讨论如何使用Anaplan优化器计算矩阵逆。矩阵逆作为功能可用于解决Anaplan中的多线性回归问题。使用矩阵逆,我们将求解以下多线性回归方程:y = b0 + b1x1 + b2x2 + b3x3 + b4x4 + b5x5 + b5x5 + b6x6 + b7x7 + b7x7 + b8x8 x1至x8称为独立变量。y称为因变量,我们要找到其值。B0至B8称为常数和自变量的系数(x1至x8)。y = x *b x(t) *y =(x(t) *x) *b带x(t) *x到另一侧(x(t) *x)-1 x(t) *y = b multii线性回归可用于找出影响您因变量的因素(例如:因果预测)。您可以使用以下步骤使用优化器计算Anaplan中的矩阵逆,然后使用它来完成多线性回归问题。用于求解矩阵逆的理论为m * m^-1 = I.矩阵 *矩阵逆=身份矩阵。我们知道矩阵和身份矩阵的值,并且我们将使用优化器来计算我们的矩阵倒数的变量。 This trick is going to help us compute MMULT. And Optimizer will do the heavy lifting for us and compute Matrix Inverse for us. The following are the steps: Lists Create four lists I9x9 (Rows), J9x9 (Columns), K9x9 (Dummy List), Item and Populate them as follows: R1 to R9 as list members in I9x9 -> Make a number property to hold row number (R1 =1...R9=9) C1 to C9 as list members in J9x9 -> Make a number property to hold column number (C1 =1...C9=9) K1 to K9 as list members in K9x9 -> Make a number property to hold column number (K1 =1...K9=9) Item-1 to Item-xxx as list members in Item list (These are number of items for which we want to calculate the matrix inverse) Include Top Level for all the above lists Module Create a Module with the following line items: -- Input -- Input Matrix -> This is Input Matrix for Matrix Identity Matrix -> If row number=column number Then 1 else 0 -- Variables -- VAR 01: Matrix Inverse -> This is the Matrix Inverse Optimizer is solving for VAR 02: MMULT: Matrix * Matrix Inverse -> Intermediate variable to calculate Matrix *Matrix Inverse VAR 03: MMULT RxC -> Changing Dimensions of the MMULT result above from IxJxK to IxJ -- Constraints -- CONST 01: CALC MMULT = Matrix * Matrix Inverse -> Calculating Matrix * Matrix Inverse CONST 02: CONVERT MMULT RxC -> Changing dimension of MMULT result above from IxJxK to IxJ CONST 03: MMULT <= Identity -> Constraining VAR 03: MMULT RxC<= Identity Matrix -- Objective -- Objective -> Maximizing VAR 03: MMULT RxCso VAR 03: MMULT RxC = IDentity Matrix whenever a Matrix inverse exists (If Determinant of a Matrix is 0 then Matrix inverse does not exist!) Formula and Dimensions Use this to configure the formulas and dimensions for these line items. Optimizer Use this to configure Optimizer Once you run the optimizer then you will be able to see the value of Matrix inverse in VAR 01: Matrix Inverse. Please Note: While testing the solution, ensure that your Input Matrix has numbers put in such a way that its Determinant is not Zero (because a matrix with zero determinant will not have an Inverse)
... 查看更多