Merge pull request #123 from Armadilloa16/cca

stat: add canonical correlation analysis function
This commit is contained in:
Dan Kortschak
2016-12-19 11:14:29 +10:30
committed by GitHub
6 changed files with 1543 additions and 77 deletions

531
boston_data_test.go Normal file
View File

@@ -0,0 +1,531 @@
// Copyright ©2016 The gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package stat_test
import "github.com/gonum/matrix/mat64"
// Boston Housing Data of Harrison and Rubinfeld (1978)
// http://dx.doi.org/10.1016/0095-0696(78)90006-2
// http://lib.stat.cmu.edu/datasets/boston
// Columns are;
// per capita crime rate by town,
// proportion of non-retail business acres per town,
// nitric oxide concentration (parts per 10 million),
// weighted distances to Boston employment centers,
// index of accessibility to radial highways,
// pupil-teacher ratio by town,
// proportion of blacks by town,
// average number of rooms per dwelling,
// proportion of owner-occupied units built prior to 1940,
// full-value property-tax rate per $10000,
// median value of owner-occupied homes in $1000s.
var bostonData = mat64.NewDense(506, 11, []float64{
0.00632, 2.31000, 0.53800, 4.09000, 1.00000, 15.30000, 396.90000, 6.57500, 65.20000, 296.00000, 24.00000,
0.02731, 7.07000, 0.46900, 4.96710, 2.00000, 17.80000, 396.90000, 6.42100, 78.90000, 242.00000, 21.60000,
0.02729, 7.07000, 0.46900, 4.96710, 2.00000, 17.80000, 392.83000, 7.18500, 61.10000, 242.00000, 34.70000,
0.03237, 2.18000, 0.45800, 6.06220, 3.00000, 18.70000, 394.63000, 6.99800, 45.80000, 222.00000, 33.40000,
0.06905, 2.18000, 0.45800, 6.06220, 3.00000, 18.70000, 396.90000, 7.14700, 54.20000, 222.00000, 36.20000,
0.02985, 2.18000, 0.45800, 6.06220, 3.00000, 18.70000, 394.12000, 6.43000, 58.70000, 222.00000, 28.70000,
0.08829, 7.87000, 0.52400, 5.56050, 5.00000, 15.20000, 395.60000, 6.01200, 66.60000, 311.00000, 22.90000,
0.14455, 7.87000, 0.52400, 5.95050, 5.00000, 15.20000, 396.90000, 6.17200, 96.10000, 311.00000, 27.10000,
0.21124, 7.87000, 0.52400, 6.08210, 5.00000, 15.20000, 386.63000, 5.63100, 100.00000, 311.00000, 16.50000,
0.17004, 7.87000, 0.52400, 6.59210, 5.00000, 15.20000, 386.71000, 6.00400, 85.90000, 311.00000, 18.90000,
0.22489, 7.87000, 0.52400, 6.34670, 5.00000, 15.20000, 392.52000, 6.37700, 94.30000, 311.00000, 15.00000,
0.11747, 7.87000, 0.52400, 6.22670, 5.00000, 15.20000, 396.90000, 6.00900, 82.90000, 311.00000, 18.90000,
0.09378, 7.87000, 0.52400, 5.45090, 5.00000, 15.20000, 390.50000, 5.88900, 39.00000, 311.00000, 21.70000,
0.62976, 8.14000, 0.53800, 4.70750, 4.00000, 21.00000, 396.90000, 5.94900, 61.80000, 307.00000, 20.40000,
0.63796, 8.14000, 0.53800, 4.46190, 4.00000, 21.00000, 380.02000, 6.09600, 84.50000, 307.00000, 18.20000,
0.62739, 8.14000, 0.53800, 4.49860, 4.00000, 21.00000, 395.62000, 5.83400, 56.50000, 307.00000, 19.90000,
1.05393, 8.14000, 0.53800, 4.49860, 4.00000, 21.00000, 386.85000, 5.93500, 29.30000, 307.00000, 23.10000,
0.78420, 8.14000, 0.53800, 4.25790, 4.00000, 21.00000, 386.75000, 5.99000, 81.70000, 307.00000, 17.50000,
0.80271, 8.14000, 0.53800, 3.79650, 4.00000, 21.00000, 288.99000, 5.45600, 36.60000, 307.00000, 20.20000,
0.72580, 8.14000, 0.53800, 3.79650, 4.00000, 21.00000, 390.95000, 5.72700, 69.50000, 307.00000, 18.20000,
1.25179, 8.14000, 0.53800, 3.79790, 4.00000, 21.00000, 376.57000, 5.57000, 98.10000, 307.00000, 13.60000,
0.85204, 8.14000, 0.53800, 4.01230, 4.00000, 21.00000, 392.53000, 5.96500, 89.20000, 307.00000, 19.60000,
1.23247, 8.14000, 0.53800, 3.97690, 4.00000, 21.00000, 396.90000, 6.14200, 91.70000, 307.00000, 15.20000,
0.98843, 8.14000, 0.53800, 4.09520, 4.00000, 21.00000, 394.54000, 5.81300, 100.00000, 307.00000, 14.50000,
0.75026, 8.14000, 0.53800, 4.39960, 4.00000, 21.00000, 394.33000, 5.92400, 94.10000, 307.00000, 15.60000,
0.84054, 8.14000, 0.53800, 4.45460, 4.00000, 21.00000, 303.42000, 5.59900, 85.70000, 307.00000, 13.90000,
0.67191, 8.14000, 0.53800, 4.68200, 4.00000, 21.00000, 376.88000, 5.81300, 90.30000, 307.00000, 16.60000,
0.95577, 8.14000, 0.53800, 4.45340, 4.00000, 21.00000, 306.38000, 6.04700, 88.80000, 307.00000, 14.80000,
0.77299, 8.14000, 0.53800, 4.45470, 4.00000, 21.00000, 387.94000, 6.49500, 94.40000, 307.00000, 18.40000,
1.00245, 8.14000, 0.53800, 4.23900, 4.00000, 21.00000, 380.23000, 6.67400, 87.30000, 307.00000, 21.00000,
1.13081, 8.14000, 0.53800, 4.23300, 4.00000, 21.00000, 360.17000, 5.71300, 94.10000, 307.00000, 12.70000,
1.35472, 8.14000, 0.53800, 4.17500, 4.00000, 21.00000, 376.73000, 6.07200, 100.00000, 307.00000, 14.50000,
1.38799, 8.14000, 0.53800, 3.99000, 4.00000, 21.00000, 232.60000, 5.95000, 82.00000, 307.00000, 13.20000,
1.15172, 8.14000, 0.53800, 3.78720, 4.00000, 21.00000, 358.77000, 5.70100, 95.00000, 307.00000, 13.10000,
1.61282, 8.14000, 0.53800, 3.75980, 4.00000, 21.00000, 248.31000, 6.09600, 96.90000, 307.00000, 13.50000,
0.06417, 5.96000, 0.49900, 3.36030, 5.00000, 19.20000, 396.90000, 5.93300, 68.20000, 279.00000, 18.90000,
0.09744, 5.96000, 0.49900, 3.37790, 5.00000, 19.20000, 377.56000, 5.84100, 61.40000, 279.00000, 20.00000,
0.08014, 5.96000, 0.49900, 3.93420, 5.00000, 19.20000, 396.90000, 5.85000, 41.50000, 279.00000, 21.00000,
0.17505, 5.96000, 0.49900, 3.84730, 5.00000, 19.20000, 393.43000, 5.96600, 30.20000, 279.00000, 24.70000,
0.02763, 2.95000, 0.42800, 5.40110, 3.00000, 18.30000, 395.63000, 6.59500, 21.80000, 252.00000, 30.80000,
0.03359, 2.95000, 0.42800, 5.40110, 3.00000, 18.30000, 395.62000, 7.02400, 15.80000, 252.00000, 34.90000,
0.12744, 6.91000, 0.44800, 5.72090, 3.00000, 17.90000, 385.41000, 6.77000, 2.90000, 233.00000, 26.60000,
0.14150, 6.91000, 0.44800, 5.72090, 3.00000, 17.90000, 383.37000, 6.16900, 6.60000, 233.00000, 25.30000,
0.15936, 6.91000, 0.44800, 5.72090, 3.00000, 17.90000, 394.46000, 6.21100, 6.50000, 233.00000, 24.70000,
0.12269, 6.91000, 0.44800, 5.72090, 3.00000, 17.90000, 389.39000, 6.06900, 40.00000, 233.00000, 21.20000,
0.17142, 6.91000, 0.44800, 5.10040, 3.00000, 17.90000, 396.90000, 5.68200, 33.80000, 233.00000, 19.30000,
0.18836, 6.91000, 0.44800, 5.10040, 3.00000, 17.90000, 396.90000, 5.78600, 33.30000, 233.00000, 20.00000,
0.22927, 6.91000, 0.44800, 5.68940, 3.00000, 17.90000, 392.74000, 6.03000, 85.50000, 233.00000, 16.60000,
0.25387, 6.91000, 0.44800, 5.87000, 3.00000, 17.90000, 396.90000, 5.39900, 95.30000, 233.00000, 14.40000,
0.21977, 6.91000, 0.44800, 6.08770, 3.00000, 17.90000, 396.90000, 5.60200, 62.00000, 233.00000, 19.40000,
0.08873, 5.64000, 0.43900, 6.81470, 4.00000, 16.80000, 395.56000, 5.96300, 45.70000, 243.00000, 19.70000,
0.04337, 5.64000, 0.43900, 6.81470, 4.00000, 16.80000, 393.97000, 6.11500, 63.00000, 243.00000, 20.50000,
0.05360, 5.64000, 0.43900, 6.81470, 4.00000, 16.80000, 396.90000, 6.51100, 21.10000, 243.00000, 25.00000,
0.04981, 5.64000, 0.43900, 6.81470, 4.00000, 16.80000, 396.90000, 5.99800, 21.40000, 243.00000, 23.40000,
0.01360, 4.00000, 0.41000, 7.31970, 3.00000, 21.10000, 396.90000, 5.88800, 47.60000, 469.00000, 18.90000,
0.01311, 1.22000, 0.40300, 8.69660, 5.00000, 17.90000, 395.93000, 7.24900, 21.90000, 226.00000, 35.40000,
0.02055, 0.74000, 0.41000, 9.18760, 2.00000, 17.30000, 396.90000, 6.38300, 35.70000, 313.00000, 24.70000,
0.01432, 1.32000, 0.41100, 8.32480, 5.00000, 15.10000, 392.90000, 6.81600, 40.50000, 256.00000, 31.60000,
0.15445, 5.13000, 0.45300, 7.81480, 8.00000, 19.70000, 390.68000, 6.14500, 29.20000, 284.00000, 23.30000,
0.10328, 5.13000, 0.45300, 6.93200, 8.00000, 19.70000, 396.90000, 5.92700, 47.20000, 284.00000, 19.60000,
0.14932, 5.13000, 0.45300, 7.22540, 8.00000, 19.70000, 395.11000, 5.74100, 66.20000, 284.00000, 18.70000,
0.17171, 5.13000, 0.45300, 6.81850, 8.00000, 19.70000, 378.08000, 5.96600, 93.40000, 284.00000, 16.00000,
0.11027, 5.13000, 0.45300, 7.22550, 8.00000, 19.70000, 396.90000, 6.45600, 67.80000, 284.00000, 22.20000,
0.12650, 5.13000, 0.45300, 7.98090, 8.00000, 19.70000, 395.58000, 6.76200, 43.40000, 284.00000, 25.00000,
0.01951, 1.38000, 0.41610, 9.22290, 3.00000, 18.60000, 393.24000, 7.10400, 59.50000, 216.00000, 33.00000,
0.03584, 3.37000, 0.39800, 6.61150, 4.00000, 16.10000, 396.90000, 6.29000, 17.80000, 337.00000, 23.50000,
0.04379, 3.37000, 0.39800, 6.61150, 4.00000, 16.10000, 396.90000, 5.78700, 31.10000, 337.00000, 19.40000,
0.05789, 6.07000, 0.40900, 6.49800, 4.00000, 18.90000, 396.21000, 5.87800, 21.40000, 345.00000, 22.00000,
0.13554, 6.07000, 0.40900, 6.49800, 4.00000, 18.90000, 396.90000, 5.59400, 36.80000, 345.00000, 17.40000,
0.12816, 6.07000, 0.40900, 6.49800, 4.00000, 18.90000, 396.90000, 5.88500, 33.00000, 345.00000, 20.90000,
0.08826, 10.81000, 0.41300, 5.28730, 4.00000, 19.20000, 383.73000, 6.41700, 6.60000, 305.00000, 24.20000,
0.15876, 10.81000, 0.41300, 5.28730, 4.00000, 19.20000, 376.94000, 5.96100, 17.50000, 305.00000, 21.70000,
0.09164, 10.81000, 0.41300, 5.28730, 4.00000, 19.20000, 390.91000, 6.06500, 7.80000, 305.00000, 22.80000,
0.19539, 10.81000, 0.41300, 5.28730, 4.00000, 19.20000, 377.17000, 6.24500, 6.20000, 305.00000, 23.40000,
0.07896, 12.83000, 0.43700, 4.25150, 5.00000, 18.70000, 394.92000, 6.27300, 6.00000, 398.00000, 24.10000,
0.09512, 12.83000, 0.43700, 4.50260, 5.00000, 18.70000, 383.23000, 6.28600, 45.00000, 398.00000, 21.40000,
0.10153, 12.83000, 0.43700, 4.05220, 5.00000, 18.70000, 373.66000, 6.27900, 74.50000, 398.00000, 20.00000,
0.08707, 12.83000, 0.43700, 4.09050, 5.00000, 18.70000, 386.96000, 6.14000, 45.80000, 398.00000, 20.80000,
0.05646, 12.83000, 0.43700, 5.01410, 5.00000, 18.70000, 386.40000, 6.23200, 53.70000, 398.00000, 21.20000,
0.08387, 12.83000, 0.43700, 4.50260, 5.00000, 18.70000, 396.06000, 5.87400, 36.60000, 398.00000, 20.30000,
0.04113, 4.86000, 0.42600, 5.40070, 4.00000, 19.00000, 396.90000, 6.72700, 33.50000, 281.00000, 28.00000,
0.04462, 4.86000, 0.42600, 5.40070, 4.00000, 19.00000, 395.63000, 6.61900, 70.40000, 281.00000, 23.90000,
0.03659, 4.86000, 0.42600, 5.40070, 4.00000, 19.00000, 396.90000, 6.30200, 32.20000, 281.00000, 24.80000,
0.03551, 4.86000, 0.42600, 5.40070, 4.00000, 19.00000, 390.64000, 6.16700, 46.70000, 281.00000, 22.90000,
0.05059, 4.49000, 0.44900, 4.77940, 3.00000, 18.50000, 396.90000, 6.38900, 48.00000, 247.00000, 23.90000,
0.05735, 4.49000, 0.44900, 4.43770, 3.00000, 18.50000, 392.30000, 6.63000, 56.10000, 247.00000, 26.60000,
0.05188, 4.49000, 0.44900, 4.42720, 3.00000, 18.50000, 395.99000, 6.01500, 45.10000, 247.00000, 22.50000,
0.07151, 4.49000, 0.44900, 3.74760, 3.00000, 18.50000, 395.15000, 6.12100, 56.80000, 247.00000, 22.20000,
0.05660, 3.41000, 0.48900, 3.42170, 2.00000, 17.80000, 396.90000, 7.00700, 86.30000, 270.00000, 23.60000,
0.05302, 3.41000, 0.48900, 3.41450, 2.00000, 17.80000, 396.06000, 7.07900, 63.10000, 270.00000, 28.70000,
0.04684, 3.41000, 0.48900, 3.09230, 2.00000, 17.80000, 392.18000, 6.41700, 66.10000, 270.00000, 22.60000,
0.03932, 3.41000, 0.48900, 3.09210, 2.00000, 17.80000, 393.55000, 6.40500, 73.90000, 270.00000, 22.00000,
0.04203, 15.04000, 0.46400, 3.66590, 4.00000, 18.20000, 395.01000, 6.44200, 53.60000, 270.00000, 22.90000,
0.02875, 15.04000, 0.46400, 3.66590, 4.00000, 18.20000, 396.33000, 6.21100, 28.90000, 270.00000, 25.00000,
0.04294, 15.04000, 0.46400, 3.61500, 4.00000, 18.20000, 396.90000, 6.24900, 77.30000, 270.00000, 20.60000,
0.12204, 2.89000, 0.44500, 3.49520, 2.00000, 18.00000, 357.98000, 6.62500, 57.80000, 276.00000, 28.40000,
0.11504, 2.89000, 0.44500, 3.49520, 2.00000, 18.00000, 391.83000, 6.16300, 69.60000, 276.00000, 21.40000,
0.12083, 2.89000, 0.44500, 3.49520, 2.00000, 18.00000, 396.90000, 8.06900, 76.00000, 276.00000, 38.70000,
0.08187, 2.89000, 0.44500, 3.49520, 2.00000, 18.00000, 393.53000, 7.82000, 36.90000, 276.00000, 43.80000,
0.06860, 2.89000, 0.44500, 3.49520, 2.00000, 18.00000, 396.90000, 7.41600, 62.50000, 276.00000, 33.20000,
0.14866, 8.56000, 0.52000, 2.77780, 5.00000, 20.90000, 394.76000, 6.72700, 79.90000, 384.00000, 27.50000,
0.11432, 8.56000, 0.52000, 2.85610, 5.00000, 20.90000, 395.58000, 6.78100, 71.30000, 384.00000, 26.50000,
0.22876, 8.56000, 0.52000, 2.71470, 5.00000, 20.90000, 70.80000, 6.40500, 85.40000, 384.00000, 18.60000,
0.21161, 8.56000, 0.52000, 2.71470, 5.00000, 20.90000, 394.47000, 6.13700, 87.40000, 384.00000, 19.30000,
0.13960, 8.56000, 0.52000, 2.42100, 5.00000, 20.90000, 392.69000, 6.16700, 90.00000, 384.00000, 20.10000,
0.13262, 8.56000, 0.52000, 2.10690, 5.00000, 20.90000, 394.05000, 5.85100, 96.70000, 384.00000, 19.50000,
0.17120, 8.56000, 0.52000, 2.21100, 5.00000, 20.90000, 395.67000, 5.83600, 91.90000, 384.00000, 19.50000,
0.13117, 8.56000, 0.52000, 2.12240, 5.00000, 20.90000, 387.69000, 6.12700, 85.20000, 384.00000, 20.40000,
0.12802, 8.56000, 0.52000, 2.43290, 5.00000, 20.90000, 395.24000, 6.47400, 97.10000, 384.00000, 19.80000,
0.26363, 8.56000, 0.52000, 2.54510, 5.00000, 20.90000, 391.23000, 6.22900, 91.20000, 384.00000, 19.40000,
0.10793, 8.56000, 0.52000, 2.77780, 5.00000, 20.90000, 393.49000, 6.19500, 54.40000, 384.00000, 21.70000,
0.10084, 10.01000, 0.54700, 2.67750, 6.00000, 17.80000, 395.59000, 6.71500, 81.60000, 432.00000, 22.80000,
0.12329, 10.01000, 0.54700, 2.35340, 6.00000, 17.80000, 394.95000, 5.91300, 92.90000, 432.00000, 18.80000,
0.22212, 10.01000, 0.54700, 2.54800, 6.00000, 17.80000, 396.90000, 6.09200, 95.40000, 432.00000, 18.70000,
0.14231, 10.01000, 0.54700, 2.25650, 6.00000, 17.80000, 388.74000, 6.25400, 84.20000, 432.00000, 18.50000,
0.17134, 10.01000, 0.54700, 2.46310, 6.00000, 17.80000, 344.91000, 5.92800, 88.20000, 432.00000, 18.30000,
0.13158, 10.01000, 0.54700, 2.73010, 6.00000, 17.80000, 393.30000, 6.17600, 72.50000, 432.00000, 21.20000,
0.15098, 10.01000, 0.54700, 2.74740, 6.00000, 17.80000, 394.51000, 6.02100, 82.60000, 432.00000, 19.20000,
0.13058, 10.01000, 0.54700, 2.47750, 6.00000, 17.80000, 338.63000, 5.87200, 73.10000, 432.00000, 20.40000,
0.14476, 10.01000, 0.54700, 2.75920, 6.00000, 17.80000, 391.50000, 5.73100, 65.20000, 432.00000, 19.30000,
0.06899, 25.65000, 0.58100, 2.25770, 2.00000, 19.10000, 389.15000, 5.87000, 69.70000, 188.00000, 22.00000,
0.07165, 25.65000, 0.58100, 2.19740, 2.00000, 19.10000, 377.67000, 6.00400, 84.10000, 188.00000, 20.30000,
0.09299, 25.65000, 0.58100, 2.08690, 2.00000, 19.10000, 378.09000, 5.96100, 92.90000, 188.00000, 20.50000,
0.15038, 25.65000, 0.58100, 1.94440, 2.00000, 19.10000, 370.31000, 5.85600, 97.00000, 188.00000, 17.30000,
0.09849, 25.65000, 0.58100, 2.00630, 2.00000, 19.10000, 379.38000, 5.87900, 95.80000, 188.00000, 18.80000,
0.16902, 25.65000, 0.58100, 1.99290, 2.00000, 19.10000, 385.02000, 5.98600, 88.40000, 188.00000, 21.40000,
0.38735, 25.65000, 0.58100, 1.75720, 2.00000, 19.10000, 359.29000, 5.61300, 95.60000, 188.00000, 15.70000,
0.25915, 21.89000, 0.62400, 1.78830, 4.00000, 21.20000, 392.11000, 5.69300, 96.00000, 437.00000, 16.20000,
0.32543, 21.89000, 0.62400, 1.81250, 4.00000, 21.20000, 396.90000, 6.43100, 98.80000, 437.00000, 18.00000,
0.88125, 21.89000, 0.62400, 1.97990, 4.00000, 21.20000, 396.90000, 5.63700, 94.70000, 437.00000, 14.30000,
0.34006, 21.89000, 0.62400, 2.11850, 4.00000, 21.20000, 395.04000, 6.45800, 98.90000, 437.00000, 19.20000,
1.19294, 21.89000, 0.62400, 2.27100, 4.00000, 21.20000, 396.90000, 6.32600, 97.70000, 437.00000, 19.60000,
0.59005, 21.89000, 0.62400, 2.32740, 4.00000, 21.20000, 385.76000, 6.37200, 97.90000, 437.00000, 23.00000,
0.32982, 21.89000, 0.62400, 2.46990, 4.00000, 21.20000, 388.69000, 5.82200, 95.40000, 437.00000, 18.40000,
0.97617, 21.89000, 0.62400, 2.34600, 4.00000, 21.20000, 262.76000, 5.75700, 98.40000, 437.00000, 15.60000,
0.55778, 21.89000, 0.62400, 2.11070, 4.00000, 21.20000, 394.67000, 6.33500, 98.20000, 437.00000, 18.10000,
0.32264, 21.89000, 0.62400, 1.96690, 4.00000, 21.20000, 378.25000, 5.94200, 93.50000, 437.00000, 17.40000,
0.35233, 21.89000, 0.62400, 1.84980, 4.00000, 21.20000, 394.08000, 6.45400, 98.40000, 437.00000, 17.10000,
0.24980, 21.89000, 0.62400, 1.66860, 4.00000, 21.20000, 392.04000, 5.85700, 98.20000, 437.00000, 13.30000,
0.54452, 21.89000, 0.62400, 1.66870, 4.00000, 21.20000, 396.90000, 6.15100, 97.90000, 437.00000, 17.80000,
0.29090, 21.89000, 0.62400, 1.61190, 4.00000, 21.20000, 388.08000, 6.17400, 93.60000, 437.00000, 14.00000,
1.62864, 21.89000, 0.62400, 1.43940, 4.00000, 21.20000, 396.90000, 5.01900, 100.00000, 437.00000, 14.40000,
3.32105, 19.58000, 0.87100, 1.32160, 5.00000, 14.70000, 396.90000, 5.40300, 100.00000, 403.00000, 13.40000,
4.09740, 19.58000, 0.87100, 1.41180, 5.00000, 14.70000, 396.90000, 5.46800, 100.00000, 403.00000, 15.60000,
2.77974, 19.58000, 0.87100, 1.34590, 5.00000, 14.70000, 396.90000, 4.90300, 97.80000, 403.00000, 11.80000,
2.37934, 19.58000, 0.87100, 1.41910, 5.00000, 14.70000, 172.91000, 6.13000, 100.00000, 403.00000, 13.80000,
2.15505, 19.58000, 0.87100, 1.51660, 5.00000, 14.70000, 169.27000, 5.62800, 100.00000, 403.00000, 15.60000,
2.36862, 19.58000, 0.87100, 1.46080, 5.00000, 14.70000, 391.71000, 4.92600, 95.70000, 403.00000, 14.60000,
2.33099, 19.58000, 0.87100, 1.52960, 5.00000, 14.70000, 356.99000, 5.18600, 93.80000, 403.00000, 17.80000,
2.73397, 19.58000, 0.87100, 1.52570, 5.00000, 14.70000, 351.85000, 5.59700, 94.90000, 403.00000, 15.40000,
1.65660, 19.58000, 0.87100, 1.61800, 5.00000, 14.70000, 372.80000, 6.12200, 97.30000, 403.00000, 21.50000,
1.49632, 19.58000, 0.87100, 1.59160, 5.00000, 14.70000, 341.60000, 5.40400, 100.00000, 403.00000, 19.60000,
1.12658, 19.58000, 0.87100, 1.61020, 5.00000, 14.70000, 343.28000, 5.01200, 88.00000, 403.00000, 15.30000,
2.14918, 19.58000, 0.87100, 1.62320, 5.00000, 14.70000, 261.95000, 5.70900, 98.50000, 403.00000, 19.40000,
1.41385, 19.58000, 0.87100, 1.74940, 5.00000, 14.70000, 321.02000, 6.12900, 96.00000, 403.00000, 17.00000,
3.53501, 19.58000, 0.87100, 1.74550, 5.00000, 14.70000, 88.01000, 6.15200, 82.60000, 403.00000, 15.60000,
2.44668, 19.58000, 0.87100, 1.73640, 5.00000, 14.70000, 88.63000, 5.27200, 94.00000, 403.00000, 13.10000,
1.22358, 19.58000, 0.60500, 1.87730, 5.00000, 14.70000, 363.43000, 6.94300, 97.40000, 403.00000, 41.30000,
1.34284, 19.58000, 0.60500, 1.75730, 5.00000, 14.70000, 353.89000, 6.06600, 100.00000, 403.00000, 24.30000,
1.42502, 19.58000, 0.87100, 1.76590, 5.00000, 14.70000, 364.31000, 6.51000, 100.00000, 403.00000, 23.30000,
1.27346, 19.58000, 0.60500, 1.79840, 5.00000, 14.70000, 338.92000, 6.25000, 92.60000, 403.00000, 27.00000,
1.46336, 19.58000, 0.60500, 1.97090, 5.00000, 14.70000, 374.43000, 7.48900, 90.80000, 403.00000, 50.00000,
1.83377, 19.58000, 0.60500, 2.04070, 5.00000, 14.70000, 389.61000, 7.80200, 98.20000, 403.00000, 50.00000,
1.51902, 19.58000, 0.60500, 2.16200, 5.00000, 14.70000, 388.45000, 8.37500, 93.90000, 403.00000, 50.00000,
2.24236, 19.58000, 0.60500, 2.42200, 5.00000, 14.70000, 395.11000, 5.85400, 91.80000, 403.00000, 22.70000,
2.92400, 19.58000, 0.60500, 2.28340, 5.00000, 14.70000, 240.16000, 6.10100, 93.00000, 403.00000, 25.00000,
2.01019, 19.58000, 0.60500, 2.04590, 5.00000, 14.70000, 369.30000, 7.92900, 96.20000, 403.00000, 50.00000,
1.80028, 19.58000, 0.60500, 2.42590, 5.00000, 14.70000, 227.61000, 5.87700, 79.20000, 403.00000, 23.80000,
2.30040, 19.58000, 0.60500, 2.10000, 5.00000, 14.70000, 297.09000, 6.31900, 96.10000, 403.00000, 23.80000,
2.44953, 19.58000, 0.60500, 2.26250, 5.00000, 14.70000, 330.04000, 6.40200, 95.20000, 403.00000, 22.30000,
1.20742, 19.58000, 0.60500, 2.42590, 5.00000, 14.70000, 292.29000, 5.87500, 94.60000, 403.00000, 17.40000,
2.31390, 19.58000, 0.60500, 2.38870, 5.00000, 14.70000, 348.13000, 5.88000, 97.30000, 403.00000, 19.10000,
0.13914, 4.05000, 0.51000, 2.59610, 5.00000, 16.60000, 396.90000, 5.57200, 88.50000, 296.00000, 23.10000,
0.09178, 4.05000, 0.51000, 2.64630, 5.00000, 16.60000, 395.50000, 6.41600, 84.10000, 296.00000, 23.60000,
0.08447, 4.05000, 0.51000, 2.70190, 5.00000, 16.60000, 393.23000, 5.85900, 68.70000, 296.00000, 22.60000,
0.06664, 4.05000, 0.51000, 3.13230, 5.00000, 16.60000, 390.96000, 6.54600, 33.10000, 296.00000, 29.40000,
0.07022, 4.05000, 0.51000, 3.55490, 5.00000, 16.60000, 393.23000, 6.02000, 47.20000, 296.00000, 23.20000,
0.05425, 4.05000, 0.51000, 3.31750, 5.00000, 16.60000, 395.60000, 6.31500, 73.40000, 296.00000, 24.60000,
0.06642, 4.05000, 0.51000, 2.91530, 5.00000, 16.60000, 391.27000, 6.86000, 74.40000, 296.00000, 29.90000,
0.05780, 2.46000, 0.48800, 2.82900, 3.00000, 17.80000, 396.90000, 6.98000, 58.40000, 193.00000, 37.20000,
0.06588, 2.46000, 0.48800, 2.74100, 3.00000, 17.80000, 395.56000, 7.76500, 83.30000, 193.00000, 39.80000,
0.06888, 2.46000, 0.48800, 2.59790, 3.00000, 17.80000, 396.90000, 6.14400, 62.20000, 193.00000, 36.20000,
0.09103, 2.46000, 0.48800, 2.70060, 3.00000, 17.80000, 394.12000, 7.15500, 92.20000, 193.00000, 37.90000,
0.10008, 2.46000, 0.48800, 2.84700, 3.00000, 17.80000, 396.90000, 6.56300, 95.60000, 193.00000, 32.50000,
0.08308, 2.46000, 0.48800, 2.98790, 3.00000, 17.80000, 391.00000, 5.60400, 89.80000, 193.00000, 26.40000,
0.06047, 2.46000, 0.48800, 3.27970, 3.00000, 17.80000, 387.11000, 6.15300, 68.80000, 193.00000, 29.60000,
0.05602, 2.46000, 0.48800, 3.19920, 3.00000, 17.80000, 392.63000, 7.83100, 53.60000, 193.00000, 50.00000,
0.07875, 3.44000, 0.43700, 3.78860, 5.00000, 15.20000, 393.87000, 6.78200, 41.10000, 398.00000, 32.00000,
0.12579, 3.44000, 0.43700, 4.56670, 5.00000, 15.20000, 382.84000, 6.55600, 29.10000, 398.00000, 29.80000,
0.08370, 3.44000, 0.43700, 4.56670, 5.00000, 15.20000, 396.90000, 7.18500, 38.90000, 398.00000, 34.90000,
0.09068, 3.44000, 0.43700, 6.47980, 5.00000, 15.20000, 377.68000, 6.95100, 21.50000, 398.00000, 37.00000,
0.06911, 3.44000, 0.43700, 6.47980, 5.00000, 15.20000, 389.71000, 6.73900, 30.80000, 398.00000, 30.50000,
0.08664, 3.44000, 0.43700, 6.47980, 5.00000, 15.20000, 390.49000, 7.17800, 26.30000, 398.00000, 36.40000,
0.02187, 2.93000, 0.40100, 6.21960, 1.00000, 15.60000, 393.37000, 6.80000, 9.90000, 265.00000, 31.10000,
0.01439, 2.93000, 0.40100, 6.21960, 1.00000, 15.60000, 376.70000, 6.60400, 18.80000, 265.00000, 29.10000,
0.01381, 0.46000, 0.42200, 5.64840, 4.00000, 14.40000, 394.23000, 7.87500, 32.00000, 255.00000, 50.00000,
0.04011, 1.52000, 0.40400, 7.30900, 2.00000, 12.60000, 396.90000, 7.28700, 34.10000, 329.00000, 33.30000,
0.04666, 1.52000, 0.40400, 7.30900, 2.00000, 12.60000, 354.31000, 7.10700, 36.60000, 329.00000, 30.30000,
0.03768, 1.52000, 0.40400, 7.30900, 2.00000, 12.60000, 392.20000, 7.27400, 38.30000, 329.00000, 34.60000,
0.03150, 1.47000, 0.40300, 7.65340, 3.00000, 17.00000, 396.90000, 6.97500, 15.30000, 402.00000, 34.90000,
0.01778, 1.47000, 0.40300, 7.65340, 3.00000, 17.00000, 384.30000, 7.13500, 13.90000, 402.00000, 32.90000,
0.03445, 2.03000, 0.41500, 6.27000, 2.00000, 14.70000, 393.77000, 6.16200, 38.40000, 348.00000, 24.10000,
0.02177, 2.03000, 0.41500, 6.27000, 2.00000, 14.70000, 395.38000, 7.61000, 15.70000, 348.00000, 42.30000,
0.03510, 2.68000, 0.41610, 5.11800, 4.00000, 14.70000, 392.78000, 7.85300, 33.20000, 224.00000, 48.50000,
0.02009, 2.68000, 0.41610, 5.11800, 4.00000, 14.70000, 390.55000, 8.03400, 31.90000, 224.00000, 50.00000,
0.13642, 10.59000, 0.48900, 3.94540, 4.00000, 18.60000, 396.90000, 5.89100, 22.30000, 277.00000, 22.60000,
0.22969, 10.59000, 0.48900, 4.35490, 4.00000, 18.60000, 394.87000, 6.32600, 52.50000, 277.00000, 24.40000,
0.25199, 10.59000, 0.48900, 4.35490, 4.00000, 18.60000, 389.43000, 5.78300, 72.70000, 277.00000, 22.50000,
0.13587, 10.59000, 0.48900, 4.23920, 4.00000, 18.60000, 381.32000, 6.06400, 59.10000, 277.00000, 24.40000,
0.43571, 10.59000, 0.48900, 3.87500, 4.00000, 18.60000, 396.90000, 5.34400, 100.00000, 277.00000, 20.00000,
0.17446, 10.59000, 0.48900, 3.87710, 4.00000, 18.60000, 393.25000, 5.96000, 92.10000, 277.00000, 21.70000,
0.37578, 10.59000, 0.48900, 3.66500, 4.00000, 18.60000, 395.24000, 5.40400, 88.60000, 277.00000, 19.30000,
0.21719, 10.59000, 0.48900, 3.65260, 4.00000, 18.60000, 390.94000, 5.80700, 53.80000, 277.00000, 22.40000,
0.14052, 10.59000, 0.48900, 3.94540, 4.00000, 18.60000, 385.81000, 6.37500, 32.30000, 277.00000, 28.10000,
0.28955, 10.59000, 0.48900, 3.58750, 4.00000, 18.60000, 348.93000, 5.41200, 9.80000, 277.00000, 23.70000,
0.19802, 10.59000, 0.48900, 3.94540, 4.00000, 18.60000, 393.63000, 6.18200, 42.40000, 277.00000, 25.00000,
0.04560, 13.89000, 0.55000, 3.11210, 5.00000, 16.40000, 392.80000, 5.88800, 56.00000, 276.00000, 23.30000,
0.07013, 13.89000, 0.55000, 3.42110, 5.00000, 16.40000, 392.78000, 6.64200, 85.10000, 276.00000, 28.70000,
0.11069, 13.89000, 0.55000, 2.88930, 5.00000, 16.40000, 396.90000, 5.95100, 93.80000, 276.00000, 21.50000,
0.11425, 13.89000, 0.55000, 3.36330, 5.00000, 16.40000, 393.74000, 6.37300, 92.40000, 276.00000, 23.00000,
0.35809, 6.20000, 0.50700, 2.86170, 8.00000, 17.40000, 391.70000, 6.95100, 88.50000, 307.00000, 26.70000,
0.40771, 6.20000, 0.50700, 3.04800, 8.00000, 17.40000, 395.24000, 6.16400, 91.30000, 307.00000, 21.70000,
0.62356, 6.20000, 0.50700, 3.27210, 8.00000, 17.40000, 390.39000, 6.87900, 77.70000, 307.00000, 27.50000,
0.61470, 6.20000, 0.50700, 3.27210, 8.00000, 17.40000, 396.90000, 6.61800, 80.80000, 307.00000, 30.10000,
0.31533, 6.20000, 0.50400, 2.89440, 8.00000, 17.40000, 385.05000, 8.26600, 78.30000, 307.00000, 44.80000,
0.52693, 6.20000, 0.50400, 2.89440, 8.00000, 17.40000, 382.00000, 8.72500, 83.00000, 307.00000, 50.00000,
0.38214, 6.20000, 0.50400, 3.21570, 8.00000, 17.40000, 387.38000, 8.04000, 86.50000, 307.00000, 37.60000,
0.41238, 6.20000, 0.50400, 3.21570, 8.00000, 17.40000, 372.08000, 7.16300, 79.90000, 307.00000, 31.60000,
0.29819, 6.20000, 0.50400, 3.37510, 8.00000, 17.40000, 377.51000, 7.68600, 17.00000, 307.00000, 46.70000,
0.44178, 6.20000, 0.50400, 3.37510, 8.00000, 17.40000, 380.34000, 6.55200, 21.40000, 307.00000, 31.50000,
0.53700, 6.20000, 0.50400, 3.67150, 8.00000, 17.40000, 378.35000, 5.98100, 68.10000, 307.00000, 24.30000,
0.46296, 6.20000, 0.50400, 3.67150, 8.00000, 17.40000, 376.14000, 7.41200, 76.90000, 307.00000, 31.70000,
0.57529, 6.20000, 0.50700, 3.83840, 8.00000, 17.40000, 385.91000, 8.33700, 73.30000, 307.00000, 41.70000,
0.33147, 6.20000, 0.50700, 3.65190, 8.00000, 17.40000, 378.95000, 8.24700, 70.40000, 307.00000, 48.30000,
0.44791, 6.20000, 0.50700, 3.65190, 8.00000, 17.40000, 360.20000, 6.72600, 66.50000, 307.00000, 29.00000,
0.33045, 6.20000, 0.50700, 3.65190, 8.00000, 17.40000, 376.75000, 6.08600, 61.50000, 307.00000, 24.00000,
0.52058, 6.20000, 0.50700, 4.14800, 8.00000, 17.40000, 388.45000, 6.63100, 76.50000, 307.00000, 25.10000,
0.51183, 6.20000, 0.50700, 4.14800, 8.00000, 17.40000, 390.07000, 7.35800, 71.60000, 307.00000, 31.50000,
0.08244, 4.93000, 0.42800, 6.18990, 6.00000, 16.60000, 379.41000, 6.48100, 18.50000, 300.00000, 23.70000,
0.09252, 4.93000, 0.42800, 6.18990, 6.00000, 16.60000, 383.78000, 6.60600, 42.20000, 300.00000, 23.30000,
0.11329, 4.93000, 0.42800, 6.33610, 6.00000, 16.60000, 391.25000, 6.89700, 54.30000, 300.00000, 22.00000,
0.10612, 4.93000, 0.42800, 6.33610, 6.00000, 16.60000, 394.62000, 6.09500, 65.10000, 300.00000, 20.10000,
0.10290, 4.93000, 0.42800, 7.03550, 6.00000, 16.60000, 372.75000, 6.35800, 52.90000, 300.00000, 22.20000,
0.12757, 4.93000, 0.42800, 7.03550, 6.00000, 16.60000, 374.71000, 6.39300, 7.80000, 300.00000, 23.70000,
0.20608, 5.86000, 0.43100, 7.95490, 7.00000, 19.10000, 372.49000, 5.59300, 76.50000, 330.00000, 17.60000,
0.19133, 5.86000, 0.43100, 7.95490, 7.00000, 19.10000, 389.13000, 5.60500, 70.20000, 330.00000, 18.50000,
0.33983, 5.86000, 0.43100, 8.05550, 7.00000, 19.10000, 390.18000, 6.10800, 34.90000, 330.00000, 24.30000,
0.19657, 5.86000, 0.43100, 8.05550, 7.00000, 19.10000, 376.14000, 6.22600, 79.20000, 330.00000, 20.50000,
0.16439, 5.86000, 0.43100, 7.82650, 7.00000, 19.10000, 374.71000, 6.43300, 49.10000, 330.00000, 24.50000,
0.19073, 5.86000, 0.43100, 7.82650, 7.00000, 19.10000, 393.74000, 6.71800, 17.50000, 330.00000, 26.20000,
0.14030, 5.86000, 0.43100, 7.39670, 7.00000, 19.10000, 396.28000, 6.48700, 13.00000, 330.00000, 24.40000,
0.21409, 5.86000, 0.43100, 7.39670, 7.00000, 19.10000, 377.07000, 6.43800, 8.90000, 330.00000, 24.80000,
0.08221, 5.86000, 0.43100, 8.90670, 7.00000, 19.10000, 386.09000, 6.95700, 6.80000, 330.00000, 29.60000,
0.36894, 5.86000, 0.43100, 8.90670, 7.00000, 19.10000, 396.90000, 8.25900, 8.40000, 330.00000, 42.80000,
0.04819, 3.64000, 0.39200, 9.22030, 1.00000, 16.40000, 392.89000, 6.10800, 32.00000, 315.00000, 21.90000,
0.03548, 3.64000, 0.39200, 9.22030, 1.00000, 16.40000, 395.18000, 5.87600, 19.10000, 315.00000, 20.90000,
0.01538, 3.75000, 0.39400, 6.33610, 3.00000, 15.90000, 386.34000, 7.45400, 34.20000, 244.00000, 44.00000,
0.61154, 3.97000, 0.64700, 1.80100, 5.00000, 13.00000, 389.70000, 8.70400, 86.90000, 264.00000, 50.00000,
0.66351, 3.97000, 0.64700, 1.89460, 5.00000, 13.00000, 383.29000, 7.33300, 100.00000, 264.00000, 36.00000,
0.65665, 3.97000, 0.64700, 2.01070, 5.00000, 13.00000, 391.93000, 6.84200, 100.00000, 264.00000, 30.10000,
0.54011, 3.97000, 0.64700, 2.11210, 5.00000, 13.00000, 392.80000, 7.20300, 81.80000, 264.00000, 33.80000,
0.53412, 3.97000, 0.64700, 2.13980, 5.00000, 13.00000, 388.37000, 7.52000, 89.40000, 264.00000, 43.10000,
0.52014, 3.97000, 0.64700, 2.28850, 5.00000, 13.00000, 386.86000, 8.39800, 91.50000, 264.00000, 48.80000,
0.82526, 3.97000, 0.64700, 2.07880, 5.00000, 13.00000, 393.42000, 7.32700, 94.50000, 264.00000, 31.00000,
0.55007, 3.97000, 0.64700, 1.93010, 5.00000, 13.00000, 387.89000, 7.20600, 91.60000, 264.00000, 36.50000,
0.76162, 3.97000, 0.64700, 1.98650, 5.00000, 13.00000, 392.40000, 5.56000, 62.80000, 264.00000, 22.80000,
0.78570, 3.97000, 0.64700, 2.13290, 5.00000, 13.00000, 384.07000, 7.01400, 84.60000, 264.00000, 30.70000,
0.57834, 3.97000, 0.57500, 2.42160, 5.00000, 13.00000, 384.54000, 8.29700, 67.00000, 264.00000, 50.00000,
0.54050, 3.97000, 0.57500, 2.87200, 5.00000, 13.00000, 390.30000, 7.47000, 52.60000, 264.00000, 43.50000,
0.09065, 6.96000, 0.46400, 3.91750, 3.00000, 18.60000, 391.34000, 5.92000, 61.50000, 223.00000, 20.70000,
0.29916, 6.96000, 0.46400, 4.42900, 3.00000, 18.60000, 388.65000, 5.85600, 42.10000, 223.00000, 21.10000,
0.16211, 6.96000, 0.46400, 4.42900, 3.00000, 18.60000, 396.90000, 6.24000, 16.30000, 223.00000, 25.20000,
0.11460, 6.96000, 0.46400, 3.91750, 3.00000, 18.60000, 394.96000, 6.53800, 58.70000, 223.00000, 24.40000,
0.22188, 6.96000, 0.46400, 4.36650, 3.00000, 18.60000, 390.77000, 7.69100, 51.80000, 223.00000, 35.20000,
0.05644, 6.41000, 0.44700, 4.07760, 4.00000, 17.60000, 396.90000, 6.75800, 32.90000, 254.00000, 32.40000,
0.09604, 6.41000, 0.44700, 4.26730, 4.00000, 17.60000, 396.90000, 6.85400, 42.80000, 254.00000, 32.00000,
0.10469, 6.41000, 0.44700, 4.78720, 4.00000, 17.60000, 389.25000, 7.26700, 49.00000, 254.00000, 33.20000,
0.06127, 6.41000, 0.44700, 4.86280, 4.00000, 17.60000, 393.45000, 6.82600, 27.60000, 254.00000, 33.10000,
0.07978, 6.41000, 0.44700, 4.14030, 4.00000, 17.60000, 396.90000, 6.48200, 32.10000, 254.00000, 29.10000,
0.21038, 3.33000, 0.44290, 4.10070, 5.00000, 14.90000, 396.90000, 6.81200, 32.20000, 216.00000, 35.10000,
0.03578, 3.33000, 0.44290, 4.69470, 5.00000, 14.90000, 387.31000, 7.82000, 64.50000, 216.00000, 45.40000,
0.03705, 3.33000, 0.44290, 5.24470, 5.00000, 14.90000, 392.23000, 6.96800, 37.20000, 216.00000, 35.40000,
0.06129, 3.33000, 0.44290, 5.21190, 5.00000, 14.90000, 377.07000, 7.64500, 49.70000, 216.00000, 46.00000,
0.01501, 1.21000, 0.40100, 5.88500, 1.00000, 13.60000, 395.52000, 7.92300, 24.80000, 198.00000, 50.00000,
0.00906, 2.97000, 0.40000, 7.30730, 1.00000, 15.30000, 394.72000, 7.08800, 20.80000, 285.00000, 32.20000,
0.01096, 2.25000, 0.38900, 7.30730, 1.00000, 15.30000, 394.72000, 6.45300, 31.90000, 300.00000, 22.00000,
0.01965, 1.76000, 0.38500, 9.08920, 1.00000, 18.20000, 341.60000, 6.23000, 31.50000, 241.00000, 20.10000,
0.03871, 5.32000, 0.40500, 7.31720, 6.00000, 16.60000, 396.90000, 6.20900, 31.30000, 293.00000, 23.20000,
0.04590, 5.32000, 0.40500, 7.31720, 6.00000, 16.60000, 396.90000, 6.31500, 45.60000, 293.00000, 22.30000,
0.04297, 5.32000, 0.40500, 7.31720, 6.00000, 16.60000, 371.72000, 6.56500, 22.90000, 293.00000, 24.80000,
0.03502, 4.95000, 0.41100, 5.11670, 4.00000, 19.20000, 396.90000, 6.86100, 27.90000, 245.00000, 28.50000,
0.07886, 4.95000, 0.41100, 5.11670, 4.00000, 19.20000, 396.90000, 7.14800, 27.70000, 245.00000, 37.30000,
0.03615, 4.95000, 0.41100, 5.11670, 4.00000, 19.20000, 396.90000, 6.63000, 23.40000, 245.00000, 27.90000,
0.08265, 13.92000, 0.43700, 5.50270, 4.00000, 16.00000, 396.90000, 6.12700, 18.40000, 289.00000, 23.90000,
0.08199, 13.92000, 0.43700, 5.50270, 4.00000, 16.00000, 396.90000, 6.00900, 42.30000, 289.00000, 21.70000,
0.12932, 13.92000, 0.43700, 5.96040, 4.00000, 16.00000, 396.90000, 6.67800, 31.10000, 289.00000, 28.60000,
0.05372, 13.92000, 0.43700, 5.96040, 4.00000, 16.00000, 392.85000, 6.54900, 51.00000, 289.00000, 27.10000,
0.14103, 13.92000, 0.43700, 6.32000, 4.00000, 16.00000, 396.90000, 5.79000, 58.00000, 289.00000, 20.30000,
0.06466, 2.24000, 0.40000, 7.82780, 5.00000, 14.80000, 368.24000, 6.34500, 20.10000, 358.00000, 22.50000,
0.05561, 2.24000, 0.40000, 7.82780, 5.00000, 14.80000, 371.58000, 7.04100, 10.00000, 358.00000, 29.00000,
0.04417, 2.24000, 0.40000, 7.82780, 5.00000, 14.80000, 390.86000, 6.87100, 47.40000, 358.00000, 24.80000,
0.03537, 6.09000, 0.43300, 5.49170, 7.00000, 16.10000, 395.75000, 6.59000, 40.40000, 329.00000, 22.00000,
0.09266, 6.09000, 0.43300, 5.49170, 7.00000, 16.10000, 383.61000, 6.49500, 18.40000, 329.00000, 26.40000,
0.10000, 6.09000, 0.43300, 5.49170, 7.00000, 16.10000, 390.43000, 6.98200, 17.70000, 329.00000, 33.10000,
0.05515, 2.18000, 0.47200, 4.02200, 7.00000, 18.40000, 393.68000, 7.23600, 41.10000, 222.00000, 36.10000,
0.05479, 2.18000, 0.47200, 3.37000, 7.00000, 18.40000, 393.36000, 6.61600, 58.10000, 222.00000, 28.40000,
0.07503, 2.18000, 0.47200, 3.09920, 7.00000, 18.40000, 396.90000, 7.42000, 71.90000, 222.00000, 33.40000,
0.04932, 2.18000, 0.47200, 3.18270, 7.00000, 18.40000, 396.90000, 6.84900, 70.30000, 222.00000, 28.20000,
0.49298, 9.90000, 0.54400, 3.31750, 4.00000, 18.40000, 396.90000, 6.63500, 82.50000, 304.00000, 22.80000,
0.34940, 9.90000, 0.54400, 3.10250, 4.00000, 18.40000, 396.24000, 5.97200, 76.70000, 304.00000, 20.30000,
2.63548, 9.90000, 0.54400, 2.51940, 4.00000, 18.40000, 350.45000, 4.97300, 37.80000, 304.00000, 16.10000,
0.79041, 9.90000, 0.54400, 2.64030, 4.00000, 18.40000, 396.90000, 6.12200, 52.80000, 304.00000, 22.10000,
0.26169, 9.90000, 0.54400, 2.83400, 4.00000, 18.40000, 396.30000, 6.02300, 90.40000, 304.00000, 19.40000,
0.26938, 9.90000, 0.54400, 3.26280, 4.00000, 18.40000, 393.39000, 6.26600, 82.80000, 304.00000, 21.60000,
0.36920, 9.90000, 0.54400, 3.60230, 4.00000, 18.40000, 395.69000, 6.56700, 87.30000, 304.00000, 23.80000,
0.25356, 9.90000, 0.54400, 3.94500, 4.00000, 18.40000, 396.42000, 5.70500, 77.70000, 304.00000, 16.20000,
0.31827, 9.90000, 0.54400, 3.99860, 4.00000, 18.40000, 390.70000, 5.91400, 83.20000, 304.00000, 17.80000,
0.24522, 9.90000, 0.54400, 4.03170, 4.00000, 18.40000, 396.90000, 5.78200, 71.70000, 304.00000, 19.80000,
0.40202, 9.90000, 0.54400, 3.53250, 4.00000, 18.40000, 395.21000, 6.38200, 67.20000, 304.00000, 23.10000,
0.47547, 9.90000, 0.54400, 4.00190, 4.00000, 18.40000, 396.23000, 6.11300, 58.80000, 304.00000, 21.00000,
0.16760, 7.38000, 0.49300, 4.54040, 5.00000, 19.60000, 396.90000, 6.42600, 52.30000, 287.00000, 23.80000,
0.18159, 7.38000, 0.49300, 4.54040, 5.00000, 19.60000, 396.90000, 6.37600, 54.30000, 287.00000, 23.10000,
0.35114, 7.38000, 0.49300, 4.72110, 5.00000, 19.60000, 396.90000, 6.04100, 49.90000, 287.00000, 20.40000,
0.28392, 7.38000, 0.49300, 4.72110, 5.00000, 19.60000, 391.13000, 5.70800, 74.30000, 287.00000, 18.50000,
0.34109, 7.38000, 0.49300, 4.72110, 5.00000, 19.60000, 396.90000, 6.41500, 40.10000, 287.00000, 25.00000,
0.19186, 7.38000, 0.49300, 5.41590, 5.00000, 19.60000, 393.68000, 6.43100, 14.70000, 287.00000, 24.60000,
0.30347, 7.38000, 0.49300, 5.41590, 5.00000, 19.60000, 396.90000, 6.31200, 28.90000, 287.00000, 23.00000,
0.24103, 7.38000, 0.49300, 5.41590, 5.00000, 19.60000, 396.90000, 6.08300, 43.70000, 287.00000, 22.20000,
0.06617, 3.24000, 0.46000, 5.21460, 4.00000, 16.90000, 382.44000, 5.86800, 25.80000, 430.00000, 19.30000,
0.06724, 3.24000, 0.46000, 5.21460, 4.00000, 16.90000, 375.21000, 6.33300, 17.20000, 430.00000, 22.60000,
0.04544, 3.24000, 0.46000, 5.87360, 4.00000, 16.90000, 368.57000, 6.14400, 32.20000, 430.00000, 19.80000,
0.05023, 6.06000, 0.43790, 6.64070, 1.00000, 16.90000, 394.02000, 5.70600, 28.40000, 304.00000, 17.10000,
0.03466, 6.06000, 0.43790, 6.64070, 1.00000, 16.90000, 362.25000, 6.03100, 23.30000, 304.00000, 19.40000,
0.05083, 5.19000, 0.51500, 6.45840, 5.00000, 20.20000, 389.71000, 6.31600, 38.10000, 224.00000, 22.20000,
0.03738, 5.19000, 0.51500, 6.45840, 5.00000, 20.20000, 389.40000, 6.31000, 38.50000, 224.00000, 20.70000,
0.03961, 5.19000, 0.51500, 5.98530, 5.00000, 20.20000, 396.90000, 6.03700, 34.50000, 224.00000, 21.10000,
0.03427, 5.19000, 0.51500, 5.23110, 5.00000, 20.20000, 396.90000, 5.86900, 46.30000, 224.00000, 19.50000,
0.03041, 5.19000, 0.51500, 5.61500, 5.00000, 20.20000, 394.81000, 5.89500, 59.60000, 224.00000, 18.50000,
0.03306, 5.19000, 0.51500, 4.81220, 5.00000, 20.20000, 396.14000, 6.05900, 37.30000, 224.00000, 20.60000,
0.05497, 5.19000, 0.51500, 4.81220, 5.00000, 20.20000, 396.90000, 5.98500, 45.40000, 224.00000, 19.00000,
0.06151, 5.19000, 0.51500, 4.81220, 5.00000, 20.20000, 396.90000, 5.96800, 58.50000, 224.00000, 18.70000,
0.01301, 1.52000, 0.44200, 7.03790, 1.00000, 15.50000, 394.74000, 7.24100, 49.30000, 284.00000, 32.70000,
0.02498, 1.89000, 0.51800, 6.26690, 1.00000, 15.90000, 389.96000, 6.54000, 59.70000, 422.00000, 16.50000,
0.02543, 3.78000, 0.48400, 5.73210, 5.00000, 17.60000, 396.90000, 6.69600, 56.40000, 370.00000, 23.90000,
0.03049, 3.78000, 0.48400, 6.46540, 5.00000, 17.60000, 387.97000, 6.87400, 28.10000, 370.00000, 31.20000,
0.03113, 4.39000, 0.44200, 8.01360, 3.00000, 18.80000, 385.64000, 6.01400, 48.50000, 352.00000, 17.50000,
0.06162, 4.39000, 0.44200, 8.01360, 3.00000, 18.80000, 364.61000, 5.89800, 52.30000, 352.00000, 17.20000,
0.01870, 4.15000, 0.42900, 8.53530, 4.00000, 17.90000, 392.43000, 6.51600, 27.70000, 351.00000, 23.10000,
0.01501, 2.01000, 0.43500, 8.34400, 4.00000, 17.00000, 390.94000, 6.63500, 29.70000, 280.00000, 24.50000,
0.02899, 1.25000, 0.42900, 8.79210, 1.00000, 19.70000, 389.85000, 6.93900, 34.50000, 335.00000, 26.60000,
0.06211, 1.25000, 0.42900, 8.79210, 1.00000, 19.70000, 396.90000, 6.49000, 44.40000, 335.00000, 22.90000,
0.07950, 1.69000, 0.41100, 10.71030, 4.00000, 18.30000, 370.78000, 6.57900, 35.90000, 411.00000, 24.10000,
0.07244, 1.69000, 0.41100, 10.71030, 4.00000, 18.30000, 392.33000, 5.88400, 18.50000, 411.00000, 18.60000,
0.01709, 2.02000, 0.41000, 12.12650, 5.00000, 17.00000, 384.46000, 6.72800, 36.10000, 187.00000, 30.10000,
0.04301, 1.91000, 0.41300, 10.58570, 4.00000, 22.00000, 382.80000, 5.66300, 21.90000, 334.00000, 18.20000,
0.10659, 1.91000, 0.41300, 10.58570, 4.00000, 22.00000, 376.04000, 5.93600, 19.50000, 334.00000, 20.60000,
8.98296, 18.10000, 0.77000, 2.12220, 24.00000, 20.20000, 377.73000, 6.21200, 97.40000, 666.00000, 17.80000,
3.84970, 18.10000, 0.77000, 2.50520, 24.00000, 20.20000, 391.34000, 6.39500, 91.00000, 666.00000, 21.70000,
5.20177, 18.10000, 0.77000, 2.72270, 24.00000, 20.20000, 395.43000, 6.12700, 83.40000, 666.00000, 22.70000,
4.26131, 18.10000, 0.77000, 2.50910, 24.00000, 20.20000, 390.74000, 6.11200, 81.30000, 666.00000, 22.60000,
4.54192, 18.10000, 0.77000, 2.51820, 24.00000, 20.20000, 374.56000, 6.39800, 88.00000, 666.00000, 25.00000,
3.83684, 18.10000, 0.77000, 2.29550, 24.00000, 20.20000, 350.65000, 6.25100, 91.10000, 666.00000, 19.90000,
3.67822, 18.10000, 0.77000, 2.10360, 24.00000, 20.20000, 380.79000, 5.36200, 96.20000, 666.00000, 20.80000,
4.22239, 18.10000, 0.77000, 1.90470, 24.00000, 20.20000, 353.04000, 5.80300, 89.00000, 666.00000, 16.80000,
3.47428, 18.10000, 0.71800, 1.90470, 24.00000, 20.20000, 354.55000, 8.78000, 82.90000, 666.00000, 21.90000,
4.55587, 18.10000, 0.71800, 1.61320, 24.00000, 20.20000, 354.70000, 3.56100, 87.90000, 666.00000, 27.50000,
3.69695, 18.10000, 0.71800, 1.75230, 24.00000, 20.20000, 316.03000, 4.96300, 91.40000, 666.00000, 21.90000,
13.52220, 18.10000, 0.63100, 1.51060, 24.00000, 20.20000, 131.42000, 3.86300, 100.00000, 666.00000, 23.10000,
4.89822, 18.10000, 0.63100, 1.33250, 24.00000, 20.20000, 375.52000, 4.97000, 100.00000, 666.00000, 50.00000,
5.66998, 18.10000, 0.63100, 1.35670, 24.00000, 20.20000, 375.33000, 6.68300, 96.80000, 666.00000, 50.00000,
6.53876, 18.10000, 0.63100, 1.20240, 24.00000, 20.20000, 392.05000, 7.01600, 97.50000, 666.00000, 50.00000,
9.23230, 18.10000, 0.63100, 1.16910, 24.00000, 20.20000, 366.15000, 6.21600, 100.00000, 666.00000, 50.00000,
8.26725, 18.10000, 0.66800, 1.12960, 24.00000, 20.20000, 347.88000, 5.87500, 89.60000, 666.00000, 50.00000,
11.10810, 18.10000, 0.66800, 1.17420, 24.00000, 20.20000, 396.90000, 4.90600, 100.00000, 666.00000, 13.80000,
18.49820, 18.10000, 0.66800, 1.13700, 24.00000, 20.20000, 396.90000, 4.13800, 100.00000, 666.00000, 13.80000,
19.60910, 18.10000, 0.67100, 1.31630, 24.00000, 20.20000, 396.90000, 7.31300, 97.90000, 666.00000, 15.00000,
15.28800, 18.10000, 0.67100, 1.34490, 24.00000, 20.20000, 363.02000, 6.64900, 93.30000, 666.00000, 13.90000,
9.82349, 18.10000, 0.67100, 1.35800, 24.00000, 20.20000, 396.90000, 6.79400, 98.80000, 666.00000, 13.30000,
23.64820, 18.10000, 0.67100, 1.38610, 24.00000, 20.20000, 396.90000, 6.38000, 96.20000, 666.00000, 13.10000,
17.86670, 18.10000, 0.67100, 1.38610, 24.00000, 20.20000, 393.74000, 6.22300, 100.00000, 666.00000, 10.20000,
88.97620, 18.10000, 0.67100, 1.41650, 24.00000, 20.20000, 396.90000, 6.96800, 91.90000, 666.00000, 10.40000,
15.87440, 18.10000, 0.67100, 1.51920, 24.00000, 20.20000, 396.90000, 6.54500, 99.10000, 666.00000, 10.90000,
9.18702, 18.10000, 0.70000, 1.58040, 24.00000, 20.20000, 396.90000, 5.53600, 100.00000, 666.00000, 11.30000,
7.99248, 18.10000, 0.70000, 1.53310, 24.00000, 20.20000, 396.90000, 5.52000, 100.00000, 666.00000, 12.30000,
20.08490, 18.10000, 0.70000, 1.43950, 24.00000, 20.20000, 285.83000, 4.36800, 91.20000, 666.00000, 8.80000,
16.81180, 18.10000, 0.70000, 1.42610, 24.00000, 20.20000, 396.90000, 5.27700, 98.10000, 666.00000, 7.20000,
24.39380, 18.10000, 0.70000, 1.46720, 24.00000, 20.20000, 396.90000, 4.65200, 100.00000, 666.00000, 10.50000,
22.59710, 18.10000, 0.70000, 1.51840, 24.00000, 20.20000, 396.90000, 5.00000, 89.50000, 666.00000, 7.40000,
14.33370, 18.10000, 0.70000, 1.58950, 24.00000, 20.20000, 372.92000, 4.88000, 100.00000, 666.00000, 10.20000,
8.15174, 18.10000, 0.70000, 1.72810, 24.00000, 20.20000, 396.90000, 5.39000, 98.90000, 666.00000, 11.50000,
6.96215, 18.10000, 0.70000, 1.92650, 24.00000, 20.20000, 394.43000, 5.71300, 97.00000, 666.00000, 15.10000,
5.29305, 18.10000, 0.70000, 2.16780, 24.00000, 20.20000, 378.38000, 6.05100, 82.50000, 666.00000, 23.20000,
11.57790, 18.10000, 0.70000, 1.77000, 24.00000, 20.20000, 396.90000, 5.03600, 97.00000, 666.00000, 9.70000,
8.64476, 18.10000, 0.69300, 1.79120, 24.00000, 20.20000, 396.90000, 6.19300, 92.60000, 666.00000, 13.80000,
13.35980, 18.10000, 0.69300, 1.78210, 24.00000, 20.20000, 396.90000, 5.88700, 94.70000, 666.00000, 12.70000,
8.71675, 18.10000, 0.69300, 1.72570, 24.00000, 20.20000, 391.98000, 6.47100, 98.80000, 666.00000, 13.10000,
5.87205, 18.10000, 0.69300, 1.67680, 24.00000, 20.20000, 396.90000, 6.40500, 96.00000, 666.00000, 12.50000,
7.67202, 18.10000, 0.69300, 1.63340, 24.00000, 20.20000, 393.10000, 5.74700, 98.90000, 666.00000, 8.50000,
38.35180, 18.10000, 0.69300, 1.48960, 24.00000, 20.20000, 396.90000, 5.45300, 100.00000, 666.00000, 5.00000,
9.91655, 18.10000, 0.69300, 1.50040, 24.00000, 20.20000, 338.16000, 5.85200, 77.80000, 666.00000, 6.30000,
25.04610, 18.10000, 0.69300, 1.58880, 24.00000, 20.20000, 396.90000, 5.98700, 100.00000, 666.00000, 5.60000,
14.23620, 18.10000, 0.69300, 1.57410, 24.00000, 20.20000, 396.90000, 6.34300, 100.00000, 666.00000, 7.20000,
9.59571, 18.10000, 0.69300, 1.63900, 24.00000, 20.20000, 376.11000, 6.40400, 100.00000, 666.00000, 12.10000,
24.80170, 18.10000, 0.69300, 1.70280, 24.00000, 20.20000, 396.90000, 5.34900, 96.00000, 666.00000, 8.30000,
41.52920, 18.10000, 0.69300, 1.60740, 24.00000, 20.20000, 329.46000, 5.53100, 85.40000, 666.00000, 8.50000,
67.92080, 18.10000, 0.69300, 1.42540, 24.00000, 20.20000, 384.97000, 5.68300, 100.00000, 666.00000, 5.00000,
20.71620, 18.10000, 0.65900, 1.17810, 24.00000, 20.20000, 370.22000, 4.13800, 100.00000, 666.00000, 11.90000,
11.95110, 18.10000, 0.65900, 1.28520, 24.00000, 20.20000, 332.09000, 5.60800, 100.00000, 666.00000, 27.90000,
7.40389, 18.10000, 0.59700, 1.45470, 24.00000, 20.20000, 314.64000, 5.61700, 97.90000, 666.00000, 17.20000,
14.43830, 18.10000, 0.59700, 1.46550, 24.00000, 20.20000, 179.36000, 6.85200, 100.00000, 666.00000, 27.50000,
51.13580, 18.10000, 0.59700, 1.41300, 24.00000, 20.20000, 2.60000, 5.75700, 100.00000, 666.00000, 15.00000,
14.05070, 18.10000, 0.59700, 1.52750, 24.00000, 20.20000, 35.05000, 6.65700, 100.00000, 666.00000, 17.20000,
18.81100, 18.10000, 0.59700, 1.55390, 24.00000, 20.20000, 28.79000, 4.62800, 100.00000, 666.00000, 17.90000,
28.65580, 18.10000, 0.59700, 1.58940, 24.00000, 20.20000, 210.97000, 5.15500, 100.00000, 666.00000, 16.30000,
45.74610, 18.10000, 0.69300, 1.65820, 24.00000, 20.20000, 88.27000, 4.51900, 100.00000, 666.00000, 7.00000,
18.08460, 18.10000, 0.67900, 1.83470, 24.00000, 20.20000, 27.25000, 6.43400, 100.00000, 666.00000, 7.20000,
10.83420, 18.10000, 0.67900, 1.81950, 24.00000, 20.20000, 21.57000, 6.78200, 90.80000, 666.00000, 7.50000,
25.94060, 18.10000, 0.67900, 1.64750, 24.00000, 20.20000, 127.36000, 5.30400, 89.10000, 666.00000, 10.40000,
73.53410, 18.10000, 0.67900, 1.80260, 24.00000, 20.20000, 16.45000, 5.95700, 100.00000, 666.00000, 8.80000,
11.81230, 18.10000, 0.71800, 1.79400, 24.00000, 20.20000, 48.45000, 6.82400, 76.50000, 666.00000, 8.40000,
11.08740, 18.10000, 0.71800, 1.85890, 24.00000, 20.20000, 318.75000, 6.41100, 100.00000, 666.00000, 16.70000,
7.02259, 18.10000, 0.71800, 1.87460, 24.00000, 20.20000, 319.98000, 6.00600, 95.30000, 666.00000, 14.20000,
12.04820, 18.10000, 0.61400, 1.95120, 24.00000, 20.20000, 291.55000, 5.64800, 87.60000, 666.00000, 20.80000,
7.05042, 18.10000, 0.61400, 2.02180, 24.00000, 20.20000, 2.52000, 6.10300, 85.10000, 666.00000, 13.40000,
8.79212, 18.10000, 0.58400, 2.06350, 24.00000, 20.20000, 3.65000, 5.56500, 70.60000, 666.00000, 11.70000,
15.86030, 18.10000, 0.67900, 1.90960, 24.00000, 20.20000, 7.68000, 5.89600, 95.40000, 666.00000, 8.30000,
12.24720, 18.10000, 0.58400, 1.99760, 24.00000, 20.20000, 24.65000, 5.83700, 59.70000, 666.00000, 10.20000,
37.66190, 18.10000, 0.67900, 1.86290, 24.00000, 20.20000, 18.82000, 6.20200, 78.70000, 666.00000, 10.90000,
7.36711, 18.10000, 0.67900, 1.93560, 24.00000, 20.20000, 96.73000, 6.19300, 78.10000, 666.00000, 11.00000,
9.33889, 18.10000, 0.67900, 1.96820, 24.00000, 20.20000, 60.72000, 6.38000, 95.60000, 666.00000, 9.50000,
8.49213, 18.10000, 0.58400, 2.05270, 24.00000, 20.20000, 83.45000, 6.34800, 86.10000, 666.00000, 14.50000,
10.06230, 18.10000, 0.58400, 2.08820, 24.00000, 20.20000, 81.33000, 6.83300, 94.30000, 666.00000, 14.10000,
6.44405, 18.10000, 0.58400, 2.20040, 24.00000, 20.20000, 97.95000, 6.42500, 74.80000, 666.00000, 16.10000,
5.58107, 18.10000, 0.71300, 2.31580, 24.00000, 20.20000, 100.19000, 6.43600, 87.90000, 666.00000, 14.30000,
13.91340, 18.10000, 0.71300, 2.22220, 24.00000, 20.20000, 100.63000, 6.20800, 95.00000, 666.00000, 11.70000,
11.16040, 18.10000, 0.74000, 2.12470, 24.00000, 20.20000, 109.85000, 6.62900, 94.60000, 666.00000, 13.40000,
14.42080, 18.10000, 0.74000, 2.00260, 24.00000, 20.20000, 27.49000, 6.46100, 93.30000, 666.00000, 9.60000,
15.17720, 18.10000, 0.74000, 1.91420, 24.00000, 20.20000, 9.32000, 6.15200, 100.00000, 666.00000, 8.70000,
13.67810, 18.10000, 0.74000, 1.82060, 24.00000, 20.20000, 68.95000, 5.93500, 87.90000, 666.00000, 8.40000,
9.39063, 18.10000, 0.74000, 1.81720, 24.00000, 20.20000, 396.90000, 5.62700, 93.90000, 666.00000, 12.80000,
22.05110, 18.10000, 0.74000, 1.86620, 24.00000, 20.20000, 391.45000, 5.81800, 92.40000, 666.00000, 10.50000,
9.72418, 18.10000, 0.74000, 2.06510, 24.00000, 20.20000, 385.96000, 6.40600, 97.20000, 666.00000, 17.10000,
5.66637, 18.10000, 0.74000, 2.00480, 24.00000, 20.20000, 395.69000, 6.21900, 100.00000, 666.00000, 18.40000,
9.96654, 18.10000, 0.74000, 1.97840, 24.00000, 20.20000, 386.73000, 6.48500, 100.00000, 666.00000, 15.40000,
12.80230, 18.10000, 0.74000, 1.89560, 24.00000, 20.20000, 240.52000, 5.85400, 96.60000, 666.00000, 10.80000,
10.67180, 18.10000, 0.74000, 1.98790, 24.00000, 20.20000, 43.06000, 6.45900, 94.80000, 666.00000, 11.80000,
6.28807, 18.10000, 0.74000, 2.07200, 24.00000, 20.20000, 318.01000, 6.34100, 96.40000, 666.00000, 14.90000,
9.92485, 18.10000, 0.74000, 2.19800, 24.00000, 20.20000, 388.52000, 6.25100, 96.60000, 666.00000, 12.60000,
9.32909, 18.10000, 0.71300, 2.26160, 24.00000, 20.20000, 396.90000, 6.18500, 98.70000, 666.00000, 14.10000,
7.52601, 18.10000, 0.71300, 2.18500, 24.00000, 20.20000, 304.21000, 6.41700, 98.30000, 666.00000, 13.00000,
6.71772, 18.10000, 0.71300, 2.32360, 24.00000, 20.20000, 0.32000, 6.74900, 92.60000, 666.00000, 13.40000,
5.44114, 18.10000, 0.71300, 2.35520, 24.00000, 20.20000, 355.29000, 6.65500, 98.20000, 666.00000, 15.20000,
5.09017, 18.10000, 0.71300, 2.36820, 24.00000, 20.20000, 385.09000, 6.29700, 91.80000, 666.00000, 16.10000,
8.24809, 18.10000, 0.71300, 2.45270, 24.00000, 20.20000, 375.87000, 7.39300, 99.30000, 666.00000, 17.80000,
9.51363, 18.10000, 0.71300, 2.49610, 24.00000, 20.20000, 6.68000, 6.72800, 94.10000, 666.00000, 14.90000,
4.75237, 18.10000, 0.71300, 2.43580, 24.00000, 20.20000, 50.92000, 6.52500, 86.50000, 666.00000, 14.10000,
4.66883, 18.10000, 0.71300, 2.58060, 24.00000, 20.20000, 10.48000, 5.97600, 87.90000, 666.00000, 12.70000,
8.20058, 18.10000, 0.71300, 2.77920, 24.00000, 20.20000, 3.50000, 5.93600, 80.30000, 666.00000, 13.50000,
7.75223, 18.10000, 0.71300, 2.78310, 24.00000, 20.20000, 272.21000, 6.30100, 83.70000, 666.00000, 14.90000,
6.80117, 18.10000, 0.71300, 2.71750, 24.00000, 20.20000, 396.90000, 6.08100, 84.40000, 666.00000, 20.00000,
4.81213, 18.10000, 0.71300, 2.59750, 24.00000, 20.20000, 255.23000, 6.70100, 90.00000, 666.00000, 16.40000,
3.69311, 18.10000, 0.71300, 2.56710, 24.00000, 20.20000, 391.43000, 6.37600, 88.40000, 666.00000, 17.70000,
6.65492, 18.10000, 0.71300, 2.73440, 24.00000, 20.20000, 396.90000, 6.31700, 83.00000, 666.00000, 19.50000,
5.82115, 18.10000, 0.71300, 2.80160, 24.00000, 20.20000, 393.82000, 6.51300, 89.90000, 666.00000, 20.20000,
7.83932, 18.10000, 0.65500, 2.96340, 24.00000, 20.20000, 396.90000, 6.20900, 65.40000, 666.00000, 21.40000,
3.16360, 18.10000, 0.65500, 3.06650, 24.00000, 20.20000, 334.40000, 5.75900, 48.20000, 666.00000, 19.90000,
3.77498, 18.10000, 0.65500, 2.87150, 24.00000, 20.20000, 22.01000, 5.95200, 84.70000, 666.00000, 19.00000,
4.42228, 18.10000, 0.58400, 2.54030, 24.00000, 20.20000, 331.29000, 6.00300, 94.50000, 666.00000, 19.10000,
15.57570, 18.10000, 0.58000, 2.90840, 24.00000, 20.20000, 368.74000, 5.92600, 71.00000, 666.00000, 19.10000,
13.07510, 18.10000, 0.58000, 2.82370, 24.00000, 20.20000, 396.90000, 5.71300, 56.70000, 666.00000, 20.10000,
4.34879, 18.10000, 0.58000, 3.03340, 24.00000, 20.20000, 396.90000, 6.16700, 84.00000, 666.00000, 19.90000,
4.03841, 18.10000, 0.53200, 3.09930, 24.00000, 20.20000, 395.33000, 6.22900, 90.70000, 666.00000, 19.60000,
3.56868, 18.10000, 0.58000, 2.89650, 24.00000, 20.20000, 393.37000, 6.43700, 75.00000, 666.00000, 23.20000,
4.64689, 18.10000, 0.61400, 2.53290, 24.00000, 20.20000, 374.68000, 6.98000, 67.60000, 666.00000, 29.80000,
8.05579, 18.10000, 0.58400, 2.42980, 24.00000, 20.20000, 352.58000, 5.42700, 95.40000, 666.00000, 13.80000,
6.39312, 18.10000, 0.58400, 2.20600, 24.00000, 20.20000, 302.76000, 6.16200, 97.40000, 666.00000, 13.30000,
4.87141, 18.10000, 0.61400, 2.30530, 24.00000, 20.20000, 396.21000, 6.48400, 93.60000, 666.00000, 16.70000,
15.02340, 18.10000, 0.61400, 2.10070, 24.00000, 20.20000, 349.48000, 5.30400, 97.30000, 666.00000, 12.00000,
10.23300, 18.10000, 0.61400, 2.17050, 24.00000, 20.20000, 379.70000, 6.18500, 96.70000, 666.00000, 14.60000,
14.33370, 18.10000, 0.61400, 1.95120, 24.00000, 20.20000, 383.32000, 6.22900, 88.00000, 666.00000, 21.40000,
5.82401, 18.10000, 0.53200, 3.42420, 24.00000, 20.20000, 396.90000, 6.24200, 64.70000, 666.00000, 23.00000,
5.70818, 18.10000, 0.53200, 3.33170, 24.00000, 20.20000, 393.07000, 6.75000, 74.90000, 666.00000, 23.70000,
5.73116, 18.10000, 0.53200, 3.41060, 24.00000, 20.20000, 395.28000, 7.06100, 77.00000, 666.00000, 25.00000,
2.81838, 18.10000, 0.53200, 4.09830, 24.00000, 20.20000, 392.92000, 5.76200, 40.30000, 666.00000, 21.80000,
2.37857, 18.10000, 0.58300, 3.72400, 24.00000, 20.20000, 370.73000, 5.87100, 41.90000, 666.00000, 20.60000,
3.67367, 18.10000, 0.58300, 3.99170, 24.00000, 20.20000, 388.62000, 6.31200, 51.90000, 666.00000, 21.20000,
5.69175, 18.10000, 0.58300, 3.54590, 24.00000, 20.20000, 392.68000, 6.11400, 79.80000, 666.00000, 19.10000,
4.83567, 18.10000, 0.58300, 3.15230, 24.00000, 20.20000, 388.22000, 5.90500, 53.20000, 666.00000, 20.60000,
0.15086, 27.74000, 0.60900, 1.82090, 4.00000, 20.10000, 395.09000, 5.45400, 92.70000, 711.00000, 15.20000,
0.18337, 27.74000, 0.60900, 1.75540, 4.00000, 20.10000, 344.05000, 5.41400, 98.30000, 711.00000, 7.00000,
0.20746, 27.74000, 0.60900, 1.82260, 4.00000, 20.10000, 318.43000, 5.09300, 98.00000, 711.00000, 8.10000,
0.10574, 27.74000, 0.60900, 1.86810, 4.00000, 20.10000, 390.11000, 5.98300, 98.80000, 711.00000, 13.60000,
0.11132, 27.74000, 0.60900, 2.10990, 4.00000, 20.10000, 396.90000, 5.98300, 83.50000, 711.00000, 20.10000,
0.17331, 9.69000, 0.58500, 2.38170, 6.00000, 19.20000, 396.90000, 5.70700, 54.00000, 391.00000, 21.80000,
0.27957, 9.69000, 0.58500, 2.38170, 6.00000, 19.20000, 396.90000, 5.92600, 42.60000, 391.00000, 24.50000,
0.17899, 9.69000, 0.58500, 2.79860, 6.00000, 19.20000, 393.29000, 5.67000, 28.80000, 391.00000, 23.10000,
0.28960, 9.69000, 0.58500, 2.79860, 6.00000, 19.20000, 396.90000, 5.39000, 72.90000, 391.00000, 19.70000,
0.26838, 9.69000, 0.58500, 2.89270, 6.00000, 19.20000, 396.90000, 5.79400, 70.60000, 391.00000, 18.30000,
0.23912, 9.69000, 0.58500, 2.40910, 6.00000, 19.20000, 396.90000, 6.01900, 65.30000, 391.00000, 21.20000,
0.17783, 9.69000, 0.58500, 2.39990, 6.00000, 19.20000, 395.77000, 5.56900, 73.50000, 391.00000, 17.50000,
0.22438, 9.69000, 0.58500, 2.49820, 6.00000, 19.20000, 396.90000, 6.02700, 79.70000, 391.00000, 16.80000,
0.06263, 11.93000, 0.57300, 2.47860, 1.00000, 21.00000, 391.99000, 6.59300, 69.10000, 273.00000, 22.40000,
0.04527, 11.93000, 0.57300, 2.28750, 1.00000, 21.00000, 396.90000, 6.12000, 76.70000, 273.00000, 20.60000,
0.06076, 11.93000, 0.57300, 2.16750, 1.00000, 21.00000, 396.90000, 6.97600, 91.00000, 273.00000, 23.90000,
0.10959, 11.93000, 0.57300, 2.38890, 1.00000, 21.00000, 393.45000, 6.79400, 89.30000, 273.00000, 22.00000,
0.04741, 11.93000, 0.57300, 2.50500, 1.00000, 21.00000, 396.90000, 6.03000, 80.80000, 273.00000, 11.90000,
})

