MGH10: More, Gabrow and Hillstrom example 10

Description Format Details Source Examples

Description

The MGH10 data frame has 16 rows and 2 columns.

Format

This data frame contains the following columns:

y

A numeric vector of response values.

x

A numeric vector of input values.

Details

This problem was found to be difficult for some very good algorithms.

See More, J. J., Garbow, B. S., and Hillstrom, K. E. (1981). Testing unconstrained optimization software. ACM Transactions on Mathematical Software. 7(1): pp. 17-41.

Source

Meyer, R. R. (1970). Theoretical and computational aspects of nonlinear regression. In Nonlinear Programming, Rosen, Mangasarian and Ritter (Eds). New York, NY: Academic Press, pp. 465-486.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
Try <- function(expr) if (!inherits(val <- try(expr), "try-error")) val
plot(y ~ x, data = MGH10)
## check plot on log scale for shape
plot(y ~ x, data = MGH10, log = "y")
## starting values for this run are ridiculous
Try(fm1 <- nls(y ~ b1 * exp(b2/(x+b3)), data = MGH10, trace = TRUE,
           start = c(b1 = 2, b2 = 400000, b3 = 25000)))
Try(fm1a <- nls(y ~ b1 * exp(b2/(x+b3)), data = MGH10,
                trace = TRUE, alg = "port",
                start = c(b1 = 2, b2 = 400000, b3 = 25000)))
Try(fm2 <- nls(y ~ b1 * exp(b2/(x+b3)), data = MGH10, trace = TRUE,
           start = c(b1 = 0.02, b2 = 4000, b3 = 250)))
Try(fm2a <- nls(y ~ b1 * exp(b2/(x+b3)), data = MGH10,
                trace = TRUE, alg = "port",
                start = c(b1 = 0.02, b2 = 4000, b3 = 250)))
Try(fm3 <- nls(y ~ exp(b2/(x+b3)), data = MGH10, trace = TRUE,
               start = c(b2 = 400000, b3 = 25000),
               algorithm = "plinear"))
Try(fm4 <- nls(y ~ exp(b2/(x+b3)), data = MGH10, trace = TRUE,
           start = c(b2 = 4000, b3 = 250),
           algorithm = "plinear"))

Example output

