1 | #region License Information
|
---|
2 | /* HeuristicLab
|
---|
3 | * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
4 | *
|
---|
5 | * This file is part of HeuristicLab.
|
---|
6 | *
|
---|
7 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
8 | * it under the terms of the GNU General Public License as published by
|
---|
9 | * the Free Software Foundation, either version 3 of the License, or
|
---|
10 | * (at your option) any later version.
|
---|
11 | *
|
---|
12 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | * GNU General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU General Public License
|
---|
18 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
19 | */
|
---|
20 | #endregion
|
---|
21 |
|
---|
22 | using System.Linq;
|
---|
23 | using HeuristicLab.Algorithms.DataAnalysis;
|
---|
24 | using Microsoft.VisualStudio.TestTools.UnitTesting;
|
---|
25 |
|
---|
26 | namespace HeuristicLab.Algorithms.DataAnalysis_34.Tests {
|
---|
27 | [TestClass]
|
---|
28 |
|
---|
29 | // reference values calculated with Rasmussen's GPML MATLAB package
|
---|
30 | public class GaussianProcessFunctionsTest {
|
---|
31 | [TestMethod]
|
---|
32 | public void MeanConstTest() {
|
---|
33 | TestMeanFunction(new MeanConst(), 0,
|
---|
34 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
35 | new double[][] { new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }
|
---|
36 | );
|
---|
37 | TestMeanFunction(new MeanConst(), 1,
|
---|
38 | new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
|
---|
39 | new double[][] { new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }
|
---|
40 | );
|
---|
41 | }
|
---|
42 |
|
---|
43 | [TestMethod]
|
---|
44 | public void MeanZeroTest() {
|
---|
45 | TestMeanFunction(new MeanZero(), 0,
|
---|
46 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
47 | new double[][] { new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
|
---|
48 | );
|
---|
49 | TestMeanFunction(new MeanZero(), 1,
|
---|
50 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
51 | new double[][] { new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
|
---|
52 | );
|
---|
53 | }
|
---|
54 |
|
---|
55 | [TestMethod]
|
---|
56 | public void MeanSumTest() {
|
---|
57 | var sum = new MeanSum();
|
---|
58 | sum.Terms.Add(new MeanConst());
|
---|
59 | sum.Terms.Add(new MeanConst());
|
---|
60 | TestMeanFunction(sum, 0,
|
---|
61 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
62 | new double[][]
|
---|
63 | {
|
---|
64 | new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
|
---|
65 | new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
|
---|
66 | }
|
---|
67 | );
|
---|
68 | sum = new MeanSum();
|
---|
69 | sum.Terms.Add(new MeanConst());
|
---|
70 | sum.Terms.Add(new MeanConst());
|
---|
71 | TestMeanFunction(sum, 1,
|
---|
72 | new double[] { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
|
---|
73 | new double[][]
|
---|
74 | {
|
---|
75 | new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
|
---|
76 | new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
|
---|
77 | }
|
---|
78 | );
|
---|
79 | }
|
---|
80 | [TestMethod]
|
---|
81 | public void MeanProdTest() {
|
---|
82 | var prod = new MeanProduct();
|
---|
83 | prod.Factors.Add(new MeanConst());
|
---|
84 | prod.Factors.Add(new MeanConst());
|
---|
85 | TestMeanFunction(prod, 0,
|
---|
86 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
87 | new double[][]
|
---|
88 | {
|
---|
89 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
90 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
|
---|
91 | }
|
---|
92 | );
|
---|
93 | prod = new MeanProduct();
|
---|
94 | prod.Factors.Add(new MeanConst());
|
---|
95 | prod.Factors.Add(new MeanConst());
|
---|
96 | TestMeanFunction(prod, 1,
|
---|
97 | new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
|
---|
98 | new double[][]
|
---|
99 | {
|
---|
100 | new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
|
---|
101 | new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
|
---|
102 | }
|
---|
103 | );
|
---|
104 |
|
---|
105 | prod = new MeanProduct();
|
---|
106 | prod.Factors.Add(new MeanZero());
|
---|
107 | prod.Factors.Add(new MeanLinear());
|
---|
108 | TestMeanFunction(prod, 0,
|
---|
109 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
110 | new double[][]
|
---|
111 | {
|
---|
112 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
113 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
114 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
115 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
116 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
|
---|
117 | }
|
---|
118 | );
|
---|
119 | prod = new MeanProduct();
|
---|
120 | prod.Factors.Add(new MeanZero());
|
---|
121 | prod.Factors.Add(new MeanLinear());
|
---|
122 | TestMeanFunction(prod, 1,
|
---|
123 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
124 | new double[][]
|
---|
125 | {
|
---|
126 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
127 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
128 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
129 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
130 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
|
---|
131 | }
|
---|
132 | );
|
---|
133 |
|
---|
134 | prod = new MeanProduct();
|
---|
135 | prod.Factors.Add(new MeanConst());
|
---|
136 | prod.Factors.Add(new MeanLinear());
|
---|
137 | TestMeanFunction(prod, 1,
|
---|
138 | new double[] { 1.843574580675791, 2.127929337522181, 3.116568910281474, 1.688566127130978, 3.250517738447450, 2.961262743634280, 2.326019412613392, 1.729286976436201, 1.769654419215176, 2.398170347588917 },
|
---|
139 | new double[][]
|
---|
140 | {
|
---|
141 | new double[] { 2.9088, 1.8646, 3.1971, 1.9890, 1.7640, 1.2801, 2.8059, 3.7243, 3.1899 ,1.4978 },
|
---|
142 | new double[] { 0.4173, 0.0497, 0.9027, 0.9448, 0.4909, 0.4893, 0.3377, 0.9001, 0.3692 ,0.1112 },
|
---|
143 | new double[] { 0.7803, 0.3897, 0.2417, 0.4039, 0.0965, 0.1320, 0.9421, 0.9561, 0.5752 ,0.0598 },
|
---|
144 | new double[] { 0.2348, 0.3532, 0.8212, 0.0154, 0.0430, 0.1690, 0.6491, 0.7317, 0.6477 ,0.4509 },
|
---|
145 | new double[] { 0.5470, 0.2963, 0.7447, 0.1890, 0.6868, 0.1835, 0.3685, 0.6256, 0.7802 ,0.0811 },
|
---|
146 | new double[] { 0.9294, 0.7757, 0.4868, 0.4359, 0.4468, 0.3063, 0.5085, 0.5108, 0.8176 ,0.7948 }
|
---|
147 | }
|
---|
148 | );
|
---|
149 | }
|
---|
150 |
|
---|
151 | [TestMethod]
|
---|
152 | public void MeanLinear() {
|
---|
153 | TestMeanFunction(new MeanLinear(), 0,
|
---|
154 | new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
---|
155 | new double[][]
|
---|
156 | {
|
---|
157 | new double[] { 0.4173, 0.0497, 0.9027, 0.9448, 0.4909, 0.4893, 0.3377, 0.9001, 0.3692, 0.1112 },
|
---|
158 | new double[] { 0.7803, 0.3897, 0.2417, 0.4039, 0.0965, 0.1320, 0.9421, 0.9561, 0.5752, 0.0598 },
|
---|
159 | new double[] { 0.2348, 0.3532, 0.8212, 0.0154, 0.0430, 0.1690, 0.6491, 0.7317, 0.6477, 0.4509 },
|
---|
160 | new double[] { 0.5470, 0.2963, 0.7447, 0.1890, 0.6868, 0.1835, 0.3685, 0.6256, 0.7802, 0.0811 },
|
---|
161 | new double[] { 0.9294, 0.7757, 0.4868, 0.4359, 0.4468, 0.3063, 0.5085, 0.5108, 0.8176, 0.7948 }
|
---|
162 | }
|
---|
163 | );
|
---|
164 | TestMeanFunction(new MeanLinear(), 1,
|
---|
165 | new double[] { 1.8436, 2.1279, 3.1166, 1.6886, 3.2505, 2.9613, 2.3260, 1.7293, 1.7697, 2.3982 },
|
---|
166 | new double[][]
|
---|
167 | {
|
---|
168 | new double[] { 0.4173, 0.0497, 0.9027, 0.9448, 0.4909, 0.4893, 0.3377, 0.9001, 0.3692, 0.1112 },
|
---|
169 | new double[] { 0.7803, 0.3897, 0.2417, 0.4039, 0.0965, 0.1320, 0.9421, 0.9561, 0.5752, 0.0598 },
|
---|
170 | new double[] { 0.2348, 0.3532, 0.8212, 0.0154, 0.0430, 0.1690, 0.6491, 0.7317, 0.6477, 0.4509 },
|
---|
171 | new double[] { 0.5470, 0.2963, 0.7447, 0.1890, 0.6868, 0.1835, 0.3685, 0.6256, 0.7802, 0.0811 },
|
---|
172 | new double[] { 0.9294, 0.7757, 0.4868, 0.4359, 0.4468, 0.3063, 0.5085, 0.5108, 0.8176, 0.7948 }
|
---|
173 | }
|
---|
174 | );
|
---|
175 | }
|
---|
176 |
|
---|
177 | [TestMethod]
|
---|
178 | public void CovSeIsoTest() {
|
---|
179 | TestCovarianceFunction(new CovarianceSquaredExponentialIso(), 0,
|
---|
180 | new double[,]
|
---|
181 | {
|
---|
182 | { 0.5771, 0.5404, 0.8569, 0.5612, 0.7545, 0.4980, 0.6649, 0.7484, 0.6564, 0.8184},
|
---|
183 | { 0.6206, 0.7027, 0.7091, 0.6015, 0.7295, 0.5338, 0.6705, 0.8202, 0.7155, 0.8029},
|
---|
184 | { 0.7743, 0.7513, 0.8468, 0.6865, 0.5645, 0.7861, 0.8404, 0.6625, 0.7555, 0.8335},
|
---|
185 | { 0.7773, 0.5513, 0.7792, 0.7166, 0.4534, 0.5870, 0.8913, 0.8796, 0.8656, 0.8245},
|
---|
186 | { 0.8839, 0.5934, 0.7689, 0.8982, 0.4126, 0.4741, 0.7883, 0.9201, 0.9077, 0.8649},
|
---|
187 | { 0.8746, 0.7341, 0.7020, 0.8323, 0.4826, 0.5922, 0.8706, 0.9508, 0.9524, 0.8660},
|
---|
188 | { 0.6133, 0.7560, 0.7280, 0.5749, 0.8722, 0.5651, 0.6530, 0.6260, 0.6633, 0.8195},
|
---|
189 | { 0.6113, 0.6277, 0.8110, 0.5489, 0.7110, 0.6221, 0.6948, 0.5425, 0.6227, 0.7828},
|
---|
190 | { 0.6394, 0.6950, 0.8669, 0.6107, 0.7933, 0.5985, 0.6823, 0.6858, 0.6702, 0.8492},
|
---|
191 | { 0.5790, 0.7156, 0.6274, 0.5324, 0.6323, 0.6100, 0.6863, 0.8091, 0.6855, 0.7173},
|
---|
192 | },
|
---|
193 | new double[][,]
|
---|
194 | {
|
---|
195 | new double[,] {
|
---|
196 | { 0, 0.3197, 0.6358, 0.5518, 0.5207, 0.5909, 0.3361, 0.4897, 0.2447, 0.5720},
|
---|
197 | { 0.3197, 0, 0.6697, 0.6190, 0.4635, 0.4047, 0.4190, 0.6899, 0.3650, 0.1552},
|
---|
198 | { 0.6358, 0.6697, 0, 0.6031, 0.5367, 0.5927, 0.6008, 0.4084, 0.4103, 0.6843},
|
---|
199 | { 0.5518, 0.6190, 0.6031, 0, 0.4173, 0.2740, 0.6339, 0.6114, 0.6702, 0.6455},
|
---|
200 | { 0.5207, 0.4635, 0.5367, 0.4173, 0, 0.2510, 0.6610, 0.6935, 0.5180, 0.5362},
|
---|
201 | { 0.5909, 0.4047, 0.5927, 0.2740, 0.2510, 0, 0.6019, 0.6955, 0.6232, 0.3756},
|
---|
202 | { 0.3361, 0.4190, 0.6008, 0.6339, 0.6610, 0.6019, 0, 0.3205, 0.3279, 0.6165},
|
---|
203 | { 0.4897, 0.6899, 0.4084, 0.6114, 0.6935, 0.6955, 0.3205, 0, 0.4189, 0.7344},
|
---|
204 | { 0.2447, 0.3650, 0.4103, 0.6702, 0.5180, 0.6232, 0.3279, 0.4189, 0, 0.5595},
|
---|
205 | { 0.5720, 0.1552, 0.6843, 0.6455, 0.5362, 0.3756, 0.6165, 0.7344, 0.5595, 0},
|
---|
206 | },
|
---|
207 | new double[,] {
|
---|
208 | { 2.0000, 1.6472, 1.1513, 1.3142, 1.3662, 1.2437, 1.6267, 1.4148, 1.7372, 1.2786},
|
---|
209 | { 1.6472, 2.0000, 1.0689, 1.1876, 1.4541, 1.5370, 1.5174, 1.0103, 1.5898, 1.8381},
|
---|
210 | { 1.1513, 1.0689, 2.0000, 1.2199, 1.3398, 1.2402, 1.2244, 1.5320, 1.5293, 1.0276},
|
---|
211 | { 1.3142, 1.1876, 1.2199, 2.0000, 1.5197, 1.7027, 1.1555, 1.2033, 1.0675, 1.1291},
|
---|
212 | { 1.3662, 1.4541, 1.3398, 1.5197, 2.0000, 1.7299, 1.0916, 0.9989, 1.3706, 1.3407},
|
---|
213 | { 1.2437, 1.5370, 1.2402, 1.7027, 1.7299, 2.0000, 1.2223, 0.9923, 1.1787, 1.5758},
|
---|
214 | { 1.6267, 1.5174, 1.2244, 1.1555, 1.0916, 1.2223, 2.0000, 1.6461, 1.6369, 1.1928},
|
---|
215 | { 1.4148, 1.0103, 1.5320, 1.2033, 0.9989, 0.9923, 1.6461, 2.0000, 1.5176, 0.7806},
|
---|
216 | { 1.7372, 1.5898, 1.5293, 1.0675, 1.3706, 1.1787, 1.6369, 1.5176, 2.0000, 1.3009},
|
---|
217 | { 1.2786, 1.8381, 1.0276, 1.1291, 1.3407, 1.5758, 1.1928, 0.7806, 1.3009, 2.0000},
|
---|
218 | }
|
---|
219 | }
|
---|
220 | );
|
---|
221 | TestCovarianceFunction(new CovarianceSquaredExponentialIso(), 1,
|
---|
222 | new double[,]
|
---|
223 | {
|
---|
224 | { 6.8592, 6.7985, 7.2362, 6.8334, 7.1127, 6.7239, 6.9920, 7.1048, 6.9798, 7.1914},
|
---|
225 | { 6.9271, 7.0445, 7.0531, 6.8979, 7.0803, 6.7872, 7.0000, 7.1935, 7.0617, 7.1727},
|
---|
226 | { 7.1376, 7.1086, 7.2246, 7.0223, 6.8388, 7.1522, 7.2172, 6.9886, 7.1139, 7.2091},
|
---|
227 | { 7.1414, 6.8169, 7.1438, 7.0632, 6.6389, 6.8750, 7.2749, 7.2619, 7.2462, 7.1986},
|
---|
228 | { 7.2667, 6.8852, 7.1309, 7.2824, 6.5548, 6.6792, 7.1550, 7.3063, 7.2929, 7.2454},
|
---|
229 | { 7.2563, 7.0864, 7.0436, 7.2078, 6.6953, 6.8834, 7.2517, 7.3388, 7.3405, 7.2466},
|
---|
230 | { 6.9160, 7.1146, 7.0783, 6.8557, 7.2536, 6.8398, 6.9750, 6.9351, 6.9897, 7.1926},
|
---|
231 | { 6.9130, 6.9378, 7.1825, 6.8129, 7.0557, 6.9294, 7.0338, 6.8021, 6.9302, 7.1482},
|
---|
232 | { 6.9551, 7.0340, 7.2476, 6.9120, 7.1611, 6.8932, 7.0166, 7.0213, 6.9995, 7.2274},
|
---|
233 | { 6.8624, 7.0619, 6.9373, 6.7848, 6.9446, 6.9109, 7.0221, 7.1802, 7.0209, 7.0642},
|
---|
234 | },
|
---|
235 | new double[][,]
|
---|
236 | {
|
---|
237 | new double[,] {
|
---|
238 | { 0, 0.3781, 1.0250, 0.7934, 0.7239, 0.8910, 0.4018, 0.6606, 0.2764, 0.8421},
|
---|
239 | { 0.3781, 0, 1.1512, 0.9715, 0.6106, 0.5082, 0.5320, 1.2453, 0.4451, 0.1669},
|
---|
240 | { 1.0250, 1.1512, 0, 0.9248, 0.7589, 0.8960, 0.9183, 0.5143, 0.5175, 1.2171},
|
---|
241 | { 0.7934, 0.9715, 0.9248, 0, 0.5292, 0.3149, 1.0188, 0.9487, 1.1534, 1.0583},
|
---|
242 | { 0.7239, 0.6106, 0.7589, 0.5292, 0, 0.2845, 1.1157, 1.2640, 0.7182, 0.7577},
|
---|
243 | { 0.8910, 0.5082, 0.8960, 0.3149, 0.2845, 0, 0.9214, 1.2749, 0.9845, 0.4616},
|
---|
244 | { 0.4018, 0.5320, 0.9183, 1.0188, 1.1157, 0.9214, 0, 0.3793, 0.3899, 0.9638},
|
---|
245 | { 0.6606, 1.2453, 0.5143, 0.9487, 1.2640, 1.2749, 0.3793, 0, 0.5318, 1.6567},
|
---|
246 | { 0.2764, 0.4451, 0.5175, 1.1534, 0.7182, 0.9845, 0.3899, 0.5318, 0, 0.8116},
|
---|
247 | { 0.8421, 0.1669, 1.2171, 1.0583, 0.7577, 0.4616, 0.9638, 1.6567, 0.8116, 0},
|
---|
248 | },
|
---|
249 | new double[,] {
|
---|
250 | { 14.7781, 14.3950, 13.7138, 13.9618, 14.0352, 13.8578, 14.3707, 14.1018, 14.4990, 13.9100},
|
---|
251 | { 14.3950, 14.7781, 13.5767, 13.7715, 14.1542, 14.2607, 14.2360, 13.4735, 14.3260, 14.6102},
|
---|
252 | { 13.7138, 13.5767, 14.7781, 13.8217, 13.9982, 13.8525, 13.8286, 14.2545, 14.2511, 13.5045},
|
---|
253 | { 13.9618, 13.7715, 13.8217, 14.7781, 14.2390, 14.4598, 13.7206, 13.7960, 13.5743, 13.6778},
|
---|
254 | { 14.0352, 14.1542, 13.9982, 14.2390, 14.7781, 14.4908, 13.6154, 13.4528, 14.0413, 13.9995},
|
---|
255 | { 13.8578, 14.2607, 13.8525, 14.4598, 14.4908, 14.7781, 13.8254, 13.4407, 13.7576, 14.3090},
|
---|
256 | { 14.3707, 14.2360, 13.8286, 13.7206, 13.6154, 13.8254, 14.7781, 14.3938, 14.3828, 13.7798},
|
---|
257 | { 14.1018, 13.4735, 14.2545, 13.7960, 13.4528, 13.4407, 14.3938, 14.7781, 14.2363, 13.0113},
|
---|
258 | { 14.4990, 14.3260, 14.2511, 13.5743, 14.0413, 13.7576, 14.3828, 14.2363, 14.7781, 13.9425},
|
---|
259 | { 13.9100, 14.6102, 13.5045, 13.6778, 13.9995, 14.3090, 13.7798, 13.0113, 13.9425, 14.7781},
|
---|
260 | },
|
---|
261 | }
|
---|
262 | );
|
---|
263 | }
|
---|
264 |
|
---|
265 | [TestMethod]
|
---|
266 | public void CovNnTest() {
|
---|
267 | TestCovarianceFunction(new CovarianceNeuralNetwork(), 0,
|
---|
268 | new double[,]
|
---|
269 | {
|
---|
270 | { 0.5930, 0.5896, 0.7951, 0.5808, 0.7787, 0.6411, 0.6672, 0.6814, 0.6297, 0.7338},
|
---|
271 | { 0.5214, 0.5987, 0.6763, 0.5053, 0.7289, 0.6077, 0.5909, 0.6230, 0.5621, 0.6472},
|
---|
272 | { 0.7299, 0.7305, 0.8081, 0.6837, 0.7039, 0.7994, 0.7756, 0.6668, 0.7145, 0.7665},
|
---|
273 | { 0.6399, 0.5347, 0.7261, 0.6044, 0.5836, 0.6549, 0.7250, 0.6815, 0.6720, 0.6819},
|
---|
274 | { 0.6627, 0.5300, 0.7045, 0.6665, 0.5340, 0.5659, 0.6509, 0.6692, 0.6600, 0.6747},
|
---|
275 | { 0.6151, 0.5719, 0.6465, 0.5881, 0.5593, 0.6189, 0.6585, 0.6397, 0.6364, 0.6382},
|
---|
276 | { 0.5978, 0.6929, 0.7292, 0.5719, 0.8209, 0.6695, 0.6469, 0.5966, 0.6160, 0.7203},
|
---|
277 | { 0.6944, 0.7128, 0.8241, 0.6566, 0.8002, 0.7548, 0.7503, 0.6494, 0.6961, 0.7875},
|
---|
278 | { 0.6443, 0.6893, 0.8074, 0.6258, 0.8018, 0.7049, 0.6885, 0.6633, 0.6530, 0.7602},
|
---|
279 | { 0.4829, 0.5970, 0.6259, 0.4461, 0.6737, 0.6484, 0.5912, 0.6067, 0.5329, 0.5928},
|
---|
280 | },
|
---|
281 | new double[][,]
|
---|
282 | {
|
---|
283 | new double[,] {
|
---|
284 | { -0.5669, -0.5220, -0.3879, -0.4304, -0.4540, -0.4460, -0.4901, -0.4465, -0.5095, -0.4340},
|
---|
285 | { -0.5220, -0.5969, -0.3884, -0.3843, -0.4499, -0.4737, -0.4843, -0.3961, -0.5133, -0.5540},
|
---|
286 | { -0.3879, -0.3884, -0.5554, -0.4160, -0.4600, -0.4671, -0.4056, -0.4603, -0.4637, -0.3810},
|
---|
287 | { -0.4304, -0.3843, -0.4160, -0.5895, -0.4728, -0.5384, -0.3884, -0.4288, -0.3748, -0.3672},
|
---|
288 | { -0.4540, -0.4499, -0.4600, -0.4728, -0.5977, -0.5296, -0.3758, -0.3954, -0.4610, -0.4165},
|
---|
289 | { -0.4460, -0.4737, -0.4671, -0.5384, -0.5296, -0.5987, -0.4280, -0.4285, -0.4369, -0.4802},
|
---|
290 | { -0.4901, -0.4843, -0.4056, -0.3884, -0.3758, -0.4280, -0.5731, -0.5003, -0.4920, -0.4043},
|
---|
291 | { -0.4465, -0.3961, -0.4603, -0.4288, -0.3954, -0.4285, -0.5003, -0.5362, -0.4621, -0.3360},
|
---|
292 | { -0.5095, -0.5133, -0.4637, -0.3748, -0.4610, -0.4369, -0.4920, -0.4621, -0.5614, -0.4463},
|
---|
293 | { -0.4340, -0.5540, -0.3810, -0.3672, -0.4165, -0.4802, -0.4043, -0.3360, -0.4463, -0.5987},
|
---|
294 | },
|
---|
295 | new double[,] {
|
---|
296 | { 1.6963, 1.4541, 1.3587, 1.3199, 1.3084, 1.1825, 1.5272, 1.5553, 1.6096, 1.2526},
|
---|
297 | { 1.4541, 1.4500, 1.2006, 1.0794, 1.1704, 1.1251, 1.3601, 1.2650, 1.4540, 1.3576},
|
---|
298 | { 1.3587, 1.2006, 1.7563, 1.3216, 1.3536, 1.2537, 1.3780, 1.6296, 1.5559, 1.1618},
|
---|
299 | { 1.3199, 1.0794, 1.3216, 1.5376, 1.2625, 1.2852, 1.2016, 1.4015, 1.2051, 1.0222},
|
---|
300 | { 1.3084, 1.1704, 1.3536, 1.2625, 1.4362, 1.2215, 1.1132, 1.2541, 1.3394, 1.0837},
|
---|
301 | { 1.1825, 1.1251, 1.2537, 1.2852, 1.2215, 1.2511, 1.1282, 1.2125, 1.1771, 1.1218},
|
---|
302 | { 1.5272, 1.3601, 1.3780, 1.2016, 1.1132, 1.1282, 1.6603, 1.6427, 1.5504, 1.1677},
|
---|
303 | { 1.5553, 1.2650, 1.6296, 1.4015, 1.2541, 1.2125, 1.6427, 1.8427, 1.6113, 1.0910},
|
---|
304 | { 1.6096, 1.4540, 1.5559, 1.2051, 1.3394, 1.1771, 1.5504, 1.6113, 1.7261, 1.2950},
|
---|
305 | { 1.2526, 1.3576, 1.1618, 1.0222, 1.0837, 1.1218, 1.1677, 1.0910, 1.2950, 1.4153},
|
---|
306 | }
|
---|
307 | }
|
---|
308 | );
|
---|
309 | TestCovarianceFunction(new CovarianceNeuralNetwork(), 1,
|
---|
310 | new double[,]
|
---|
311 | {
|
---|
312 | { 1.4436, 1.4866, 2.0692, 1.4105, 2.1077, 1.7712, 1.6764, 1.6030, 1.4898, 1.7857},
|
---|
313 | { 1.1652, 1.3662, 1.6384, 1.1271, 1.8076, 1.5312, 1.3659, 1.3446, 1.2210, 1.4545},
|
---|
314 | { 1.7710, 1.8348, 2.1497, 1.6684, 1.9875, 2.1872, 1.9499, 1.6132, 1.7025, 1.8978},
|
---|
315 | { 1.4480, 1.2766, 1.8006, 1.3710, 1.5424, 1.6920, 1.6866, 1.5035, 1.4784, 1.5742},
|
---|
316 | { 1.4350, 1.2175, 1.6874, 1.4354, 1.3683, 1.4290, 1.4793, 1.4231, 1.3994, 1.4995},
|
---|
317 | { 1.2557, 1.2181, 1.4634, 1.2013, 1.3324, 1.4450, 1.3951, 1.2781, 1.2662, 1.3344},
|
---|
318 | { 1.4328, 1.6864, 1.8991, 1.3709, 2.1658, 1.8123, 1.6081, 1.4065, 1.4398, 1.7323},
|
---|
319 | { 1.7618, 1.8647, 2.2657, 1.6713, 2.2933, 2.1661, 1.9689, 1.6354, 1.7276, 2.0126},
|
---|
320 | { 1.5724, 1.7252, 2.1209, 1.5259, 2.1852, 1.9465, 1.7436, 1.5858, 1.5568, 1.8614},
|
---|
321 | { 1.0716, 1.3447, 1.5116, 0.9906, 1.6687, 1.5994, 1.3485, 1.2963, 1.1483, 1.3287},
|
---|
322 | },
|
---|
323 | new double[][,]
|
---|
324 | {
|
---|
325 | new double[,] {
|
---|
326 | { -3.1708, -2.6488, -2.6475, -2.4774, -2.4067, -2.1099, -2.8841, -3.0223, -3.0526, -2.3041},
|
---|
327 | { -2.6488, -2.5111, -2.2570, -1.9637, -2.0708, -1.9172, -2.4814, -2.3998, -2.6632, -2.3537},
|
---|
328 | { -2.6475, -2.2570, -3.3336, -2.5066, -2.5075, -2.2490, -2.6640, -3.1778, -2.9977, -2.1743},
|
---|
329 | { -2.4774, -1.9637, -2.5066, -2.7415, -2.2591, -2.2029, -2.2607, -2.6778, -2.2936, -1.8530},
|
---|
330 | { -2.4067, -2.0708, -2.5075, -2.2591, -2.4753, -2.0592, -2.0638, -2.3743, -2.4708, -1.9151},
|
---|
331 | { -2.1099, -1.9172, -2.2490, -2.2029, -2.0592, -2.0176, -2.0074, -2.2134, -2.1126, -1.8976},
|
---|
332 | { -2.8841, -2.4814, -2.6640, -2.2607, -2.0638, -2.0074, -3.0726, -3.1450, -2.9374, -2.1472},
|
---|
333 | { -3.0223, -2.3998, -3.1778, -2.6778, -2.3743, -2.2134, -3.1450, -3.5652, -3.1314, -2.0795},
|
---|
334 | { -3.0526, -2.6632, -2.9977, -2.2936, -2.4708, -2.1126, -2.9374, -3.1314, -3.2519, -2.3870},
|
---|
335 | { -2.3041, -2.3537, -2.1743, -1.8530, -1.9151, -1.8976, -2.1472, -2.0795, -2.3870, -2.4217},
|
---|
336 | },
|
---|
337 | new double[,] {
|
---|
338 | { 4.3303, 3.4649, 3.7030, 3.3026, 3.1505, 2.6912, 3.9244, 4.3025, 4.2082, 3.0090},
|
---|
339 | { 3.4649, 3.1323, 3.0110, 2.5036, 2.5893, 2.3340, 3.2266, 3.2706, 3.5078, 2.9242},
|
---|
340 | { 3.7030, 3.0110, 4.6774, 3.3899, 3.3261, 2.9053, 3.6926, 4.5813, 4.1997, 2.8855},
|
---|
341 | { 3.3026, 2.5036, 3.3899, 3.5200, 2.8645, 2.7165, 2.9968, 3.6979, 3.0870, 2.3508},
|
---|
342 | { 3.1505, 2.5893, 3.3261, 2.8645, 3.0745, 2.4980, 2.6901, 3.2286, 3.2548, 2.3841},
|
---|
343 | { 2.6912, 2.3340, 2.9053, 2.7165, 2.4980, 2.3825, 2.5425, 2.9255, 2.7134, 2.2974},
|
---|
344 | { 3.9244, 3.2266, 3.6926, 2.9968, 2.6901, 2.5425, 4.1329, 4.4278, 4.0227, 2.7860},
|
---|
345 | { 4.3025, 3.2706, 4.5813, 3.6979, 3.2286, 2.9255, 4.4278, 5.2237, 4.4826, 2.8275},
|
---|
346 | { 4.2082, 3.5078, 4.1997, 3.0870, 3.2548, 2.7134, 4.0227, 4.4826, 4.4998, 3.1361},
|
---|
347 | { 3.0090, 2.9242, 2.8855, 2.3508, 2.3841, 2.2974, 2.7860, 2.8275, 3.1361, 2.9891},
|
---|
348 | },
|
---|
349 | }
|
---|
350 | );
|
---|
351 | }
|
---|
352 |
|
---|
353 |
|
---|
354 | [TestMethod]
|
---|
355 | public void CovRQIsoTest() {
|
---|
356 | TestCovarianceFunction(new CovarianceRationalQuadraticIso(), 0,
|
---|
357 | new double[,]
|
---|
358 | {
|
---|
359 | { 0.6452, 0.6190, 0.8662, 0.6338, 0.7802, 0.5893, 0.7102, 0.7753, 0.7037, 0.8331},
|
---|
360 | { 0.6771, 0.7392, 0.7442, 0.6630, 0.7603, 0.6144, 0.7145, 0.8346, 0.7492, 0.8200},
|
---|
361 | { 0.7963, 0.7777, 0.8574, 0.7266, 0.6362, 0.8060, 0.8519, 0.7084, 0.7810, 0.8459},
|
---|
362 | { 0.7988, 0.6268, 0.8004, 0.7500, 0.5583, 0.6524, 0.8968, 0.8864, 0.8739, 0.8382},
|
---|
363 | { 0.8902, 0.6571, 0.7919, 0.9030, 0.5304, 0.5727, 0.8079, 0.9232, 0.9117, 0.8733},
|
---|
364 | { 0.8819, 0.7639, 0.7387, 0.8449, 0.5785, 0.6563, 0.8783, 0.9519, 0.9535, 0.8742},
|
---|
365 | { 0.6716, 0.7814, 0.7590, 0.6437, 0.8797, 0.6366, 0.7012, 0.6810, 0.7090, 0.8339},
|
---|
366 | { 0.6702, 0.6823, 0.8268, 0.6250, 0.7456, 0.6782, 0.7331, 0.6205, 0.6786, 0.8033},
|
---|
367 | { 0.6910, 0.7332, 0.8750, 0.6697, 0.8119, 0.6608, 0.7235, 0.7261, 0.7142, 0.8595},
|
---|
368 | { 0.6467, 0.7493, 0.6821, 0.6133, 0.6857, 0.6692, 0.7265, 0.8252, 0.7259, 0.7506},
|
---|
369 | },
|
---|
370 | new double[][,]
|
---|
371 | {
|
---|
372 | new double[,] {
|
---|
373 | { 0, 0.2722, 0.4584, 0.4165, 0.3996, 0.4367, 0.2838, 0.3820, 0.2165, 0.4271},
|
---|
374 | { 0.2722, 0, 0.4736, 0.4505, 0.3666, 0.3300, 0.3391, 0.4823, 0.3037, 0.1436},
|
---|
375 | { 0.4584, 0.4736, 0, 0.4428, 0.4084, 0.4376, 0.4416, 0.3323, 0.3336, 0.4799},
|
---|
376 | { 0.4165, 0.4505, 0.4428, 0, 0.3381, 0.2388, 0.4575, 0.4468, 0.4739, 0.4629},
|
---|
377 | { 0.3996, 0.3666, 0.4084, 0.3381, 0, 0.2213, 0.4698, 0.4837, 0.3981, 0.4081},
|
---|
378 | { 0.4367, 0.3300, 0.4376, 0.2388, 0.2213, 0, 0.4422, 0.4845, 0.4525, 0.3109},
|
---|
379 | { 0.2838, 0.3391, 0.4416, 0.4575, 0.4698, 0.4422, 0, 0.2728, 0.2781, 0.4493},
|
---|
380 | { 0.3820, 0.4823, 0.3323, 0.4468, 0.4837, 0.4845, 0.2728, 0, 0.3390, 0.4995},
|
---|
381 | { 0.2165, 0.3037, 0.3336, 0.4739, 0.3981, 0.4525, 0.2781, 0.3390, 0, 0.4206},
|
---|
382 | { 0.4271, 0.1436, 0.4799, 0.4629, 0.4081, 0.3109, 0.4493, 0.4995, 0.4206, 0},
|
---|
383 | },
|
---|
384 | new double[,] {
|
---|
385 | { 2.0000, 1.6749, 1.2884, 1.4086, 1.4481, 1.3558, 1.6576, 1.4857, 1.7530, 1.3818},
|
---|
386 | { 1.6749, 2.0000, 1.2296, 1.3147, 1.5166, 1.5831, 1.5672, 1.1884, 1.6266, 1.8443},
|
---|
387 | { 1.2884, 1.2296, 2.0000, 1.3383, 1.4280, 1.3533, 1.3417, 1.5791, 1.5769, 1.2005},
|
---|
388 | { 1.4086, 1.3147, 1.3383, 2.0000, 1.5691, 1.7228, 1.2914, 1.3262, 1.2286, 1.2725},
|
---|
389 | { 1.4481, 1.5166, 1.4280, 1.5691, 2.0000, 1.7466, 1.2457, 1.1805, 1.4515, 1.4286},
|
---|
390 | { 1.3558, 1.5831, 1.3533, 1.7228, 1.7466, 2.0000, 1.3401, 1.1758, 1.3083, 1.6150},
|
---|
391 | { 1.6576, 1.5672, 1.3417, 1.2914, 1.2457, 1.3401, 2.0000, 1.6740, 1.6662, 1.3186},
|
---|
392 | { 1.4857, 1.1884, 1.5791, 1.3262, 1.1805, 1.1758, 1.6740, 2.0000, 1.5674, 1.0305},
|
---|
393 | { 1.7530, 1.6266, 1.5769, 1.2286, 1.4515, 1.3083, 1.6662, 1.5674, 2.0000, 1.3985},
|
---|
394 | { 1.3818, 1.8443, 1.2005, 1.2725, 1.4286, 1.6150, 1.3186, 1.0305, 1.3985, 2.0000},
|
---|
395 | },
|
---|
396 | new double[,] {
|
---|
397 | { 0, -0.0124, -0.0541, -0.0386, -0.0340, -0.0452, -0.0137, -0.0298, -0.0073, -0.0419},
|
---|
398 | { -0.0124, 0, -0.0623, -0.0505, -0.0265, -0.0200, -0.0215, -0.0682, -0.0162, -0.0029},
|
---|
399 | { -0.0541, -0.0623, 0, -0.0474, -0.0363, -0.0455, -0.0470, -0.0204, -0.0206, -0.0664},
|
---|
400 | { -0.0386, -0.0505, -0.0474, 0, -0.0213, -0.0091, -0.0537, -0.0490, -0.0624, -0.0563},
|
---|
401 | { -0.0340, -0.0265, -0.0363, -0.0213, 0, -0.0077, -0.0600, -0.0693, -0.0336, -0.0362},
|
---|
402 | { -0.0452, -0.0200, -0.0455, -0.0091, -0.0077, 0, -0.0472, -0.0700, -0.0514, -0.0172},
|
---|
403 | { -0.0137, -0.0215, -0.0470, -0.0537, -0.0600, -0.0472, 0, -0.0125, -0.0131, -0.0500},
|
---|
404 | { -0.0298, -0.0682, -0.0204, -0.0490, -0.0693, -0.0700, -0.0125, 0, -0.0215, -0.0919},
|
---|
405 | { -0.0073, -0.0162, -0.0206, -0.0624, -0.0336, -0.0514, -0.0131, -0.0215, 0, -0.0399},
|
---|
406 | { -0.0419, -0.0029, -0.0664, -0.0563, -0.0362, -0.0172, -0.0500, -0.0919, -0.0399, 0},
|
---|
407 | }
|
---|
408 | }
|
---|
409 | );
|
---|
410 | TestCovarianceFunction(new CovarianceRationalQuadraticIso(), 1,
|
---|
411 | new double[,]
|
---|
412 | {
|
---|
413 | { 6.8660, 6.8070, 7.2367, 6.8409, 7.1145, 6.7347, 6.9959, 7.1068, 6.9839, 7.1923},
|
---|
414 | { 6.9324, 7.0474, 7.0559, 6.9038, 7.0827, 6.7961, 7.0038, 7.1944, 7.0644, 7.1739},
|
---|
415 | { 7.1392, 7.1106, 7.2253, 7.0255, 6.8461, 7.1536, 7.2179, 6.9926, 7.1158, 7.2099},
|
---|
416 | { 7.1429, 6.8249, 7.1453, 7.0658, 6.6525, 6.8816, 7.2752, 7.2623, 7.2467, 7.1995},
|
---|
417 | { 7.2671, 6.8913, 7.1326, 7.2827, 6.5716, 6.6915, 7.1564, 7.3065, 7.2931, 7.2459},
|
---|
418 | { 7.2567, 7.0886, 7.0466, 7.2086, 6.7069, 6.8897, 7.2522, 7.3388, 7.3405, 7.2471},
|
---|
419 | { 6.9215, 7.1164, 7.0807, 6.8626, 7.2540, 6.8471, 6.9792, 6.9401, 6.9937, 7.1935},
|
---|
420 | { 6.9185, 6.9428, 7.1836, 6.8210, 7.0584, 6.9346, 7.0369, 6.8105, 6.9354, 7.1496},
|
---|
421 | { 6.9598, 7.0372, 7.2481, 6.9176, 7.1623, 6.8992, 7.0200, 7.0247, 7.0033, 7.2280},
|
---|
422 | { 6.8692, 7.0646, 6.9424, 6.7937, 6.9495, 6.9165, 7.0254, 7.1813, 7.0242, 7.0668},
|
---|
423 | },
|
---|
424 | new double[][,]
|
---|
425 | {
|
---|
426 | new double[,] {
|
---|
427 | { 0, 0.3746, 0.9986, 0.7776, 0.7108, 0.8711, 0.3978, 0.6497, 0.2745, 0.8243},
|
---|
428 | { 0.3746, 0, 1.1178, 0.9478, 0.6013, 0.5017, 0.5249, 1.2062, 0.4401, 0.1662},
|
---|
429 | { 0.9986, 1.1178, 0, 0.9033, 0.7445, 0.8758, 0.8972, 0.5076, 0.5108, 1.1798},
|
---|
430 | { 0.7776, 0.9478, 0.9033, 0, 0.5222, 0.3124, 0.9927, 0.9261, 1.1199, 1.0301},
|
---|
431 | { 0.7108, 0.6013, 0.7445, 0.5222, 0, 0.2825, 1.0844, 1.2237, 0.7052, 0.7433},
|
---|
432 | { 0.8711, 0.5017, 0.8758, 0.3124, 0.2825, 0, 0.9000, 1.2339, 0.9601, 0.4563},
|
---|
433 | { 0.3978, 0.5249, 0.8972, 0.9927, 1.0844, 0.9000, 0, 0.3757, 0.3861, 0.9404},
|
---|
434 | { 0.6497, 1.2062, 0.5076, 0.9261, 1.2237, 1.2339, 0.3757, 0, 0.5247, 1.5872},
|
---|
435 | { 0.2745, 0.4401, 0.5108, 1.1199, 0.7052, 0.9601, 0.3861, 0.5247, 0, 0.7950},
|
---|
436 | { 0.8243, 0.1662, 1.1798, 1.0301, 0.7433, 0.4563, 0.9404, 1.5872, 0.7950, 0},
|
---|
437 | },
|
---|
438 | new double[,] {
|
---|
439 | { 14.7781, 14.3968, 13.7277, 13.9699, 14.0420, 13.8682, 14.3727, 14.1074, 14.5000, 13.9192},
|
---|
440 | { 14.3968, 14.7781, 13.5943, 13.7839, 14.1589, 14.2640, 14.2397, 13.4942, 14.3286, 14.6106},
|
---|
441 | { 13.7277, 13.5943, 14.7781, 13.8329, 14.0057, 13.8630, 13.8396, 14.2579, 14.2545, 13.5242},
|
---|
442 | { 13.9699, 13.7839, 13.8329, 14.7781, 14.2426, 14.4610, 13.7342, 13.8078, 13.5920, 13.6926},
|
---|
443 | { 14.0420, 14.1589, 14.0057, 14.2426, 14.7781, 14.4918, 13.6319, 13.4742, 14.0479, 14.0069},
|
---|
444 | { 13.8682, 14.2640, 13.8630, 14.4610, 14.4918, 14.7781, 13.8365, 13.4625, 13.7703, 14.3117},
|
---|
445 | { 14.3727, 14.2397, 13.8396, 13.7342, 13.6319, 13.8365, 14.7781, 14.3956, 14.3848, 13.7920},
|
---|
446 | { 14.1074, 13.4942, 14.2579, 13.8078, 13.4742, 13.4625, 14.3956, 14.7781, 14.2399, 13.0490},
|
---|
447 | { 14.5000, 14.3286, 14.2545, 13.5920, 14.0479, 13.7703, 14.3848, 14.2399, 14.7781, 13.9510},
|
---|
448 | { 13.9192, 14.6106, 13.5242, 13.6926, 14.0069, 14.3117, 13.7920, 13.0490, 13.9510, 14.7781},
|
---|
449 | },
|
---|
450 | new double[,] {
|
---|
451 | { 0, -0.0009, -0.0068, -0.0040, -0.0034, -0.0051, -0.0010, -0.0028, -0.0005, -0.0046},
|
---|
452 | { -0.0009, 0, -0.0086, -0.0061, -0.0024, -0.0016, -0.0018, -0.0101, -0.0013, -0.0002},
|
---|
453 | { -0.0068, -0.0086, 0, -0.0055, -0.0037, -0.0052, -0.0054, -0.0017, -0.0017, -0.0097},
|
---|
454 | { -0.0040, -0.0061, -0.0055, 0, -0.0018, -0.0006, -0.0067, -0.0058, -0.0087, -0.0073},
|
---|
455 | { -0.0034, -0.0024, -0.0037, -0.0018, 0, -0.0005, -0.0081, -0.0105, -0.0033, -0.0037},
|
---|
456 | { -0.0051, -0.0016, -0.0052, -0.0006, -0.0005, 0, -0.0055, -0.0106, -0.0063, -0.0013},
|
---|
457 | { -0.0010, -0.0018, -0.0054, -0.0067, -0.0081, -0.0055, 0, -0.0009, -0.0010, -0.0060},
|
---|
458 | { -0.0028, -0.0101, -0.0017, -0.0058, -0.0105, -0.0106, -0.0009, 0, -0.0018, -0.0183},
|
---|
459 | { -0.0005, -0.0013, -0.0017, -0.0087, -0.0033, -0.0063, -0.0010, -0.0018, 0, -0.0042},
|
---|
460 | { -0.0046, -0.0002, -0.0097, -0.0073, -0.0037, -0.0013, -0.0060, -0.0183, -0.0042, 0},
|
---|
461 | }
|
---|
462 | }
|
---|
463 | );
|
---|
464 | }
|
---|
465 |
|
---|
466 |
|
---|
467 | [TestMethod]
|
---|
468 | public void CovRQArdTest() {
|
---|
469 | TestCovarianceFunction(new CovarianceRationalQuadraticArd(), 0,
|
---|
470 | new double[,]
|
---|
471 | {
|
---|
472 | { 0.6452, 0.6190, 0.8662, 0.6338, 0.7802, 0.5893, 0.7102, 0.7753, 0.7037, 0.8331},
|
---|
473 | { 0.6771, 0.7392, 0.7442, 0.6630, 0.7603, 0.6144, 0.7145, 0.8346, 0.7492, 0.8200},
|
---|
474 | { 0.7963, 0.7777, 0.8574, 0.7266, 0.6362, 0.8060, 0.8519, 0.7084, 0.7810, 0.8459},
|
---|
475 | { 0.7988, 0.6268, 0.8004, 0.7500, 0.5583, 0.6524, 0.8968, 0.8864, 0.8739, 0.8382},
|
---|
476 | { 0.8902, 0.6571, 0.7919, 0.9030, 0.5304, 0.5727, 0.8079, 0.9232, 0.9117, 0.8733},
|
---|
477 | { 0.8819, 0.7639, 0.7387, 0.8449, 0.5785, 0.6563, 0.8783, 0.9519, 0.9535, 0.8742},
|
---|
478 | { 0.6716, 0.7814, 0.7590, 0.6437, 0.8797, 0.6366, 0.7012, 0.6810, 0.7090, 0.8339},
|
---|
479 | { 0.6702, 0.6823, 0.8268, 0.6250, 0.7456, 0.6782, 0.7331, 0.6205, 0.6786, 0.8033},
|
---|
480 | { 0.6910, 0.7332, 0.8750, 0.6697, 0.8119, 0.6608, 0.7235, 0.7261, 0.7142, 0.8595},
|
---|
481 | { 0.6467, 0.7493, 0.6821, 0.6133, 0.6857, 0.6692, 0.7265, 0.8252, 0.7259, 0.7506},
|
---|
482 | },
|
---|
483 | new double[][,]
|
---|
484 | {
|
---|
485 | new double[,]
|
---|
486 | {
|
---|
487 | { 0, 0.0948, 0.0978, 0.1380, 0.0028, 0.0024, 0.0044, 0.1286, 0.0018, 0.0447},
|
---|
488 | { 0.0948, 0, 0.2750, 0.3462, 0.1119, 0.1211, 0.0509, 0.2553, 0.0675, 0.0032},
|
---|
489 | { 0.0978, 0.2750, 0, 0.0008, 0.0864, 0.0782, 0.1437, 0.0000, 0.1769, 0.2257},
|
---|
490 | { 0.1380, 0.3462, 0.0008, 0, 0.1268, 0.1539, 0.1537, 0.0009, 0.1250, 0.2813},
|
---|
491 | { 0.0028, 0.1119, 0.0864, 0.1268, 0, 0.0000, 0.0091, 0.0583, 0.0078, 0.0736},
|
---|
492 | { 0.0024, 0.1211, 0.0782, 0.1539, 0.0000, 0, 0.0103, 0.0583, 0.0062, 0.0932},
|
---|
493 | { 0.0044, 0.0509, 0.1437, 0.1537, 0.0091, 0.0103, 0, 0.2216, 0.0007, 0.0223},
|
---|
494 | { 0.1286, 0.2553, 0.0000, 0.0009, 0.0583, 0.0583, 0.2216, 0, 0.1731, 0.1652},
|
---|
495 | { 0.0018, 0.0675, 0.1769, 0.1250, 0.0078, 0.0062, 0.0007, 0.1731, 0, 0.0325},
|
---|
496 | { 0.0447, 0.0032, 0.2257, 0.2813, 0.0736, 0.0932, 0.0223, 0.1652, 0.0325, 0},
|
---|
497 | },
|
---|
498 | new double[,]
|
---|
499 | {
|
---|
500 | { 0, 0.1070, 0.1204, 0.0703, 0.2451, 0.1932, 0.0180, 0.0171, 0.0323, 0.2478},
|
---|
501 | { 0.1070, 0, 0.0083, 0.0001, 0.0494, 0.0416, 0.1874, 0.1133, 0.0228, 0.0925},
|
---|
502 | { 0.1204, 0.0083, 0, 0.0118, 0.0107, 0.0055, 0.2208, 0.3181, 0.0691, 0.0119},
|
---|
503 | { 0.0703, 0.0001, 0.0118, 0, 0.0582, 0.0549, 0.1208, 0.1341, 0.0111, 0.0479},
|
---|
504 | { 0.2451, 0.0494, 0.0107, 0.0582, 0, 0.0010, 0.2774, 0.2574, 0.1207, 0.0007},
|
---|
505 | { 0.1932, 0.0416, 0.0055, 0.0549, 0.0010, 0, 0.2946, 0.2347, 0.0840, 0.0034},
|
---|
506 | { 0.0180, 0.1874, 0.2208, 0.1208, 0.2774, 0.2946, 0, 0.0001, 0.0934, 0.3384},
|
---|
507 | { 0.0171, 0.1133, 0.3181, 0.1341, 0.2574, 0.2347, 0.0001, 0, 0.0891, 0.2133},
|
---|
508 | { 0.0323, 0.0228, 0.0691, 0.0111, 0.1207, 0.0840, 0.0934, 0.0891, 0, 0.1299},
|
---|
509 | { 0.2478, 0.0925, 0.0119, 0.0479, 0.0007, 0.0034, 0.3384, 0.2133, 0.1299, 0},
|
---|
510 | },
|
---|
511 | new double[,]
|
---|
512 | {
|
---|
513 | { 0, 0.0098, 0.1427, 0.0239, 0.0193, 0.0020, 0.1179, 0.1363, 0.1310, 0.0223},
|
---|
514 | { 0.0098, 0, 0.0828, 0.0493, 0.0553, 0.0213, 0.0538, 0.0506, 0.0574, 0.0081},
|
---|
515 | { 0.1427, 0.0828, 0, 0.2908, 0.3087, 0.1947, 0.0133, 0.0050, 0.0187, 0.0494},
|
---|
516 | { 0.0239, 0.0493, 0.2908, 0, 0.0005, 0.0175, 0.1674, 0.2256, 0.1509, 0.0768},
|
---|
517 | { 0.0193, 0.0553, 0.3087, 0.0005, 0, 0.0121, 0.1425, 0.1652, 0.1926, 0.0849},
|
---|
518 | { 0.0020, 0.0213, 0.1947, 0.0175, 0.0121, 0, 0.1035, 0.1094, 0.0981, 0.0518},
|
---|
519 | { 0.1179, 0.0538, 0.0133, 0.1674, 0.1425, 0.1035, 0, 0.0048, 0.0000, 0.0171},
|
---|
520 | { 0.1363, 0.0506, 0.0050, 0.2256, 0.1652, 0.1094, 0.0048, 0, 0.0043, 0.0209},
|
---|
521 | { 0.1310, 0.0574, 0.0187, 0.1509, 0.1926, 0.0981, 0.0000, 0.0043, 0, 0.0189},
|
---|
522 | { 0.0223, 0.0081, 0.0494, 0.0768, 0.0849, 0.0518, 0.0171, 0.0209, 0.0189, 0},
|
---|
523 | },
|
---|
524 | new double[,]
|
---|
525 | {
|
---|
526 | { 0, 0.0441, 0.0162, 0.0636, 0.0102, 0.0607, 0.0219, 0.0034, 0.0418, 0.1036},
|
---|
527 | { 0.0441, 0, 0.0760, 0.0050, 0.0877, 0.0080, 0.0032, 0.0383, 0.1549, 0.0394},
|
---|
528 | { 0.0162, 0.0760, 0, 0.1383, 0.0017, 0.1442, 0.0637, 0.0088, 0.0008, 0.1587},
|
---|
529 | { 0.0636, 0.0050, 0.1383, 0, 0.1525, 0.0000, 0.0134, 0.0838, 0.1319, 0.0047},
|
---|
530 | { 0.0102, 0.0877, 0.0017, 0.1525, 0, 0.1932, 0.0393, 0.0013, 0.0046, 0.1872},
|
---|
531 | { 0.0607, 0.0080, 0.1442, 0.0000, 0.1932, 0, 0.0154, 0.0676, 0.1524, 0.0068},
|
---|
532 | { 0.0219, 0.0032, 0.0637, 0.0134, 0.0393, 0.0154, 0, 0.0463, 0.1176, 0.0359},
|
---|
533 | { 0.0034, 0.0383, 0.0088, 0.0838, 0.0013, 0.0676, 0.0463, 0, 0.0147, 0.0787},
|
---|
534 | { 0.0418, 0.1549, 0.0008, 0.1319, 0.0046, 0.1524, 0.1176, 0.0147, 0, 0.2390},
|
---|
535 | { 0.1036, 0.0394, 0.1587, 0.0047, 0.1872, 0.0068, 0.0359, 0.0787, 0.2390, 0},
|
---|
536 | },
|
---|
537 | new double[,]
|
---|
538 | {
|
---|
539 | { 0, 0.0166, 0.0813, 0.1208, 0.1221, 0.1784, 0.1217, 0.0967, 0.0096, 0.0086},
|
---|
540 | { 0.0166, 0, 0.0315, 0.0499, 0.0622, 0.1381, 0.0438, 0.0248, 0.0012, 0.0003},
|
---|
541 | { 0.0813, 0.0315, 0, 0.0012, 0.0008, 0.0149, 0.0002, 0.0004, 0.0680, 0.0342},
|
---|
542 | { 0.1208, 0.0499, 0.0012, 0, 0.0001, 0.0125, 0.0022, 0.0025, 0.0550, 0.0521},
|
---|
543 | { 0.1221, 0.0622, 0.0008, 0.0001, 0, 0.0151, 0.0015, 0.0014, 0.0724, 0.0618},
|
---|
544 | { 0.1784, 0.1381, 0.0149, 0.0125, 0.0151, 0, 0.0184, 0.0145, 0.1119, 0.1556},
|
---|
545 | { 0.1217, 0.0438, 0.0002, 0.0022, 0.0015, 0.0184, 0, 0.0000, 0.0663, 0.0356},
|
---|
546 | { 0.0967, 0.0248, 0.0004, 0.0025, 0.0014, 0.0145, 0.0000, 0, 0.0578, 0.0214},
|
---|
547 | { 0.0096, 0.0012, 0.0680, 0.0550, 0.0724, 0.1119, 0.0663, 0.0578, 0, 0.0003},
|
---|
548 | { 0.0086, 0.0003, 0.0342, 0.0521, 0.0618, 0.1556, 0.0356, 0.0214, 0.0003, 0},
|
---|
549 | },
|
---|
550 | new double[,]
|
---|
551 | {
|
---|
552 | { 2.0000, 1.6749, 1.2884, 1.4086, 1.4481, 1.3558, 1.6576, 1.4857, 1.7530, 1.3818},
|
---|
553 | { 1.6749, 2.0000, 1.2296, 1.3147, 1.5166, 1.5831, 1.5672, 1.1884, 1.6266, 1.8443},
|
---|
554 | { 1.2884, 1.2296, 2.0000, 1.3383, 1.4280, 1.3533, 1.3417, 1.5791, 1.5769, 1.2005},
|
---|
555 | { 1.4086, 1.3147, 1.3383, 2.0000, 1.5691, 1.7228, 1.2914, 1.3262, 1.2286, 1.2725},
|
---|
556 | { 1.4481, 1.5166, 1.4280, 1.5691, 2.0000, 1.7466, 1.2457, 1.1805, 1.4515, 1.4286},
|
---|
557 | { 1.3558, 1.5831, 1.3533, 1.7228, 1.7466, 2.0000, 1.3401, 1.1758, 1.3083, 1.6150},
|
---|
558 | { 1.6576, 1.5672, 1.3417, 1.2914, 1.2457, 1.3401, 2.0000, 1.6740, 1.6662, 1.3186},
|
---|
559 | { 1.4857, 1.1884, 1.5791, 1.3262, 1.1805, 1.1758, 1.6740, 2.0000, 1.5674, 1.0305},
|
---|
560 | { 1.7530, 1.6266, 1.5769, 1.2286, 1.4515, 1.3083, 1.6662, 1.5674, 2.0000, 1.3985},
|
---|
561 | { 1.3818, 1.8443, 1.2005, 1.2725, 1.4286, 1.6150, 1.3186, 1.0305, 1.3985, 2.0000},
|
---|
562 | },
|
---|
563 | new double[,]
|
---|
564 | {
|
---|
565 | { 0, -0.0124, -0.0541, -0.0386, -0.0340, -0.0452, -0.0137, -0.0298, -0.0073, -0.0419},
|
---|
566 | { -0.0124, 0, -0.0623, -0.0505, -0.0265, -0.0200, -0.0215, -0.0682, -0.0162, -0.0029},
|
---|
567 | { -0.0541, -0.0623, 0, -0.0474, -0.0363, -0.0455, -0.0470, -0.0204, -0.0206, -0.0664},
|
---|
568 | { -0.0386, -0.0505, -0.0474, 0, -0.0213, -0.0091, -0.0537, -0.0490, -0.0624, -0.0563},
|
---|
569 | { -0.0340, -0.0265, -0.0363, -0.0213, 0, -0.0077, -0.0600, -0.0693, -0.0336, -0.0362},
|
---|
570 | { -0.0452, -0.0200, -0.0455, -0.0091, -0.0077, 0, -0.0472, -0.0700, -0.0514, -0.0172},
|
---|
571 | { -0.0137, -0.0215, -0.0470, -0.0537, -0.0600, -0.0472, 0, -0.0125, -0.0131, -0.0500},
|
---|
572 | { -0.0298, -0.0682, -0.0204, -0.0490, -0.0693, -0.0700, -0.0125, 0, -0.0215, -0.0919},
|
---|
573 | { -0.0073, -0.0162, -0.0206, -0.0624, -0.0336, -0.0514, -0.0131, -0.0215, 0, -0.0399},
|
---|
574 | { -0.0419, -0.0029, -0.0664, -0.0563, -0.0362, -0.0172, -0.0500, -0.0919, -0.0399, 0},
|
---|
575 | },
|
---|
576 | }
|
---|
577 | );
|
---|
578 |
|
---|
579 | TestCovarianceFunction(new CovarianceRationalQuadraticArd(), 1,
|
---|
580 | new double[,]
|
---|
581 | {
|
---|
582 | { 6.8660, 6.8070, 7.2367, 6.8409, 7.1145, 6.7347, 6.9959, 7.1068, 6.9839, 7.1923},
|
---|
583 | { 6.9324, 7.0474, 7.0559, 6.9038, 7.0827, 6.7961, 7.0038, 7.1944, 7.0644, 7.1739},
|
---|
584 | { 7.1392, 7.1106, 7.2253, 7.0255, 6.8461, 7.1536, 7.2179, 6.9926, 7.1158, 7.2099},
|
---|
585 | { 7.1429, 6.8249, 7.1453, 7.0658, 6.6525, 6.8816, 7.2752, 7.2623, 7.2467, 7.1995},
|
---|
586 | { 7.2671, 6.8913, 7.1326, 7.2827, 6.5716, 6.6915, 7.1564, 7.3065, 7.2931, 7.2459},
|
---|
587 | { 7.2567, 7.0886, 7.0466, 7.2086, 6.7069, 6.8897, 7.2522, 7.3388, 7.3405, 7.2471},
|
---|
588 | { 6.9215, 7.1164, 7.0807, 6.8626, 7.2540, 6.8471, 6.9792, 6.9401, 6.9937, 7.1935},
|
---|
589 | { 6.9185, 6.9428, 7.1836, 6.8210, 7.0584, 6.9346, 7.0369, 6.8105, 6.9354, 7.1496},
|
---|
590 | { 6.9598, 7.0372, 7.2481, 6.9176, 7.1623, 6.8992, 7.0200, 7.0247, 7.0033, 7.2280},
|
---|
591 | { 6.8692, 7.0646, 6.9424, 6.7937, 6.9495, 6.9165, 7.0254, 7.1813, 7.0242, 7.0668},
|
---|
592 | },
|
---|
593 | new double[][,]
|
---|
594 | {
|
---|
595 | new double[,]
|
---|
596 | {
|
---|
597 | { 0, 0.1304, 0.2130, 0.2577, 0.0051, 0.0048, 0.0061, 0.2187, 0.0023, 0.0863},
|
---|
598 | { 0.1304, 0, 0.6491, 0.7284, 0.1836, 0.1841, 0.0788, 0.6386, 0.0979, 0.0037},
|
---|
599 | { 0.2130, 0.6491, 0, 0.0016, 0.1576, 0.1566, 0.2918, 0.0000, 0.2709, 0.5549},
|
---|
600 | { 0.2577, 0.7284, 0.0016, 0, 0.1959, 0.2014, 0.3334, 0.0018, 0.2955, 0.6260},
|
---|
601 | { 0.0051, 0.1836, 0.1576, 0.1959, 0, 0.0000, 0.0210, 0.1476, 0.0138, 0.1340},
|
---|
602 | { 0.0048, 0.1841, 0.1566, 0.2014, 0.0000, 0, 0.0210, 0.1485, 0.0131, 0.1368},
|
---|
603 | { 0.0061, 0.0788, 0.2918, 0.3334, 0.0210, 0.0210, 0, 0.3051, 0.0010, 0.0467},
|
---|
604 | { 0.2187, 0.6386, 0.0000, 0.0018, 0.1476, 0.1485, 0.3051, 0, 0.2679, 0.5250},
|
---|
605 | { 0.0023, 0.0979, 0.2709, 0.2955, 0.0138, 0.0131, 0.0010, 0.2679, 0, 0.0615},
|
---|
606 | { 0.0863, 0.0037, 0.5549, 0.6260, 0.1340, 0.1368, 0.0467, 0.5250, 0.0615, 0},
|
---|
607 | },
|
---|
608 | new double[,]
|
---|
609 | {
|
---|
610 | { 0, 0.1472, 0.2623, 0.1312, 0.4360, 0.3853, 0.0252, 0.0290, 0.0410, 0.4783},
|
---|
611 | { 0.1472, 0, 0.0195, 0.0002, 0.0811, 0.0633, 0.2900, 0.2833, 0.0330, 0.1071},
|
---|
612 | { 0.2623, 0.0195, 0, 0.0240, 0.0196, 0.0110, 0.4485, 0.4860, 0.1059, 0.0293},
|
---|
613 | { 0.1312, 0.0002, 0.0240, 0, 0.0898, 0.0718, 0.2620, 0.2779, 0.0262, 0.1067},
|
---|
614 | { 0.4360, 0.0811, 0.0196, 0.0898, 0, 0.0012, 0.6403, 0.6512, 0.2138, 0.0013},
|
---|
615 | { 0.3853, 0.0633, 0.0110, 0.0718, 0.0012, 0, 0.5997, 0.5978, 0.1783, 0.0050},
|
---|
616 | { 0.0252, 0.2900, 0.4485, 0.2620, 0.6403, 0.5997, 0, 0.0002, 0.1297, 0.7083},
|
---|
617 | { 0.0290, 0.2833, 0.4860, 0.2779, 0.6512, 0.5978, 0.0002, 0, 0.1379, 0.6776},
|
---|
618 | { 0.0410, 0.0330, 0.1059, 0.0262, 0.2138, 0.1783, 0.1297, 0.1379, 0, 0.2455},
|
---|
619 | { 0.4783, 0.1071, 0.0293, 0.1067, 0.0013, 0.0050, 0.7083, 0.6776, 0.2455, 0},
|
---|
620 | },
|
---|
621 | new double[,]
|
---|
622 | {
|
---|
623 | { 0, 0.0135, 0.3109, 0.0446, 0.0343, 0.0040, 0.1652, 0.2317, 0.1661, 0.0430},
|
---|
624 | { 0.0135, 0, 0.1954, 0.1037, 0.0908, 0.0323, 0.0832, 0.1265, 0.0831, 0.0094},
|
---|
625 | { 0.3109, 0.1954, 0, 0.5932, 0.5627, 0.3898, 0.0271, 0.0076, 0.0287, 0.1215},
|
---|
626 | { 0.0446, 0.1037, 0.5932, 0, 0.0007, 0.0229, 0.3633, 0.4676, 0.3566, 0.1709},
|
---|
627 | { 0.0343, 0.0908, 0.5627, 0.0007, 0, 0.0155, 0.3289, 0.4180, 0.3412, 0.1546},
|
---|
628 | { 0.0040, 0.0323, 0.3898, 0.0229, 0.0155, 0, 0.2106, 0.2787, 0.2080, 0.0761},
|
---|
629 | { 0.1652, 0.0832, 0.0271, 0.3633, 0.3289, 0.2106, 0, 0.0066, 0.0000, 0.0357},
|
---|
630 | { 0.2317, 0.1265, 0.0076, 0.4676, 0.4180, 0.2787, 0.0066, 0, 0.0067, 0.0665},
|
---|
631 | { 0.1661, 0.0831, 0.0287, 0.3566, 0.3412, 0.2080, 0.0000, 0.0067, 0, 0.0358},
|
---|
632 | { 0.0430, 0.0094, 0.1215, 0.1709, 0.1546, 0.0761, 0.0357, 0.0665, 0.0358, 0},
|
---|
633 | },
|
---|
634 | new double[,]
|
---|
635 | {
|
---|
636 | { 0, 0.0606, 0.0353, 0.1187, 0.0182, 0.1211, 0.0307, 0.0058, 0.0530, 0.2000},
|
---|
637 | { 0.0606, 0, 0.1794, 0.0105, 0.1438, 0.0121, 0.0050, 0.0958, 0.2245, 0.0456},
|
---|
638 | { 0.0353, 0.1794, 0, 0.2821, 0.0031, 0.2886, 0.1294, 0.0135, 0.0012, 0.3901},
|
---|
639 | { 0.1187, 0.0105, 0.2821, 0, 0.2356, 0.0000, 0.0291, 0.1737, 0.3117, 0.0105},
|
---|
640 | { 0.0182, 0.1438, 0.0031, 0.2356, 0, 0.2466, 0.0907, 0.0033, 0.0081, 0.3409},
|
---|
641 | { 0.1211, 0.0121, 0.2886, 0.0000, 0.2466, 0, 0.0313, 0.1720, 0.3233, 0.0100},
|
---|
642 | { 0.0307, 0.0050, 0.1294, 0.0291, 0.0907, 0.0313, 0, 0.0638, 0.1634, 0.0752},
|
---|
643 | { 0.0058, 0.0958, 0.0135, 0.1737, 0.0033, 0.1720, 0.0638, 0, 0.0227, 0.2501},
|
---|
644 | { 0.0530, 0.2245, 0.0012, 0.3117, 0.0081, 0.3233, 0.1634, 0.0227, 0, 0.4517},
|
---|
645 | { 0.2000, 0.0456, 0.3901, 0.0105, 0.3409, 0.0100, 0.0752, 0.2501, 0.4517, 0},
|
---|
646 | },
|
---|
647 | new double[,]
|
---|
648 | {
|
---|
649 | { 0, 0.0228, 0.1771, 0.2255, 0.2172, 0.3559, 0.1705, 0.1644, 0.0122, 0.0167},
|
---|
650 | { 0.0228, 0, 0.0745, 0.1050, 0.1020, 0.2099, 0.0679, 0.0620, 0.0017, 0.0004},
|
---|
651 | { 0.1771, 0.0745, 0, 0.0024, 0.0015, 0.0299, 0.0004, 0.0005, 0.1042, 0.0840},
|
---|
652 | { 0.2255, 0.1050, 0.0024, 0, 0.0001, 0.0163, 0.0048, 0.0051, 0.1299, 0.1160},
|
---|
653 | { 0.2172, 0.1020, 0.0015, 0.0001, 0, 0.0192, 0.0034, 0.0036, 0.1283, 0.1125},
|
---|
654 | { 0.3559, 0.2099, 0.0299, 0.0163, 0.0192, 0, 0.0374, 0.0368, 0.2374, 0.2284},
|
---|
655 | { 0.1705, 0.0679, 0.0004, 0.0048, 0.0034, 0.0374, 0, 0.0000, 0.0921, 0.0746},
|
---|
656 | { 0.1644, 0.0620, 0.0005, 0.0051, 0.0036, 0.0368, 0.0000, 0, 0.0895, 0.0680},
|
---|
657 | { 0.0122, 0.0017, 0.1042, 0.1299, 0.1283, 0.2374, 0.0921, 0.0895, 0, 0.0005},
|
---|
658 | { 0.0167, 0.0004, 0.0840, 0.1160, 0.1125, 0.2284, 0.0746, 0.0680, 0.0005, 0},
|
---|
659 | },
|
---|
660 | new double[,]
|
---|
661 | {
|
---|
662 | { 14.7781, 14.3968, 13.7277, 13.9699, 14.0420, 13.8682, 14.3727, 14.1074, 14.5000, 13.9192},
|
---|
663 | { 14.3968, 14.7781, 13.5943, 13.7839, 14.1589, 14.2640, 14.2397, 13.4942, 14.3286, 14.6106},
|
---|
664 | { 13.7277, 13.5943, 14.7781, 13.8329, 14.0057, 13.8630, 13.8396, 14.2579, 14.2545, 13.5242},
|
---|
665 | { 13.9699, 13.7839, 13.8329, 14.7781, 14.2426, 14.4610, 13.7342, 13.8078, 13.5920, 13.6926},
|
---|
666 | { 14.0420, 14.1589, 14.0057, 14.2426, 14.7781, 14.4918, 13.6319, 13.4742, 14.0479, 14.0069},
|
---|
667 | { 13.8682, 14.2640, 13.8630, 14.4610, 14.4918, 14.7781, 13.8365, 13.4625, 13.7703, 14.3117},
|
---|
668 | { 14.3727, 14.2397, 13.8396, 13.7342, 13.6319, 13.8365, 14.7781, 14.3956, 14.3848, 13.7920},
|
---|
669 | { 14.1074, 13.4942, 14.2579, 13.8078, 13.4742, 13.4625, 14.3956, 14.7781, 14.2399, 13.0490},
|
---|
670 | { 14.5000, 14.3286, 14.2545, 13.5920, 14.0479, 13.7703, 14.3848, 14.2399, 14.7781, 13.9510},
|
---|
671 | { 13.9192, 14.6106, 13.5242, 13.6926, 14.0069, 14.3117, 13.7920, 13.0490, 13.9510, 14.7781},
|
---|
672 | },
|
---|
673 | new double[,]
|
---|
674 | {
|
---|
675 | { 0, -0.0009, -0.0068, -0.0040, -0.0034, -0.0051, -0.0010, -0.0028, -0.0005, -0.0046},
|
---|
676 | { -0.0009, 0, -0.0086, -0.0061, -0.0024, -0.0016, -0.0018, -0.0101, -0.0013, -0.0002},
|
---|
677 | { -0.0068, -0.0086, 0, -0.0055, -0.0037, -0.0052, -0.0054, -0.0017, -0.0017, -0.0097},
|
---|
678 | { -0.0040, -0.0061, -0.0055, 0, -0.0018, -0.0006, -0.0067, -0.0058, -0.0087, -0.0073},
|
---|
679 | { -0.0034, -0.0024, -0.0037, -0.0018, 0, -0.0005, -0.0081, -0.0105, -0.0033, -0.0037},
|
---|
680 | { -0.0051, -0.0016, -0.0052, -0.0006, -0.0005, 0, -0.0055, -0.0106, -0.0063, -0.0013},
|
---|
681 | { -0.0010, -0.0018, -0.0054, -0.0067, -0.0081, -0.0055, 0, -0.0009, -0.0010, -0.0060},
|
---|
682 | { -0.0028, -0.0101, -0.0017, -0.0058, -0.0105, -0.0106, -0.0009, 0, -0.0018, -0.0183},
|
---|
683 | { -0.0005, -0.0013, -0.0017, -0.0087, -0.0033, -0.0063, -0.0010, -0.0018, 0, -0.0042},
|
---|
684 | { -0.0046, -0.0002, -0.0097, -0.0073, -0.0037, -0.0013, -0.0060, -0.0183, -0.0042, 0},
|
---|
685 | },
|
---|
686 | }
|
---|
687 | );
|
---|
688 | }
|
---|
689 |
|
---|
690 |
|
---|
691 | [TestMethod]
|
---|
692 | public void CovMaternIsoTest() {
|
---|
693 | var cov = new CovarianceMaternIso();
|
---|
694 | cov.DParameter.Value = cov.DParameter.ValidValues.Single(x => x.Value == 1);
|
---|
695 | TestCovarianceFunction(cov, 0,
|
---|
696 | new double[,]
|
---|
697 | {
|
---|
698 | { 0.3504, 0.3297, 0.5736, 0.3413, 0.4721, 0.3071, 0.4052, 0.4670, 0.3995, 0.5310},
|
---|
699 | { 0.3765, 0.4317, 0.4364, 0.3649, 0.4520, 0.3261, 0.4090, 0.5328, 0.4412, 0.5155},
|
---|
700 | { 0.4891, 0.4695, 0.5618, 0.4200, 0.3432, 0.4996, 0.5545, 0.4036, 0.4729, 0.5468},
|
---|
701 | { 0.4918, 0.3358, 0.4935, 0.4420, 0.2843, 0.3562, 0.6189, 0.6027, 0.5844, 0.5373},
|
---|
702 | { 0.6085, 0.3600, 0.4844, 0.6291, 0.2643, 0.2947, 0.5017, 0.6650, 0.6440, 0.5835},
|
---|
703 | { 0.5959, 0.4556, 0.4312, 0.5456, 0.2990, 0.3593, 0.5907, 0.7278, 0.7318, 0.5848},
|
---|
704 | { 0.3720, 0.4733, 0.4507, 0.3492, 0.5928, 0.3435, 0.3972, 0.3798, 0.4041, 0.5320},
|
---|
705 | { 0.3708, 0.3810, 0.5235, 0.3344, 0.4378, 0.3775, 0.4260, 0.3309, 0.3778, 0.4967},
|
---|
706 | { 0.3884, 0.4261, 0.5860, 0.3704, 0.5063, 0.3631, 0.4172, 0.4196, 0.4088, 0.5645},
|
---|
707 | { 0.3516, 0.4413, 0.3808, 0.3253, 0.3839, 0.3700, 0.4200, 0.5215, 0.4193, 0.4426},
|
---|
708 | },
|
---|
709 | new double[][,]
|
---|
710 | {
|
---|
711 | new double[,] {
|
---|
712 | { 0, 0.3341, 0.3674, 0.3665, 0.3647, 0.3678, 0.3380, 0.3621, 0.3122, 0.3673},
|
---|
713 | { 0.3341, 0, 0.3655, 0.3678, 0.3593, 0.3512, 0.3535, 0.3632, 0.3441, 0.2724},
|
---|
714 | { 0.3674, 0.3655, 0, 0.3679, 0.3657, 0.3678, 0.3679, 0.3518, 0.3521, 0.3639},
|
---|
715 | { 0.3665, 0.3678, 0.3679, 0, 0.3532, 0.3217, 0.3675, 0.3679, 0.3654, 0.3670},
|
---|
716 | { 0.3647, 0.3593, 0.3657, 0.3532, 0, 0.3143, 0.3661, 0.3627, 0.3645, 0.3657},
|
---|
717 | { 0.3678, 0.3512, 0.3678, 0.3217, 0.3143, 0, 0.3679, 0.3624, 0.3677, 0.3462},
|
---|
718 | { 0.3380, 0.3535, 0.3679, 0.3675, 0.3661, 0.3679, 0, 0.3343, 0.3361, 0.3678},
|
---|
719 | { 0.3621, 0.3632, 0.3518, 0.3679, 0.3627, 0.3624, 0.3343, 0, 0.3534, 0.3480},
|
---|
720 | { 0.3122, 0.3441, 0.3521, 0.3654, 0.3645, 0.3677, 0.3361, 0.3534, 0, 0.3669},
|
---|
721 | { 0.3673, 0.2724, 0.3639, 0.3670, 0.3657, 0.3462, 0.3678, 0.3480, 0.3669, 0},
|
---|
722 | },
|
---|
723 | new double[,] {
|
---|
724 | { 2.0000, 1.0726, 0.6992, 0.7999, 0.8353, 0.7546, 1.0516, 0.8703, 1.1763, 0.7767},
|
---|
725 | { 1.0726, 2.0000, 0.6529, 0.7205, 0.9001, 0.9680, 0.9512, 0.6215, 1.0157, 1.3261},
|
---|
726 | { 0.6992, 0.6529, 2.0000, 0.7399, 0.8171, 0.7524, 0.7427, 0.9637, 0.9614, 0.6307},
|
---|
727 | { 0.7999, 0.7205, 0.7399, 2.0000, 0.9532, 1.1341, 0.7016, 0.7298, 0.6522, 0.6865},
|
---|
728 | { 0.8353, 0.9001, 0.8171, 0.9532, 2.0000, 1.1670, 0.6654, 0.6156, 0.8384, 0.8177},
|
---|
729 | { 0.7546, 0.9680, 0.7524, 1.1341, 1.1670, 2.0000, 0.7414, 0.6121, 0.7152, 1.0027},
|
---|
730 | { 1.0516, 0.9512, 0.7427, 0.7016, 0.6654, 0.7414, 2.0000, 1.0716, 1.0620, 0.7236},
|
---|
731 | { 0.8703, 0.6215, 0.9637, 0.7298, 0.6156, 0.6121, 1.0716, 2.0000, 0.9514, 0.5073},
|
---|
732 | { 1.1763, 1.0157, 0.9614, 0.6522, 0.8384, 0.7152, 1.0620, 0.9514, 2.0000, 0.7911},
|
---|
733 | { 0.7767, 1.3261, 0.6307, 0.6865, 0.8177, 1.0027, 0.7236, 0.5073, 0.7911, 2.0000},
|
---|
734 | },
|
---|
735 | }
|
---|
736 | );
|
---|
737 |
|
---|
738 | cov = new CovarianceMaternIso();
|
---|
739 | cov.DParameter.Value = cov.DParameter.ValidValues.Single(x => x.Value == 1);
|
---|
740 | TestCovarianceFunction(cov, 1,
|
---|
741 | new double[,]
|
---|
742 | {
|
---|
743 | { 5.0240, 4.9127, 6.0225, 4.9757, 5.6062, 4.7858, 5.2996, 5.5839, 5.2720, 5.8539},
|
---|
744 | { 5.1587, 5.4247, 5.4464, 5.0993, 5.5171, 4.8930, 5.3181, 5.8612, 5.4683, 5.7906},
|
---|
745 | { 5.6795, 5.5947, 5.9766, 5.3703, 4.9856, 5.7244, 5.9479, 5.2920, 5.6098, 5.9177},
|
---|
746 | { 5.6910, 4.9457, 5.6984, 5.4720, 4.6518, 5.0545, 6.1936, 6.1332, 6.0640, 5.8794},
|
---|
747 | { 6.1550, 5.0740, 5.6595, 6.2308, 4.5290, 4.7142, 5.7333, 6.3593, 6.2847, 6.0607},
|
---|
748 | { 6.1078, 5.5332, 5.4226, 5.9127, 4.7394, 5.0707, 6.0880, 6.5739, 6.5871, 6.0658},
|
---|
749 | { 5.1358, 5.6116, 5.5116, 5.0174, 6.0960, 4.9875, 5.2612, 5.1753, 5.2945, 5.8581},
|
---|
750 | { 5.1296, 5.1809, 5.8235, 4.9384, 5.4528, 5.1635, 5.3983, 4.9192, 5.1652, 5.7119},
|
---|
751 | { 5.2179, 5.3989, 6.0701, 5.1278, 5.7524, 5.0900, 5.3568, 5.3681, 5.3171, 5.9874},
|
---|
752 | { 5.0301, 5.4688, 5.1800, 4.8886, 5.1954, 5.1255, 5.3700, 5.8155, 5.3671, 5.4746},
|
---|
753 | },
|
---|
754 | new double[][,]
|
---|
755 | {
|
---|
756 | new double[,] {
|
---|
757 | { 0, 1.3467, 1.9408, 1.7781, 1.7213, 1.8512, 1.3793, 1.6654, 1.1869, 1.8156},
|
---|
758 | { 1.3467, 0, 2.0157, 1.9064, 1.6180, 1.5105, 1.5369, 2.0667, 1.4355, 0.9602},
|
---|
759 | { 1.9408, 2.0157, 0, 1.8749, 1.7505, 1.8547, 1.8704, 1.5173, 1.5209, 2.0519},
|
---|
760 | { 1.7781, 1.9064, 1.8749, 0, 1.5338, 1.2516, 1.9369, 1.8912, 2.0170, 1.9613},
|
---|
761 | { 1.7213, 1.6180, 1.7505, 1.5338, 0, 1.2011, 1.9955, 2.0764, 1.7164, 1.7495},
|
---|
762 | { 1.8512, 1.5105, 1.8547, 1.2516, 1.2011, 0, 1.8725, 2.0820, 1.9149, 1.4559},
|
---|
763 | { 1.3793, 1.5369, 1.8704, 1.9369, 1.9955, 1.8725, 0, 1.3483, 1.3632, 1.9013},
|
---|
764 | { 1.6654, 2.0667, 1.5173, 1.8912, 2.0764, 2.0820, 1.3483, 0, 1.5366, 2.2512},
|
---|
765 | { 1.1869, 1.4355, 1.5209, 2.0170, 1.7164, 1.9149, 1.3632, 1.5366, 0, 1.7923},
|
---|
766 | { 1.8156, 0.9602, 2.0519, 1.9613, 1.7495, 1.4559, 1.9013, 2.2512, 1.7923, 0},
|
---|
767 | },
|
---|
768 | new double[,] {
|
---|
769 | { 14.7781, 11.7510, 10.0394, 10.5489, 10.7184, 10.3248, 11.6660, 10.8814, 12.1567, 10.4351},
|
---|
770 | { 11.7510, 14.7781, 9.7898, 10.1506, 11.0167, 11.3155, 11.2432, 9.6139, 11.5176, 12.7049},
|
---|
771 | { 10.0394, 9.7898, 14.7781, 10.2506, 10.6319, 10.3138, 10.2646, 11.2970, 11.2870, 9.6657},
|
---|
772 | { 10.5489, 10.1506, 10.2506, 14.7781, 11.2517, 11.9945, 10.0521, 10.1990, 9.7856, 9.9719},
|
---|
773 | { 10.7184, 11.0167, 10.6319, 11.2517, 14.7781, 12.1214, 9.8583, 9.5798, 10.7329, 10.6348},
|
---|
774 | { 10.3248, 11.3155, 10.3138, 11.9945, 12.1214, 14.7781, 10.2581, 9.5600, 10.1233, 11.4631},
|
---|
775 | { 11.6660, 11.2432, 10.2646, 10.0521, 9.8583, 10.2581, 14.7781, 11.7468, 11.7082, 10.1669},
|
---|
776 | { 10.8814, 9.6139, 11.2970, 10.1990, 9.5798, 9.5600, 11.7468, 14.7781, 11.2438, 8.9219},
|
---|
777 | { 12.1567, 11.5176, 11.2870, 9.7856, 10.7329, 10.1233, 11.7082, 11.2438, 14.7781, 10.5061},
|
---|
778 | { 10.4351, 12.7049, 9.6657, 9.9719, 10.6348, 11.4631, 10.1669, 8.9219, 10.5061, 14.7781},
|
---|
779 | },
|
---|
780 | }
|
---|
781 | );
|
---|
782 |
|
---|
783 | cov = new CovarianceMaternIso();
|
---|
784 | cov.DParameter.Value = cov.DParameter.ValidValues.Single(x => x.Value == 5);
|
---|
785 | TestCovarianceFunction(cov, 0,
|
---|
786 | new double[,]
|
---|
787 | {
|
---|
788 | { 0.4963, 0.4629, 0.7958, 0.4817, 0.6753, 0.4255, 0.5810, 0.6685, 0.5725, 0.7486},
|
---|
789 | { 0.5375, 0.6197, 0.6264, 0.5193, 0.6481, 0.4570, 0.5867, 0.7507, 0.6331, 0.7303},
|
---|
790 | { 0.6974, 0.6718, 0.7832, 0.6029, 0.4847, 0.7108, 0.7752, 0.5786, 0.6764, 0.7668},
|
---|
791 | { 0.7008, 0.4727, 0.7030, 0.6342, 0.3873, 0.5056, 0.8402, 0.8250, 0.8069, 0.7559},
|
---|
792 | { 0.8305, 0.5116, 0.6914, 0.8494, 0.3535, 0.4049, 0.7134, 0.8794, 0.8623, 0.8060},
|
---|
793 | { 0.8184, 0.6530, 0.6190, 0.7654, 0.4121, 0.5105, 0.8132, 0.9232, 0.9256, 0.8074},
|
---|
794 | { 0.5305, 0.6769, 0.6464, 0.4943, 0.8153, 0.4853, 0.5691, 0.5426, 0.5794, 0.7499},
|
---|
795 | { 0.5286, 0.5443, 0.7399, 0.4706, 0.6283, 0.5390, 0.6115, 0.4648, 0.5395, 0.7071},
|
---|
796 | { 0.5557, 0.6117, 0.8085, 0.5280, 0.7191, 0.5164, 0.5987, 0.6022, 0.5864, 0.7862},
|
---|
797 | { 0.4982, 0.6333, 0.5441, 0.4557, 0.5488, 0.5273, 0.6028, 0.7375, 0.6019, 0.6350},
|
---|
798 | },
|
---|
799 | new double[][,]
|
---|
800 | {
|
---|
801 | new double[,] {
|
---|
802 | { 0, 0.3844, 0.5881, 0.5499, 0.5324, 0.5694, 0.3987, 0.5135, 0.3134, 0.5603},
|
---|
803 | { 0.3844, 0, 0.5987, 0.5817, 0.4964, 0.4543, 0.4650, 0.6029, 0.4230, 0.2154},
|
---|
804 | { 0.5881, 0.5987, 0, 0.5749, 0.5416, 0.5703, 0.5739, 0.4571, 0.4586, 0.6019},
|
---|
805 | { 0.5499, 0.5817, 0.5749, 0, 0.4638, 0.3422, 0.5874, 0.5785, 0.5988, 0.5915},
|
---|
806 | { 0.5324, 0.4964, 0.5416, 0.4638, 0, 0.3197, 0.5963, 0.6034, 0.5308, 0.5413},
|
---|
807 | { 0.5694, 0.4543, 0.5703, 0.3422, 0.3197, 0, 0.5744, 0.6036, 0.5833, 0.4316},
|
---|
808 | { 0.3987, 0.4650, 0.5739, 0.5874, 0.5963, 0.5744, 0, 0.3852, 0.3917, 0.5806},
|
---|
809 | { 0.5135, 0.6029, 0.4571, 0.5785, 0.6034, 0.6036, 0.3852, 0, 0.4649, 0.5937},
|
---|
810 | { 0.3134, 0.4230, 0.4586, 0.5988, 0.5308, 0.5833, 0.3917, 0.4649, 0, 0.5539},
|
---|
811 | { 0.5603, 0.2154, 0.6019, 0.5915, 0.5413, 0.4316, 0.5806, 0.5937, 0.5539, 0},
|
---|
812 | },
|
---|
813 | new double[,] {
|
---|
814 | { 2.0000, 1.5097, 0.9901, 1.1464, 1.1989, 1.0773, 1.4852, 1.2492, 1.6213, 1.1113},
|
---|
815 | { 1.5097, 2.0000, 0.9152, 1.0239, 1.2908, 1.3817, 1.3599, 0.8633, 1.4419, 1.7557},
|
---|
816 | { 0.9901, 0.9152, 2.0000, 1.0545, 1.1721, 1.0739, 1.0588, 1.3761, 1.3731, 0.8785},
|
---|
817 | { 1.1464, 1.0239, 1.0545, 2.0000, 1.3625, 1.5777, 0.9939, 1.0387, 0.9139, 0.9697},
|
---|
818 | { 1.1989, 1.2908, 1.1721, 1.3625, 2.0000, 1.6120, 0.9356, 0.8534, 1.2033, 1.1730},
|
---|
819 | { 1.0773, 1.3817, 1.0739, 1.5777, 1.6120, 2.0000, 1.0568, 0.8477, 1.0156, 1.4258},
|
---|
820 | { 1.4852, 1.3599, 1.0588, 0.9939, 0.9356, 1.0568, 2.0000, 1.5084, 1.4974, 1.0289},
|
---|
821 | { 1.2492, 0.8633, 1.3761, 1.0387, 0.8534, 0.8477, 1.5084, 2.0000, 1.3601, 0.6706},
|
---|
822 | { 1.6213, 1.4419, 1.3731, 0.9139, 1.2033, 1.0156, 1.4974, 1.3601, 2.0000, 1.1332},
|
---|
823 | { 1.1113, 1.7557, 0.8785, 0.9697, 1.1730, 1.4258, 1.0289, 0.6706, 1.1332, 2.0000},
|
---|
824 | },
|
---|
825 | }
|
---|
826 | );
|
---|
827 |
|
---|
828 | cov = new CovarianceMaternIso();
|
---|
829 | cov.DParameter.Value = cov.DParameter.ValidValues.Single(x => x.Value == 5);
|
---|
830 | TestCovarianceFunction(cov, 1,
|
---|
831 | new double[,]
|
---|
832 | {
|
---|
833 | { 6.5823, 6.4972, 7.1422, 6.5459, 6.9521, 6.3944, 6.7729, 6.9402, 6.7551, 7.0723},
|
---|
834 | { 6.6790, 6.8501, 6.8629, 6.6372, 6.9035, 6.4817, 6.7847, 7.0756, 6.8757, 7.0436},
|
---|
835 | { 6.9899, 6.9460, 7.1241, 6.8172, 6.5535, 7.0122, 7.1124, 6.7680, 6.9540, 7.0999},
|
---|
836 | { 6.9957, 6.5229, 6.9993, 6.8778, 6.2792, 6.6048, 7.2033, 7.1828, 7.1579, 7.0835},
|
---|
837 | { 7.1904, 6.6190, 6.9797, 7.2154, 6.1675, 6.3337, 7.0164, 7.2536, 7.2321, 7.1567},
|
---|
838 | { 7.1739, 6.9125, 6.8488, 7.0978, 6.3553, 6.6166, 7.1667, 7.3062, 7.3089, 7.1586},
|
---|
839 | { 6.6630, 6.9549, 6.9004, 6.5773, 7.1696, 6.5549, 6.7481, 6.6904, 6.7696, 7.0742},
|
---|
840 | { 6.6587, 6.6943, 7.0587, 6.5173, 6.8667, 6.6823, 6.8343, 6.5023, 6.6835, 7.0060},
|
---|
841 | { 6.7194, 6.8347, 7.1602, 6.6574, 7.0257, 6.6305, 6.8089, 6.8159, 6.7840, 7.1284},
|
---|
842 | { 6.5868, 6.8760, 6.6937, 6.4782, 6.7042, 6.6558, 6.8171, 7.0551, 6.8153, 6.8793},
|
---|
843 | },
|
---|
844 | new double[][,]
|
---|
845 | {
|
---|
846 | new double[,] {
|
---|
847 | { 0, 0.5862, 1.4459, 1.1551, 1.0644, 1.2798, 0.6204, 0.9803, 0.4359, 1.2178},
|
---|
848 | { 0.5862, 0, 1.5974, 1.3802, 0.9128, 0.7716, 0.8048, 1.7072, 0.6825, 0.2685},
|
---|
849 | { 1.4459, 1.5974, 0, 1.3222, 1.1103, 1.2860, 1.3141, 0.7801, 0.7846, 1.6746},
|
---|
850 | { 1.1551, 1.3802, 1.3222, 0, 0.8009, 0.4933, 1.4383, 1.3520, 1.5999, 1.4863},
|
---|
851 | { 1.0644, 0.9128, 1.1103, 0.8009, 0, 0.4481, 1.5552, 1.7288, 1.0568, 1.1088},
|
---|
852 | { 1.2798, 0.7716, 1.2860, 0.4933, 0.4481, 0, 1.3179, 1.7414, 1.3962, 0.7060},
|
---|
853 | { 0.6204, 0.8048, 1.3141, 1.4383, 1.5552, 1.3179, 0, 0.5878, 0.6033, 1.3707},
|
---|
854 | { 0.9803, 1.7072, 0.7801, 1.3520, 1.7288, 1.7414, 0.5878, 0, 0.8045, 2.1597},
|
---|
855 | { 0.4359, 0.6825, 0.7846, 1.5999, 1.0568, 1.3962, 0.6033, 0.8045, 0, 1.1785},
|
---|
856 | { 1.2178, 0.2685, 1.6746, 1.4863, 1.1088, 0.7060, 1.3707, 2.1597, 1.1785, 0},
|
---|
857 | },
|
---|
858 | new double[,] {
|
---|
859 | { 14.7781, 14.1637, 13.1581, 13.5134, 13.6208, 13.3631, 14.1260, 13.7191, 14.3263, 13.4382},
|
---|
860 | { 14.1637, 14.7781, 12.9663, 13.2398, 13.7972, 13.9577, 13.9203, 12.8239, 14.0574, 14.5034},
|
---|
861 | { 13.1581, 12.9663, 14.7781, 13.3113, 13.5666, 13.3555, 13.3212, 13.9482, 13.9431, 12.8665},
|
---|
862 | { 13.5134, 13.2398, 13.3113, 14.7781, 13.9248, 14.2646, 13.1676, 13.2747, 12.9630, 13.1074},
|
---|
863 | { 13.6208, 13.7972, 13.5666, 13.9248, 14.7781, 14.3133, 13.0201, 12.7957, 13.6298, 13.5685},
|
---|
864 | { 13.3631, 13.9577, 13.3555, 14.2646, 14.3133, 14.7781, 13.3166, 12.7791, 13.2200, 14.0312},
|
---|
865 | { 14.1260, 13.9203, 13.3212, 13.1676, 13.0201, 13.3166, 14.7781, 14.1618, 14.1449, 13.2516},
|
---|
866 | { 13.7191, 12.8239, 13.9482, 13.2747, 12.7957, 12.7791, 14.1618, 14.7781, 13.9207, 12.2062},
|
---|
867 | { 14.3263, 14.0574, 13.9431, 12.9630, 13.6298, 13.2200, 14.1449, 13.9207, 14.7781, 13.4853},
|
---|
868 | { 13.4382, 14.5034, 12.8665, 13.1074, 13.5685, 14.0312, 13.2516, 12.2062, 13.4853, 14.7781},
|
---|
869 | },
|
---|
870 | }
|
---|
871 | );
|
---|
872 |
|
---|
873 | }
|
---|
874 |
|
---|
875 |
|
---|
876 | [TestMethod]
|
---|
877 | public void CovLinearTest() {
|
---|
878 | TestCovarianceFunction(new CovarianceLinear(), 0,
|
---|
879 | new double[,]
|
---|
880 | {
|
---|
881 | { 0.9089, 0.9972, 1.8813, 0.8618, 2.0021, 1.5168, 1.2612, 1.1009, 0.9505, 1.3851},
|
---|
882 | { 0.4654, 0.7436, 1.1758, 0.4150, 1.4523, 1.0699, 0.7535, 0.6763, 0.5205, 0.8497},
|
---|
883 | { 1.3720, 1.4959, 2.0386, 1.2323, 1.8810, 2.1422, 1.6645, 1.1482, 1.2602, 1.5724},
|
---|
884 | { 0.8471, 0.6576, 1.4266, 0.7465, 1.1331, 1.3214, 1.1946, 0.9028, 0.8676, 1.0329},
|
---|
885 | { 0.7965, 0.5520, 1.2342, 0.7932, 0.8598, 0.9288, 0.8927, 0.7687, 0.7359, 0.9016},
|
---|
886 | { 0.5306, 0.5096, 0.8879, 0.4618, 0.7612, 0.8960, 0.7367, 0.5462, 0.5287, 0.6475},
|
---|
887 | { 0.8779, 1.2411, 1.6264, 0.7940, 2.0552, 1.5512, 1.1513, 0.8304, 0.8692, 1.2945},
|
---|
888 | { 1.4220, 1.6026, 2.2818, 1.2951, 2.3982, 2.1948, 1.7607, 1.2346, 1.3533, 1.7961},
|
---|
889 | { 1.0930, 1.3304, 1.9745, 1.0278, 2.1338, 1.7821, 1.3686, 1.0951, 1.0529, 1.5035},
|
---|
890 | { 0.3406, 0.7064, 0.9980, 0.2373, 1.2538, 1.1479, 0.7212, 0.6072, 0.4222, 0.6815},
|
---|
891 | },
|
---|
892 | new double[][,]
|
---|
893 | {
|
---|
894 | }
|
---|
895 | );
|
---|
896 | }
|
---|
897 |
|
---|
898 | [TestMethod]
|
---|
899 | public void CovLinearArdTest() {
|
---|
900 | TestCovarianceFunction(new CovarianceLinearArd(), 0,
|
---|
901 | new double[,]
|
---|
902 | {
|
---|
903 | { 0.9089, 0.9972, 1.8813, 0.8618, 2.0022, 1.5168, 1.2612, 1.1009, 0.9506, 1.3851},
|
---|
904 | { 0.4654, 0.7437, 1.1757, 0.4150, 1.4523, 1.0699, 0.7535, 0.6763, 0.5206, 0.8497},
|
---|
905 | { 1.3719, 1.4959, 2.0386, 1.2323, 1.8810, 2.1422, 1.6645, 1.1482, 1.2603, 1.5724},
|
---|
906 | { 0.8471, 0.6576, 1.4267, 0.7465, 1.1331, 1.3215, 1.1946, 0.9029, 0.8677, 1.0329},
|
---|
907 | { 0.7965, 0.5520, 1.2342, 0.7932, 0.8598, 0.9288, 0.8927, 0.7688, 0.7360, 0.9016},
|
---|
908 | { 0.5306, 0.5096, 0.8879, 0.4618, 0.7612, 0.8960, 0.7367, 0.5462, 0.5288, 0.6475},
|
---|
909 | { 0.8779, 1.2411, 1.6264, 0.7940, 2.0553, 1.5512, 1.1513, 0.8304, 0.8693, 1.2945},
|
---|
910 | { 1.4220, 1.6025, 2.2818, 1.2950, 2.3982, 2.1948, 1.7607, 1.2347, 1.3535, 1.7961},
|
---|
911 | { 1.0929, 1.3303, 1.9743, 1.0277, 2.1337, 1.7820, 1.3686, 1.0950, 1.0529, 1.5034},
|
---|
912 | { 0.3405, 0.7064, 0.9979, 0.2372, 1.2538, 1.1478, 0.7212, 0.6071, 0.4222, 0.6815},
|
---|
913 | },
|
---|
914 | new double[][,]
|
---|
915 | {
|
---|
916 | new double[,]
|
---|
917 | {
|
---|
918 | { -0.3483, -0.0415, -0.7534, -0.7885, -0.4097, -0.4084, -0.2818, -0.7512, -0.3081, -0.0928},
|
---|
919 | { -0.0415, -0.0049, -0.0897, -0.0939, -0.0488, -0.0486, -0.0336, -0.0895, -0.0367, -0.0111},
|
---|
920 | { -0.7534, -0.0897, -1.6297, -1.7057, -0.8863, -0.8834, -0.6097, -1.6250, -0.6666, -0.2008},
|
---|
921 | { -0.7885, -0.0939, -1.7057, -1.7853, -0.9276, -0.9246, -0.6381, -1.7008, -0.6976, -0.2101},
|
---|
922 | { -0.4097, -0.0488, -0.8863, -0.9276, -0.4820, -0.4804, -0.3316, -0.8837, -0.3625, -0.1092},
|
---|
923 | { -0.4084, -0.0486, -0.8834, -0.9246, -0.4804, -0.4788, -0.3305, -0.8808, -0.3613, -0.1088},
|
---|
924 | { -0.2818, -0.0336, -0.6097, -0.6381, -0.3316, -0.3305, -0.2281, -0.6079, -0.2494, -0.0751},
|
---|
925 | { -0.7512, -0.0895, -1.6250, -1.7008, -0.8837, -0.8808, -0.6079, -1.6204, -0.6646, -0.2002},
|
---|
926 | { -0.3081, -0.0367, -0.6666, -0.6976, -0.3625, -0.3613, -0.2494, -0.6646, -0.2726, -0.0821},
|
---|
927 | { -0.0928, -0.0111, -0.2008, -0.2101, -0.1092, -0.1088, -0.0751, -0.2002, -0.0821, -0.0247},
|
---|
928 | },
|
---|
929 | new double[,]
|
---|
930 | {
|
---|
931 | { -1.2177, -0.6082, -0.3772, -0.6303, -0.1506, -0.2060, -1.4702, -1.4921, -0.8977, -0.0933},
|
---|
932 | { -0.6082, -0.3037, -0.1884, -0.3148, -0.0752, -0.1029, -0.7343, -0.7452, -0.4483, -0.0466},
|
---|
933 | { -0.3772, -0.1884, -0.1168, -0.1952, -0.0466, -0.0638, -0.4554, -0.4622, -0.2781, -0.0289},
|
---|
934 | { -0.6303, -0.3148, -0.1952, -0.3263, -0.0780, -0.1066, -0.7610, -0.7723, -0.4646, -0.0483},
|
---|
935 | { -0.1506, -0.0752, -0.0466, -0.0780, -0.0186, -0.0255, -0.1818, -0.1845, -0.1110, -0.0115},
|
---|
936 | { -0.2060, -0.1029, -0.0638, -0.1066, -0.0255, -0.0348, -0.2487, -0.2524, -0.1519, -0.0158},
|
---|
937 | { -1.4702, -0.7343, -0.4554, -0.7610, -0.1818, -0.2487, -1.7751, -1.8015, -1.0838, -0.1127},
|
---|
938 | { -1.4921, -0.7452, -0.4622, -0.7723, -0.1845, -0.2524, -1.8015, -1.8283, -1.0999, -0.1143},
|
---|
939 | { -0.8977, -0.4483, -0.2781, -0.4646, -0.1110, -0.1519, -1.0838, -1.0999, -0.6617, -0.0688},
|
---|
940 | { -0.0933, -0.0466, -0.0289, -0.0483, -0.0115, -0.0158, -0.1127, -0.1143, -0.0688, -0.0072},
|
---|
941 | },
|
---|
942 | new double[,]
|
---|
943 | {
|
---|
944 | { -0.1103, -0.1659, -0.3856, -0.0072, -0.0202, -0.0794, -0.3048, -0.3436, -0.3042, -0.2117},
|
---|
945 | { -0.1659, -0.2495, -0.5801, -0.0109, -0.0304, -0.1194, -0.4585, -0.5169, -0.4575, -0.3185},
|
---|
946 | { -0.3856, -0.5801, -1.3487, -0.0253, -0.0706, -0.2776, -1.0661, -1.2017, -1.0638, -0.7406},
|
---|
947 | { -0.0072, -0.0109, -0.0253, -0.0005, -0.0013, -0.0052, -0.0200, -0.0225, -0.0199, -0.0139},
|
---|
948 | { -0.0202, -0.0304, -0.0706, -0.0013, -0.0037, -0.0145, -0.0558, -0.0629, -0.0557, -0.0388},
|
---|
949 | { -0.0794, -0.1194, -0.2776, -0.0052, -0.0145, -0.0571, -0.2194, -0.2473, -0.2189, -0.1524},
|
---|
950 | { -0.3048, -0.4585, -1.0661, -0.0200, -0.0558, -0.2194, -0.8427, -0.9499, -0.8408, -0.5854},
|
---|
951 | { -0.3436, -0.5169, -1.2017, -0.0225, -0.0629, -0.2473, -0.9499, -1.0708, -0.9478, -0.6598},
|
---|
952 | { -0.3042, -0.4575, -1.0638, -0.0199, -0.0557, -0.2189, -0.8408, -0.9478, -0.8390, -0.5841},
|
---|
953 | { -0.2117, -0.3185, -0.7406, -0.0139, -0.0388, -0.1524, -0.5854, -0.6598, -0.5841, -0.4066},
|
---|
954 | },
|
---|
955 | new double[,]
|
---|
956 | {
|
---|
957 | { -0.5984, -0.3242, -0.8147, -0.2068, -0.7514, -0.2007, -0.4031, -0.6844, -0.8535, -0.0887},
|
---|
958 | { -0.3242, -0.1756, -0.4413, -0.1120, -0.4070, -0.1087, -0.2184, -0.3707, -0.4623, -0.0481},
|
---|
959 | { -0.8147, -0.4413, -1.1092, -0.2815, -1.0229, -0.2733, -0.5488, -0.9318, -1.1620, -0.1208},
|
---|
960 | { -0.2068, -0.1120, -0.2815, -0.0714, -0.2596, -0.0694, -0.1393, -0.2365, -0.2949, -0.0307},
|
---|
961 | { -0.7514, -0.4070, -1.0229, -0.2596, -0.9434, -0.2521, -0.5062, -0.8593, -1.0717, -0.1114},
|
---|
962 | { -0.2007, -0.1087, -0.2733, -0.0694, -0.2521, -0.0673, -0.1352, -0.2296, -0.2863, -0.0298},
|
---|
963 | { -0.4031, -0.2184, -0.5488, -0.1393, -0.5062, -0.1352, -0.2716, -0.4611, -0.5750, -0.0598},
|
---|
964 | { -0.6844, -0.3707, -0.9318, -0.2365, -0.8593, -0.2296, -0.4611, -0.7828, -0.9762, -0.1015},
|
---|
965 | { -0.8535, -0.4623, -1.1620, -0.2949, -1.0717, -0.2863, -0.5750, -0.9762, -1.2174, -0.1265},
|
---|
966 | { -0.0887, -0.0481, -0.1208, -0.0307, -0.1114, -0.0298, -0.0598, -0.1015, -0.1265, -0.0132},
|
---|
967 | },
|
---|
968 | new double[,]
|
---|
969 | {
|
---|
970 | { -1.7276, -1.4419, -0.9049, -0.8103, -0.8305, -0.5694, -0.9452, -0.9495, -1.5198, -1.4774},
|
---|
971 | { -1.4419, -1.2034, -0.7552, -0.6763, -0.6932, -0.4752, -0.7889, -0.7925, -1.2684, -1.2331},
|
---|
972 | { -0.9049, -0.7552, -0.4739, -0.4244, -0.4350, -0.2982, -0.4951, -0.4973, -0.7960, -0.7738},
|
---|
973 | { -0.8103, -0.6763, -0.4244, -0.3800, -0.3895, -0.2670, -0.4433, -0.4453, -0.7128, -0.6929},
|
---|
974 | { -0.8305, -0.6932, -0.4350, -0.3895, -0.3993, -0.2737, -0.4544, -0.4565, -0.7306, -0.7102},
|
---|
975 | { -0.5694, -0.4752, -0.2982, -0.2670, -0.2737, -0.1876, -0.3115, -0.3129, -0.5009, -0.4869},
|
---|
976 | { -0.9452, -0.7889, -0.4951, -0.4433, -0.4544, -0.3115, -0.5171, -0.5195, -0.8315, -0.8083},
|
---|
977 | { -0.9495, -0.7925, -0.4973, -0.4453, -0.4565, -0.3129, -0.5195, -0.5218, -0.8353, -0.8120},
|
---|
978 | { -1.5198, -1.2684, -0.7960, -0.7128, -0.7306, -0.5009, -0.8315, -0.8353, -1.3369, -1.2997},
|
---|
979 | { -1.4774, -1.2331, -0.7738, -0.6929, -0.7102, -0.4869, -0.8083, -0.8120, -1.2997, -1.2634},
|
---|
980 | },
|
---|
981 | }
|
---|
982 | );
|
---|
983 |
|
---|
984 | TestCovarianceFunction(new CovarianceLinearArd(), 1,
|
---|
985 | new double[,]
|
---|
986 | {
|
---|
987 | { 0.1230, 0.1350, 0.2546, 0.1166, 0.2710, 0.2053, 0.1707, 0.1490, 0.1287, 0.1875},
|
---|
988 | { 0.0630, 0.1006, 0.1591, 0.0562, 0.1965, 0.1448, 0.1020, 0.0915, 0.0705, 0.1150},
|
---|
989 | { 0.1857, 0.2024, 0.2759, 0.1668, 0.2546, 0.2899, 0.2253, 0.1554, 0.1706, 0.2128},
|
---|
990 | { 0.1146, 0.0890, 0.1931, 0.1010, 0.1533, 0.1788, 0.1617, 0.1222, 0.1174, 0.1398},
|
---|
991 | { 0.1078, 0.0747, 0.1670, 0.1074, 0.1164, 0.1257, 0.1208, 0.1040, 0.0996, 0.1220},
|
---|
992 | { 0.0718, 0.0690, 0.1202, 0.0625, 0.1030, 0.1213, 0.0997, 0.0739, 0.0716, 0.0876},
|
---|
993 | { 0.1188, 0.1680, 0.2201, 0.1075, 0.2781, 0.2099, 0.1558, 0.1124, 0.1176, 0.1752},
|
---|
994 | { 0.1924, 0.2169, 0.3088, 0.1753, 0.3246, 0.2970, 0.2383, 0.1671, 0.1832, 0.2431},
|
---|
995 | { 0.1479, 0.1800, 0.2672, 0.1391, 0.2888, 0.2412, 0.1852, 0.1482, 0.1425, 0.2035},
|
---|
996 | { 0.0461, 0.0956, 0.1351, 0.0321, 0.1697, 0.1553, 0.0976, 0.0822, 0.0571, 0.0922},
|
---|
997 | },
|
---|
998 | new double[][,]
|
---|
999 | {
|
---|
1000 | new double[,]
|
---|
1001 | {
|
---|
1002 | { -0.0471, -0.0056, -0.1020, -0.1067, -0.0554, -0.0553, -0.0381, -0.1017, -0.0417, -0.0126},
|
---|
1003 | { -0.0056, -0.0007, -0.0121, -0.0127, -0.0066, -0.0066, -0.0045, -0.0121, -0.0050, -0.0015},
|
---|
1004 | { -0.1020, -0.0121, -0.2206, -0.2308, -0.1199, -0.1196, -0.0825, -0.2199, -0.0902, -0.0272},
|
---|
1005 | { -0.1067, -0.0127, -0.2308, -0.2416, -0.1255, -0.1251, -0.0864, -0.2302, -0.0944, -0.0284},
|
---|
1006 | { -0.0554, -0.0066, -0.1199, -0.1255, -0.0652, -0.0650, -0.0449, -0.1196, -0.0491, -0.0148},
|
---|
1007 | { -0.0553, -0.0066, -0.1196, -0.1251, -0.0650, -0.0648, -0.0447, -0.1192, -0.0489, -0.0147},
|
---|
1008 | { -0.0381, -0.0045, -0.0825, -0.0864, -0.0449, -0.0447, -0.0309, -0.0823, -0.0337, -0.0102},
|
---|
1009 | { -0.1017, -0.0121, -0.2199, -0.2302, -0.1196, -0.1192, -0.0823, -0.2193, -0.0899, -0.0271},
|
---|
1010 | { -0.0417, -0.0050, -0.0902, -0.0944, -0.0491, -0.0489, -0.0337, -0.0899, -0.0369, -0.0111},
|
---|
1011 | { -0.0126, -0.0015, -0.0272, -0.0284, -0.0148, -0.0147, -0.0102, -0.0271, -0.0111, -0.0033},
|
---|
1012 | },
|
---|
1013 | new double[,]
|
---|
1014 | {
|
---|
1015 | { -0.1648, -0.0823, -0.0510, -0.0853, -0.0204, -0.0279, -0.1990, -0.2019, -0.1215, -0.0126},
|
---|
1016 | { -0.0823, -0.0411, -0.0255, -0.0426, -0.0102, -0.0139, -0.0994, -0.1008, -0.0607, -0.0063},
|
---|
1017 | { -0.0510, -0.0255, -0.0158, -0.0264, -0.0063, -0.0086, -0.0616, -0.0625, -0.0376, -0.0039},
|
---|
1018 | { -0.0853, -0.0426, -0.0264, -0.0442, -0.0105, -0.0144, -0.1030, -0.1045, -0.0629, -0.0065},
|
---|
1019 | { -0.0204, -0.0102, -0.0063, -0.0105, -0.0025, -0.0034, -0.0246, -0.0250, -0.0150, -0.0016},
|
---|
1020 | { -0.0279, -0.0139, -0.0086, -0.0144, -0.0034, -0.0047, -0.0337, -0.0342, -0.0206, -0.0021},
|
---|
1021 | { -0.1990, -0.0994, -0.0616, -0.1030, -0.0246, -0.0337, -0.2402, -0.2438, -0.1467, -0.0152},
|
---|
1022 | { -0.2019, -0.1008, -0.0625, -0.1045, -0.0250, -0.0342, -0.2438, -0.2474, -0.1489, -0.0155},
|
---|
1023 | { -0.1215, -0.0607, -0.0376, -0.0629, -0.0150, -0.0206, -0.1467, -0.1489, -0.0896, -0.0093},
|
---|
1024 | { -0.0126, -0.0063, -0.0039, -0.0065, -0.0016, -0.0021, -0.0152, -0.0155, -0.0093, -0.0010},
|
---|
1025 | },
|
---|
1026 | new double[,]
|
---|
1027 | {
|
---|
1028 | { -0.0149, -0.0224, -0.0522, -0.0010, -0.0027, -0.0107, -0.0413, -0.0465, -0.0412, -0.0287},
|
---|
1029 | { -0.0224, -0.0338, -0.0785, -0.0015, -0.0041, -0.0162, -0.0621, -0.0700, -0.0619, -0.0431},
|
---|
1030 | { -0.0522, -0.0785, -0.1825, -0.0034, -0.0096, -0.0376, -0.1443, -0.1626, -0.1440, -0.1002},
|
---|
1031 | { -0.0010, -0.0015, -0.0034, -0.0001, -0.0002, -0.0007, -0.0027, -0.0030, -0.0027, -0.0019},
|
---|
1032 | { -0.0027, -0.0041, -0.0096, -0.0002, -0.0005, -0.0020, -0.0076, -0.0085, -0.0075, -0.0052},
|
---|
1033 | { -0.0107, -0.0162, -0.0376, -0.0007, -0.0020, -0.0077, -0.0297, -0.0335, -0.0296, -0.0206},
|
---|
1034 | { -0.0413, -0.0621, -0.1443, -0.0027, -0.0076, -0.0297, -0.1140, -0.1286, -0.1138, -0.0792},
|
---|
1035 | { -0.0465, -0.0700, -0.1626, -0.0030, -0.0085, -0.0335, -0.1286, -0.1449, -0.1283, -0.0893},
|
---|
1036 | { -0.0412, -0.0619, -0.1440, -0.0027, -0.0075, -0.0296, -0.1138, -0.1283, -0.1136, -0.0790},
|
---|
1037 | { -0.0287, -0.0431, -0.1002, -0.0019, -0.0052, -0.0206, -0.0792, -0.0893, -0.0790, -0.0550},
|
---|
1038 | },
|
---|
1039 | new double[,]
|
---|
1040 | {
|
---|
1041 | { -0.0810, -0.0439, -0.1103, -0.0280, -0.1017, -0.0272, -0.0546, -0.0926, -0.1155, -0.0120},
|
---|
1042 | { -0.0439, -0.0238, -0.0597, -0.0152, -0.0551, -0.0147, -0.0296, -0.0502, -0.0626, -0.0065},
|
---|
1043 | { -0.1103, -0.0597, -0.1501, -0.0381, -0.1384, -0.0370, -0.0743, -0.1261, -0.1573, -0.0163},
|
---|
1044 | { -0.0280, -0.0152, -0.0381, -0.0097, -0.0351, -0.0094, -0.0189, -0.0320, -0.0399, -0.0041},
|
---|
1045 | { -0.1017, -0.0551, -0.1384, -0.0351, -0.1277, -0.0341, -0.0685, -0.1163, -0.1450, -0.0151},
|
---|
1046 | { -0.0272, -0.0147, -0.0370, -0.0094, -0.0341, -0.0091, -0.0183, -0.0311, -0.0388, -0.0040},
|
---|
1047 | { -0.0546, -0.0296, -0.0743, -0.0189, -0.0685, -0.0183, -0.0368, -0.0624, -0.0778, -0.0081},
|
---|
1048 | { -0.0926, -0.0502, -0.1261, -0.0320, -0.1163, -0.0311, -0.0624, -0.1059, -0.1321, -0.0137},
|
---|
1049 | { -0.1155, -0.0626, -0.1573, -0.0399, -0.1450, -0.0388, -0.0778, -0.1321, -0.1648, -0.0171},
|
---|
1050 | { -0.0120, -0.0065, -0.0163, -0.0041, -0.0151, -0.0040, -0.0081, -0.0137, -0.0171, -0.0018},
|
---|
1051 | },
|
---|
1052 | new double[,]
|
---|
1053 | {
|
---|
1054 | { -0.2338, -0.1951, -0.1225, -0.1097, -0.1124, -0.0771, -0.1279, -0.1285, -0.2057, -0.1999},
|
---|
1055 | { -0.1951, -0.1629, -0.1022, -0.0915, -0.0938, -0.0643, -0.1068, -0.1072, -0.1717, -0.1669},
|
---|
1056 | { -0.1225, -0.1022, -0.0641, -0.0574, -0.0589, -0.0404, -0.0670, -0.0673, -0.1077, -0.1047},
|
---|
1057 | { -0.1097, -0.0915, -0.0574, -0.0514, -0.0527, -0.0361, -0.0600, -0.0603, -0.0965, -0.0938},
|
---|
1058 | { -0.1124, -0.0938, -0.0589, -0.0527, -0.0540, -0.0370, -0.0615, -0.0618, -0.0989, -0.0961},
|
---|
1059 | { -0.0771, -0.0643, -0.0404, -0.0361, -0.0370, -0.0254, -0.0422, -0.0423, -0.0678, -0.0659},
|
---|
1060 | { -0.1279, -0.1068, -0.0670, -0.0600, -0.0615, -0.0422, -0.0700, -0.0703, -0.1125, -0.1094},
|
---|
1061 | { -0.1285, -0.1072, -0.0673, -0.0603, -0.0618, -0.0423, -0.0703, -0.0706, -0.1130, -0.1099},
|
---|
1062 | { -0.2057, -0.1717, -0.1077, -0.0965, -0.0989, -0.0678, -0.1125, -0.1130, -0.1809, -0.1759},
|
---|
1063 | { -0.1999, -0.1669, -0.1047, -0.0938, -0.0961, -0.0659, -0.1094, -0.1099, -0.1759, -0.1710},
|
---|
1064 | },
|
---|
1065 | }
|
---|
1066 | );
|
---|
1067 | }
|
---|
1068 |
|
---|
1069 |
|
---|
1070 | [TestMethod]
|
---|
1071 | public void CovPeriodicTest() {
|
---|
1072 | TestCovarianceFunction(new CovariancePeriodic(), 0,
|
---|
1073 | new double[,]
|
---|
1074 | {
|
---|
1075 | { 0.9548, 0.7965, 0.1438, 0.8971, 0.3692, 0.5608, 0.8367, 0.3951, 0.8773, 0.1881},
|
---|
1076 | { 0.9894, 0.6290, 0.5931, 0.9987, 0.4838, 0.7608, 0.8078, 0.1852, 0.5579, 0.2184},
|
---|
1077 | { 0.2962, 0.3824, 0.1517, 0.7208, 0.9105, 0.2604, 0.1580, 0.8483, 0.3653, 0.1660},
|
---|
1078 | { 0.2864, 0.8521, 0.2806, 0.5519, 0.3502, 0.9797, 0.1364, 0.1354, 0.1391, 0.1784},
|
---|
1079 | { 0.1354, 0.9908, 0.3145, 0.1389, 0.2266, 0.4391, 0.2541, 0.1592, 0.1452, 0.1394},
|
---|
1080 | { 0.1362, 0.4609, 0.6325, 0.1675, 0.4801, 0.9891, 0.1372, 0.2435, 0.2512, 0.1389},
|
---|
1081 | { 0.9975, 0.3630, 0.4916, 0.9481, 0.1367, 0.9130, 0.8921, 0.9800, 0.8445, 0.1864},
|
---|
1082 | { 0.9988, 0.9762, 0.2016, 0.8402, 0.5823, 0.9870, 0.6736, 0.8076, 0.9861, 0.2698},
|
---|
1083 | { 0.9440, 0.6724, 0.1385, 0.9991, 0.2411, 0.9966, 0.7439, 0.7247, 0.8095, 0.1496},
|
---|
1084 | { 0.9605, 0.5569, 0.9769, 0.7531, 0.9651, 0.9994, 0.7216, 0.2054, 0.7264, 0.5478},
|
---|
1085 | },
|
---|
1086 | new double[][,]
|
---|
1087 | {
|
---|
1088 | new double[,]
|
---|
1089 | {
|
---|
1090 | { 0, 0.6171, 0.0967, 0.2357, 0.4461, 0.0247, 0.6403, 0.6107, 0.5464, 0.1081},
|
---|
1091 | { 0.6171, 0, 0.4105, 0.0173, 0.6953, 0.7281, 0.7351, 0.6132, 0.6825, 0.5825},
|
---|
1092 | { 0.0967, 0.4105, 0, 0.0012, 0.3397, 0.0195, 0.0034, 0.7305, 0.7317, 0.5618},
|
---|
1093 | { 0.2357, 0.0173, 0.0012, 0, 0.7346, 0.5651, 0.0847, 0.0026, 0.4161, 0.1700},
|
---|
1094 | { 0.4461, 0.6953, 0.3397, 0.7346, 0, 0.5493, 0.3178, 0.6422, 0.4630, 0.3434},
|
---|
1095 | { 0.0247, 0.7281, 0.0195, 0.5651, 0.5493, 0, 0.0023, 0.6572, 0.0311, 0.6971},
|
---|
1096 | { 0.6403, 0.7351, 0.0034, 0.0847, 0.3178, 0.0023, 0, 0.6182, 0.6285, 0.0109},
|
---|
1097 | { 0.6107, 0.6132, 0.7305, 0.0026, 0.6422, 0.6572, 0.6182, 0, 0.7351, 0.6230},
|
---|
1098 | { 0.5464, 0.6825, 0.7317, 0.4161, 0.4630, 0.0311, 0.6285, 0.7351, 0, 0.1843},
|
---|
1099 | { 0.1081, 0.5825, 0.5618, 0.1700, 0.3434, 0.6971, 0.0109, 0.6230, 0.1843, 0},
|
---|
1100 | },
|
---|
1101 | new double[,]
|
---|
1102 | {
|
---|
1103 | { 0, -0.4917, 1.9759, -2.5233, -2.9038, -0.9545, -0.6223, -2.7396, -0.0884, -1.8718},
|
---|
1104 | { -0.4917, 0, 3.6663, 0.8377, -2.3760, -1.4241, -1.6437, 3.8424, -0.9067, 0.2162},
|
---|
1105 | { 1.9759, 3.6663, 0, -0.2205, -2.7933, -0.8509, -0.3646, -1.4789, -1.5087, 3.8738},
|
---|
1106 | { -2.5233, 0.8377, -0.2205, 0, -1.6172, -0.2162, 1.8523, 0.3213, 3.6804, 2.5815},
|
---|
1107 | { -2.9038, -2.3760, -2.7933, -1.6172, 0, -0.1136, 3.3650, 3.7893, -2.9070, -2.7998},
|
---|
1108 | { -0.9545, -1.4241, -0.8509, -0.2162, -0.1136, 0, -0.2974, 3.7478, 1.1265, -1.0310},
|
---|
1109 | { -0.6223, -1.6437, -0.3646, 1.8523, 3.3650, -0.2974, 0, -0.4977, -0.5548, 0.6640},
|
---|
1110 | { -2.7396, 3.8424, -1.4789, 0.3213, 3.7893, 3.7478, -0.4977, 0, -1.6417, 1.1444},
|
---|
1111 | { -0.0884, -0.9067, -1.5087, 3.6804, -2.9070, 1.1265, -0.5548, -1.6417, 0, -2.3160},
|
---|
1112 | { -1.8718, 0.2162, 3.8738, 2.5815, -2.7998, -1.0310, 0.6640, 1.1444, -2.3160, 0},
|
---|
1113 | },
|
---|
1114 | new double[,]
|
---|
1115 | {
|
---|
1116 | { 2.0000, 0.3597, 1.9008, 1.7477, 1.4793, 1.9751, 0.3943, 1.2046, 0.2758, 1.8887},
|
---|
1117 | { 0.3597, 2.0000, 1.5291, 1.9826, 0.9929, 0.6320, 0.7047, 1.1997, 0.4741, 0.3153},
|
---|
1118 | { 1.9008, 1.5291, 2.0000, 1.9988, 1.6221, 1.9804, 1.9966, 0.6498, 0.6595, 1.2969},
|
---|
1119 | { 1.7477, 1.9826, 1.9988, 2.0000, 0.6957, 0.2956, 1.9134, 1.9974, 1.5215, 1.8218},
|
---|
1120 | { 1.4793, 0.9929, 1.6221, 0.6957, 2.0000, 0.2787, 1.6495, 1.1369, 1.4549, 1.6174},
|
---|
1121 | { 1.9751, 0.6320, 1.9804, 0.2956, 0.2787, 2.0000, 1.9977, 1.1010, 1.9686, 0.5106},
|
---|
1122 | { 0.3943, 0.7047, 1.9966, 1.9134, 1.6495, 1.9977, 2.0000, 0.3612, 0.3762, 1.9891},
|
---|
1123 | { 1.2046, 1.1997, 0.6498, 1.9974, 1.1369, 1.1010, 0.3612, 2.0000, 0.7040, 0.3681},
|
---|
1124 | { 0.2758, 0.4741, 0.6595, 1.5215, 1.4549, 1.9686, 0.3762, 0.7040, 2.0000, 1.8059},
|
---|
1125 | { 1.8887, 0.3153, 1.2969, 1.8218, 1.6174, 0.5106, 1.9891, 0.3681, 1.8059, 2.0000},
|
---|
1126 | },
|
---|
1127 | }
|
---|
1128 | , 5e-3);
|
---|
1129 | TestCovarianceFunction(new CovariancePeriodic(), 1,
|
---|
1130 | new double[,]
|
---|
1131 | {
|
---|
1132 | { 5.8283, 5.7618, 6.7049, 5.7980, 6.3126, 5.7012, 6.0358, 6.2917, 6.0128, 6.5482},
|
---|
1133 | { 5.9230, 6.1447, 6.1643, 5.8794, 6.2291, 5.7511, 6.0513, 6.5551, 6.1842, 6.4880},
|
---|
1134 | { 6.3822, 6.3018, 6.6628, 6.0966, 5.8040, 6.4250, 6.6362, 6.0294, 6.3159, 6.6082},
|
---|
1135 | { 6.3932, 5.7803, 6.4000, 6.1876, 5.6577, 5.8483, 6.8550, 6.8032, 6.7423, 6.5723},
|
---|
1136 | { 6.8221, 5.8618, 6.3630, 6.8860, 5.6385, 5.6752, 6.4334, 6.9877, 6.9298, 6.7393},
|
---|
1137 | { 6.7811, 6.2441, 6.1428, 6.6035, 5.6837, 5.8594, 6.7636, 7.1358, 7.1438, 6.7439},
|
---|
1138 | { 5.9060, 6.3179, 6.2241, 5.8240, 6.7709, 5.8052, 6.0040, 5.9357, 6.0315, 6.5522},
|
---|
1139 | { 5.9014, 5.9400, 6.5193, 5.7761, 6.1703, 5.9266, 6.1211, 5.7652, 5.9278, 6.4131},
|
---|
1140 | { 5.9689, 6.1217, 6.7479, 5.9000, 6.4518, 5.8729, 6.0847, 6.0946, 6.0504, 6.6728},
|
---|
1141 | { 5.8322, 6.1847, 5.9393, 5.7489, 5.9512, 5.8983, 6.0962, 6.5118, 6.0937, 6.1900},
|
---|
1142 | },
|
---|
1143 | new double[][,]
|
---|
1144 | {
|
---|
1145 | new double[,]
|
---|
1146 | {
|
---|
1147 | { 0, 1.5463, 2.7702, 2.4754, 2.3601, 2.6154, 1.6170, 2.2426, 1.2120, 2.5484},
|
---|
1148 | { 1.5463, 0, 2.8809, 2.7132, 2.1407, 1.9051, 1.9633, 2.9438, 1.7399, 0.7903},
|
---|
1149 | { 2.7702, 2.8809, 0, 2.6583, 2.4199, 2.6219, 2.6503, 1.9201, 1.9281, 2.9266},
|
---|
1150 | { 2.4754, 2.7132, 2.6583, 0, 1.9565, 1.3445, 2.7639, 2.6871, 2.8826, 2.8025},
|
---|
1151 | { 2.3601, 2.1407, 2.4199, 1.9565, 0, 1.2406, 2.8530, 2.9544, 2.3499, 2.4179},
|
---|
1152 | { 2.6154, 1.9051, 2.6219, 1.3445, 1.2406, 0, 2.6541, 2.9603, 2.7276, 1.7848},
|
---|
1153 | { 1.6170, 1.9633, 2.6503, 2.7639, 2.8530, 2.6541, 0, 1.5498, 1.5819, 2.7045},
|
---|
1154 | { 2.2426, 2.9438, 1.9201, 2.6871, 2.9544, 2.9603, 1.5498, 0, 1.9628, 3.0510},
|
---|
1155 | { 1.2120, 1.7399, 1.9281, 2.8826, 2.3499, 2.7276, 1.5819, 1.9628, 0, 2.5033},
|
---|
1156 | { 2.5484, 0.7903, 2.9266, 2.8025, 2.4179, 1.7848, 2.7045, 3.0510, 2.5033, 0},
|
---|
1157 | },
|
---|
1158 | new double[,]
|
---|
1159 | {
|
---|
1160 | { 0, 1.2693, 1.2518, 1.4723, 1.4989, 1.4024, 1.3080, 1.5046, 1.0560, 1.4419},
|
---|
1161 | { 1.2693, 0, 1.0599, 1.3190, 1.4956, 1.4360, 1.4550, 0.8895, 1.3688, 0.7299},
|
---|
1162 | { 1.2518, 1.0599, 0, 1.3700, 1.4880, 1.3979, 1.3765, 1.4411, 1.4438, 0.9428},
|
---|
1163 | { 1.4723, 1.3190, 1.3700, 0, 1.4529, 1.1461, 1.2600, 1.3448, 1.0562, 1.2056},
|
---|
1164 | { 1.4989, 1.4956, 1.4880, 1.4529, 0, 1.0760, 1.1183, 0.8531, 1.5002, 1.4885},
|
---|
1165 | { 1.4024, 1.4360, 1.3979, 1.1461, 1.0760, 0, 1.3735, 0.8314, 1.3035, 1.3888},
|
---|
1166 | { 1.3080, 1.4550, 1.3765, 1.2600, 1.1183, 1.3735, 0, 1.2713, 1.2891, 1.3279},
|
---|
1167 | { 1.5046, 0.8895, 1.4411, 1.3448, 0.8531, 0.8314, 1.2713, 0, 1.4549, -0.0705},
|
---|
1168 | { 1.0560, 1.3688, 1.4438, 1.0562, 1.5002, 1.3035, 1.2891, 1.4549, 0, 1.4621},
|
---|
1169 | { 1.4419, 0.7299, 0.9428, 1.2056, 1.4885, 1.3888, 1.3279, -0.0705, 1.4621, 0},
|
---|
1170 | },
|
---|
1171 | new double[,]
|
---|
1172 | {
|
---|
1173 | { 14.7781, 13.1371, 11.6509, 12.0296, 12.1738, 11.8516, 13.0567, 12.3184, 13.5101, 11.9373},
|
---|
1174 | { 13.1371, 14.7781, 11.5044, 11.7253, 12.4422, 12.7230, 12.6543, 11.4201, 12.9155, 13.9651},
|
---|
1175 | { 11.6509, 11.5044, 14.7781, 11.7964, 12.0992, 11.8434, 11.8067, 12.7053, 12.6959, 11.4432},
|
---|
1176 | { 12.0296, 11.7253, 11.7964, 14.7781, 12.6624, 13.3637, 11.6592, 11.7593, 11.5022, 11.6084},
|
---|
1177 | { 12.1738, 12.4422, 12.0992, 12.6624, 14.7781, 13.4786, 11.5416, 11.4058, 12.1864, 12.1017},
|
---|
1178 | { 11.8516, 12.7230, 11.8434, 13.3637, 13.4786, 14.7781, 11.8019, 11.3978, 11.7066, 12.8636},
|
---|
1179 | { 13.0567, 12.6543, 11.8067, 11.6592, 11.5416, 11.8019, 14.7781, 13.1331, 13.0967, 11.7366},
|
---|
1180 | { 12.3184, 11.4201, 12.7053, 11.7593, 11.4058, 11.3978, 13.1331, 14.7781, 12.6549, 11.2744},
|
---|
1181 | { 13.5101, 12.9155, 12.6959, 11.5022, 12.1864, 11.7066, 13.0967, 12.6549, 14.7781, 11.9944},
|
---|
1182 | { 11.9373, 13.9651, 11.4432, 11.6084, 12.1017, 12.8636, 11.7366, 11.2744, 11.9944, 14.7781},
|
---|
1183 | },
|
---|
1184 | }
|
---|
1185 | , 5e-3);
|
---|
1186 | }
|
---|
1187 |
|
---|
1188 | [TestMethod]
|
---|
1189 | public void CovSEardTest() {
|
---|
1190 | TestCovarianceFunction(new CovarianceSquaredExponentialArd(), 0,
|
---|
1191 | new double[,]
|
---|
1192 | {
|
---|
1193 | { 0.5771, 0.5404, 0.8569, 0.5612, 0.7545, 0.4980, 0.6649, 0.7484, 0.6564, 0.8184},
|
---|
1194 | { 0.6206, 0.7027, 0.7091, 0.6015, 0.7295, 0.5338, 0.6705, 0.8202, 0.7155, 0.8029},
|
---|
1195 | { 0.7743, 0.7513, 0.8468, 0.6865, 0.5645, 0.7861, 0.8404, 0.6625, 0.7555, 0.8335},
|
---|
1196 | { 0.7773, 0.5513, 0.7792, 0.7166, 0.4534, 0.5870, 0.8913, 0.8796, 0.8656, 0.8245},
|
---|
1197 | { 0.8839, 0.5934, 0.7689, 0.8982, 0.4126, 0.4741, 0.7883, 0.9201, 0.9077, 0.8649},
|
---|
1198 | { 0.8746, 0.7341, 0.7020, 0.8323, 0.4826, 0.5922, 0.8706, 0.9508, 0.9524, 0.8660},
|
---|
1199 | { 0.6133, 0.7560, 0.7280, 0.5749, 0.8722, 0.5651, 0.6530, 0.6260, 0.6633, 0.8195},
|
---|
1200 | { 0.6113, 0.6277, 0.8110, 0.5489, 0.7110, 0.6221, 0.6948, 0.5425, 0.6227, 0.7828},
|
---|
1201 | { 0.6394, 0.6950, 0.8669, 0.6107, 0.7933, 0.5985, 0.6823, 0.6858, 0.6702, 0.8492},
|
---|
1202 | { 0.5790, 0.7156, 0.6274, 0.5324, 0.6323, 0.6100, 0.6863, 0.8091, 0.6855, 0.7173},
|
---|
1203 |
|
---|
1204 | },
|
---|
1205 | new double[][,]
|
---|
1206 | {
|
---|
1207 | new double[,]
|
---|
1208 | {
|
---|
1209 | { 0, 0.1113, 0.1356, 0.1828, 0.0037, 0.0032, 0.0052, 0.1649, 0.0020, 0.0599},
|
---|
1210 | { 0.1113, 0, 0.3889, 0.4757, 0.1415, 0.1485, 0.0629, 0.3653, 0.0811, 0.0035},
|
---|
1211 | { 0.1356, 0.3889, 0, 0.0011, 0.1136, 0.1060, 0.1954, 0.0000, 0.2176, 0.3219},
|
---|
1212 | { 0.1828, 0.4757, 0.0011, 0, 0.1566, 0.1766, 0.2129, 0.0012, 0.1768, 0.3923},
|
---|
1213 | { 0.0037, 0.1415, 0.1136, 0.1566, 0, 0.0000, 0.0128, 0.0836, 0.0101, 0.0966},
|
---|
1214 | { 0.0032, 0.1485, 0.1060, 0.1766, 0.0000, 0, 0.0140, 0.0837, 0.0085, 0.1126},
|
---|
1215 | { 0.0052, 0.0629, 0.1954, 0.2129, 0.0128, 0.0140, 0, 0.2603, 0.0008, 0.0306},
|
---|
1216 | { 0.1649, 0.3653, 0.0000, 0.0012, 0.0836, 0.0837, 0.2603, 0, 0.2139, 0.2429},
|
---|
1217 | { 0.0020, 0.0811, 0.2176, 0.1768, 0.0101, 0.0085, 0.0008, 0.2139, 0, 0.0433},
|
---|
1218 | { 0.0599, 0.0035, 0.3219, 0.3923, 0.0966, 0.1126, 0.0306, 0.2429, 0.0433, 0},
|
---|
1219 | },
|
---|
1220 | new double[,]
|
---|
1221 | {
|
---|
1222 | { 0, 0.1257, 0.1670, 0.0931, 0.3194, 0.2613, 0.0213, 0.0219, 0.0365, 0.3319},
|
---|
1223 | { 0.1257, 0, 0.0117, 0.0001, 0.0625, 0.0510, 0.2315, 0.1621, 0.0274, 0.1000},
|
---|
1224 | { 0.1670, 0.0117, 0, 0.0160, 0.0141, 0.0075, 0.3003, 0.3909, 0.0850, 0.0170},
|
---|
1225 | { 0.0931, 0.0001, 0.0160, 0, 0.0718, 0.0629, 0.1673, 0.1835, 0.0157, 0.0668},
|
---|
1226 | { 0.3194, 0.0625, 0.0141, 0.0718, 0, 0.0011, 0.3903, 0.3690, 0.1570, 0.0009},
|
---|
1227 | { 0.2613, 0.0510, 0.0075, 0.0629, 0.0011, 0, 0.4011, 0.3369, 0.1158, 0.0041},
|
---|
1228 | { 0.0213, 0.2315, 0.3003, 0.1673, 0.3903, 0.4011, 0, 0.0002, 0.1102, 0.4643},
|
---|
1229 | { 0.0219, 0.1621, 0.3909, 0.1835, 0.3690, 0.3369, 0.0002, 0, 0.1101, 0.3135},
|
---|
1230 | { 0.0365, 0.0274, 0.0850, 0.0157, 0.1570, 0.1158, 0.1102, 0.1101, 0, 0.1728},
|
---|
1231 | { 0.3319, 0.1000, 0.0170, 0.0668, 0.0009, 0.0041, 0.4643, 0.3135, 0.1728, 0},
|
---|
1232 | },
|
---|
1233 | new double[,]
|
---|
1234 | {
|
---|
1235 | { 0, 0.0115, 0.1979, 0.0316, 0.0251, 0.0027, 0.1396, 0.1747, 0.1481, 0.0299},
|
---|
1236 | { 0.0115, 0, 0.1171, 0.0678, 0.0700, 0.0261, 0.0664, 0.0724, 0.0689, 0.0088},
|
---|
1237 | { 0.1979, 0.1171, 0, 0.3960, 0.4057, 0.2638, 0.0181, 0.0061, 0.0230, 0.0705},
|
---|
1238 | { 0.0316, 0.0678, 0.3960, 0, 0.0006, 0.0201, 0.2320, 0.3087, 0.2134, 0.1071},
|
---|
1239 | { 0.0251, 0.0700, 0.4057, 0.0006, 0, 0.0137, 0.2005, 0.2369, 0.2506, 0.1115},
|
---|
1240 | { 0.0027, 0.0261, 0.2638, 0.0201, 0.0137, 0, 0.1409, 0.1571, 0.1351, 0.0626},
|
---|
1241 | { 0.1396, 0.0664, 0.0181, 0.2320, 0.2005, 0.1409, 0, 0.0056, 0.0000, 0.0234},
|
---|
1242 | { 0.1747, 0.0724, 0.0061, 0.3087, 0.2369, 0.1571, 0.0056, 0, 0.0054, 0.0308},
|
---|
1243 | { 0.1481, 0.0689, 0.0230, 0.2134, 0.2506, 0.1351, 0.0000, 0.0054, 0, 0.0252},
|
---|
1244 | { 0.0299, 0.0088, 0.0705, 0.1071, 0.1115, 0.0626, 0.0234, 0.0308, 0.0252, 0},
|
---|
1245 | },
|
---|
1246 | new double[,]
|
---|
1247 | {
|
---|
1248 | { 0, 0.0518, 0.0225, 0.0842, 0.0134, 0.0822, 0.0259, 0.0044, 0.0472, 0.1388},
|
---|
1249 | { 0.0518, 0, 0.1075, 0.0068, 0.1109, 0.0098, 0.0040, 0.0548, 0.1861, 0.0426},
|
---|
1250 | { 0.0225, 0.1075, 0, 0.1884, 0.0022, 0.1953, 0.0866, 0.0109, 0.0010, 0.2263},
|
---|
1251 | { 0.0842, 0.0068, 0.1884, 0, 0.1883, 0.0000, 0.0186, 0.1147, 0.1866, 0.0066},
|
---|
1252 | { 0.0134, 0.1109, 0.0022, 0.1883, 0, 0.2191, 0.0553, 0.0019, 0.0060, 0.2459},
|
---|
1253 | { 0.0822, 0.0098, 0.1953, 0.0000, 0.2191, 0, 0.0209, 0.0970, 0.2098, 0.0083},
|
---|
1254 | { 0.0259, 0.0040, 0.0866, 0.0186, 0.0553, 0.0209, 0, 0.0544, 0.1387, 0.0493},
|
---|
1255 | { 0.0044, 0.0548, 0.0109, 0.1147, 0.0019, 0.0970, 0.0544, 0, 0.0181, 0.1157},
|
---|
1256 | { 0.0472, 0.1861, 0.0010, 0.1866, 0.0060, 0.2098, 0.1387, 0.0181, 0, 0.3179},
|
---|
1257 | { 0.1388, 0.0426, 0.2263, 0.0066, 0.2459, 0.0083, 0.0493, 0.1157, 0.3179, 0},
|
---|
1258 | },
|
---|
1259 | new double[,]
|
---|
1260 | {
|
---|
1261 | { 0, 0.0195, 0.1128, 0.1600, 0.1591, 0.2414, 0.1441, 0.1240, 0.0109, 0.0116},
|
---|
1262 | { 0.0195, 0, 0.0446, 0.0686, 0.0786, 0.1693, 0.0542, 0.0354, 0.0014, 0.0003},
|
---|
1263 | { 0.1128, 0.0446, 0, 0.0016, 0.0011, 0.0202, 0.0003, 0.0004, 0.0837, 0.0487},
|
---|
1264 | { 0.1600, 0.0686, 0.0016, 0, 0.0001, 0.0143, 0.0030, 0.0034, 0.0778, 0.0727},
|
---|
1265 | { 0.1591, 0.0786, 0.0011, 0.0001, 0, 0.0171, 0.0021, 0.0020, 0.0942, 0.0812},
|
---|
1266 | { 0.2414, 0.1693, 0.0202, 0.0143, 0.0171, 0, 0.0250, 0.0207, 0.1541, 0.1880},
|
---|
1267 | { 0.1441, 0.0542, 0.0003, 0.0030, 0.0021, 0.0250, 0, 0.0000, 0.0782, 0.0489},
|
---|
1268 | { 0.1240, 0.0354, 0.0004, 0.0034, 0.0020, 0.0207, 0.0000, 0, 0.0714, 0.0315},
|
---|
1269 | { 0.0109, 0.0014, 0.0837, 0.0778, 0.0942, 0.1541, 0.0782, 0.0714, 0, 0.0003},
|
---|
1270 | { 0.0116, 0.0003, 0.0487, 0.0727, 0.0812, 0.1880, 0.0489, 0.0315, 0.0003, 0},
|
---|
1271 | },
|
---|
1272 | new double[,]
|
---|
1273 | {
|
---|
1274 | { 2.0000, 1.6472, 1.1513, 1.3142, 1.3662, 1.2437, 1.6267, 1.4148, 1.7372, 1.2786},
|
---|
1275 | { 1.6472, 2.0000, 1.0689, 1.1876, 1.4541, 1.5370, 1.5174, 1.0103, 1.5898, 1.8381},
|
---|
1276 | { 1.1513, 1.0689, 2.0000, 1.2199, 1.3398, 1.2402, 1.2244, 1.5320, 1.5293, 1.0276},
|
---|
1277 | { 1.3142, 1.1876, 1.2199, 2.0000, 1.5197, 1.7027, 1.1555, 1.2033, 1.0675, 1.1291},
|
---|
1278 | { 1.3662, 1.4541, 1.3398, 1.5197, 2.0000, 1.7299, 1.0916, 0.9989, 1.3706, 1.3407},
|
---|
1279 | { 1.2437, 1.5370, 1.2402, 1.7027, 1.7299, 2.0000, 1.2223, 0.9923, 1.1787, 1.5758},
|
---|
1280 | { 1.6267, 1.5174, 1.2244, 1.1555, 1.0916, 1.2223, 2.0000, 1.6461, 1.6369, 1.1928},
|
---|
1281 | { 1.4148, 1.0103, 1.5320, 1.2033, 0.9989, 0.9923, 1.6461, 2.0000, 1.5176, 0.7806},
|
---|
1282 | { 1.7372, 1.5898, 1.5293, 1.0675, 1.3706, 1.1787, 1.6369, 1.5176, 2.0000, 1.3009},
|
---|
1283 | { 1.2786, 1.8381, 1.0276, 1.1291, 1.3407, 1.5758, 1.1928, 0.7806, 1.3009, 2.0000},
|
---|
1284 | },
|
---|
1285 | }
|
---|
1286 | );
|
---|
1287 | TestCovarianceFunction(new CovarianceSquaredExponentialArd(), 1,
|
---|
1288 | new double[,]
|
---|
1289 | {
|
---|
1290 | { 6.8592, 6.7985, 7.2362, 6.8334, 7.1127, 6.7239, 6.9920, 7.1048, 6.9798, 7.1914},
|
---|
1291 | { 6.9271, 7.0445, 7.0531, 6.8979, 7.0803, 6.7872, 7.0000, 7.1935, 7.0617, 7.1727},
|
---|
1292 | { 7.1376, 7.1086, 7.2246, 7.0223, 6.8388, 7.1522, 7.2172, 6.9886, 7.1139, 7.2091},
|
---|
1293 | { 7.1414, 6.8169, 7.1438, 7.0632, 6.6389, 6.8750, 7.2749, 7.2619, 7.2462, 7.1986},
|
---|
1294 | { 7.2667, 6.8852, 7.1309, 7.2824, 6.5548, 6.6792, 7.1550, 7.3063, 7.2929, 7.2454},
|
---|
1295 | { 7.2563, 7.0864, 7.0436, 7.2078, 6.6953, 6.8834, 7.2517, 7.3388, 7.3405, 7.2466},
|
---|
1296 | { 6.9160, 7.1146, 7.0783, 6.8557, 7.2536, 6.8398, 6.9750, 6.9351, 6.9897, 7.1926},
|
---|
1297 | { 6.9130, 6.9378, 7.1825, 6.8129, 7.0557, 6.9294, 7.0338, 6.8021, 6.9302, 7.1482},
|
---|
1298 | { 6.9551, 7.0340, 7.2476, 6.9120, 7.1611, 6.8932, 7.0166, 7.0213, 6.9995, 7.2274},
|
---|
1299 | { 6.8624, 7.0619, 6.9373, 6.7848, 6.9446, 6.9109, 7.0221, 7.1802, 7.0209, 7.0642},
|
---|
1300 | },
|
---|
1301 | new double[][,]
|
---|
1302 | {
|
---|
1303 | new double[,]
|
---|
1304 | {
|
---|
1305 | { 0, 0.1316, 0.2186, 0.2629, 0.0051, 0.0049, 0.0062, 0.2224, 0.0023, 0.0882},
|
---|
1306 | { 0.1316, 0, 0.6685, 0.7466, 0.1864, 0.1865, 0.0799, 0.6593, 0.0990, 0.0037},
|
---|
1307 | { 0.2186, 0.6685, 0, 0.0017, 0.1606, 0.1602, 0.2987, 0.0000, 0.2745, 0.5725},
|
---|
1308 | { 0.2629, 0.7466, 0.0017, 0, 0.1985, 0.2030, 0.3422, 0.0019, 0.3043, 0.6432},
|
---|
1309 | { 0.0051, 0.1864, 0.1606, 0.1985, 0, 0.0000, 0.0216, 0.1524, 0.0141, 0.1366},
|
---|
1310 | { 0.0049, 0.1865, 0.1602, 0.2030, 0.0000, 0, 0.0215, 0.1535, 0.0134, 0.1384},
|
---|
1311 | { 0.0062, 0.0799, 0.2987, 0.3422, 0.0216, 0.0215, 0, 0.3081, 0.0010, 0.0478},
|
---|
1312 | { 0.2224, 0.6593, 0.0000, 0.0019, 0.1524, 0.1535, 0.3081, 0, 0.2715, 0.5480},
|
---|
1313 | { 0.0023, 0.0990, 0.2745, 0.3043, 0.0141, 0.0134, 0.0010, 0.2715, 0, 0.0628},
|
---|
1314 | { 0.0882, 0.0037, 0.5725, 0.6432, 0.1366, 0.1384, 0.0478, 0.5480, 0.0628, 0},
|
---|
1315 | },
|
---|
1316 | new double[,]
|
---|
1317 | {
|
---|
1318 | { 0, 0.1486, 0.2692, 0.1339, 0.4441, 0.3941, 0.0255, 0.0295, 0.0413, 0.4886},
|
---|
1319 | { 0.1486, 0, 0.0201, 0.0002, 0.0823, 0.0641, 0.2940, 0.2925, 0.0334, 0.1076},
|
---|
1320 | { 0.2692, 0.0201, 0, 0.0246, 0.0200, 0.0113, 0.4590, 0.4923, 0.1073, 0.0302},
|
---|
1321 | { 0.1339, 0.0002, 0.0246, 0, 0.0910, 0.0723, 0.2689, 0.2847, 0.0270, 0.1096},
|
---|
1322 | { 0.4441, 0.0823, 0.0200, 0.0910, 0, 0.0012, 0.6588, 0.6726, 0.2177, 0.0013},
|
---|
1323 | { 0.3941, 0.0641, 0.0113, 0.0723, 0.0012, 0, 0.6140, 0.6177, 0.1829, 0.0050},
|
---|
1324 | { 0.0255, 0.2940, 0.4590, 0.2689, 0.6588, 0.6140, 0, 0.0002, 0.1310, 0.7259},
|
---|
1325 | { 0.0295, 0.2925, 0.4923, 0.2847, 0.6726, 0.6177, 0.0002, 0, 0.1398, 0.7073},
|
---|
1326 | { 0.0413, 0.0334, 0.1073, 0.0270, 0.2177, 0.1829, 0.1310, 0.1398, 0, 0.2506},
|
---|
1327 | { 0.4886, 0.1076, 0.0302, 0.1096, 0.0013, 0.0050, 0.7259, 0.7073, 0.2506, 0},
|
---|
1328 | },
|
---|
1329 | new double[,]
|
---|
1330 | {
|
---|
1331 | { 0, 0.0137, 0.3191, 0.0455, 0.0349, 0.0041, 0.1669, 0.2356, 0.1673, 0.0440},
|
---|
1332 | { 0.0137, 0, 0.2012, 0.1063, 0.0922, 0.0327, 0.0843, 0.1306, 0.0841, 0.0094},
|
---|
1333 | { 0.3191, 0.2012, 0, 0.6073, 0.5736, 0.3987, 0.0277, 0.0077, 0.0290, 0.1253},
|
---|
1334 | { 0.0455, 0.1063, 0.6073, 0, 0.0007, 0.0231, 0.3728, 0.4790, 0.3672, 0.1755},
|
---|
1335 | { 0.0349, 0.0922, 0.5736, 0.0007, 0, 0.0156, 0.3385, 0.4318, 0.3474, 0.1576},
|
---|
1336 | { 0.0041, 0.0327, 0.3987, 0.0231, 0.0156, 0, 0.2156, 0.2880, 0.2133, 0.0769},
|
---|
1337 | { 0.1669, 0.0843, 0.0277, 0.3728, 0.3385, 0.2156, 0, 0.0066, 0.0000, 0.0366},
|
---|
1338 | { 0.2356, 0.1306, 0.0077, 0.4790, 0.4318, 0.2880, 0.0066, 0, 0.0068, 0.0694},
|
---|
1339 | { 0.1673, 0.0841, 0.0290, 0.3672, 0.3474, 0.2133, 0.0000, 0.0068, 0, 0.0365},
|
---|
1340 | { 0.0440, 0.0094, 0.1253, 0.1755, 0.1576, 0.0769, 0.0366, 0.0694, 0.0365, 0},
|
---|
1341 | },
|
---|
1342 | new double[,]
|
---|
1343 | {
|
---|
1344 | { 0, 0.0612, 0.0363, 0.1211, 0.0186, 0.1239, 0.0310, 0.0059, 0.0534, 0.2043},
|
---|
1345 | { 0.0612, 0, 0.1847, 0.0107, 0.1461, 0.0123, 0.0050, 0.0989, 0.2270, 0.0458},
|
---|
1346 | { 0.0363, 0.1847, 0, 0.2888, 0.0032, 0.2952, 0.1324, 0.0137, 0.0012, 0.4024},
|
---|
1347 | { 0.1211, 0.0107, 0.2888, 0, 0.2388, 0.0000, 0.0299, 0.1780, 0.3210, 0.0108},
|
---|
1348 | { 0.0186, 0.1461, 0.0032, 0.2388, 0, 0.2484, 0.0933, 0.0034, 0.0083, 0.3475},
|
---|
1349 | { 0.1239, 0.0123, 0.2952, 0.0000, 0.2484, 0, 0.0320, 0.1778, 0.3315, 0.0102},
|
---|
1350 | { 0.0310, 0.0050, 0.1324, 0.0299, 0.0933, 0.0320, 0, 0.0644, 0.1650, 0.0770},
|
---|
1351 | { 0.0059, 0.0989, 0.0137, 0.1780, 0.0034, 0.1778, 0.0644, 0, 0.0230, 0.2610},
|
---|
1352 | { 0.0534, 0.2270, 0.0012, 0.3210, 0.0083, 0.3315, 0.1650, 0.0230, 0, 0.4611},
|
---|
1353 | { 0.2043, 0.0458, 0.4024, 0.0108, 0.3475, 0.0102, 0.0770, 0.2610, 0.4611, 0},
|
---|
1354 | },
|
---|
1355 | new double[,]
|
---|
1356 | {
|
---|
1357 | { 0, 0.0230, 0.1818, 0.2301, 0.2212, 0.3641, 0.1723, 0.1672, 0.0123, 0.0171},
|
---|
1358 | { 0.0230, 0, 0.0767, 0.1076, 0.1036, 0.2126, 0.0688, 0.0640, 0.0017, 0.0004},
|
---|
1359 | { 0.1818, 0.0767, 0, 0.0024, 0.0015, 0.0305, 0.0004, 0.0006, 0.1055, 0.0867},
|
---|
1360 | { 0.2301, 0.1076, 0.0024, 0, 0.0001, 0.0164, 0.0049, 0.0052, 0.1338, 0.1192},
|
---|
1361 | { 0.2212, 0.1036, 0.0015, 0.0001, 0, 0.0194, 0.0035, 0.0037, 0.1306, 0.1147},
|
---|
1362 | { 0.3641, 0.2126, 0.0305, 0.0164, 0.0194, 0, 0.0382, 0.0380, 0.2434, 0.2311},
|
---|
1363 | { 0.1723, 0.0688, 0.0004, 0.0049, 0.0035, 0.0382, 0, 0.0000, 0.0930, 0.0764},
|
---|
1364 | { 0.1672, 0.0640, 0.0006, 0.0052, 0.0037, 0.0380, 0.0000, 0, 0.0907, 0.0710},
|
---|
1365 | { 0.0123, 0.0017, 0.1055, 0.1338, 0.1306, 0.2434, 0.0930, 0.0907, 0, 0.0005},
|
---|
1366 | { 0.0171, 0.0004, 0.0867, 0.1192, 0.1147, 0.2311, 0.0764, 0.0710, 0.0005, 0},
|
---|
1367 | },
|
---|
1368 | new double[,]
|
---|
1369 | {
|
---|
1370 | { 14.7781, 14.3950, 13.7138, 13.9618, 14.0352, 13.8578, 14.3707, 14.1018, 14.4990, 13.9100},
|
---|
1371 | { 14.3950, 14.7781, 13.5767, 13.7715, 14.1542, 14.2607, 14.2360, 13.4735, 14.3260, 14.6102},
|
---|
1372 | { 13.7138, 13.5767, 14.7781, 13.8217, 13.9982, 13.8525, 13.8286, 14.2545, 14.2511, 13.5045},
|
---|
1373 | { 13.9618, 13.7715, 13.8217, 14.7781, 14.2390, 14.4598, 13.7206, 13.7960, 13.5743, 13.6778},
|
---|
1374 | { 14.0352, 14.1542, 13.9982, 14.2390, 14.7781, 14.4908, 13.6154, 13.4528, 14.0413, 13.9995},
|
---|
1375 | { 13.8578, 14.2607, 13.8525, 14.4598, 14.4908, 14.7781, 13.8254, 13.4407, 13.7576, 14.3090},
|
---|
1376 | { 14.3707, 14.2360, 13.8286, 13.7206, 13.6154, 13.8254, 14.7781, 14.3938, 14.3828, 13.7798},
|
---|
1377 | { 14.1018, 13.4735, 14.2545, 13.7960, 13.4528, 13.4407, 14.3938, 14.7781, 14.2363, 13.0113},
|
---|
1378 | { 14.4990, 14.3260, 14.2511, 13.5743, 14.0413, 13.7576, 14.3828, 14.2363, 14.7781, 13.9425},
|
---|
1379 | { 13.9100, 14.6102, 13.5045, 13.6778, 13.9995, 14.3090, 13.7798, 13.0113, 13.9425, 14.7781},
|
---|
1380 | },
|
---|
1381 | }
|
---|
1382 | );
|
---|
1383 | }
|
---|
1384 |
|
---|
1385 | [TestMethod]
|
---|
1386 | public void CovSumTest() {
|
---|
1387 | var cov = new CovarianceSum();
|
---|
1388 | cov.Terms.Add(new CovarianceSquaredExponentialIso());
|
---|
1389 | cov.Terms.Add(new CovarianceLinear());
|
---|
1390 | TestCovarianceFunction(cov, 0,
|
---|
1391 | new double[,]
|
---|
1392 | {
|
---|
1393 | { 1.4860, 1.5376, 2.7382, 1.4230, 2.7566, 2.0148, 1.9261, 1.8493, 1.6069, 2.2035},
|
---|
1394 | { 1.0861, 1.4463, 1.8848, 1.0165, 2.1818, 1.6036, 1.4240, 1.4965, 1.2360, 1.6526},
|
---|
1395 | { 2.1463, 2.2472, 2.8854, 1.9188, 2.4455, 2.9283, 2.5049, 1.8107, 2.0157, 2.4059},
|
---|
1396 | { 1.6245, 1.2089, 2.2059, 1.4630, 1.5864, 1.9084, 2.0859, 1.7825, 1.7332, 1.8574},
|
---|
1397 | { 1.6804, 1.1454, 2.0031, 1.6914, 1.2725, 1.4029, 1.6810, 1.6888, 1.6437, 1.7665},
|
---|
1398 | { 1.4052, 1.2437, 1.5900, 1.2941, 1.2438, 1.4882, 1.6072, 1.4970, 1.4811, 1.5135},
|
---|
1399 | { 1.4913, 1.9972, 2.3544, 1.3689, 2.9275, 2.1163, 1.8043, 1.4564, 1.5325, 2.1139},
|
---|
1400 | { 2.0334, 2.2303, 3.0928, 1.8439, 3.1092, 2.8169, 2.4555, 1.7771, 1.9760, 2.5789},
|
---|
1401 | { 1.7324, 2.0254, 2.8414, 1.6386, 2.9270, 2.3807, 2.0510, 1.7808, 1.7231, 2.3527},
|
---|
1402 | { 0.9196, 1.4220, 1.6254, 0.7696, 1.8861, 1.7579, 1.4076, 1.4163, 1.1077, 1.3988},
|
---|
1403 | },
|
---|
1404 | new double[][,]
|
---|
1405 | {
|
---|
1406 | new double[,]
|
---|
1407 | {
|
---|
1408 | { 0, 0.3197, 0.6358, 0.5518, 0.5207, 0.5909, 0.3361, 0.4897, 0.2447, 0.5720},
|
---|
1409 | { 0.3197, 0, 0.6697, 0.6190, 0.4635, 0.4047, 0.4190, 0.6899, 0.3650, 0.1552},
|
---|
1410 | { 0.6358, 0.6697, 0, 0.6031, 0.5367, 0.5927, 0.6008, 0.4084, 0.4103, 0.6843},
|
---|
1411 | { 0.5518, 0.6190, 0.6031, 0, 0.4173, 0.2740, 0.6339, 0.6114, 0.6702, 0.6455},
|
---|
1412 | { 0.5207, 0.4635, 0.5367, 0.4173, 0, 0.2510, 0.6610, 0.6935, 0.5180, 0.5362},
|
---|
1413 | { 0.5909, 0.4047, 0.5927, 0.2740, 0.2510, 0, 0.6019, 0.6955, 0.6232, 0.3756},
|
---|
1414 | { 0.3361, 0.4190, 0.6008, 0.6339, 0.6610, 0.6019, 0, 0.3205, 0.3279, 0.6165},
|
---|
1415 | { 0.4897, 0.6899, 0.4084, 0.6114, 0.6935, 0.6955, 0.3205, 0, 0.4189, 0.7344},
|
---|
1416 | { 0.2447, 0.3650, 0.4103, 0.6702, 0.5180, 0.6232, 0.3279, 0.4189, 0, 0.5595},
|
---|
1417 | { 0.5720, 0.1552, 0.6843, 0.6455, 0.5362, 0.3756, 0.6165, 0.7344, 0.5595, 0},
|
---|
1418 | },
|
---|
1419 | new double[,]
|
---|
1420 | {
|
---|
1421 | { 2.0000, 1.6472, 1.1513, 1.3142, 1.3662, 1.2437, 1.6267, 1.4148, 1.7372, 1.2786},
|
---|
1422 | { 1.6472, 2.0000, 1.0689, 1.1876, 1.4541, 1.5370, 1.5174, 1.0103, 1.5898, 1.8381},
|
---|
1423 | { 1.1513, 1.0689, 2.0000, 1.2199, 1.3398, 1.2402, 1.2244, 1.5320, 1.5293, 1.0276},
|
---|
1424 | { 1.3142, 1.1876, 1.2199, 2.0000, 1.5197, 1.7027, 1.1555, 1.2033, 1.0675, 1.1291},
|
---|
1425 | { 1.3662, 1.4541, 1.3398, 1.5197, 2.0000, 1.7299, 1.0916, 0.9989, 1.3706, 1.3407},
|
---|
1426 | { 1.2437, 1.5370, 1.2402, 1.7027, 1.7299, 2.0000, 1.2223, 0.9923, 1.1787, 1.5758},
|
---|
1427 | { 1.6267, 1.5174, 1.2244, 1.1555, 1.0916, 1.2223, 2.0000, 1.6461, 1.6369, 1.1928},
|
---|
1428 | { 1.4148, 1.0103, 1.5320, 1.2033, 0.9989, 0.9923, 1.6461, 2.0000, 1.5176, 0.7806},
|
---|
1429 | { 1.7372, 1.5898, 1.5293, 1.0675, 1.3706, 1.1787, 1.6369, 1.5176, 2.0000, 1.3009},
|
---|
1430 | { 1.2786, 1.8381, 1.0276, 1.1291, 1.3407, 1.5758, 1.1928, 0.7806, 1.3009, 2.0000},
|
---|
1431 | },
|
---|
1432 | }
|
---|
1433 | );
|
---|
1434 | cov = new CovarianceSum();
|
---|
1435 | cov.Terms.Add(new CovarianceSquaredExponentialIso());
|
---|
1436 | cov.Terms.Add(new CovarianceLinear());
|
---|
1437 | TestCovarianceFunction(cov, 1,
|
---|
1438 | new double[,]
|
---|
1439 | {
|
---|
1440 | { 7.7681, 7.7957, 9.1175, 7.6951, 9.1148, 8.2406, 8.2532, 8.2057, 7.9303, 8.5765},
|
---|
1441 | { 7.3926, 7.7881, 8.2289, 7.3128, 8.5326, 7.8570, 7.7535, 7.8698, 7.5822, 8.0224},
|
---|
1442 | { 8.5096, 8.6045, 9.2632, 8.2546, 8.7198, 9.2945, 8.8817, 8.1368, 8.3741, 8.7816},
|
---|
1443 | { 7.9886, 7.4745, 8.5704, 7.8096, 7.7719, 8.1964, 8.4695, 8.1648, 8.1138, 8.2315},
|
---|
1444 | { 8.0632, 7.4371, 8.3651, 8.0757, 7.4147, 7.6080, 8.0477, 8.0750, 8.0288, 8.1469},
|
---|
1445 | { 7.7869, 7.5959, 7.9316, 7.6696, 7.4564, 7.7793, 7.9884, 7.8850, 7.8692, 7.8941},
|
---|
1446 | { 7.7940, 8.3557, 8.7048, 7.6497, 9.3089, 8.3910, 8.1263, 7.7655, 7.8589, 8.4871},
|
---|
1447 | { 8.3350, 8.5404, 9.4643, 8.1079, 9.4540, 9.1241, 8.7945, 8.0367, 8.2835, 8.9443},
|
---|
1448 | { 8.0481, 8.3644, 9.2221, 7.9399, 9.2948, 8.6753, 8.3852, 8.1164, 8.0524, 8.7309},
|
---|
1449 | { 7.2030, 7.7683, 7.9353, 7.0220, 8.1984, 8.0588, 7.7433, 7.7874, 7.4431, 7.7457},
|
---|
1450 | },
|
---|
1451 | new double[][,]
|
---|
1452 | {
|
---|
1453 | new double[,]
|
---|
1454 | {
|
---|
1455 | { 0, 0.3781, 1.0250, 0.7934, 0.7239, 0.8910, 0.4018, 0.6606, 0.2764, 0.8421},
|
---|
1456 | { 0.3781, 0, 1.1512, 0.9715, 0.6106, 0.5082, 0.5320, 1.2453, 0.4451, 0.1669},
|
---|
1457 | { 1.0250, 1.1512, 0, 0.9248, 0.7589, 0.8960, 0.9183, 0.5143, 0.5175, 1.2171},
|
---|
1458 | { 0.7934, 0.9715, 0.9248, 0, 0.5292, 0.3149, 1.0188, 0.9487, 1.1534, 1.0583},
|
---|
1459 | { 0.7239, 0.6106, 0.7589, 0.5292, 0, 0.2845, 1.1157, 1.2640, 0.7182, 0.7577},
|
---|
1460 | { 0.8910, 0.5082, 0.8960, 0.3149, 0.2845, 0, 0.9214, 1.2749, 0.9845, 0.4616},
|
---|
1461 | { 0.4018, 0.5320, 0.9183, 1.0188, 1.1157, 0.9214, 0, 0.3793, 0.3899, 0.9638},
|
---|
1462 | { 0.6606, 1.2453, 0.5143, 0.9487, 1.2640, 1.2749, 0.3793, 0, 0.5318, 1.6567},
|
---|
1463 | { 0.2764, 0.4451, 0.5175, 1.1534, 0.7182, 0.9845, 0.3899, 0.5318, 0, 0.8116},
|
---|
1464 | { 0.8421, 0.1669, 1.2171, 1.0583, 0.7577, 0.4616, 0.9638, 1.6567, 0.8116, 0},
|
---|
1465 | },
|
---|
1466 | new double[,]
|
---|
1467 | {
|
---|
1468 | { 14.7781, 14.3950, 13.7138, 13.9618, 14.0352, 13.8578, 14.3707, 14.1018, 14.4990, 13.9100},
|
---|
1469 | { 14.3950, 14.7781, 13.5767, 13.7715, 14.1542, 14.2607, 14.2360, 13.4735, 14.3260, 14.6102},
|
---|
1470 | { 13.7138, 13.5767, 14.7781, 13.8217, 13.9982, 13.8525, 13.8286, 14.2545, 14.2511, 13.5045},
|
---|
1471 | { 13.9618, 13.7715, 13.8217, 14.7781, 14.2390, 14.4598, 13.7206, 13.7960, 13.5743, 13.6778},
|
---|
1472 | { 14.0352, 14.1542, 13.9982, 14.2390, 14.7781, 14.4908, 13.6154, 13.4528, 14.0413, 13.9995},
|
---|
1473 | { 13.8578, 14.2607, 13.8525, 14.4598, 14.4908, 14.7781, 13.8254, 13.4407, 13.7576, 14.3090},
|
---|
1474 | { 14.3707, 14.2360, 13.8286, 13.7206, 13.6154, 13.8254, 14.7781, 14.3938, 14.3828, 13.7798},
|
---|
1475 | { 14.1018, 13.4735, 14.2545, 13.7960, 13.4528, 13.4407, 14.3938, 14.7781, 14.2363, 13.0113},
|
---|
1476 | { 14.4990, 14.3260, 14.2511, 13.5743, 14.0413, 13.7576, 14.3828, 14.2363, 14.7781, 13.9425},
|
---|
1477 | { 13.9100, 14.6102, 13.5045, 13.6778, 13.9995, 14.3090, 13.7798, 13.0113, 13.9425, 14.7781},
|
---|
1478 | },
|
---|
1479 | }
|
---|
1480 | );
|
---|
1481 | }
|
---|
1482 |
|
---|
1483 | [TestMethod]
|
---|
1484 | public void CovScaleTest() {
|
---|
1485 | var cov = new CovarianceScale();
|
---|
1486 | cov.CovarianceFunctionParameter.Value = new CovarianceSquaredExponentialIso();
|
---|
1487 | TestCovarianceFunction(cov, 0,
|
---|
1488 | new double[,]
|
---|
1489 | {
|
---|
1490 | { 0.5770, 0.5404, 0.8569, 0.5612, 0.7545, 0.4981, 0.6649, 0.7483, 0.6564, 0.8184},
|
---|
1491 | { 0.6206, 0.7027, 0.7091, 0.6015, 0.7295, 0.5338, 0.6706, 0.8202, 0.7155, 0.8029},
|
---|
1492 | { 0.7743, 0.7513, 0.8468, 0.6864, 0.5644, 0.7861, 0.8404, 0.6625, 0.7555, 0.8335},
|
---|
1493 | { 0.7773, 0.5513, 0.7793, 0.7166, 0.4533, 0.5870, 0.8913, 0.8797, 0.8656, 0.8245},
|
---|
1494 | { 0.8839, 0.5934, 0.7689, 0.8982, 0.4126, 0.4742, 0.7883, 0.9202, 0.9077, 0.8649},
|
---|
1495 | { 0.8746, 0.7341, 0.7021, 0.8323, 0.4826, 0.5923, 0.8706, 0.9508, 0.9524, 0.8660},
|
---|
1496 | { 0.6133, 0.7560, 0.7280, 0.5749, 0.8722, 0.5651, 0.6530, 0.6259, 0.6633, 0.8194},
|
---|
1497 | { 0.6113, 0.6277, 0.8110, 0.5489, 0.7110, 0.6222, 0.6948, 0.5425, 0.6227, 0.7828},
|
---|
1498 | { 0.6394, 0.6950, 0.8669, 0.6107, 0.7933, 0.5985, 0.6824, 0.6858, 0.6703, 0.8492},
|
---|
1499 | { 0.5791, 0.7156, 0.6274, 0.5324, 0.6323, 0.6100, 0.6863, 0.8091, 0.6855, 0.7173},
|
---|
1500 | },
|
---|
1501 | new double[][,]
|
---|
1502 | {
|
---|
1503 | new double[,]
|
---|
1504 | {
|
---|
1505 | { 2.0000, 1.6472, 1.1513, 1.3142, 1.3662, 1.2437, 1.6267, 1.4148, 1.7372, 1.2786},
|
---|
1506 | { 1.6472, 2.0000, 1.0689, 1.1876, 1.4541, 1.5370, 1.5174, 1.0103, 1.5898, 1.8381},
|
---|
1507 | { 1.1513, 1.0689, 2.0000, 1.2199, 1.3398, 1.2402, 1.2244, 1.5320, 1.5293, 1.0276},
|
---|
1508 | { 1.3142, 1.1876, 1.2199, 2.0000, 1.5197, 1.7027, 1.1555, 1.2033, 1.0675, 1.1291},
|
---|
1509 | { 1.3662, 1.4541, 1.3398, 1.5197, 2.0000, 1.7299, 1.0916, 0.9989, 1.3706, 1.3407},
|
---|
1510 | { 1.2437, 1.5370, 1.2402, 1.7027, 1.7299, 2.0000, 1.2223, 0.9923, 1.1787, 1.5758},
|
---|
1511 | { 1.6267, 1.5174, 1.2244, 1.1555, 1.0916, 1.2223, 2.0000, 1.6461, 1.6369, 1.1928},
|
---|
1512 | { 1.4148, 1.0103, 1.5320, 1.2033, 0.9989, 0.9923, 1.6461, 2.0000, 1.5176, 0.7806},
|
---|
1513 | { 1.7372, 1.5898, 1.5293, 1.0675, 1.3706, 1.1787, 1.6369, 1.5176, 2.0000, 1.3009},
|
---|
1514 | { 1.2786, 1.8381, 1.0276, 1.1291, 1.3407, 1.5758, 1.1928, 0.7806, 1.3009, 2.0000},
|
---|
1515 | },
|
---|
1516 | new double[,]
|
---|
1517 | {
|
---|
1518 | { 0, 0.3197, 0.6358, 0.5518, 0.5207, 0.5909, 0.3361, 0.4897, 0.2447, 0.5720},
|
---|
1519 | { 0.3197, 0, 0.6697, 0.6190, 0.4635, 0.4047, 0.4190, 0.6899, 0.3650, 0.1552},
|
---|
1520 | { 0.6358, 0.6697, 0, 0.6031, 0.5367, 0.5927, 0.6008, 0.4084, 0.4103, 0.6843},
|
---|
1521 | { 0.5518, 0.6190, 0.6031, 0, 0.4173, 0.2740, 0.6339, 0.6114, 0.6702, 0.6455},
|
---|
1522 | { 0.5207, 0.4635, 0.5367, 0.4173, 0, 0.2510, 0.6610, 0.6935, 0.5180, 0.5362},
|
---|
1523 | { 0.5909, 0.4047, 0.5927, 0.2740, 0.2510, 0, 0.6019, 0.6955, 0.6232, 0.3756},
|
---|
1524 | { 0.3361, 0.4190, 0.6008, 0.6339, 0.6610, 0.6019, 0, 0.3205, 0.3279, 0.6165},
|
---|
1525 | { 0.4897, 0.6899, 0.4084, 0.6114, 0.6935, 0.6955, 0.3205, 0, 0.4189, 0.7344},
|
---|
1526 | { 0.2447, 0.3650, 0.4103, 0.6702, 0.5180, 0.6232, 0.3279, 0.4189, 0, 0.5595},
|
---|
1527 | { 0.5720, 0.1552, 0.6843, 0.6455, 0.5362, 0.3756, 0.6165, 0.7344, 0.5595, 0},
|
---|
1528 | },
|
---|
1529 | new double[,]
|
---|
1530 | {
|
---|
1531 | { 2.0000, 1.6472, 1.1513, 1.3142, 1.3662, 1.2437, 1.6267, 1.4148, 1.7372, 1.2786},
|
---|
1532 | { 1.6472, 2.0000, 1.0689, 1.1876, 1.4541, 1.5370, 1.5174, 1.0103, 1.5898, 1.8381},
|
---|
1533 | { 1.1513, 1.0689, 2.0000, 1.2199, 1.3398, 1.2402, 1.2244, 1.5320, 1.5293, 1.0276},
|
---|
1534 | { 1.3142, 1.1876, 1.2199, 2.0000, 1.5197, 1.7027, 1.1555, 1.2033, 1.0675, 1.1291},
|
---|
1535 | { 1.3662, 1.4541, 1.3398, 1.5197, 2.0000, 1.7299, 1.0916, 0.9989, 1.3706, 1.3407},
|
---|
1536 | { 1.2437, 1.5370, 1.2402, 1.7027, 1.7299, 2.0000, 1.2223, 0.9923, 1.1787, 1.5758},
|
---|
1537 | { 1.6267, 1.5174, 1.2244, 1.1555, 1.0916, 1.2223, 2.0000, 1.6461, 1.6369, 1.1928},
|
---|
1538 | { 1.4148, 1.0103, 1.5320, 1.2033, 0.9989, 0.9923, 1.6461, 2.0000, 1.5176, 0.7806},
|
---|
1539 | { 1.7372, 1.5898, 1.5293, 1.0675, 1.3706, 1.1787, 1.6369, 1.5176, 2.0000, 1.3009},
|
---|
1540 | { 1.2786, 1.8381, 1.0276, 1.1291, 1.3407, 1.5758, 1.1928, 0.7806, 1.3009, 2.0000},
|
---|
1541 | },
|
---|
1542 | }
|
---|
1543 | );
|
---|
1544 | cov = new CovarianceScale();
|
---|
1545 | cov.CovarianceFunctionParameter.Value = new CovarianceSquaredExponentialIso();
|
---|
1546 | TestCovarianceFunction(cov, 1,
|
---|
1547 | new double[,]
|
---|
1548 | {
|
---|
1549 | { 50.6828, 50.2342, 53.4685, 50.4920, 52.5559, 49.6832, 51.6641, 52.4976, 51.5740, 53.1373},
|
---|
1550 | { 51.1850, 52.0523, 52.1160, 50.9689, 52.3171, 50.1516, 51.7239, 53.1529, 52.1794, 52.9998},
|
---|
1551 | { 52.7403, 52.5260, 53.3832, 51.8877, 50.5317, 52.8481, 53.3281, 51.6395, 52.5652, 53.2686},
|
---|
1552 | { 52.7683, 50.3705, 52.7860, 52.1901, 49.0546, 50.8004, 53.7544, 53.6589, 53.5423, 53.1907},
|
---|
1553 | { 53.6941, 50.8746, 52.6909, 53.8103, 48.4337, 49.3535, 52.8689, 53.9867, 53.8874, 53.5365},
|
---|
1554 | { 53.6171, 52.3616, 52.0459, 53.2586, 49.4713, 50.8619, 53.5837, 54.2264, 54.2390, 53.5454},
|
---|
1555 | { 51.1026, 52.5698, 52.3019, 50.6571, 53.5972, 50.5394, 51.5383, 51.2437, 51.6476, 53.1463},
|
---|
1556 | { 51.0802, 51.2635, 53.0723, 50.3407, 52.1347, 51.2021, 51.9731, 50.2612, 51.2082, 52.8185},
|
---|
1557 | { 51.3920, 51.9750, 53.5529, 51.0735, 52.9133, 50.9343, 51.8460, 51.8810, 51.7204, 53.4037},
|
---|
1558 | { 50.7067, 52.1810, 51.2605, 50.1330, 51.3144, 51.0653, 51.8868, 53.0548, 51.8777, 52.1974},
|
---|
1559 | },
|
---|
1560 | new double[][,]
|
---|
1561 | {
|
---|
1562 | new double[,]
|
---|
1563 | {
|
---|
1564 | { 109.1963, 106.3653, 101.3323, 103.1642, 103.7069, 102.3962, 106.1856, 104.1987, 107.1342, 102.7815},
|
---|
1565 | { 106.3653, 109.1963, 100.3190, 101.7587, 104.5858, 105.3734, 105.1910, 99.5562, 105.8559, 107.9559},
|
---|
1566 | { 101.3323, 100.3190, 109.1963, 102.1292, 103.4337, 102.3572, 102.1802, 105.3271, 105.3022, 99.7852},
|
---|
1567 | { 103.1642, 101.7587, 102.1292, 109.1963, 105.2127, 106.8440, 101.3820, 101.9396, 100.3013, 101.0662},
|
---|
1568 | { 103.7069, 104.5858, 103.4337, 105.2127, 109.1963, 107.0730, 100.6050, 99.4038, 103.7518, 103.4431},
|
---|
1569 | { 102.3962, 105.3734, 102.3572, 106.8440, 107.0730, 109.1963, 102.1564, 99.3144, 101.6555, 105.7297},
|
---|
1570 | { 106.1856, 105.1910, 102.1802, 101.3820, 100.6050, 102.1564, 109.1963, 106.3564, 106.2756, 101.8199},
|
---|
1571 | { 104.1987, 99.5562, 105.3271, 101.9396, 99.4038, 99.3144, 106.3564, 109.1963, 105.1926, 96.1411},
|
---|
1572 | { 107.1342, 105.8559, 105.3022, 100.3013, 103.7518, 101.6555, 106.2756, 105.1926, 109.1963, 103.0217},
|
---|
1573 | { 102.7815, 107.9559, 99.7852, 101.0662, 103.4431, 105.7297, 101.8199, 96.1411, 103.0217, 109.1963},
|
---|
1574 | },
|
---|
1575 | new double[,]
|
---|
1576 | {
|
---|
1577 | { 0, 2.7940, 7.5738, 5.8624, 5.3491, 6.5838, 2.9688, 4.8814, 2.0425, 6.2226},
|
---|
1578 | { 2.7940, 0, 8.5062, 7.1784, 4.5117, 3.7552, 3.9310, 9.2014, 3.2888, 1.2334},
|
---|
1579 | { 7.5738, 8.5062, 0, 6.8334, 5.6078, 6.6203, 6.7857, 3.7999, 3.8238, 8.9934},
|
---|
1580 | { 5.8624, 7.1784, 6.8334, 0, 3.9101, 2.3268, 7.5278, 7.0100, 8.5225, 7.8196},
|
---|
1581 | { 5.3491, 4.5117, 5.6078, 3.9101, 0, 2.1025, 8.2441, 9.3397, 5.3065, 5.5989},
|
---|
1582 | { 6.5838, 3.7552, 6.6203, 2.3268, 2.1025, 0, 6.8080, 9.4206, 7.2742, 3.4110},
|
---|
1583 | { 2.9688, 3.9310, 6.7857, 7.5278, 8.2441, 6.8080, 0, 2.8026, 2.8812, 7.1214},
|
---|
1584 | { 4.8814, 9.2014, 3.7999, 7.0100, 9.3397, 9.4206, 2.8026, 0, 3.9294, 12.2417},
|
---|
1585 | { 2.0425, 3.2888, 3.8238, 8.5225, 5.3065, 7.2742, 2.8812, 3.9294, 0, 5.9966},
|
---|
1586 | { 6.2226, 1.2334, 8.9934, 7.8196, 5.5989, 3.4110, 7.1214, 12.2417, 5.9966, 0},
|
---|
1587 | },
|
---|
1588 | new double[,]
|
---|
1589 | {
|
---|
1590 | { 109.1963, 106.3653, 101.3323, 103.1642, 103.7069, 102.3962, 106.1856, 104.1987, 107.1342, 102.7815},
|
---|
1591 | { 106.3653, 109.1963, 100.3190, 101.7587, 104.5858, 105.3734, 105.1910, 99.5562, 105.8559, 107.9559},
|
---|
1592 | { 101.3323, 100.3190, 109.1963, 102.1292, 103.4337, 102.3572, 102.1802, 105.3271, 105.3022, 99.7852},
|
---|
1593 | { 103.1642, 101.7587, 102.1292, 109.1963, 105.2127, 106.8440, 101.3820, 101.9396, 100.3013, 101.0662},
|
---|
1594 | { 103.7069, 104.5858, 103.4337, 105.2127, 109.1963, 107.0730, 100.6050, 99.4038, 103.7518, 103.4431},
|
---|
1595 | { 102.3962, 105.3734, 102.3572, 106.8440, 107.0730, 109.1963, 102.1564, 99.3144, 101.6555, 105.7297},
|
---|
1596 | { 106.1856, 105.1910, 102.1802, 101.3820, 100.6050, 102.1564, 109.1963, 106.3564, 106.2756, 101.8199},
|
---|
1597 | { 104.1987, 99.5562, 105.3271, 101.9396, 99.4038, 99.3144, 106.3564, 109.1963, 105.1926, 96.1411},
|
---|
1598 | { 107.1342, 105.8559, 105.3022, 100.3013, 103.7518, 101.6555, 106.2756, 105.1926, 109.1963, 103.0217},
|
---|
1599 | { 102.7815, 107.9559, 99.7852, 101.0662, 103.4431, 105.7297, 101.8199, 96.1411, 103.0217, 109.1963},
|
---|
1600 | },
|
---|
1601 | }
|
---|
1602 | );
|
---|
1603 | }
|
---|
1604 |
|
---|
1605 | [TestMethod]
|
---|
1606 | public void CovProdTest() {
|
---|
1607 | var cov = new CovarianceProduct();
|
---|
1608 | cov.Factors.Add(new CovarianceSquaredExponentialIso());
|
---|
1609 | cov.Factors.Add(new CovarianceLinear());
|
---|
1610 | TestCovarianceFunction(cov, 0,
|
---|
1611 | new double[,]
|
---|
1612 | {
|
---|
1613 | { 0.5245, 0.5389, 1.6120, 0.4836, 1.5106, 0.7554, 0.8386, 0.8239, 0.6239, 1.1336},
|
---|
1614 | { 0.2889, 0.5225, 0.8337, 0.2496, 1.0595, 0.5710, 0.5052, 0.5547, 0.3724, 0.6822},
|
---|
1615 | { 1.0623, 1.1239, 1.7263, 0.8459, 1.0618, 1.6839, 1.3988, 0.7607, 0.9521, 1.3106},
|
---|
1616 | { 0.6585, 0.3625, 1.1117, 0.5349, 0.5137, 0.7756, 1.0648, 0.7942, 0.7510, 0.8516},
|
---|
1617 | { 0.7040, 0.3275, 0.9490, 0.7125, 0.3548, 0.4404, 0.7037, 0.7073, 0.6680, 0.7798},
|
---|
1618 | { 0.4641, 0.3741, 0.6234, 0.3844, 0.3673, 0.5306, 0.6413, 0.5193, 0.5036, 0.5608},
|
---|
1619 | { 0.5385, 0.9383, 1.1840, 0.4565, 1.7927, 0.8766, 0.7518, 0.5198, 0.5765, 1.0608},
|
---|
1620 | { 0.8694, 1.0060, 1.8506, 0.7108, 1.7052, 1.3654, 1.2234, 0.6698, 0.8427, 1.4060},
|
---|
1621 | { 0.6989, 0.9246, 1.7118, 0.6277, 1.6927, 1.0667, 0.9339, 0.7510, 0.7057, 1.2768},
|
---|
1622 | { 0.1972, 0.5055, 0.6262, 0.1263, 0.7928, 0.7002, 0.4950, 0.4913, 0.2894, 0.4889},
|
---|
1623 |
|
---|
1624 | },
|
---|
1625 | new double[][,]
|
---|
1626 | {
|
---|
1627 | new double[,]
|
---|
1628 | {
|
---|
1629 | { 0, 0.4127, 1.0287, 0.6741, 0.5630, 0.4325, 0.5722, 1.0336, 0.4752, 0.5617},
|
---|
1630 | { 0.4127, 0, 0.6880, 0.3738, 0.2907, 0.1730, 0.4679, 0.8675, 0.4878, 0.1286},
|
---|
1631 | { 1.0287, 0.6880, 0, 0.7937, 0.6606, 0.5323, 0.9538, 0.9634, 0.8138, 0.6381},
|
---|
1632 | { 0.6741, 0.3738, 0.7937, 0, 0.3455, 0.1881, 0.6345, 0.9714, 0.7339, 0.3214},
|
---|
1633 | { 0.5630, 0.2907, 0.6606, 0.3455, 0, 0.1313, 0.5056, 0.8485, 0.6038, 0.2630},
|
---|
1634 | { 0.4325, 0.1730, 0.5323, 0.1881, 0.1313, 0, 0.3748, 0.6687, 0.4734, 0.1491},
|
---|
1635 | { 0.5722, 0.4679, 0.9538, 0.6345, 0.5056, 0.3748, 0, 0.6955, 0.5871, 0.5059},
|
---|
1636 | { 1.0336, 0.8675, 0.9634, 0.9714, 0.8485, 0.6687, 0.6955, 0, 0.9475, 0.6932},
|
---|
1637 | { 0.4752, 0.4878, 0.8138, 0.7339, 0.6038, 0.4734, 0.5871, 0.9475, 0, 0.6046},
|
---|
1638 | { 0.5617, 0.1286, 0.6381, 0.3214, 0.2630, 0.1491, 0.5059, 0.6932, 0.6046, 0},
|
---|
1639 | },
|
---|
1640 | new double[,]
|
---|
1641 | {
|
---|
1642 | { 4.0023, 2.1261, 1.8626, 1.6054, 1.4771, 0.9102, 2.7697, 2.9858, 3.3730, 1.2556},
|
---|
1643 | { 2.1261, 1.9372, 1.0981, 0.7172, 0.9121, 0.6569, 1.6947, 1.2703, 2.1250, 1.5231},
|
---|
1644 | { 1.8626, 1.0981, 4.6784, 1.6055, 1.6490, 1.1138, 1.9438, 3.6140, 3.0330, 0.9581},
|
---|
1645 | { 1.6054, 0.7172, 1.6055, 2.5635, 1.2584, 1.1688, 1.1565, 1.9117, 1.1689, 0.5622},
|
---|
1646 | { 1.4771, 0.9121, 1.6490, 1.2584, 1.8469, 0.9049, 0.8350, 1.2221, 1.5977, 0.6577},
|
---|
1647 | { 0.9102, 0.6569, 1.1138, 1.1688, 0.9049, 0.8258, 0.7611, 0.9541, 0.8954, 0.6253},
|
---|
1648 | { 2.7697, 1.6947, 1.9438, 1.1565, 0.8350, 0.7611, 3.6346, 3.5720, 2.9305, 0.9789},
|
---|
1649 | { 2.9858, 1.2703, 3.6140, 1.9117, 1.2221, 0.9541, 3.5720, 5.8240, 3.4327, 0.7368},
|
---|
1650 | { 3.3730, 2.1250, 3.0330, 1.1689, 1.5977, 0.8954, 2.9305, 3.4327, 4.3277, 1.4057},
|
---|
1651 | { 1.2556, 1.5231, 0.9581, 0.5622, 0.6577, 0.6253, 0.9789, 0.7368, 1.4057, 1.7151},
|
---|
1652 | },
|
---|
1653 | }
|
---|
1654 | );
|
---|
1655 | cov = new CovarianceProduct();
|
---|
1656 | cov.Factors.Add(new CovarianceSquaredExponentialIso());
|
---|
1657 | cov.Factors.Add(new CovarianceLinear());
|
---|
1658 | TestCovarianceFunction(cov, 1,
|
---|
1659 | new double[,]
|
---|
1660 | {
|
---|
1661 | { 6.2342, 6.7795, 13.6134, 5.8887, 14.2405, 10.1987, 8.8183, 7.8217, 6.6344, 9.9609},
|
---|
1662 | { 3.2242, 5.2384, 8.2928, 2.8624, 10.2826, 7.2613, 5.2743, 4.8651, 3.6758, 6.0948},
|
---|
1663 | { 9.7926, 10.6338, 14.7280, 8.6537, 12.8640, 15.3218, 12.0130, 8.0240, 8.9653, 11.3359},
|
---|
1664 | { 6.0497, 4.4825, 10.1916, 5.2725, 7.5223, 9.0848, 8.6907, 6.5563, 6.2868, 7.4352},
|
---|
1665 | { 5.7877, 3.8005, 8.8010, 5.7766, 5.6360, 6.2037, 6.3872, 5.6164, 5.3671, 6.5321},
|
---|
1666 | { 3.8501, 3.6110, 6.2543, 3.3286, 5.0963, 6.1672, 5.3421, 4.0085, 3.8812, 4.6925},
|
---|
1667 | { 6.0719, 8.8301, 11.5124, 5.4433, 14.9080, 10.6099, 8.0304, 5.7589, 6.0753, 9.3107},
|
---|
1668 | { 9.8306, 11.1183, 16.3892, 8.8231, 16.9213, 15.2084, 12.3844, 8.3980, 9.3789, 12.8390},
|
---|
1669 | { 7.6019, 9.3580, 14.3105, 7.1044, 15.2800, 12.2846, 9.6031, 7.6887, 7.3699, 10.8667},
|
---|
1670 | { 2.3372, 4.9884, 6.9233, 1.6100, 8.7070, 7.9328, 5.0646, 4.3597, 2.9643, 4.8145},
|
---|
1671 | },
|
---|
1672 | new double[][,]
|
---|
1673 | {
|
---|
1674 | new double[,]
|
---|
1675 | {
|
---|
1676 | { 0, 0.4881, 1.6583, 0.9692, 0.7827, 0.6522, 0.6841, 1.3942, 0.5367, 0.8270},
|
---|
1677 | { 0.4881, 0, 1.1827, 0.5867, 0.3830, 0.2172, 0.5941, 1.5658, 0.5949, 0.1383},
|
---|
1678 | { 1.6583, 1.1827, 0, 1.2171, 0.9340, 0.8047, 1.4579, 1.2131, 1.0263, 1.1349},
|
---|
1679 | { 0.9692, 0.5867, 1.2171, 0, 0.4382, 0.2161, 1.0197, 1.5073, 1.2629, 0.5270},
|
---|
1680 | { 0.7827, 0.3830, 0.9340, 0.4382, 0, 0.1488, 0.8534, 1.5465, 0.8372, 0.3717},
|
---|
1681 | { 0.6522, 0.2172, 0.8047, 0.2161, 0.1488, 0, 0.5737, 1.2259, 0.7478, 0.1832},
|
---|
1682 | { 0.6841, 0.5941, 1.4579, 1.0197, 0.8534, 0.5737, 0, 0.8230, 0.6981, 0.7909},
|
---|
1683 | { 1.3942, 1.5658, 1.2131, 1.5073, 1.5465, 1.2259, 0.8230, 0, 1.2028, 1.5638},
|
---|
1684 | { 0.5367, 0.5949, 1.0263, 1.2629, 0.8372, 0.7478, 0.6981, 1.2028, 0, 0.8770},
|
---|
1685 | { 0.8270, 0.1383, 1.1349, 0.5270, 0.3717, 0.1832, 0.7909, 1.5638, 0.8770, 0},
|
---|
1686 | },
|
---|
1687 | new double[,]
|
---|
1688 | {
|
---|
1689 | { 29.5729, 18.5805, 22.1876, 17.0550, 15.1746, 10.1428, 24.4678, 29.7604, 28.1516, 13.6594},
|
---|
1690 | { 18.5805, 14.3139, 13.9483, 8.3170, 8.8785, 6.0953, 15.8990, 16.9410, 19.1490, 12.1067},
|
---|
1691 | { 22.1876, 13.9483, 34.5691, 18.1905, 17.2281, 12.4415, 21.9535, 33.6266, 28.2630, 12.5918},
|
---|
1692 | { 17.0550, 8.3170, 18.1905, 18.9418, 11.7900, 9.9253, 13.7325, 21.9184, 14.8634, 6.8107},
|
---|
1693 | { 15.1746, 8.8785, 17.2281, 11.7900, 13.6471, 7.5799, 10.4142, 16.4592, 16.3685, 6.8676},
|
---|
1694 | { 10.1428, 6.0953, 12.4415, 9.9253, 7.5799, 6.1018, 8.6086, 12.9238, 10.4507, 5.6783},
|
---|
1695 | { 24.4678, 15.8990, 21.9535, 13.7325, 10.4142, 8.6086, 26.8561, 31.2335, 25.7489, 11.3079},
|
---|
1696 | { 29.7604, 16.9410, 33.6266, 21.9184, 16.4592, 12.9238, 31.2335, 43.0336, 32.2012, 12.2815},
|
---|
1697 | { 28.1516, 19.1490, 28.2630, 14.8634, 16.3685, 10.4507, 25.7489, 32.2012, 31.9778, 15.0663},
|
---|
1698 | { 13.6594, 12.1067, 12.5918, 6.8107, 6.8676, 5.6783, 11.3079, 12.2815, 15.0663, 12.6728},
|
---|
1699 | },
|
---|
1700 | }
|
---|
1701 | , 5e-3);
|
---|
1702 | }
|
---|
1703 |
|
---|
1704 |
|
---|
1705 | private void TestCovarianceFunction(ICovarianceFunction cf, double hypValue, double[,] expectedCov, double[][,] expectedGradients, double delta = 1E-3) {
|
---|
1706 | var x = GetData();
|
---|
1707 | var xt = GetDataTest();
|
---|
1708 |
|
---|
1709 | int nHyp = cf.GetNumberOfParameters(x.GetLength(1));
|
---|
1710 | var hyp = Enumerable.Repeat(hypValue, nHyp).ToArray();
|
---|
1711 |
|
---|
1712 | int rows0 = x.GetLength(0);
|
---|
1713 | int rows1 = xt.GetLength(0);
|
---|
1714 | var actualCov = new double[rows0, rows1];
|
---|
1715 | var covFunction = cf.GetParameterizedCovarianceFunction(hyp, Enumerable.Range(0, x.GetLength(1)));
|
---|
1716 | for (int i = 0; i < rows0; i++)
|
---|
1717 | for (int j = 0; j < rows1; j++)
|
---|
1718 | actualCov[i, j] = covFunction.CrossCovariance(x, xt, i, j);
|
---|
1719 |
|
---|
1720 | AssertEqual(expectedCov, actualCov, delta);
|
---|
1721 |
|
---|
1722 | for (int i = 0; i < rows0; i++)
|
---|
1723 | for (int j = 0; j < rows1; j++) {
|
---|
1724 | var g = covFunction.CovarianceGradient(x, i, j).ToArray();
|
---|
1725 | for (int k = 0; k < nHyp; k++)
|
---|
1726 | Assert.AreEqual(expectedGradients[k][i, j], g[k], delta);
|
---|
1727 | }
|
---|
1728 | }
|
---|
1729 |
|
---|
1730 |
|
---|
1731 | private void TestMeanFunction(IMeanFunction mf, double hypValue, double[] expectedMean, double[][] expectedGradients) {
|
---|
1732 | var x = GetData();
|
---|
1733 | var xt = GetDataTest();
|
---|
1734 |
|
---|
1735 | int nHyp = mf.GetNumberOfParameters(x.GetLength(1));
|
---|
1736 | var hyp = Enumerable.Repeat(hypValue, nHyp).ToArray();
|
---|
1737 | var meanFunction = mf.GetParameterizedMeanFunction(hyp, Enumerable.Range(0, x.GetLength(1)));
|
---|
1738 |
|
---|
1739 | var m = Enumerable.Range(0, xt.GetLength(0)).Select(i => meanFunction.Mean(xt, i)).ToArray();
|
---|
1740 |
|
---|
1741 | AssertEqual(expectedMean, m);
|
---|
1742 |
|
---|
1743 | for (int k = 0; k < nHyp; k++) {
|
---|
1744 | var g = Enumerable.Range(0, xt.GetLength(0)).Select(i => meanFunction.Gradient(x, i, k)).ToArray();
|
---|
1745 | AssertEqual(expectedGradients[k], g);
|
---|
1746 | }
|
---|
1747 | }
|
---|
1748 |
|
---|
1749 |
|
---|
1750 | private void AssertEqual(double[] expected, double[] actual) {
|
---|
1751 | Assert.AreEqual(expected.Length, actual.Length);
|
---|
1752 | for (int i = 0; i < expected.Length; i++)
|
---|
1753 | Assert.AreEqual(expected[i], actual[i], 1E-3);
|
---|
1754 | }
|
---|
1755 | private void AssertEqual(double[,] expected, double[,] actual, double delta = 5e-3) {
|
---|
1756 | Assert.AreEqual(expected.Length, actual.Length);
|
---|
1757 | for (int i = 0; i < expected.GetLength(0); i++)
|
---|
1758 | for (int j = 0; j < expected.GetLength(1); j++)
|
---|
1759 | Assert.AreEqual(expected[i, j], actual[i, j], delta);
|
---|
1760 | }
|
---|
1761 |
|
---|
1762 | private double[,] GetData() {
|
---|
1763 | return new double[,]
|
---|
1764 | {
|
---|
1765 | {0.4173, 0.7803, 0.2348, 0.5470, 0.9294},
|
---|
1766 | {0.0497, 0.3897, 0.3532, 0.2963, 0.7757},
|
---|
1767 | {0.9027, 0.2417, 0.8212, 0.7447, 0.4868},
|
---|
1768 | {0.9448, 0.4039, 0.0154, 0.1890, 0.4359},
|
---|
1769 | {0.4909, 0.0965, 0.0430, 0.6868, 0.4468},
|
---|
1770 | {0.4893, 0.1320, 0.1690, 0.1835, 0.3063},
|
---|
1771 | {0.3377, 0.9421, 0.6491, 0.3685, 0.5085},
|
---|
1772 | {0.9001, 0.9561, 0.7317, 0.6256, 0.5108},
|
---|
1773 | {0.3692, 0.5752, 0.6477, 0.7802, 0.8176},
|
---|
1774 | {0.1112, 0.0598, 0.4509, 0.0811, 0.7948}
|
---|
1775 | };
|
---|
1776 | }
|
---|
1777 |
|
---|
1778 | private double[,] GetDataTest() {
|
---|
1779 | return new double[,]
|
---|
1780 | {
|
---|
1781 | {0.6443, 0.2077, 0.3111, 0.5949, 0.0855},
|
---|
1782 | {0.3786, 0.3012, 0.9234, 0.2622, 0.2625},
|
---|
1783 | {0.8116, 0.4709, 0.4302, 0.6028, 0.8010},
|
---|
1784 | {0.5328, 0.2305, 0.1848, 0.7112, 0.0292},
|
---|
1785 | {0.3507, 0.8443, 0.9049, 0.2217, 0.9289},
|
---|
1786 | {0.9390, 0.1948, 0.9797, 0.1174, 0.7303},
|
---|
1787 | {0.8759, 0.2259, 0.4389, 0.2967, 0.4886},
|
---|
1788 | {0.5502, 0.1707, 0.1111, 0.3188, 0.5785},
|
---|
1789 | {0.6225, 0.2277, 0.2581, 0.4242, 0.2373},
|
---|
1790 | {0.5870, 0.4357, 0.4087, 0.5079, 0.4588}
|
---|
1791 | };
|
---|
1792 | }
|
---|
1793 | }
|
---|
1794 | }
|
---|