406
car_data_test.go Normal file
View File

@@ -0,0 +1,406 @@
// Copyright ©2016 The gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package stat_test
import "github.com/gonum/matrix/mat64"
// ASA Car Exposition Data of Ramos and Donoho (1983)
// http://lib.stat.cmu.edu/datasets/cars.desc
// http://lib.stat.cmu.edu/datasets/cars.data
// Columns are: displacement, horsepower, weight, acceleration, MPG.
var carData = mat64.NewDense(392, 5, []float64{
307.0, 130.0, 3504.0, 12.0, 18.0,
350.0, 165.0, 3693.0, 11.5, 15.0,
318.0, 150.0, 3436.0, 11.0, 18.0,
304.0, 150.0, 3433.0, 12.0, 16.0,
302.0, 140.0, 3449.0, 10.5, 17.0,
429.0, 198.0, 4341.0, 10.0, 15.0,
454.0, 220.0, 4354.0, 9.0, 14.0,
440.0, 215.0, 4312.0, 8.5, 14.0,
455.0, 225.0, 4425.0, 10.0, 14.0,
390.0, 190.0, 3850.0, 8.5, 15.0,
383.0, 170.0, 3563.0, 10.0, 15.0,
340.0, 160.0, 3609.0, 8.0, 14.0,
400.0, 150.0, 3761.0, 9.5, 15.0,
455.0, 225.0, 3086.0, 10.0, 14.0,
113.0, 95.0, 2372.0, 15.0, 24.0,
198.0, 95.0, 2833.0, 15.5, 22.0,
199.0, 97.0, 2774.0, 15.5, 18.0,
200.0, 85.0, 2587.0, 16.0, 21.0,
97.0, 88.0, 2130.0, 14.5, 27.0,
97.0, 46.0, 1835.0, 20.5, 26.0,
110.0, 87.0, 2672.0, 17.5, 25.0,
107.0, 90.0, 2430.0, 14.5, 24.0,
104.0, 95.0, 2375.0, 17.5, 25.0,
121.0, 113.0, 2234.0, 12.5, 26.0,
199.0, 90.0, 2648.0, 15.0, 21.0,
360.0, 215.0, 4615.0, 14.0, 10.0,
307.0, 200.0, 4376.0, 15.0, 10.0,
318.0, 210.0, 4382.0, 13.5, 11.0,
304.0, 193.0, 4732.0, 18.5, 9.0,
97.0, 88.0, 2130.0, 14.5, 27.0,
140.0, 90.0, 2264.0, 15.5, 28.0,
113.0, 95.0, 2228.0, 14.0, 25.0,
232.0, 100.0, 2634.0, 13.0, 19.0,
225.0, 105.0, 3439.0, 15.5, 16.0,
250.0, 100.0, 3329.0, 15.5, 17.0,
250.0, 88.0, 3302.0, 15.5, 19.0,
232.0, 100.0, 3288.0, 15.5, 18.0,
350.0, 165.0, 4209.0, 12.0, 14.0,
400.0, 175.0, 4464.0, 11.5, 14.0,
351.0, 153.0, 4154.0, 13.5, 14.0,
318.0, 150.0, 4096.0, 13.0, 14.0,
383.0, 180.0, 4955.0, 11.5, 12.0,
400.0, 170.0, 4746.0, 12.0, 13.0,
400.0, 175.0, 5140.0, 12.0, 13.0,
258.0, 110.0, 2962.0, 13.5, 18.0,
140.0, 72.0, 2408.0, 19.0, 22.0,
250.0, 100.0, 3282.0, 15.0, 19.0,
250.0, 88.0, 3139.0, 14.5, 18.0,
122.0, 86.0, 2220.0, 14.0, 23.0,
116.0, 90.0, 2123.0, 14.0, 28.0,
79.0, 70.0, 2074.0, 19.5, 30.0,
88.0, 76.0, 2065.0, 14.5, 30.0,
71.0, 65.0, 1773.0, 19.0, 31.0,
72.0, 69.0, 1613.0, 18.0, 35.0,
97.0, 60.0, 1834.0, 19.0, 27.0,
91.0, 70.0, 1955.0, 20.5, 26.0,
113.0, 95.0, 2278.0, 15.5, 24.0,
97.5, 80.0, 2126.0, 17.0, 25.0,
97.0, 54.0, 2254.0, 23.5, 23.0,
140.0, 90.0, 2408.0, 19.5, 20.0,
122.0, 86.0, 2226.0, 16.5, 21.0,
350.0, 165.0, 4274.0, 12.0, 13.0,
400.0, 175.0, 4385.0, 12.0, 14.0,
318.0, 150.0, 4135.0, 13.5, 15.0,
351.0, 153.0, 4129.0, 13.0, 14.0,
304.0, 150.0, 3672.0, 11.5, 17.0,
429.0, 208.0, 4633.0, 11.0, 11.0,
350.0, 155.0, 4502.0, 13.5, 13.0,
350.0, 160.0, 4456.0, 13.5, 12.0,
400.0, 190.0, 4422.0, 12.5, 13.0,
70.0, 97.0, 2330.0, 13.5, 19.0,
304.0, 150.0, 3892.0, 12.5, 15.0,
307.0, 130.0, 4098.0, 14.0, 13.0,
302.0, 140.0, 4294.0, 16.0, 13.0,
318.0, 150.0, 4077.0, 14.0, 14.0,
121.0, 112.0, 2933.0, 14.5, 18.0,
121.0, 76.0, 2511.0, 18.0, 22.0,
120.0, 87.0, 2979.0, 19.5, 21.0,
96.0, 69.0, 2189.0, 18.0, 26.0,
122.0, 86.0, 2395.0, 16.0, 22.0,
97.0, 92.0, 2288.0, 17.0, 28.0,
120.0, 97.0, 2506.0, 14.5, 23.0,
98.0, 80.0, 2164.0, 15.0, 28.0,
97.0, 88.0, 2100.0, 16.5, 27.0,
350.0, 175.0, 4100.0, 13.0, 13.0,
304.0, 150.0, 3672.0, 11.5, 14.0,
350.0, 145.0, 3988.0, 13.0, 13.0,
302.0, 137.0, 4042.0, 14.5, 14.0,
318.0, 150.0, 3777.0, 12.5, 15.0,
429.0, 198.0, 4952.0, 11.5, 12.0,
400.0, 150.0, 4464.0, 12.0, 13.0,
351.0, 158.0, 4363.0, 13.0, 13.0,
318.0, 150.0, 4237.0, 14.5, 14.0,
440.0, 215.0, 4735.0, 11.0, 13.0,
455.0, 225.0, 4951.0, 11.0, 12.0,
360.0, 175.0, 3821.0, 11.0, 13.0,
225.0, 105.0, 3121.0, 16.5, 18.0,
250.0, 100.0, 3278.0, 18.0, 16.0,
232.0, 100.0, 2945.0, 16.0, 18.0,
250.0, 88.0, 3021.0, 16.5, 18.0,
198.0, 95.0, 2904.0, 16.0, 23.0,
97.0, 46.0, 1950.0, 21.0, 26.0,
400.0, 150.0, 4997.0, 14.0, 11.0,
400.0, 167.0, 4906.0, 12.5, 12.0,
360.0, 170.0, 4654.0, 13.0, 13.0,
350.0, 180.0, 4499.0, 12.5, 12.0,
232.0, 100.0, 2789.0, 15.0, 18.0,
97.0, 88.0, 2279.0, 19.0, 20.0,
140.0, 72.0, 2401.0, 19.5, 21.0,
108.0, 94.0, 2379.0, 16.5, 22.0,
70.0, 90.0, 2124.0, 13.5, 18.0,
122.0, 85.0, 2310.0, 18.5, 19.0,
155.0, 107.0, 2472.0, 14.0, 21.0,
98.0, 90.0, 2265.0, 15.5, 26.0,
350.0, 145.0, 4082.0, 13.0, 15.0,
400.0, 230.0, 4278.0, 9.5, 16.0,
68.0, 49.0, 1867.0, 19.5, 29.0,
116.0, 75.0, 2158.0, 15.5, 24.0,
114.0, 91.0, 2582.0, 14.0, 20.0,
121.0, 112.0, 2868.0, 15.5, 19.0,
318.0, 150.0, 3399.0, 11.0, 15.0,
121.0, 110.0, 2660.0, 14.0, 24.0,
156.0, 122.0, 2807.0, 13.5, 20.0,
350.0, 180.0, 3664.0, 11.0, 11.0,
198.0, 95.0, 3102.0, 16.5, 20.0,
232.0, 100.0, 2901.0, 16.0, 19.0,
250.0, 100.0, 3336.0, 17.0, 15.0,
79.0, 67.0, 1950.0, 19.0, 31.0,
122.0, 80.0, 2451.0, 16.5, 26.0,
71.0, 65.0, 1836.0, 21.0, 32.0,
140.0, 75.0, 2542.0, 17.0, 25.0,
250.0, 100.0, 3781.0, 17.0, 16.0,
258.0, 110.0, 3632.0, 18.0, 16.0,
225.0, 105.0, 3613.0, 16.5, 18.0,
302.0, 140.0, 4141.0, 14.0, 16.0,
350.0, 150.0, 4699.0, 14.5, 13.0,
318.0, 150.0, 4457.0, 13.5, 14.0,
302.0, 140.0, 4638.0, 16.0, 14.0,
304.0, 150.0, 4257.0, 15.5, 14.0,
98.0, 83.0, 2219.0, 16.5, 29.0,
79.0, 67.0, 1963.0, 15.5, 26.0,
97.0, 78.0, 2300.0, 14.5, 26.0,
76.0, 52.0, 1649.0, 16.5, 31.0,
83.0, 61.0, 2003.0, 19.0, 32.0,
90.0, 75.0, 2125.0, 14.5, 28.0,
90.0, 75.0, 2108.0, 15.5, 24.0,
116.0, 75.0, 2246.0, 14.0, 26.0,
120.0, 97.0, 2489.0, 15.0, 24.0,
108.0, 93.0, 2391.0, 15.5, 26.0,
79.0, 67.0, 2000.0, 16.0, 31.0,
225.0, 95.0, 3264.0, 16.0, 19.0,
250.0, 105.0, 3459.0, 16.0, 18.0,
250.0, 72.0, 3432.0, 21.0, 15.0,
250.0, 72.0, 3158.0, 19.5, 15.0,
400.0, 170.0, 4668.0, 11.5, 16.0,
350.0, 145.0, 4440.0, 14.0, 15.0,
318.0, 150.0, 4498.0, 14.5, 16.0,
351.0, 148.0, 4657.0, 13.5, 14.0,
231.0, 110.0, 3907.0, 21.0, 17.0,
250.0, 105.0, 3897.0, 18.5, 16.0,
258.0, 110.0, 3730.0, 19.0, 15.0,
225.0, 95.0, 3785.0, 19.0, 18.0,
231.0, 110.0, 3039.0, 15.0, 21.0,
262.0, 110.0, 3221.0, 13.5, 20.0,
302.0, 129.0, 3169.0, 12.0, 13.0,
97.0, 75.0, 2171.0, 16.0, 29.0,
140.0, 83.0, 2639.0, 17.0, 23.0,
232.0, 100.0, 2914.0, 16.0, 20.0,
140.0, 78.0, 2592.0, 18.5, 23.0,
134.0, 96.0, 2702.0, 13.5, 24.0,
90.0, 71.0, 2223.0, 16.5, 25.0,
119.0, 97.0, 2545.0, 17.0, 24.0,
171.0, 97.0, 2984.0, 14.5, 18.0,
90.0, 70.0, 1937.0, 14.0, 29.0,
232.0, 90.0, 3211.0, 17.0, 19.0,
115.0, 95.0, 2694.0, 15.0, 23.0,
120.0, 88.0, 2957.0, 17.0, 23.0,
121.0, 98.0, 2945.0, 14.5, 22.0,
121.0, 115.0, 2671.0, 13.5, 25.0,
91.0, 53.0, 1795.0, 17.5, 33.0,
107.0, 86.0, 2464.0, 15.5, 28.0,
116.0, 81.0, 2220.0, 16.9, 25.0,
140.0, 92.0, 2572.0, 14.9, 25.0,
98.0, 79.0, 2255.0, 17.7, 26.0,
101.0, 83.0, 2202.0, 15.3, 27.0,
305.0, 140.0, 4215.0, 13.0, 17.5,
318.0, 150.0, 4190.0, 13.0, 16.0,
304.0, 120.0, 3962.0, 13.9, 15.5,
351.0, 152.0, 4215.0, 12.8, 14.5,
225.0, 100.0, 3233.0, 15.4, 22.0,
250.0, 105.0, 3353.0, 14.5, 22.0,
200.0, 81.0, 3012.0, 17.6, 24.0,
232.0, 90.0, 3085.0, 17.6, 22.5,
85.0, 52.0, 2035.0, 22.2, 29.0,
98.0, 60.0, 2164.0, 22.1, 24.5,
90.0, 70.0, 1937.0, 14.2, 29.0,
91.0, 53.0, 1795.0, 17.4, 33.0,
225.0, 100.0, 3651.0, 17.7, 20.0,
250.0, 78.0, 3574.0, 21.0, 18.0,
250.0, 110.0, 3645.0, 16.2, 18.5,
258.0, 95.0, 3193.0, 17.8, 17.5,
97.0, 71.0, 1825.0, 12.2, 29.5,
85.0, 70.0, 1990.0, 17.0, 32.0,
97.0, 75.0, 2155.0, 16.4, 28.0,
140.0, 72.0, 2565.0, 13.6, 26.5,
130.0, 102.0, 3150.0, 15.7, 20.0,
318.0, 150.0, 3940.0, 13.2, 13.0,
120.0, 88.0, 3270.0, 21.9, 19.0,
156.0, 108.0, 2930.0, 15.5, 19.0,
168.0, 120.0, 3820.0, 16.7, 16.5,
350.0, 180.0, 4380.0, 12.1, 16.5,
350.0, 145.0, 4055.0, 12.0, 13.0,
302.0, 130.0, 3870.0, 15.0, 13.0,
318.0, 150.0, 3755.0, 14.0, 13.0,
98.0, 68.0, 2045.0, 18.5, 31.5,
111.0, 80.0, 2155.0, 14.8, 30.0,
79.0, 58.0, 1825.0, 18.6, 36.0,
122.0, 96.0, 2300.0, 15.5, 25.5,
85.0, 70.0, 1945.0, 16.8, 33.5,
305.0, 145.0, 3880.0, 12.5, 17.5,
260.0, 110.0, 4060.0, 19.0, 17.0,
318.0, 145.0, 4140.0, 13.7, 15.5,
302.0, 130.0, 4295.0, 14.9, 15.0,
250.0, 110.0, 3520.0, 16.4, 17.5,
231.0, 105.0, 3425.0, 16.9, 20.5,
225.0, 100.0, 3630.0, 17.7, 19.0,
250.0, 98.0, 3525.0, 19.0, 18.5,
400.0, 180.0, 4220.0, 11.1, 16.0,
350.0, 170.0, 4165.0, 11.4, 15.5,
400.0, 190.0, 4325.0, 12.2, 15.5,
351.0, 149.0, 4335.0, 14.5, 16.0,
97.0, 78.0, 1940.0, 14.5, 29.0,
151.0, 88.0, 2740.0, 16.0, 24.5,
97.0, 75.0, 2265.0, 18.2, 26.0,
140.0, 89.0, 2755.0, 15.8, 25.5,
98.0, 63.0, 2051.0, 17.0, 30.5,
98.0, 83.0, 2075.0, 15.9, 33.5,
97.0, 67.0, 1985.0, 16.4, 30.0,
97.0, 78.0, 2190.0, 14.1, 30.5,
146.0, 97.0, 2815.0, 14.5, 22.0,
121.0, 110.0, 2600.0, 12.8, 21.5,
80.0, 110.0, 2720.0, 13.5, 21.5,
90.0, 48.0, 1985.0, 21.5, 43.1,
98.0, 66.0, 1800.0, 14.4, 36.1,
78.0, 52.0, 1985.0, 19.4, 32.8,
85.0, 70.0, 2070.0, 18.6, 39.4,
91.0, 60.0, 1800.0, 16.4, 36.1,
260.0, 110.0, 3365.0, 15.5, 19.9,
318.0, 140.0, 3735.0, 13.2, 19.4,
302.0, 139.0, 3570.0, 12.8, 20.2,
231.0, 105.0, 3535.0, 19.2, 19.2,
200.0, 95.0, 3155.0, 18.2, 20.5,
200.0, 85.0, 2965.0, 15.8, 20.2,
140.0, 88.0, 2720.0, 15.4, 25.1,
225.0, 100.0, 3430.0, 17.2, 20.5,
232.0, 90.0, 3210.0, 17.2, 19.4,
231.0, 105.0, 3380.0, 15.8, 20.6,
200.0, 85.0, 3070.0, 16.7, 20.8,
225.0, 110.0, 3620.0, 18.7, 18.6,
258.0, 120.0, 3410.0, 15.1, 18.1,
305.0, 145.0, 3425.0, 13.2, 19.2,
231.0, 165.0, 3445.0, 13.4, 17.7,
302.0, 139.0, 3205.0, 11.2, 18.1,
318.0, 140.0, 4080.0, 13.7, 17.5,
98.0, 68.0, 2155.0, 16.5, 30.0,
134.0, 95.0, 2560.0, 14.2, 27.5,
119.0, 97.0, 2300.0, 14.7, 27.2,
105.0, 75.0, 2230.0, 14.5, 30.9,
134.0, 95.0, 2515.0, 14.8, 21.1,
156.0, 105.0, 2745.0, 16.7, 23.2,
151.0, 85.0, 2855.0, 17.6, 23.8,
119.0, 97.0, 2405.0, 14.9, 23.9,
131.0, 103.0, 2830.0, 15.9, 20.3,
163.0, 125.0, 3140.0, 13.6, 17.0,
121.0, 115.0, 2795.0, 15.7, 21.6,
163.0, 133.0, 3410.0, 15.8, 16.2,
89.0, 71.0, 1990.0, 14.9, 31.5,
98.0, 68.0, 2135.0, 16.6, 29.5,
231.0, 115.0, 3245.0, 15.4, 21.5,
200.0, 85.0, 2990.0, 18.2, 19.8,
140.0, 88.0, 2890.0, 17.3, 22.3,
232.0, 90.0, 3265.0, 18.2, 20.2,
225.0, 110.0, 3360.0, 16.6, 20.6,
305.0, 130.0, 3840.0, 15.4, 17.0,
302.0, 129.0, 3725.0, 13.4, 17.6,
351.0, 138.0, 3955.0, 13.2, 16.5,
318.0, 135.0, 3830.0, 15.2, 18.2,
350.0, 155.0, 4360.0, 14.9, 16.9,
351.0, 142.0, 4054.0, 14.3, 15.5,
267.0, 125.0, 3605.0, 15.0, 19.2,
360.0, 150.0, 3940.0, 13.0, 18.5,
89.0, 71.0, 1925.0, 14.0, 31.9,
86.0, 65.0, 1975.0, 15.2, 34.1,
98.0, 80.0, 1915.0, 14.4, 35.7,
121.0, 80.0, 2670.0, 15.0, 27.4,
183.0, 77.0, 3530.0, 20.1, 25.4,
350.0, 125.0, 3900.0, 17.4, 23.0,
141.0, 71.0, 3190.0, 24.8, 27.2,
260.0, 90.0, 3420.0, 22.2, 23.9,
105.0, 70.0, 2200.0, 13.2, 34.2,
105.0, 70.0, 2150.0, 14.9, 34.5,
85.0, 65.0, 2020.0, 19.2, 31.8,
91.0, 69.0, 2130.0, 14.7, 37.3,
151.0, 90.0, 2670.0, 16.0, 28.4,
173.0, 115.0, 2595.0, 11.3, 28.8,
173.0, 115.0, 2700.0, 12.9, 26.8,
151.0, 90.0, 2556.0, 13.2, 33.5,
98.0, 76.0, 2144.0, 14.7, 41.5,
89.0, 60.0, 1968.0, 18.8, 38.1,
98.0, 70.0, 2120.0, 15.5, 32.1,
86.0, 65.0, 2019.0, 16.4, 37.2,
151.0, 90.0, 2678.0, 16.5, 28.0,
140.0, 88.0, 2870.0, 18.1, 26.4,
151.0, 90.0, 3003.0, 20.1, 24.3,
225.0, 90.0, 3381.0, 18.7, 19.1,
97.0, 78.0, 2188.0, 15.8, 34.3,
134.0, 90.0, 2711.0, 15.5, 29.8,
120.0, 75.0, 2542.0, 17.5, 31.3,
119.0, 92.0, 2434.0, 15.0, 37.0,
108.0, 75.0, 2265.0, 15.2, 32.2,
86.0, 65.0, 2110.0, 17.9, 46.6,
156.0, 105.0, 2800.0, 14.4, 27.9,
85.0, 65.0, 2110.0, 19.2, 40.8,
90.0, 48.0, 2085.0, 21.7, 44.3,
90.0, 48.0, 2335.0, 23.7, 43.4,
121.0, 67.0, 2950.0, 19.9, 36.4,
146.0, 67.0, 3250.0, 21.8, 30.0,
91.0, 67.0, 1850.0, 13.8, 44.6,
97.0, 67.0, 2145.0, 18.0, 33.8,
89.0, 62.0, 1845.0, 15.3, 29.8,
168.0, 132.0, 2910.0, 11.4, 32.7,
70.0, 100.0, 2420.0, 12.5, 23.7,
122.0, 88.0, 2500.0, 15.1, 35.0,
107.0, 72.0, 2290.0, 17.0, 32.4,
135.0, 84.0, 2490.0, 15.7, 27.2,
151.0, 84.0, 2635.0, 16.4, 26.6,
156.0, 92.0, 2620.0, 14.4, 25.8,
173.0, 110.0, 2725.0, 12.6, 23.5,
135.0, 84.0, 2385.0, 12.9, 30.0,
79.0, 58.0, 1755.0, 16.9, 39.1,
86.0, 64.0, 1875.0, 16.4, 39.0,
81.0, 60.0, 1760.0, 16.1, 35.1,
97.0, 67.0, 2065.0, 17.8, 32.3,
85.0, 65.0, 1975.0, 19.4, 37.0,
89.0, 62.0, 2050.0, 17.3, 37.7,
91.0, 68.0, 1985.0, 16.0, 34.1,
105.0, 63.0, 2215.0, 14.9, 34.7,
98.0, 65.0, 2045.0, 16.2, 34.4,
98.0, 65.0, 2380.0, 20.7, 29.9,
105.0, 74.0, 2190.0, 14.2, 33.0,
107.0, 75.0, 2210.0, 14.4, 33.7,
108.0, 75.0, 2350.0, 16.8, 32.4,
119.0, 100.0, 2615.0, 14.8, 32.9,
120.0, 74.0, 2635.0, 18.3, 31.6,
141.0, 80.0, 3230.0, 20.4, 28.1,
145.0, 76.0, 3160.0, 19.6, 30.7,
168.0, 116.0, 2900.0, 12.6, 25.4,
146.0, 120.0, 2930.0, 13.8, 24.2,
231.0, 110.0, 3415.0, 15.8, 22.4,
350.0, 105.0, 3725.0, 19.0, 26.6,
200.0, 88.0, 3060.0, 17.1, 20.2,
225.0, 85.0, 3465.0, 16.6, 17.6,
112.0, 88.0, 2605.0, 19.6, 28.0,
112.0, 88.0, 2640.0, 18.6, 27.0,
112.0, 88.0, 2395.0, 18.0, 34.0,
112.0, 85.0, 2575.0, 16.2, 31.0,
135.0, 84.0, 2525.0, 16.0, 29.0,
151.0, 90.0, 2735.0, 18.0, 27.0,
140.0, 92.0, 2865.0, 16.4, 24.0,
105.0, 74.0, 1980.0, 15.3, 36.0,
91.0, 68.0, 2025.0, 18.2, 37.0,
91.0, 68.0, 1970.0, 17.6, 31.0,
105.0, 63.0, 2125.0, 14.7, 38.0,
98.0, 70.0, 2125.0, 17.3, 36.0,
120.0, 88.0, 2160.0, 14.5, 36.0,
107.0, 75.0, 2205.0, 14.5, 36.0,
108.0, 70.0, 2245.0, 16.9, 34.0,
91.0, 67.0, 1965.0, 15.0, 38.0,
91.0, 67.0, 1965.0, 15.7, 32.0,
91.0, 67.0, 1995.0, 16.2, 38.0,
181.0, 110.0, 2945.0, 16.4, 25.0,
262.0, 85.0, 3015.0, 17.0, 38.0,
156.0, 92.0, 2585.0, 14.5, 26.0,
232.0, 112.0, 2835.0, 14.7, 22.0,
144.0, 96.0, 2665.0, 13.9, 32.0,
135.0, 84.0, 2370.0, 13.0, 36.0,
151.0, 90.0, 2950.0, 17.3, 27.0,
140.0, 86.0, 2790.0, 15.6, 27.0,
97.0, 52.0, 2130.0, 24.6, 44.0,
135.0, 84.0, 2295.0, 11.6, 32.0,
120.0, 79.0, 2625.0, 18.6, 28.0,
119.0, 82.0, 2720.0, 19.4, 31.0,
})

