January 14 2011 8:31:08.763 PM REGRESSION_PRB FORTRAN90 version Test the REGRESSION library. TEST01 EXAMPLE_SIZE gets the size of an example file. EXAMPLE_READ reads an example file. EXAMPLE_PRINT prints an example file. Open and print file x01.txt EXAMPLE_PRINT: Number of rows/observations = 62 Number of columns/variables = 1 # Brain WeigBody Weigh 1 3.385 44.500 2 0.480 15.500 3 1.350 8.100 4 465.000 423.000 5 36.330 119.500 6 27.660 115.000 7 14.830 98.200 8 1.040 5.500 9 4.190 58.000 10 0.425 6.400 11 0.101 4.000 12 0.920 5.700 13 1.000 6.600 14 0.005 0.140 15 0.060 1.000 16 3.500 10.800 17 2.000 12.300 18 1.700 6.300 19 2547.000 4603.000 20 0.023 0.300 21 187.100 419.000 22 521.000 655.000 23 0.785 3.500 24 10.000 115.000 25 3.300 25.600 26 0.200 5.000 27 1.410 17.500 28 529.000 680.000 29 207.000 406.000 30 85.000 325.000 31 0.750 12.300 32 62.000 1320.000 33 6654.000 5712.000 34 3.500 3.900 35 6.800 179.000 36 35.000 56.000 37 4.050 17.000 38 0.120 1.000 39 0.023 0.400 40 0.010 0.250 41 1.400 12.500 42 250.000 490.000 43 2.500 12.100 44 55.500 175.000 45 100.000 157.000 46 52.160 440.000 47 10.550 179.500 48 0.550 2.400 49 60.000 81.000 50 3.600 21.000 51 4.288 39.200 52 0.280 1.900 53 0.075 1.200 54 0.122 3.000 55 0.048 0.330 56 192.000 180.000 57 3.000 25.000 58 160.000 169.000 59 0.900 2.600 60 1.620 11.400 61 0.104 2.500 62 4.235 50.400 TEST01 EXAMPLE_SIZE gets the size of an example file. EXAMPLE_READ reads an example file. EXAMPLE_PRINT prints an example file. Open and print file x03.txt EXAMPLE_PRINT: Number of rows/observations = 30 Number of columns/variables = 2 # One AgeSystolic B 1 1.000 39.000 144.000 2 1.000 47.000 220.000 3 1.000 45.000 138.000 4 1.000 47.000 145.000 5 1.000 65.000 162.000 6 1.000 46.000 142.000 7 1.000 67.000 170.000 8 1.000 42.000 124.000 9 1.000 67.000 158.000 10 1.000 56.000 154.000 11 1.000 64.000 162.000 12 1.000 56.000 150.000 13 1.000 59.000 140.000 14 1.000 34.000 110.000 15 1.000 42.000 128.000 16 1.000 48.000 130.000 17 1.000 45.000 135.000 18 1.000 17.000 114.000 19 1.000 20.000 116.000 20 1.000 19.000 124.000 21 1.000 36.000 136.000 22 1.000 50.000 142.000 23 1.000 39.000 120.000 24 1.000 21.000 120.000 25 1.000 44.000 160.000 26 1.000 53.000 158.000 27 1.000 63.000 144.000 28 1.000 29.000 130.000 29 1.000 25.000 125.000 30 1.000 69.000 175.000 TEST01 EXAMPLE_SIZE gets the size of an example file. EXAMPLE_READ reads an example file. EXAMPLE_PRINT prints an example file. Open and print file x60.txt EXAMPLE_PRINT: Number of rows/observations = 3 Number of columns/variables = 3 # A1 A2 A3 B 1 2.000 -1.000 0.000 0.000 2 -1.000 2.000 -1.000 0.000 3 0.000 -1.000 2.000 4.000 TEST02 GEN generates a random example. EXAMPLE_PRINT: Number of rows/observations = 5 Number of columns/variables = 3 # A1 A2 A3 B 1 0.012 0.071 0.563 0.650 2 0.716 0.767 0.756 2.249 3 0.734 0.294 0.322 1.367 4 0.545 0.315 0.416 1.269 5 0.132 0.484 0.452 1.016 EXAMPLE_PRINT: Number of rows/observations = 8 Number of columns/variables = 4 # A1 A2 A3 A4 B 1 0.435 0.384 0.762 0.927 2.508 2 0.340 0.218 0.390 0.609 1.541 3 0.757 0.708 0.797 0.359 2.678 4 0.227 0.202 0.793 0.714 1.971 5 0.198 0.712 0.476 0.619 1.942 6 0.930 0.505 0.224 0.356 1.967 7 0.207 0.661 0.126 0.190 1.129 8 0.557 0.534 0.370 0.549 1.937 EXAMPLE_PRINT: Number of rows/observations = 4 Number of columns/variables = 2 # A1 A2 B 1 0.191 0.615 0.788 2 0.275 0.326 0.626 3 0.917 0.532 1.424 4 0.613 0.821 1.426 TEST03 SCR returns all the M by NA submatrices of an M by N matrix A, where NA is between NL and NU. For our problem: M = 4 N = 5 NL = 2 NU = 3 The M by N matrix A: Col 1 2 3 4 5 Row 1: 11. 12. 13. 14. 15. 2: 21. 22. 23. 24. 25. 3: 31. 32. 33. 34. 35. 4: 41. 42. 43. 44. 45. Col 1 2 Row 1: 11. 12. 2: 21. 22. 3: 31. 32. 4: 41. 42. Col 1 2 Row 1: 11. 13. 2: 21. 23. 3: 31. 33. 4: 41. 43. Col 1 2 Row 1: 12. 13. 2: 22. 23. 3: 32. 33. 4: 42. 43. Col 1 2 Row 1: 11. 14. 2: 21. 24. 3: 31. 34. 4: 41. 44. Col 1 2 Row 1: 12. 14. 2: 22. 24. 3: 32. 34. 4: 42. 44. Col 1 2 Row 1: 13. 14. 2: 23. 24. 3: 33. 34. 4: 43. 44. Col 1 2 Row 1: 11. 15. 2: 21. 25. 3: 31. 35. 4: 41. 45. Col 1 2 Row 1: 12. 15. 2: 22. 25. 3: 32. 35. 4: 42. 45. Col 1 2 Row 1: 13. 15. 2: 23. 25. 3: 33. 35. 4: 43. 45. Col 1 2 Row 1: 14. 15. 2: 24. 25. 3: 34. 35. 4: 44. 45. Col 1 2 3 Row 1: 11. 12. 13. 2: 21. 22. 23. 3: 31. 32. 33. 4: 41. 42. 43. Col 1 2 3 Row 1: 11. 12. 14. 2: 21. 22. 24. 3: 31. 32. 34. 4: 41. 42. 44. Col 1 2 3 Row 1: 11. 13. 14. 2: 21. 23. 24. 3: 31. 33. 34. 4: 41. 43. 44. Col 1 2 3 Row 1: 12. 13. 14. 2: 22. 23. 24. 3: 32. 33. 34. 4: 42. 43. 44. Col 1 2 3 Row 1: 11. 12. 15. 2: 21. 22. 25. 3: 31. 32. 35. 4: 41. 42. 45. Col 1 2 3 Row 1: 11. 13. 15. 2: 21. 23. 25. 3: 31. 33. 35. 4: 41. 43. 45. Col 1 2 3 Row 1: 12. 13. 15. 2: 22. 23. 25. 3: 32. 33. 35. 4: 42. 43. 45. Col 1 2 3 Row 1: 11. 14. 15. 2: 21. 24. 25. 3: 31. 34. 35. 4: 41. 44. 45. Col 1 2 3 Row 1: 12. 14. 15. 2: 22. 24. 25. 3: 32. 34. 35. 4: 42. 44. 45. Col 1 2 3 Row 1: 13. 14. 15. 2: 23. 24. 25. 3: 33. 34. 35. 4: 43. 44. 45. TEST04 QRBD computes the singular values S of a bidiagonal matrix BD, and can also compute the decomposition factors U and V, so that S = U * BD * V. The bidiagonal matrix BD: 0.9976 0.7479 0.0000 0.0000 0.5668 0.3674 0.0000 0.0000 0.9659 The singular values of BD: 1 1.31063 2 1.03082 3 0.404261 The factor U: 0.9211 0.3547 0.1604 0.2835 -0.3290 -0.9008 -0.2667 0.8752 -0.4036 The factor V: 0.7011 0.2744 -0.6582 0.6790 0.0248 0.7337 0.2176 -0.9613 -0.1689 The product U' * S * V' = BD: 0.9976 0.7479 -0.0000 0.0000 0.5668 0.3674 -0.0000 -0.0000 0.9659 TEST05 SVD computes the singular value decomposition of a real general matrix. Matrix order = 4 The matrix A: Col 1 2 3 4 Row 1: 0.990000 0.200000E-02 0.600000E-02 0.200000E-02 2: 0.200000E-02 0.990000 0.200000E-02 0.600000E-02 3: 0.600000E-02 0.200000E-02 0.990000 0.200000E-02 4: 0.200000E-02 0.600000E-02 0.200000E-02 0.990000 The singular values S 1: 1.0000002 2: 0.98400003 3: 0.99199998 4: 0.98400009 The U matrix: Col 1 2 3 4 Row 1: -0.499987 0.707125 -0.499987 0.235177E-09 2: -0.499996 0.755489E-05 0.500007 0.707104 3: -0.500023 -0.707088 -0.500003 0.154972E-05 4: -0.499994 0.602007E-05 0.500003 -0.707109 The V matrix: Col 1 2 3 4 Row 1: -0.499987 0.707125 -0.499987 0. 2: -0.499996 0.759959E-05 0.500007 0.707104 3: -0.500023 -0.707088 -0.500003 0.157952E-05 4: -0.499994 0.591576E-05 0.500003 -0.707109 The product U * S * Transpose(V): Col 1 2 3 4 Row 1: 0.990000 0.199993E-02 0.600006E-02 0.199990E-02 2: 0.199993E-02 0.990000 0.200010E-02 0.600004E-02 3: 0.600003E-02 0.199993E-02 0.990001 0.200009E-02 4: 0.199991E-02 0.599998E-02 0.200001E-02 0.990000 TEST06 C01M generates all subsets of size M from a set of size N, one at a time, trying to use simple exchanges. 1 0 0 1 1 1 1 1 1 2 0 1 0 1 1 1 1 1 3 0 1 1 0 1 1 1 1 4 0 1 1 1 0 1 1 1 5 0 1 1 1 1 0 1 1 6 0 1 1 1 1 1 0 1 7 0 1 1 1 1 1 1 0 8 1 0 0 1 1 1 1 1 9 1 0 1 0 1 1 1 1 10 1 0 1 1 0 1 1 1 11 1 0 1 1 1 0 1 1 12 1 0 1 1 1 1 0 1 13 1 0 1 1 1 1 1 0 14 1 1 0 0 1 1 1 1 TEST07 CWLR_L2 uses clustering techniques. Open data file x06.txt Number of rows/observations, M = 44 Number of columns/variables, N = 2 Number of clusters, S = 4 Minimum cluster population, ML = 3 Maximum cluster population, MU = 44 Solution column vectors X: Col 1 2 Row 1: 26.1464 40.4875 2: 23.1990 26.5536 3: 29.0852 29.3947 4: 26.0948 32.4271 Objective function = 0.166475E+08 TEST08 CWLR_LI uses clustering techniques. Open data file x06.txt Number of rows/observations, M = 44 Number of columns/variables, N = 2 Number of clusters, S = 4 Minimum cluster population, ML = 3 Maximum cluster population, MU = 44 DEBUG: Call example_read DEBUG: Returned from example_read DEBUG: Call random_partition2 DEBUG: Call cwlr_li ERRORS ARE OCCURRING IN CALL To CWKL_LI. WE WILL SKIP THIS CALL FOR NOW TEST09 REGR_LP minimizes the LP norm of the residual A*X-B, where 1 < P < Infinity. Open data file x03.txt Number of rows/observations = 30 Number of columns/variables = 2 Using P = 1.10000 REGR_LP - Warning! No convergence after ITMAX iterations. TEST09 - Warning! REGR_LP returned IFLAG = 3 Using P = 1.20000 Solution: 1: 98.441826 2: 0.95404375 LP norm of residual = 183.050 Using P = 1.40000 Solution: 1: 98.608253 2: 0.95076120 LP norm of residual = 137.261 Using P = 1.70000 Solution: 1: 98.576553 2: 0.95768392 LP norm of residual = 105.842 Using P = 2.00000 Solution: 1: 98.714729 2: 0.97087026 LP norm of residual = 91.6157 Using P = 2.50000 Solution: 1: 100.33682 2: 0.99637580 LP norm of residual = 80.9287 Using P = 4.00000 Solution: 1: 109.08456 2: 1.0357488 LP norm of residual = 68.0956 Using P = 6.50000 Solution: 1: 115.48245 2: 1.0588800 LP norm of residual = 59.1820 TEST10 NORMAL_L2 solves the normal equations. Open data file x03.txt Number of rows/observations = 30 Number of columns/variables = 2 Solution: 1: 98.714661 2: 0.97087127 L2 norm of residual = 91.6157 TEST11 MGS_L2 uses the modified Gram Schmidt method. Open data file x03.txt Number of rows/observations = 30 Number of columns/variables = 2 Solution: 1: 98.714729 2: 0.97087026 L2 norm of residual = 91.6157 TEST12 ICMGS_L2 uses the modified Gram Schmidt method. Note that this code should get the same answer as MGS_L2. Open data file x03.txt Number of rows/observations = 30 Number of columns/variables = 2 Solution: 1: 98.714760 2: 0.97086954 L2 norm of residual = 91.6157 TEST13 GIVR_L2 uses the Givens Rotation method. Open data file x03.txt Number of rows/observations = 30 Number of columns/variables = 2 Solution: 1: 98.714691 2: 0.97087121 L2 norm of residual = 91.6157 TEST14 HFTI_L2 uses Householder transformations. Open data file x03.txt Number of rows/observations = 30 Number of columns/variables = 2 Solution: 1: 98.714729 2: 0.97087038 L2 norm of residual = 91.6157 TEST15 SVDR_L2 uses the singular value decomposition to solve a least squares problem. Open data file x03.txt Number of rows/observations = 30 Number of columns/variables = 2 Solution: 1: 98.714668 2: 0.97087085 L2 norm of residual = 91.6157 TEST16 A478_L1 minimizes the L1 norm of the residual A*X-B. Open data file x10.txt Number of rows/observations = 21 Number of columns/variables = 3 Solution: 1: 0.92807084 2: 0.35824421 3: -0.53316212 Numerical estimate of rank = 3 L1 norm of computed residual = 63.9715 L1 norm of recomputed residual = 63.9715 TEST17 AFK_L1 minimizes the L1 norm of the residual A*X-B. Open data file x10.txt Number of rows/observations = 21 Number of columns/variables = 3 Solution: 1: 0.92807072 2: 0.35824451 3: -0.53316206 L1 norm of computed residual = 63.9715 L1 norm of recomputed residual = 63.9715 TEST18 BLOD_L1 minimizes the L1 norm of the residual A*X-B. Open data file x10.txt Number of rows/observations = 21 Number of columns/variables = 3 Solution: 1: 0.92807102 2: 0.35824379 3: -0.53316206 Computed L1 norm of residual = 63.9715 Recomputed L1 norm of residual = 63.9715 TEST19 A328_LI minimizes the L-infinity norm of the residual A*X-B. Open data file x03.txt Number of rows/observations = 30 Number of columns/variables = 2 Solution: 1: 117.51723 2: 1.1724138 Computed L-infinity norm of residual = 47.3793 Recomputed L-infinity norm of residual = 47.3793 TEST20 A495_LI minimizes the L-infinity norm of the residual A*X-B. Open data file x03.txt Number of rows/observations = 30 Number of columns/variables = 2 Solution: 1: 117.51725 2: 1.1724138 Computed L-infinity norm of residual = 47.3793 Recomputed L-infinity norm of residual = 47.3793 TEST21 ABD_LI minimizes the L-infinity norm of the residual A*X-B. Open data file x03.txt Number of rows/observations = 30 Number of columns/variables = 2 Solution: 1: 117.51726 2: 1.1724139 Computed L-infinity norm of residual = 47.3793 Recomputed L-infinity norm of residual = 47.3793 TEST30 ORTH_L2 minimizes the L2 norm of: A*X - X(N+1)*B with L2 norm of X equal to 1. Open data file x02.txt Number of rows/observations = 12 Number of columns/variables = 2 Solution: 1: 0.72880429 2: -0.13371196 3: 0.67153960 L2 norm of AX-X(N+1)*B = 9.96384 L2 norm of X = 1.00000 TEST305 ORTH_L1 minimizes the L1 norm of: A*X - X(N+1)*B with L2 norm of X equal to 1. Open data file x02.txt Number of rows/observations = 12 Number of columns/variables = 2 Solution: 1: 0.73079038 2: -0.13892421 3: 0.66831553 L1 norm of AX-X(N+1)*B = 23.5581 L2 norm of X = 1.00000 Spaeth solution: 1: 0.73079097 2: -0.13892500 3: 0.66831499 L1 norm of AX-X(N+1)*B = 23.5581 L2 norm of X = 1.00000 TEST306 ORTH_LI minimizes the LI norm of: A*X - X(N+1)*B with L2 norm of X equal to 1. Open data file x02.txt Number of rows/observations = 12 Number of columns/variables = 2 Solution: 1: 0.0000000 2: 0.61340964 3: 0.78976494 LI norm of AX-X(N+1)*B = 17.8656 L2 norm of X = 1.00000 Spaeth solution: 1: 0.69975001 2: -0.84585600E-01 3: 0.70936197 LI norm of AX-X(N+1)*B = 5.64030 L2 norm of X = 1.00000 TEST307 ORTH_LP minimizes the LP norm of: A*X - X(N+1)*B with L2 norm of X equal to 1. Open data file x02.txt Number of rows/observations = 12 Number of columns/variables = 2 P = 1.10000 ORTH_LP - Fatal error! Number of iterations exceeded. TEST307 - Warning! ORTH_LP returned IFLAG = 4 Solution: 1: 0.73011333 2: -0.13789628 3: 0.66926765 LP norm of AX-X(N+1)*B = 19.8290 L2 norm of X = 1.00000 P = 1.20000 Solution: 1: 0.72930557 2: -0.13665080 3: 0.67040277 LP norm of AX-X(N+1)*B = 17.2456 L2 norm of X = 1.00000 P = 1.40000 Solution: 1: 0.72954506 2: -0.13696498 3: 0.67007804 LP norm of AX-X(N+1)*B = 13.9803 L2 norm of X = 1.00000 P = 1.70000 Solution: 1: 0.72991890 2: -0.13703842 3: 0.66965580 LP norm of AX-X(N+1)*B = 11.3722 L2 norm of X = 1.00000 P = 2.00000 Solution: 1: 0.72880429 2: -0.13371196 3: 0.67153960 LP norm of AX-X(N+1)*B = 9.96384 L2 norm of X = 1.00000 P = 2.50000 Solution: 1: 0.72467095 2: -0.12365471 3: 0.67790973 LP norm of AX-X(N+1)*B = 8.70769 L2 norm of X = 1.00000 P = 4.00000 Solution: 1: 0.71368963 2: -0.10373799 3: 0.69273776 LP norm of AX-X(N+1)*B = 7.32297 L2 norm of X = 1.00000 P = 6.50000 ORTH_LP - Fatal error! Number of iterations exceeded. TEST307 - Warning! ORTH_LP returned IFLAG = 4 Solution: 1: 0.71749657 2: -0.15411228 3: 0.67929965 LP norm of AX-X(N+1)*B = 6.65007 L2 norm of X = 1.00000 TEST33 CON_L1 solves a constrained minimization problem in the L1 norm: Find an N vector X which minimizes the residual: || A * X - B || and satisifies the linear equalities: C * X = D and the linear inequalities: E * X >= F. Open data file x54.txt Number of rows/observations = 13 Number of columns/variables = 5 Number of subsystems = 3 Open data file x54_01.txt Open data file x54_02.txt Open data file x54_03.txt Solution: 1: 0.81632659E-01 2: 0.0000000 3: 0.0000000 4: 0.78231290E-01 5: -0.64625844E-01 L1 norms of residuals: CON_L1 claims A*X-B residual norm = 31.3401 A*X-B = 31.3401 C*X-D = 0.178814E-06 E*X-F = 7.34014 E*X-F: 1: 0.51020396 2: 6.8299322 Spaeth's solution: 1: 0.81632704E-01 2: 0.0000000 3: 0.0000000 4: 0.78231297E-01 5: -0.64625897E-01 L1 norms of residuals: A*X-B = 31.3401 C*X-D = 0.774860E-06 E*X-F = 7.34014 E*X-F: 1: 0.51020408 2: 6.8299317 TEST33 CON_L1 solves a constrained minimization problem in the L1 norm: Find an N vector X which minimizes the residual: || A * X - B || and satisifies the linear equalities: C * X = D and the linear inequalities: E * X >= F. Open data file x61.txt Number of rows/observations = 13 Number of columns/variables = 5 Number of subsystems = 3 Open data file x61_01.txt Open data file x61_02.txt Open data file x61_03.txt Solution: 1: 0.0000000 2: 1.7377048 3: 0.0000000 4: -0.23770487 5: -0.18852460 L1 norms of residuals: CON_L1 claims A*X-B residual norm = 26.1475 A*X-B = 26.1475 C*X-D = 0.238419E-06 E*X-F = 8.62295 E*X-F: 1: 2.4918032 2: 6.1311474 Barrodale and Roberts's solution: 1: 0.0000000 2: 1.7377050 3: 0.0000000 4: -0.23770490 5: -0.18852460 L1 norms of residuals: A*X-B = 26.1475 C*X-D = 0.715256E-06 E*X-F = 8.62295 E*X-F: 1: 2.4918032 2: 6.1311474 TEST34 CON_L2 solves a constrained minimization problem in the L2 norm: Find an N vector X which minimizes the residual: || A * X - B || and satisifies the linear equalities: C * X = D and the linear inequalities: E * X >= F. Open data file x54.txt Number of rows/observations = 13 Number of columns/variables = 5 Number of subsystems = 3 Open data file x54_01.txt Number of minimizine equations M = 8 Open data file x54_02.txt Number of equality constraints L = 3 Open data file x54_03.txt Number of inequality constraints K = 2 Solution: 1: -0.19499056 2: -0.88715544E-02 3: 0.26737386 4: 0.91288581E-01 5: 0.27218860 L2 norms of residuals: CON_L2 claims A*X-B residual norm = 9.03411 A*X-B = 10.2120 C*X-D = 3.87588 E*X-F = 5.93724 E*X-F: 1: -0.19703877 2: 5.9339733 Spaeth's solution: 1: -0.41158199E-01 2: 0.41158199E-01 3: 0.25269900E-08 4: 0.10137200 5: -0.41485202E-01 L2 norms of residuals: A*X-B = 13.3791 C*X-D = 0.178416E-05 E*X-F = 7.15954 E*X-F: 1: 0.80531198 2: 7.1141095 TEST35 CON_LI solves a constrained minimization problem in the LI norm: Find an N vector X which minimizes the residual: || A * X - B || and satisifies the linear equalities: C * X = D and the linear inequalities: F <= E * X <= G. Open data file x54.txt Number of rows/observations = 13 Number of columns/variables = 5 Number of subsystems = 3 Open data file x54_01.txt Open data file x54_02.txt Open data file x54_03.txt Solution: 1: 0.40816307E-01 2: 0.0000000 3: 0.0000000 4: 0.89115679E-01 5: -0.53741515E-01 LI norms of residuals: CON_LI claims A*X-B residual norm = 6.95782 A*X-B = 6.95782 C*X-D = 0.476837E-06 E*X-F: 1: 0.58367348 2: 6.9006801 G-E*X: 1: 100.41633 2: 101.09932 Spaeth's solution: 1: 0.40816501E-01 2: 0.0000000 3: 0.0000000 4: 0.89115597E-01 5: -0.53741600E-01 LI norms of residuals: A*X-B = 6.95782 C*X-D = 0.834465E-06 E*X-F: 1: 100.41633 2: 101.09932 G-E*X: 1: 100.41633 2: 101.09932 TEST22 NN_L2 minimizes the L2 norm of the residual A*X-B for nonnegative X. Open data file x02.txt Number of rows/observations = 12 Number of columns/variables = 2 Solution: 1: 0.87502789 2: 0.0000000 Computed L2 norm of residual = 16.3295 Recomputed L2 norm of residual = 16.3295 TEST225 NN_L1 minimizes the L1 norm of the residual A*X-B for nonnegative X. Find an N vector X which minimizes the residual: || A * X - B || and satisifies the linear equalities: C * X = D and the linear inequalities: E * X >= H and the nonnegativity constraint: X >= 0 Open data file x54.txt Number of rows/observations = 13 Number of columns/variables = 5 Number of subsystems = 3 Open data file x54_01.txt Open data file x54_02.txt Open data file x54_03.txt Solution: 1: 0.81632651E-01 2: 0.0000000 3: 0.12925170 4: 0.13605446E-01 5: 0.0000000 L1 norms of residuals: NN_L1 claims A*X-B residual norm = 31.3401 A*X-B = 31.3401 C*X-D = 0.238419E-06 E*X-H = 7.34014 E*X-H: 1: 0.51020408 2: 6.8299317 TEST23 SCRF_L1 minimizes the L1 norm of the residual A*X-B. Open data file x10.txt Number of rows/observations = 21 Number of columns/variables = 3 TEST23 - Warning! SCRF_L1 returned IFLAG = ****** TEST24 AVLLSQ carries out average linear regression. Open data file x43.txt Number of rows/observations = 12 Number of columns/variables = 2 Number of clusters = 3 Base filename = x43_01.txt Open subsystem data file x43_01.txt Number of rows/observations = 4 Open subsystem data file x43_02.txt Number of rows/observations = 5 Open subsystem data file x43_03.txt Number of rows/observations = 3 EXAMPLE_PRINT: Number of rows/observations = 12 Number of columns/variables = 2 # A1 A2 B 1 1.000 1.000 2.000 2 3.000 1.000 5.000 3 6.000 1.000 6.000 4 8.000 1.000 6.000 5 2.000 1.000 5.000 6 4.000 1.000 4.000 7 7.000 1.000 5.000 8 8.000 1.000 8.000 9 10.000 1.000 7.000 10 3.000 1.000 2.000 11 6.000 1.000 5.000 12 7.000 1.000 9.000 Solution: 1: 0.53941441 2: 2.3930490 Spaeth's solution, page 190: 1: 0.53941399 2: 2.3930500 Value of objective function = 2.53822 TEST25 ROBUST minimizes an objective function based on the residuals of A*X-B. Open data file x04.txt Number of rows/observations = 38 Number of columns/variables = 2 Method = 1 Solution: 1: 0.27121753E-01 2: 9.8984032 Value of SR = 40.4575 Recomputed L2 norm of residual = 1346.01 Method = 2 Solution: 1: 0.27116209E-01 2: 9.8967667 Value of SR = 40.4704 Recomputed L2 norm of residual = 1346.09 Method = 3 Solution: 1: 0.26479810E-01 2: 9.9338140 Value of SR = 37.4856 Recomputed L2 norm of residual = 1345.09 Method = 4 Solution: 1: 0.26441067E-01 2: 9.9910393 Value of SR = 26.9198 Recomputed L2 norm of residual = 1343.11 Method = 5 Solution: 1: 0.27443618E-01 2: 9.8829231 Value of SR = 43.5852 Recomputed L2 norm of residual = 1346.41 Method = 6 Solution: 1: 0.21544963E-01 2: 9.7433510 Value of SR = 44.6302 Recomputed L2 norm of residual = 1368.19 Method = 7 Solution: 1: 0.31863332E-01 2: 10.004489 Value of SR = 60.5393 Recomputed L2 norm of residual = 1340.88 Method = 8 Solution: 1: 0.26848346E-01 2: 9.9070816 Value of SR = 39.4134 Recomputed L2 norm of residual = 1345.90 TEST26 LDP_L2 solves a least distance programming problem. Find the vector X of minimum L2 norm which satisfies the linear inequalities E * X >= H. Open data file x54_03.txt Number of rows/observations = 2 Number of columns/variables = 5 Solution X: 1: -0.22222224 2: -0.74074075E-01 3: -0.14814815 4: -0.44444448 5: -0.14814815 Residual E * X - H: 1: 3.7407413 2: 0.95367432E-06 TEST27 RR_L2 minimizes the L2 norm of: [ A ] * X - [ B ] [ LAMBDA * I ] [ 0 ] Open data file x03.txt Number of rows/observations = 30 Number of columns/variables = 2 Solution for LAMBDA = 0.00000 Solution: 1: 98.714729 2: 0.97087026 L2 norm of AX-B = 91.6157 L2 norm of LAMBDA*X = 0.00000 L2 norm of residual = 91.6157 Solution for LAMBDA = 1.00000 Solution: 1: 74.027161 2: 1.4631891 L2 norm of AX-B = 101.095 L2 norm of LAMBDA*X = 74.0416 L2 norm of residual = 125.309 Solution for LAMBDA = 100.000 Solution: 1: 0.80632865E-01 2: 2.5607476 L2 norm of AX-B = 217.284 L2 norm of LAMBDA*X = 256.202 L2 norm of residual = 335.934 TEST28 RR_L1 minimizes the L1 norm of: [ A ] * X - [ B ] [ LAMBDA * I ] [ 0 ] Open data file x03.txt Number of rows/observations = 30 Number of columns/variables = 2 Solution for LAMBDA = 0.00000 Solution: 1: 97.000008 2: 0.99999994 L1 norm of AX-B = 286.000 L1 norm of LAMBDA*X = 0.00000 L1 norm of residual = 286.000 Solution for LAMBDA = 1.00000 Solution: 1: 97.000000 2: 1.0000001 L1 norm of AX-B = 286.000 L1 norm of LAMBDA*X = 98.0000 L1 norm of residual = 384.000 Solution for LAMBDA = 100.000 Solution: 1: 0.0000000 2: 2.8399999 L1 norm of AX-B = 828.160 L1 norm of LAMBDA*X = 284.000 L1 norm of residual = 1112.16 TEST29 RR_LI minimizes the L-infinity norm of: [ A ] * X - [ B ] [ LAMBDA * I ] [ 0 ] Open data file x03.txt Number of rows/observations = 30 Number of columns/variables = 2 Solution for LAMBDA = 0.00000 Solution: 1: 117.51725 2: 1.1724138 L-infinity norm of AX-B = 47.3793 L-infinity norm of LAMBDA*X = 0.00000 L-infinity norm of residual = 47.3793 Solution for LAMBDA = 1.00000 Solution: 1: 56.285721 2: 2.2857141 L-infinity norm of AX-B = 56.2857 L-infinity norm of LAMBDA*X = 56.2857 L-infinity norm of residual = 56.2857 Solution for LAMBDA = 100.000 Solution: 1: 1.4864960 2: 1.4864866 L-infinity norm of AX-B = 148.649 L-infinity norm of LAMBDA*X = 148.650 L-infinity norm of residual = 148.650 TEST31 SVDRS uses the singular value decomposition to solve a least squares problem. Open data file x03.txt Number of rows/observations = 30 Number of columns/variables = 2 Singular values S: 1: 260.61658 2: 1.7309499 Solution = V * inv(S) * U' * B: 1: 98.714722 2: 0.97087085 L2 norm of residual = 91.6157 TEST32 SVD applies the singular value decomposition to a matrix. Open data file x03.txt Number of rows/observations = 30 Number of columns/variables = 2 Singular values S: 1: 1.7309495 2: 260.61658 Solution: 1: 98.714668 2: 0.97087097 L2 norm of residual = 91.6157 REGRESSION_PRB Normal end of execution. January 14 2011 8:31:08.847 PM