4.515243e+15 :       2 400000  25000
Error in nls(y ~ b1 * exp(b2/(x + b3)), data = MGH10, trace = TRUE, start = c(b1 = 2,  : 
  singular gradient
  0: 2.2576214e+15:  2.00000  400000.  25000.0
  1: 1.0145664e+15:  1.73774  396720.  25205.1
  2: 1.7298446e+14:  1.15869  390479.  25589.1
  3: 8.1439367e+13: -0.503567  390674.  24863.6
  4: 1.1718825e+13: -0.454618  382885.  25811.0
  5: 1.2600229e+12: -0.254665  377162.  26423.5
  6: 3.0302969e+10: -0.0384114  375182.  26626.2
  7: 6.4621654e+09: -0.0336407  363276.  27938.0
  8: 5.2630421e+09: 0.0782266  365089.  27885.9
  9: 7.5497543e+08: 0.0187004  366335.  27756.9
 10: 6.8994245e+08: 0.0236504  366689.  27720.5
 11: 6.8969576e+08: 0.0208720  367994.  27585.5
 12: 6.8941263e+08: 0.0186784  369294.  27449.8
 13: 6.8915234e+08: 0.0166257  370612.  27311.2
 14: 6.8855695e+08: 0.0129023  373436.  27011.4
 15: 6.8839318e+08: 0.0123215  373991.  26951.4
 16: 6.8827082e+08: 0.0116952  374551.  26890.7
 17: 6.8777049e+08: 0.00948390  376781.  26647.8
 18: 6.8760160e+08: 0.00881958  377529.  26565.1
 19: 6.8737641e+08: 0.00756032  379032.  26398.0
 20: 6.8698947e+08: 0.00650637  380556.  26227.0
 21: 6.8663184e+08: 0.00554073  382133.  26048.0
 22: 6.8625624e+08: 0.00465776  383799.  25856.9
 23: 6.8587953e+08: 0.00384221  385597.  25648.2
 24: 6.8538201e+08: 0.00317026  387377.  25439.0
 25: 6.8492994e+08: 0.00259020  389187.  25223.6
 26: 6.8448566e+08: 0.00208497  391072.  24996.1
 27: 6.8409215e+08: 0.00163997  393089.  24749.5
 28: 6.8343225e+08: 0.00129030  395081.  24502.1
 29: 6.8294785e+08: 0.000999117  397114.  24245.9
 30: 6.8254376e+08: 0.000755929  399250.  23972.4
 31: 6.8243723e+08: 0.000551145  401563.  23671.3
 32: 6.7998377e+08: 0.000488562  402702.  23520.2
 33: 6.7969602e+08: 0.000409937  403898.  23360.2
 34: 6.7919793e+08: 0.000341603  405169.  23188.5
 35: 6.7875739e+08: 0.000278159  406549.  23000.0
 36: 6.7813585e+08: 0.000226732  407916.  22811.2
 37: 6.7758522e+08: 0.000182808  409306.  22616.9
 38: 6.7704268e+08: 0.000145090  410754.  22412.1
 39: 6.7656887e+08: 0.000112374  412301.  22190.6
 40: 6.7575285e+08: 8.70784e-05  413830.  21968.6
 41: 6.7517451e+08: 6.63164e-05  415390.  21738.9
 42: 6.7468858e+08: 4.92956e-05  417028.  21494.4
 43: 6.7457622e+08: 3.52515e-05  418797.  21226.2
 44: 6.7148377e+08: 3.11041e-05  419669.  21091.8
 45: 6.7116010e+08: 2.57689e-05  420588.  20948.9
 46: 6.7054406e+08: 2.12118e-05  421568.  20795.2
 47: 6.7002342e+08: 1.70179e-05  422634.  20626.3
 48: 6.6925244e+08: 1.36755e-05  423691.  20457.2
 49: 6.6858782e+08: 1.08582e-05  424765.  20283.4
 50: 6.6793214e+08: 8.47942e-06  425883.  20100.5
 50: 6.6793214e+08: 8.47942e-06  425883.  20100.5
Error in nls(y ~ b1 * exp(b2/(x + b3)), data = MGH10, trace = TRUE, alg = "port",  : 
  Convergence failure: iteration limit reached without convergence (10)
1693607809 :     0.02 4000.00  250.00
1217987754 :  1.179854e-02 4.836962e+03 2.933311e+02
962449882 :  6.668662e-03 5.447176e+03 3.184697e+02
260923500 :  4.652186e-03 6.105943e+03 3.432606e+02
3907159 :  5.580519e-03 6.205900e+03 3.458634e+02
763.0635 :  5.606712e-03 6.181983e+03 3.452404e+02
87.94588 :  5.609632e-03 6.181347e+03 3.452237e+02
87.94586 :  5.609637e-03 6.181346e+03 3.452236e+02
Nonlinear regression model
  model: y ~ b1 * exp(b2/(x + b3))
   data: MGH10
       b1        b2        b3 
5.610e-03 6.181e+03 3.452e+02 
 residual sum-of-squares: 87.95

Number of iterations to convergence: 7 
Achieved convergence tolerance: 2.101e-07
  0: 8.4680390e+08: 0.0200000  4000.00  250.000
  1: 3.5498521e+08: 0.0238126  4055.15  246.004
  2: 3.4721146e+08: 0.0127067  4078.74  233.607
  3:     42034709.: 0.0253330  4133.05  243.786
  4:     8082518.2: 0.0354411  4258.53  258.712
  5:     389985.73: 0.0457195  4424.43  276.338
  6:     101057.51: 0.0502850  4440.01  280.104
  7:     30372.903: 0.0484376  4514.08  284.724
  8:     27230.622: 0.0480299  4521.08  285.005
  9:     26959.036: 0.0475889  4527.70  285.266
 10:     26536.602: 0.0468472  4538.84  285.704
 11:     26085.189: 0.0461061  4550.03  286.135
 12:     25857.253: 0.0458176  4554.76  286.327
 13:     25671.969: 0.0455213  4559.42  286.509
 14:     25243.127: 0.0443367  4578.06  287.239
 15:     24513.347: 0.0431892  4596.87  287.973
 16:     23802.106: 0.0420708  4615.73  288.707
 17:     23122.002: 0.0409626  4634.69  289.434
 18:     22419.238: 0.0398977  4653.72  290.172
 19:     21802.562: 0.0387787  4674.28  290.969
 20:     21061.081: 0.0377248  4694.29  291.742
 21:     20646.974: 0.0364979  4718.21  292.665
 22:     19791.958: 0.0353470  4741.60  293.564
 23:     19051.373: 0.0342281  4765.11  294.466
 24:     18888.594: 0.0329363  4793.14  295.539
 25:     17761.400: 0.0317761  4819.58  296.548
 26:     17011.253: 0.0306503  4846.16  297.559
 27:     15610.381: 0.0300393  4861.38  298.136
 28:     15195.312: 0.0294275  4876.61  298.713
 29:     14804.820: 0.0289832  4887.95  299.142
 30:     14480.382: 0.0283557  4904.17  299.758
 31:     14050.008: 0.0277483  4920.25  300.365
 32:     13635.929: 0.0271506  4936.40  300.972
 33:     13224.660: 0.0265667  4952.61  301.581
 34:     12837.069: 0.0259587  4969.88  302.230
 35:     12423.948: 0.0253526  4987.54  302.892
 36:     12123.434: 0.0246510  5008.49  303.676
 37:     11666.696: 0.0239525  5030.07  304.482
 38:     11185.211: 0.0232724  5051.75  305.290
 39:     10974.680: 0.0225123  5076.70  306.218
 40:     10398.753: 0.0217919  5101.32  307.131
 41:     9906.4748: 0.0210919  5126.07  308.046
 42:     8980.4444: 0.0207346  5139.36  308.536
 43:     8728.7919: 0.0203945  5151.95  309.001
 44:     8498.6396: 0.0201024  5162.96  309.406
 45:     8282.6423: 0.0197724  5175.54  309.868
 46:     8050.4333: 0.0194534  5187.95  310.325
 47:     7824.7485: 0.0191396  5200.40  310.782
 48:     7606.6599: 0.0187754  5215.04  311.318
 49:     7348.7720: 0.0184266  5229.41  311.845
 50:     7103.3202: 0.0180840  5243.84  312.373
 50:     7103.3202: 0.0180840  5243.84  312.373
Error in nls(y ~ b1 * exp(b2/(x + b3)), data = MGH10, trace = TRUE, alg = "port",  : 
  Convergence failure: iteration limit reached without convergence (10)
1366856107 :  4.000000e+05 2.500000e+04 1.494176e-03
Error in nls(y ~ exp(b2/(x + b3)), data = MGH10, trace = TRUE, start = c(b2 = 4e+05,  : 
  step factor 0.000488281 reduced below 'minFactor' of 0.000976562
6977343 :  4.000000e+03 2.500000e+02 5.865021e-02
23094.19 :  5.139586e+03 3.089984e+02 2.108902e-02
13515.33 :  5.593556e+03 3.255459e+02 1.181885e-02
4941.471 :  6.139263e+03 3.442822e+02 6.007070e-03
88.21938 :  6.180663e+03 3.452042e+02 5.614985e-03
87.94586 :  6.181346e+03 3.452236e+02 5.609638e-03
87.94586 :  6.181346e+03 3.452236e+02 5.609637e-03
Nonlinear regression model
  model: y ~ exp(b2/(x + b3))
   data: MGH10
       b2        b3      .lin 
6.181e+03 3.452e+02 5.610e-03 
 residual sum-of-squares: 87.95

Number of iterations to convergence: 6 
Achieved convergence tolerance: 6.406e-08

NISTnls documentation built on May 2, 2019, 2:37 a.m.