164
cca_example_test.go Normal file
View File

@@ -0,0 +1,164 @@
// Copyright ©2016 The gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package stat_test
import (
"fmt"
"log"
"github.com/gonum/floats"
"github.com/gonum/matrix/mat64"
"github.com/gonum/stat"
)
// symView is a helper for getting a View of a SymDense.
type symView struct {
sym *mat64.SymDense
i, j, r, c int
}
func (s symView) Dims() (r, c int) { return s.r, s.c }
func (s symView) At(i, j int) float64 {
if i < 0 || s.r <= i {
panic("i out of bounds")
}
if j < 0 || s.c <= j {
panic("j out of bounds")
}
return s.sym.At(s.i+i, s.j+j)
}
func (s symView) T() mat64.Matrix { return mat64.Transpose{s} }
func ExampleCanonicalCorrelations() {
// This example is directly analogous to Example 3.5 on page 87 of
// Koch, Inge. Analysis of multivariate and high-dimensional data.
// Vol. 32. Cambridge University Press, 2013. ISBN: 9780521887939
// bostonData is the Boston Housing Data of Harrison and Rubinfeld (1978)
n, _ := bostonData.Dims()
var xd, yd = 7, 4
// The variables (columns) of bostonData can be partitioned into two sets:
// those that deal with environmental/social variables (xdata), and those
// that contain information regarding the individual (ydata). Because the
// variables can be naturally partitioned in this way, these data are
// appropriate for canonical correlation analysis. The columns (variables)
// of xdata are, in order:
// per capita crime rate by town,
// proportion of non-retail business acres per town,
// nitric oxide concentration (parts per 10 million),
// weighted distances to Boston employment centres,
// index of accessibility to radial highways,
// pupil-teacher ratio by town, and
// proportion of blacks by town.
xdata := bostonData.Slice(0, n, 0, xd)
// The columns (variables) of ydata are, in order:
// average number of rooms per dwelling,
// proportion of owner-occupied units built prior to 1940,
// full-value property-tax rate per $10000, and
// median value of owner-occupied homes in $1000s.
ydata := bostonData.Slice(0, n, xd, xd+yd)
// For comparison, calculate the correlation matrix for the original data.
var cor mat64.SymDense
stat.CorrelationMatrix(&cor, bostonData, nil)
// Extract just those correlations that are between xdata and ydata.
var corRaw = symView{sym: &cor, i: 0, j: xd, r: xd, c: yd}
// Note that the strongest correlation between individual variables is 0.91
// between the 5th variable of xdata (index of accessibility to radial
// highways) and the 3rd variable of ydata (full-value property-tax rate per
// $10000).
fmt.Printf("corRaw = %.4f", mat64.Formatted(corRaw, mat64.Prefix(" ")))
// Calculate the canonical correlations.
cc, err := stat.CanonicalCorrelations(xdata, ydata, nil)
if err != nil {
log.Fatal(err)
}
// Unpack cc.
ccors := cc.Corrs(nil)
pVecs := cc.Left(true)
qVecs := cc.Right(true)
phiVs := cc.Left(false)
psiVs := cc.Right(false)
// Canonical Correlation Matrix, or the correlations between the sphered
// data.
var corSph mat64.Dense
corSph.Clone(pVecs)
col := make([]float64, xd)
for j := 0; j < yd; j++ {
mat64.Col(col, j, &corSph)
floats.Scale(ccors[j], col)
corSph.SetCol(j, col)
}
corSph.Product(&corSph, qVecs.T())
fmt.Printf("\n\ncorSph = %.4f", mat64.Formatted(&corSph, mat64.Prefix(" ")))
// Canonical Correlations. Note that the first canonical correlation is
// 0.95, stronger than the greatest correlation in the original data, and
// much stronger than the greatest correlation in the sphered data.
fmt.Printf("\n\nccors = %.4f", ccors)
// Left and right eigenvectors of the canonical correlation matrix.
fmt.Printf("\n\npVecs = %.4f", mat64.Formatted(pVecs, mat64.Prefix(" ")))
fmt.Printf("\n\nqVecs = %.4f", mat64.Formatted(qVecs, mat64.Prefix(" ")))
// Canonical Correlation Transforms. These can be useful as they represent
// the canonical variables as linear combinations of the original variables.
fmt.Printf("\n\nphiVs = %.4f", mat64.Formatted(phiVs, mat64.Prefix(" ")))
fmt.Printf("\n\npsiVs = %.4f", mat64.Formatted(psiVs, mat64.Prefix(" ")))
// Output:
// corRaw = ⎡-0.2192 0.3527 0.5828 -0.3883⎤
// ⎢-0.3917 0.6448 0.7208 -0.4837⎥
// ⎢-0.3022 0.7315 0.6680 -0.4273⎥
// ⎢ 0.2052 -0.7479 -0.5344 0.2499⎥
// ⎢-0.2098 0.4560 0.9102 -0.3816⎥
// ⎢-0.3555 0.2615 0.4609 -0.5078⎥
// ⎣ 0.1281 -0.2735 -0.4418 0.3335⎦
//
// corSph = ⎡ 0.0118 0.0525 0.2300 -0.1363⎤
// ⎢-0.1810 0.3213 0.3814 -0.1412⎥
// ⎢ 0.0166 0.2241 0.0104 -0.2235⎥
// ⎢ 0.0346 -0.5481 -0.0034 -0.1994⎥
// ⎢ 0.0303 -0.0956 0.7152 0.2039⎥
// ⎢-0.0298 -0.0022 0.0739 -0.3703⎥
// ⎣-0.1226 -0.0746 -0.3899 0.1541⎦
//
// ccors = [0.9451 0.6787 0.5714 0.2010]
//
// pVecs = ⎡-0.2574 0.0158 0.2122 -0.0946⎤
// ⎢-0.4837 0.3837 0.1474 0.6597⎥
// ⎢-0.0801 0.3494 0.3287 -0.2862⎥
// ⎢ 0.1278 -0.7337 0.4851 0.2248⎥
// ⎢-0.6969 -0.4342 -0.3603 0.0291⎥
// ⎢-0.0991 0.0503 0.6384 0.1022⎥
// ⎣ 0.4260 0.0323 -0.2290 0.6419⎦
//
// qVecs = ⎡ 0.0182 -0.1583 -0.0067 -0.9872⎤
// ⎢-0.2348 0.9483 -0.1462 -0.1554⎥
// ⎢-0.9701 -0.2406 -0.0252 0.0209⎥
// ⎣ 0.0593 -0.1330 -0.9889 0.0291⎦
//
// phiVs = ⎡-0.0027 0.0093 0.0490 -0.0155⎤
// ⎢-0.0429 -0.0242 0.0361 0.1839⎥
// ⎢-1.2248 5.6031 5.8094 -4.7927⎥
// ⎢-0.0044 -0.3424 0.4470 0.1150⎥
// ⎢-0.0742 -0.1193 -0.1116 0.0022⎥
// ⎢-0.0233 0.1046 0.3853 -0.0161⎥
// ⎣ 0.0001 0.0005 -0.0030 0.0082⎦
//
// psiVs = ⎡ 0.0302 -0.3002 0.0878 -1.9583⎤
// ⎢-0.0065 0.0392 -0.0118 -0.0061⎥
// ⎢-0.0052 -0.0046 -0.0023 0.0008⎥
// ⎣ 0.0020 0.0037 -0.1293 0.1038⎦
}

183
cca_test.go Normal file
View File

@@ -0,0 +1,183 @@
// Copyright ©2016 The gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package stat_test
import (
"testing"
"github.com/gonum/floats"
"github.com/gonum/matrix/mat64"
"github.com/gonum/stat"
)
func TestCanonicalCorrelations(t *testing.T) {
for i, test := range []struct {
xdata mat64.Matrix
ydata mat64.Matrix
weights []float64
wantCorrs []float64
wantpVecs *mat64.Dense
wantqVecs *mat64.Dense
wantphiVs *mat64.Dense
wantpsiVs *mat64.Dense
epsilon float64
}{
// Test results verified using R.
{ // Truncated iris data, Sepal vs Petal measurements.
xdata: mat64.NewDense(10, 2, []float64{
5.1, 3.5,
4.9, 3.0,
4.7, 3.2,
4.6, 3.1,
5.0, 3.6,
5.4, 3.9,
4.6, 3.4,
5.0, 3.4,
4.4, 2.9,
4.9, 3.1,
}),
ydata: mat64.NewDense(10, 2, []float64{
1.4, 0.2,
1.4, 0.2,
1.3, 0.2,
1.5, 0.2,
1.4, 0.2,
1.7, 0.4,
1.4, 0.3,
1.5, 0.2,
1.4, 0.2,
1.5, 0.1,
}),
wantCorrs: []float64{0.7250624174504773, 0.5547679185730191},
wantpVecs: mat64.NewDense(2, 2, []float64{
0.0765914610875867, 0.9970625597666721,
0.9970625597666721, -0.0765914610875868,
}),
wantqVecs: mat64.NewDense(2, 2, []float64{
0.3075184850910837, 0.9515421069649439,
0.9515421069649439, -0.3075184850910837,
}),
wantphiVs: mat64.NewDense(2, 2, []float64{
-1.9794877596804641, 5.2016325219025124,
4.5211829944066553, -2.7263663170835697,
}),
wantpsiVs: mat64.NewDense(2, 2, []float64{
-0.0613084818030103, 10.8514169865438941,
12.7209032660734298, -7.6793888180353775,
}),
epsilon: 1e-12,
},
// Test results compared to those results presented in examples by
// Koch, Inge. Analysis of multivariate and high-dimensional data.
// Vol. 32. Cambridge University Press, 2013. ISBN: 9780521887939
{ // ASA Car Exposition Data of Ramos and Donoho (1983)
// Displacement, Horsepower, Weight
xdata: carData.Slice(0, 392, 0, 3),
// Acceleration, MPG
ydata: carData.Slice(0, 392, 3, 5),
wantCorrs: []float64{0.8782187384352336, 0.6328187219216761},
wantpVecs: mat64.NewDense(3, 2, []float64{
0.3218296374829181, 0.3947540257657075,
0.4162807660635797, 0.7573719053303306,
0.8503740401982725, -0.5201509936144236,
}),
wantqVecs: mat64.NewDense(2, 2, []float64{
-0.5161984172278830, -0.8564690269072364,
-0.8564690269072364, 0.5161984172278830,
}),
wantphiVs: mat64.NewDense(3, 2, []float64{
0.0025033152994308, 0.0047795464118615,
0.0201923608080173, 0.0409150208725958,
-0.0000247374128745, -0.0026766435161875,
}),
wantpsiVs: mat64.NewDense(2, 2, []float64{
-0.1666196759760772, -0.3637393866139658,
-0.0915512109649727, 0.1077863777929168,
}),
epsilon: 1e-12,
},
// Test results compared to those results presented in examples by
// Koch, Inge. Analysis of multivariate and high-dimensional data.
// Vol. 32. Cambridge University Press, 2013. ISBN: 9780521887939
{ // Boston Housing Data of Harrison and Rubinfeld (1978)
// Per capita crime rate by town,
// Proportion of non-retail business acres per town,
// Nitric oxide concentration (parts per 10 million),
// Weighted distances to Boston employment centres,
// Index of accessibility to radial highways,
// Pupil-teacher ratio by town, Proportion of blacks by town
xdata: bostonData.Slice(0, 506, 0, 7),
// Average number of rooms per dwelling,
// Proportion of owner-occupied units built prior to 1940,
// Full-value property-tax rate per $10000,
// Median value of owner-occupied homes in $1000s
ydata: bostonData.Slice(0, 506, 7, 11),
wantCorrs: []float64{0.9451239443886021, 0.6786622733370654, 0.5714338361583764, 0.2009739704710440},
wantpVecs: mat64.NewDense(7, 4, []float64{
-0.2574391924541903, 0.0158477516621194, 0.2122169934631024, -0.0945733803894706,
-0.4836594430018478, 0.3837101908138468, 0.1474448317415911, 0.6597324886718275,
-0.0800776365873296, 0.3493556742809252, 0.3287336458109373, -0.2862040444334655,
0.1277586360386374, -0.7337427663667596, 0.4851134819037011, 0.2247964865970192,
-0.6969432006136684, -0.4341748776002893, -0.3602872887636357, 0.0290661608626292,
-0.0990903250057199, 0.0503411215453873, 0.6384330631742202, 0.1022367136218303,
0.4260459963765036, 0.0323334351308141, -0.2289527516030810, 0.6419232947608805,
}),
wantqVecs: mat64.NewDense(4, 4, []float64{
0.0181660502363264, -0.1583489460479038, -0.0066723577642883, -0.9871935400650649,
-0.2347699045986119, 0.9483314614936594, -0.1462420505631345, -0.1554470767919033,
-0.9700704038477141, -0.2406071741000039, -0.0251838984227037, 0.0209134074358349,
0.0593000682318482, -0.1330460003097728, -0.9889057151969489, 0.0291161494720761,
}),
wantphiVs: mat64.NewDense(7, 4, []float64{
-0.0027462234108197, 0.0093444513500898, 0.0489643932714296, -0.0154967189805819,
-0.0428564455279537, -0.0241708702119420, 0.0360723472093996, 0.1838983230588095,
-1.2248435648802380, 5.6030921364723980, 5.8094144583797025, -4.7926812190419676,
-0.0043684825094649, -0.3424101164977618, 0.4469961215717917, 0.1150161814353696,
-0.0741534069521954, -0.1193135794923700, -0.1115518305471460, 0.0021638758323088,
-0.0233270323101624, 0.1046330818178399, 0.3853045975077387, -0.0160927870102877,
0.0001293051387859, 0.0004540746921446, -0.0030296315865440, 0.0081895477974654,
}),
wantpsiVs: mat64.NewDense(4, 4, []float64{
0.0301593362017375, -0.3002219289647127, 0.0878217377593682, -1.9583226531517062,
-0.0065483104073892, 0.0392212086716247, -0.0117570776209991, -0.0061113064481860,
-0.0052075523350125, -0.0045770200452960, -0.0022762313289592, 0.0008441873006821,
0.0020111735096327, 0.0037352799829930, -0.1292578071621794, 0.1037709056329765,
}),
epsilon: 1e-12,
},
} {
cc, err := stat.CanonicalCorrelations(test.xdata, test.ydata, test.weights)
if err != nil {
t.Errorf("%d: unexpected error: %v", i, err)
continue
}
corrs := cc.Corrs(nil)
pVecs := cc.Left(true)
qVecs := cc.Right(true)
phiVs := cc.Left(false)
psiVs := cc.Right(false)
if !floats.EqualApprox(corrs, test.wantCorrs, test.epsilon) {
t.Errorf("%d: unexpected variance result got:%v, want:%v", i, corrs, test.wantCorrs)
}
if !mat64.EqualApprox(pVecs, test.wantpVecs, test.epsilon) {
t.Errorf("%d: unexpected CCA result got:\n%v\nwant:\n%v",
i, mat64.Formatted(pVecs), mat64.Formatted(test.wantpVecs))
}
if !mat64.EqualApprox(qVecs, test.wantqVecs, test.epsilon) {
t.Errorf("%d: unexpected CCA result got:\n%v\nwant:\n%v",
i, mat64.Formatted(qVecs), mat64.Formatted(test.wantqVecs))
}
if !mat64.EqualApprox(phiVs, test.wantphiVs, test.epsilon) {
t.Errorf("%d: unexpected CCA result got:\n%v\nwant:\n%v",
i, mat64.Formatted(phiVs), mat64.Formatted(test.wantphiVs))
}
if !mat64.EqualApprox(psiVs, test.wantpsiVs, test.epsilon) {
t.Errorf("%d: unexpected CCA result got:\n%v\nwant:\n%v",
i, mat64.Formatted(psiVs), mat64.Formatted(test.wantpsiVs))
}
}
}

77
pca.go
View File

@@ -1,77 +0,0 @@
// Copyright ©2016 The gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package stat
import (
"math"
"github.com/gonum/floats"
"github.com/gonum/matrix"
"github.com/gonum/matrix/mat64"
)
// PrincipalComponents returns the principal component direction vectors and
// the column variances of the principal component scores, vecs * a, computed
// using the singular value decomposition of the input. The input a is an n×d
// matrix where each row is an observation and each column represents a variable.
//
// PrincipalComponents centers the variables but does not scale the variance.
//
// The slice weights is used to weight the observations. If weights is nil,
// each weight is considered to have a value of one, otherwise the length of
// weights must match the number of observations or PrincipalComponents will
// panic.
//
// On successful completion, the principal component direction vectors are
// returned in vecs as a d×min(n, d) matrix, and the variances are returned in
// vars as a min(n, d)-long slice in descending sort order.
//
// If no singular value decomposition is possible, vecs and vars are returned
// nil and ok is returned false.
func PrincipalComponents(a mat64.Matrix, weights []float64) (vecs *mat64.Dense, vars []float64, ok bool) {
n, d := a.Dims()
if weights != nil && len(weights) != n {
panic("stat: len(weights) != observations")
}
centered := mat64.NewDense(n, d, nil)
col := make([]float64, n)
for j := 0; j < d; j++ {
mat64.Col(col, j, a)
floats.AddConst(-Mean(col, weights), col)
centered.SetCol(j, col)
}
for i, w := range weights {
floats.Scale(math.Sqrt(w), centered.RawRowView(i))
}
kind := matrix.SVDFull
if n > d {
kind = matrix.SVDThin
}
var svd mat64.SVD
ok = svd.Factorize(centered, kind)
if !ok {
return nil, nil, false
}
vecs = &mat64.Dense{}
vecs.VFromSVD(&svd)
if n < d {
// Don't retain columns that are not valid direction vectors.
vecs.Clone(vecs.View(0, 0, d, n))
}
vars = svd.Values(nil)
var f float64
if weights == nil {
f = 1 / float64(n-1)
} else {
f = 1 / (floats.Sum(weights) - 1)
}
for i, v := range vars {
vars[i] = f * v * v
}
return vecs, vars, true
}

259
pca_cca.go Normal file
View File

@@ -0,0 +1,259 @@
// Copyright ©2016 The gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package stat
import (
"errors"
"math"
"github.com/gonum/floats"
"github.com/gonum/matrix"
"github.com/gonum/matrix/mat64"
)
// PrincipalComponents returns the principal component vectors and the variances
// of the principal component scores of the input data which is represented as
// an n×d matrix a where each row is an observation and each column is a
// variable.
//
// PrincipalComponents centers the variables but does not scale the variance.
//
// The slice weights is used to weight the observations. If weights is nil, each
// weight is considered to have a value of one, otherwise the length of weights
// must match the number of observations or PrincipalComponents will panic.
//
// On successful completion, the principal component vectors are returned in the
// columns of vecs as a d×min(n,d) matrix, and the column variances of the
// principal component scores, b * vecs where b is a with centered columns, are
// returned in vars as a min(n,d)-long slice in descending sort order.
//
// On failure, vecs and vars are returned nil and ok is returned false.
func PrincipalComponents(a mat64.Matrix, weights []float64) (vecs *mat64.Dense, vars []float64, ok bool) {
n, d := a.Dims()
if weights != nil && len(weights) != n {
panic("stat: len(weights) != observations")
}
svd, ok := svdFactorizeCentered(a, weights)
if !ok {
return nil, nil, false
}
vecs = &mat64.Dense{}
vecs.VFromSVD(svd)
if n < d {
// Don't retain columns that are not valid direction vectors.
vecs.Clone(vecs.Slice(0, d, 0, n))
}
vars = svd.Values(nil)
var f float64
if weights == nil {
f = 1 / float64(n-1)
} else {
f = 1 / (floats.Sum(weights) - 1)
}
for i, v := range vars {
vars[i] = f * v * v
}
return vecs, vars, true
}
// CC is the result of a canonical correlation analysis. A CC should not be used
// unless it has been returned by a successful call to CanonicalCorrelations.
type CC struct {
// n is the number of observations used to
// construct the canonical correlations.
n int
x, y, c *mat64.SVD
}
// Corrs returns the canonical correlations in dest.
func (c CC) Corrs(dest []float64) []float64 {
if c.c == nil {
panic("stat: canonical correlations missing or invalid")
}
return c.c.Values(dest)
}
// Left returns the left eigenvectors of the canonical correlation matrix if
// spheredSpace is true. If spheredSpace is false it returns these eigenvectors
// back-transformed to the original data space.
func (c CC) Left(spheredSpace bool) (vecs *mat64.Dense) {
if c.c == nil || c.x == nil || c.n < 2 {
panic("stat: canonical correlations missing or invalid")
}
var pv mat64.Dense
pv.UFromSVD(c.c)
if spheredSpace {
return &pv
}
var xv mat64.Dense
xs := c.x.Values(nil)
xv.VFromSVD(c.x)
scaleColsReciSqrt(&xv, xs)
pv.Product(&xv, xv.T(), &pv)
pv.Scale(math.Sqrt(float64(c.n-1)), &pv)
return &pv
}
// Right returns the right eigenvectors of the canonical correlation matrix if
// spheredSpace is true. If spheredSpace is false it returns these eigenvectors
// back-transformed to the original data space.
func (c CC) Right(spheredSpace bool) (vecs *mat64.Dense) {
if c.c == nil || c.y == nil || c.n < 2 {
panic("stat: canonical correlations missing or invalid")
}
var qv mat64.Dense
qv.VFromSVD(c.c)
if spheredSpace {
return &qv
}
var yv mat64.Dense
ys := c.y.Values(nil)
yv.VFromSVD(c.y)
scaleColsReciSqrt(&yv, ys)
qv.Product(&yv, yv.T(), &qv)
qv.Scale(math.Sqrt(float64(c.n-1)), &qv)
return &qv
}
// CanonicalCorrelations returns a CC which can provide the results of canonical
// correlation analysis of the input data x and y, columns of which should be
// interpretable as two sets of measurements on the same observations (rows).
// These observations are optionally weighted by weights.
//
// Canonical correlation analysis finds associations between two sets of
// variables on the same observations by finding linear combinations of the two
// sphered datasets that maximise the correlation between them.
//
// Some notation: let Xc and Yc denote the centered input data matrices x
// and y (column means subtracted from each column), let Sx and Sy denote the
// sample covariance matrices within x and y respectively, and let Sxy denote
// the covariance matrix between x and y. The sphered data can then be expressed
// as Xc * Sx^{-1/2} and Yc * Sy^{-1/2} respectively, and the correlation matrix
// between the sphered data is called the canonical correlation matrix,
// Sx^{-1/2} * Sxy * Sy^{-1/2}. In cases where S^{-1/2} is ambiguous for some
// covariance matrix S, S^{-1/2} is taken to be E * D^{-1/2} * E^T where S can
// be eigendecomposed as S = E * D * E^T.
//
// The canonical correlations are the correlations between the corresponding
// pairs of canonical variables and can be obtained with c.Corrs(). Canonical
// variables can be obtained by projecting the sphered data into the left and
// right eigenvectors of the canonical correlation matrix, and these
// eigenvectors can be obtained with c.Left(true) and c.Right(true)
// respectively. The canonical variables can also be obtained directly from the
// centered raw data by using the back-transformed eigenvectors which can be
// obtained with c.Left(false) and c.Right(false) respectively.
//
// The first pair of left and right eigenvectors of the canonical correlation
// matrix can be interpreted as directions into which the respective sphered
// data can be projected such that the correlation between the two projections
// is maximised. The second pair and onwards solve the same optimization but
// under the constraint that they are uncorrelated (orthogonal in sphered space)
// to previous projections.
//
// CanonicalCorrelations will panic if the inputs x and y do not have the same
// number of rows.
//
// The slice weights is used to weight the observations. If weights is nil, each
// weight is considered to have a value of one, otherwise the length of weights
// must match the number of observations (rows of both x and y) or CanonicalCorrelations will panic.
//
// More details can be found at
// https://en.wikipedia.org/wiki/Canonical_correlation
// or in Chapter 3 of
// Koch, Inge. Analysis of multivariate and high-dimensional data.
// Vol. 32. Cambridge University Press, 2013. ISBN: 9780521887939
func CanonicalCorrelations(x, y mat64.Matrix, weights []float64) (c CC, err error) {
n, _ := x.Dims()
yn, _ := y.Dims()
if n != yn {
panic("stat: unequal number of observations")
}
if weights != nil && len(weights) != n {
panic("stat: len(weights) != observations")
}
// Center and factorize x and y.
xsvd, ok := svdFactorizeCentered(x, weights)
if !ok {
return CC{}, errors.New("stat: failed to factorize x")
}
ysvd, ok := svdFactorizeCentered(y, weights)
if !ok {
return CC{}, errors.New("stat: failed to factorize y")
}
var xu, xv, yu, yv mat64.Dense
xu.UFromSVD(xsvd)
xv.VFromSVD(xsvd)
yu.UFromSVD(ysvd)
yv.VFromSVD(ysvd)
// Calculate and factorise the canonical correlation matrix.
var ccor mat64.Dense
ccor.Product(&xv, xu.T(), &yu, yv.T())
var csvd mat64.SVD
ok = csvd.Factorize(&ccor, svdKind(ccor.Dims()))
if !ok {
return CC{}, errors.New("stat: failed to factorize ccor")
}
return CC{n: n, x: xsvd, y: ysvd, c: &csvd}, nil
}
func svdKind(n, d int) matrix.SVDKind {
if n > d {
return matrix.SVDThin
}
return matrix.SVDFull
}
func svdFactorizeCentered(m mat64.Matrix, weights []float64) (svd *mat64.SVD, ok bool) {
n, d := m.Dims()
centered := mat64.NewDense(n, d, nil)
col := make([]float64, n)
for j := 0; j < d; j++ {
mat64.Col(col, j, m)
floats.AddConst(-Mean(col, weights), col)
centered.SetCol(j, col)
}
for i, w := range weights {
floats.Scale(math.Sqrt(w), centered.RawRowView(i))
}
svd = &mat64.SVD{}
ok = svd.Factorize(centered, svdKind(n, d))
if !ok {
svd = nil
}
return svd, ok
}
// scaleColsReciSqrt scales the columns of cols
// by the reciprocal square-root of vals.
func scaleColsReciSqrt(cols *mat64.Dense, vals []float64) {
if cols == nil {
panic("stat: input nil")
}
n, d := cols.Dims()
if len(vals) != d {
panic("stat: input length mismatch")
}
col := make([]float64, n)
for j := 0; j < d; j++ {
mat64.Col(col, j, cols)
floats.Scale(math.Sqrt(1/vals[j]), col)
cols.SetCol(j, col)
}
}