Changeset 9124
- Timestamp:
- 01/08/13 11:01:56 (12 years ago)
- Location:
- branches/HeuristicLab.Problems.GaussianProcessTuning
- Files:
-
- 15 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Algorithms.DataAnalysis.Experimental/TunedGaussianProcessModel.cs
r9112 r9124 182 182 183 183 // cholesky decomposition 184 ILArray<double> chol = ILNumerics.ILMath.chol(myL, false); 184 ILArray<double> chol; 185 try { 186 chol = ILNumerics.ILMath.chol(myL, false); 187 } 188 catch (Exception e) { 189 throw new ArgumentException("covariance matrix not positive definite", e); 190 } 185 191 if (chol == null || chol.IsEmpty || !chol.Size.Equals(myL.Size)) 186 192 throw new ArgumentException("covariance matrix not positive definite"); 187 188 193 this.l = new double[n * n]; 189 194 chol.ExportValues(ref l); -
branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning.sln
r9112 r9124 27 27 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.DataAnalysis.Experimental", "HeuristicLab.Algorithms.DataAnalysis.Experimental\HeuristicLab.Algorithms.DataAnalysis.Experimental.csproj", "{6142B24E-9C86-410B-A65A-1DE65C8C2349}" 28 28 EndProject 29 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GaussianProcessDemo", "GaussianProcessDemo\GaussianProcessDemo.csproj", "{D18AE898-F600-4754-B3B4-C0C7A364F973}" 30 EndProject 29 31 Global 30 32 GlobalSection(TestCaseManagementSettings) = postSolution … … 33 35 GlobalSection(SolutionConfigurationPlatforms) = preSolution 34 36 Debug|Any CPU = Debug|Any CPU 37 Debug|Mixed Platforms = Debug|Mixed Platforms 35 38 Debug|x64 = Debug|x64 36 39 Debug|x86 = Debug|x86 37 40 Release|Any CPU = Release|Any CPU 41 Release|Mixed Platforms = Release|Mixed Platforms 38 42 Release|x64 = Release|x64 39 43 Release|x86 = Release|x86 40 44 ReleaseBuild|Any CPU = ReleaseBuild|Any CPU 45 ReleaseBuild|Mixed Platforms = ReleaseBuild|Mixed Platforms 41 46 ReleaseBuild|x64 = ReleaseBuild|x64 42 47 ReleaseBuild|x86 = ReleaseBuild|x86 … … 45 50 {9A04599C-D608-4240-8DA6-D41F51C515A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 46 51 {9A04599C-D608-4240-8DA6-D41F51C515A3}.Debug|Any CPU.Build.0 = Debug|Any CPU 52 {9A04599C-D608-4240-8DA6-D41F51C515A3}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 53 {9A04599C-D608-4240-8DA6-D41F51C515A3}.Debug|Mixed Platforms.Build.0 = Debug|x86 47 54 {9A04599C-D608-4240-8DA6-D41F51C515A3}.Debug|x64.ActiveCfg = Debug|x64 48 55 {9A04599C-D608-4240-8DA6-D41F51C515A3}.Debug|x64.Build.0 = Debug|x64 … … 51 58 {9A04599C-D608-4240-8DA6-D41F51C515A3}.Release|Any CPU.ActiveCfg = Release|Any CPU 52 59 {9A04599C-D608-4240-8DA6-D41F51C515A3}.Release|Any CPU.Build.0 = Release|Any CPU 60 {9A04599C-D608-4240-8DA6-D41F51C515A3}.Release|Mixed Platforms.ActiveCfg = Release|x86 61 {9A04599C-D608-4240-8DA6-D41F51C515A3}.Release|Mixed Platforms.Build.0 = Release|x86 53 62 {9A04599C-D608-4240-8DA6-D41F51C515A3}.Release|x64.ActiveCfg = Release|x64 54 63 {9A04599C-D608-4240-8DA6-D41F51C515A3}.Release|x64.Build.0 = Release|x64 … … 57 66 {9A04599C-D608-4240-8DA6-D41F51C515A3}.ReleaseBuild|Any CPU.ActiveCfg = Release|Any CPU 58 67 {9A04599C-D608-4240-8DA6-D41F51C515A3}.ReleaseBuild|Any CPU.Build.0 = Release|Any CPU 68 {9A04599C-D608-4240-8DA6-D41F51C515A3}.ReleaseBuild|Mixed Platforms.ActiveCfg = Release|x86 69 {9A04599C-D608-4240-8DA6-D41F51C515A3}.ReleaseBuild|Mixed Platforms.Build.0 = Release|x86 59 70 {9A04599C-D608-4240-8DA6-D41F51C515A3}.ReleaseBuild|x64.ActiveCfg = Release|Any CPU 60 71 {9A04599C-D608-4240-8DA6-D41F51C515A3}.ReleaseBuild|x86.ActiveCfg = Release|Any CPU 61 72 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 62 73 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Debug|Any CPU.Build.0 = Debug|Any CPU 74 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 75 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Debug|Mixed Platforms.Build.0 = Debug|x86 63 76 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Debug|x64.ActiveCfg = Debug|x64 64 77 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Debug|x64.Build.0 = Debug|x64 … … 67 80 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Release|Any CPU.ActiveCfg = Release|Any CPU 68 81 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Release|Any CPU.Build.0 = Release|Any CPU 82 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Release|Mixed Platforms.ActiveCfg = Release|x86 83 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Release|Mixed Platforms.Build.0 = Release|x86 69 84 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Release|x64.ActiveCfg = Release|x64 70 85 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Release|x64.Build.0 = Release|x64 … … 73 88 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.ReleaseBuild|Any CPU.ActiveCfg = Release|Any CPU 74 89 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.ReleaseBuild|Any CPU.Build.0 = Release|Any CPU 90 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.ReleaseBuild|Mixed Platforms.ActiveCfg = Release|x86 91 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.ReleaseBuild|Mixed Platforms.Build.0 = Release|x86 75 92 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.ReleaseBuild|x64.ActiveCfg = Release|Any CPU 76 93 {98C8AD2B-B035-4863-A01E-B659465FF6B2}.ReleaseBuild|x86.ActiveCfg = Release|Any CPU 77 94 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 78 95 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Debug|Any CPU.Build.0 = Debug|Any CPU 96 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 97 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Debug|Mixed Platforms.Build.0 = Debug|x86 79 98 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Debug|x64.ActiveCfg = Debug|x64 80 99 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Debug|x64.Build.0 = Debug|x64 … … 83 102 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Release|Any CPU.ActiveCfg = Release|Any CPU 84 103 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Release|Any CPU.Build.0 = Release|Any CPU 104 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Release|Mixed Platforms.ActiveCfg = Release|x86 105 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Release|Mixed Platforms.Build.0 = Release|x86 85 106 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Release|x64.ActiveCfg = Release|x64 86 107 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Release|x64.Build.0 = Release|x64 … … 89 110 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.ReleaseBuild|Any CPU.ActiveCfg = Release|Any CPU 90 111 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.ReleaseBuild|Any CPU.Build.0 = Release|Any CPU 112 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.ReleaseBuild|Mixed Platforms.ActiveCfg = Release|x86 113 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.ReleaseBuild|Mixed Platforms.Build.0 = Release|x86 91 114 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.ReleaseBuild|x64.ActiveCfg = Release|x64 92 115 {94C7714E-29D4-4D6D-B213-2C18D627AB75}.ReleaseBuild|x64.Build.0 = Release|x64 … … 95 118 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 96 119 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Debug|Any CPU.Build.0 = Debug|Any CPU 120 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 121 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Debug|Mixed Platforms.Build.0 = Debug|x86 97 122 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Debug|x64.ActiveCfg = Debug|x64 98 123 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Debug|x64.Build.0 = Debug|x64 … … 101 126 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Release|Any CPU.ActiveCfg = Release|Any CPU 102 127 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Release|Any CPU.Build.0 = Release|Any CPU 128 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Release|Mixed Platforms.ActiveCfg = Release|x86 129 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Release|Mixed Platforms.Build.0 = Release|x86 103 130 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Release|x64.ActiveCfg = Release|x64 104 131 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Release|x64.Build.0 = Release|x64 … … 107 134 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.ReleaseBuild|Any CPU.ActiveCfg = ReleaseBuild|Any CPU 108 135 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.ReleaseBuild|Any CPU.Build.0 = ReleaseBuild|Any CPU 136 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.ReleaseBuild|Mixed Platforms.ActiveCfg = ReleaseBuild|x86 137 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.ReleaseBuild|Mixed Platforms.Build.0 = ReleaseBuild|x86 109 138 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.ReleaseBuild|x64.ActiveCfg = ReleaseBuild|x64 110 139 {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.ReleaseBuild|x64.Build.0 = ReleaseBuild|x64 … … 113 142 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 114 143 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Debug|Any CPU.Build.0 = Debug|Any CPU 144 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 145 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Debug|Mixed Platforms.Build.0 = Debug|x86 115 146 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Debug|x64.ActiveCfg = Debug|x64 116 147 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Debug|x64.Build.0 = Debug|x64 … … 119 150 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Release|Any CPU.ActiveCfg = Release|Any CPU 120 151 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Release|Any CPU.Build.0 = Release|Any CPU 152 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Release|Mixed Platforms.ActiveCfg = Release|x86 153 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Release|Mixed Platforms.Build.0 = Release|x86 121 154 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Release|x64.ActiveCfg = Release|x64 122 155 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Release|x64.Build.0 = Release|x64 … … 125 158 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.ReleaseBuild|Any CPU.ActiveCfg = Release|Any CPU 126 159 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.ReleaseBuild|Any CPU.Build.0 = Release|Any CPU 160 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.ReleaseBuild|Mixed Platforms.ActiveCfg = Release|x86 161 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.ReleaseBuild|Mixed Platforms.Build.0 = Release|x86 127 162 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.ReleaseBuild|x64.ActiveCfg = Release|Any CPU 128 163 {6142B24E-9C86-410B-A65A-1DE65C8C2349}.ReleaseBuild|x86.ActiveCfg = Release|Any CPU 164 {D18AE898-F600-4754-B3B4-C0C7A364F973}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 165 {D18AE898-F600-4754-B3B4-C0C7A364F973}.Debug|Any CPU.Build.0 = Debug|Any CPU 166 {D18AE898-F600-4754-B3B4-C0C7A364F973}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 167 {D18AE898-F600-4754-B3B4-C0C7A364F973}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 168 {D18AE898-F600-4754-B3B4-C0C7A364F973}.Debug|x64.ActiveCfg = Debug|Any CPU 169 {D18AE898-F600-4754-B3B4-C0C7A364F973}.Debug|x86.ActiveCfg = Debug|Any CPU 170 {D18AE898-F600-4754-B3B4-C0C7A364F973}.Release|Any CPU.ActiveCfg = Release|Any CPU 171 {D18AE898-F600-4754-B3B4-C0C7A364F973}.Release|Any CPU.Build.0 = Release|Any CPU 172 {D18AE898-F600-4754-B3B4-C0C7A364F973}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 173 {D18AE898-F600-4754-B3B4-C0C7A364F973}.Release|Mixed Platforms.Build.0 = Release|Any CPU 174 {D18AE898-F600-4754-B3B4-C0C7A364F973}.Release|x64.ActiveCfg = Release|Any CPU 175 {D18AE898-F600-4754-B3B4-C0C7A364F973}.Release|x86.ActiveCfg = Release|Any CPU 176 {D18AE898-F600-4754-B3B4-C0C7A364F973}.ReleaseBuild|Any CPU.ActiveCfg = Release|Any CPU 177 {D18AE898-F600-4754-B3B4-C0C7A364F973}.ReleaseBuild|Any CPU.Build.0 = Release|Any CPU 178 {D18AE898-F600-4754-B3B4-C0C7A364F973}.ReleaseBuild|Mixed Platforms.ActiveCfg = Release|Any CPU 179 {D18AE898-F600-4754-B3B4-C0C7A364F973}.ReleaseBuild|Mixed Platforms.Build.0 = Release|Any CPU 180 {D18AE898-F600-4754-B3B4-C0C7A364F973}.ReleaseBuild|x64.ActiveCfg = Release|Any CPU 181 {D18AE898-F600-4754-B3B4-C0C7A364F973}.ReleaseBuild|x86.ActiveCfg = Release|Any CPU 129 182 EndGlobalSection 130 183 GlobalSection(SolutionProperties) = preSolution -
branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessRegressionInstance.cs
r9112 r9124 30 30 31 31 public override string Name { 32 get { return "Gaussian Process " + covarianceFunction.ItemName; }32 get { return "Gaussian Process " + name; } 33 33 } 34 34 public override string Description { … … 36 36 } 37 37 protected override string TargetVariable { get { return "Y"; } } 38 protected override string[] VariableNames { get { return new string[] { "X1", " X2", "Y" }; } }39 protected override string[] AllowedInputVariables { get { return new string[] { "X1" , "X2"}; } }38 protected override string[] VariableNames { get { return new string[] { "X1", "Y" }; } } 39 protected override string[] AllowedInputVariables { get { return new string[] { "X1" }; } } 40 40 protected override int TrainingPartitionStart { get { return 0; } } 41 protected override int TrainingPartitionEnd { get { return 100; } }42 protected override int TestPartitionStart { get { return 100; } }43 protected override int TestPartitionEnd { get { return 200; } }41 protected override int TrainingPartitionEnd { get { return 200; } } 42 protected override int TestPartitionStart { get { return 200; } } 43 protected override int TestPartitionEnd { get { return 400; } } 44 44 45 private ICovarianceFunction covarianceFunction; 45 private ParameterizedCovarianceFunction cov; 46 private string name; 46 47 47 public GaussianProcessRegressionInstance(ICovarianceFunction covarianceFunction) { 48 this.covarianceFunction = covarianceFunction; 48 public GaussianProcessRegressionInstance(string name, ICovarianceFunction covarianceFunction, double[] hyp) { 49 this.name = name; 50 cov = covarianceFunction.GetParameterizedCovarianceFunction(hyp, null); 49 51 } 50 52 … … 53 55 List<List<double>> data = new List<List<double>>(); 54 56 for (int i = 0; i < AllowedInputVariables.Count(); i++) { 55 data.Add(ValueGenerator.GenerateSteps(0, 0.99, 0.01).ToList());56 data[i].AddRange(ValueGenerator.GenerateSteps( 0.005, 1, 0.01).ToList());57 data.Add(ValueGenerator.GenerateSteps(0, 0.99, 1.0 / TrainingPartitionEnd).ToList()); 58 data[i].AddRange(ValueGenerator.GenerateSteps(-0.5, 1.5, 2.0 / (TestPartitionEnd - TestPartitionStart)).ToList()); 57 59 } 58 60 var mt = new MersenneTwister(); 59 61 60 var noise = new CovarianceNoise();61 noise.SetParameter(new double[] { Math.Log(Math.Sqrt(0.01)) });62 var t = new CovarianceSum();63 t.Terms.Add(covarianceFunction);64 t.Terms.Add(noise);65 66 var p = Enumerable.Range(0, t.GetNumberOfParameters(data.Count)).Select(i => mt.NextDouble() - 1).ToArray();67 68 var cov = t.GetParameterizedCovarianceFunction(p, null);69 62 70 63 var target = Util.SampleGaussianProcess(mt, cov, data); -
branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/Instances.DataAnalysis.GaussianProcessRegression-3.3.csproj
r9112 r9124 178 178 </ItemGroup> 179 179 <ItemGroup> 180 <Compile Include="GaussianProcessSumOfRQIso.cs" /> 181 <Compile Include="GaussianProcessSumOfSEIso.cs" /> 180 182 <Compile Include="GaussianProcessRegressionInstance.cs" /> 181 183 <Compile Include="GaussianProcessSEIso6.cs" /> -
branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/Util.cs
r9099 r9124 31 31 32 32 33 public static List<double> SampleGaussianProcess(IRandom random, ParameterizedCovarianceFunction covFunction, List<List<double>> data) { 34 int n = data[0].Count; 33 35 34 public static List<double> SampleGaussianProcess(IRandom random, ParameterizedCovarianceFunction covFunction, List<List<double>> data) { 36 var normalRand = new NormalDistributedRandom(random, 0, 1); 37 var alpha = (from i in Enumerable.Range(0, n) 38 select normalRand.NextDouble()).ToArray(); 39 return SampleGaussianProcess(random, covFunction, data, alpha); 40 } 41 42 public static List<double> SampleGaussianProcess(IRandom random, ParameterizedCovarianceFunction covFunction, List<List<double>> data, double[] alpha) { 43 if (alpha.Length != data[0].Count) throw new ArgumentException(); 35 44 36 45 double[,] x = new double[data[0].Count, data.Count]; … … 43 52 K[i, j] = covFunction.Covariance(x, i, j); 44 53 45 var normalRand = new NormalDistributedRandom(random, 0, 1);46 47 54 if (!alglib.spdmatrixcholesky(ref K, K.GetLength(0), true)) throw new ArgumentException(); 48 var r = (from i in Enumerable.Range(0, K.GetLength(0))49 select normalRand.NextDouble()).ToArray();50 55 51 56 List<double> target = new List<double>(K.GetLength(0)); … … 54 59 for (int j = K.GetLength(0) - 1; j >= 0; j--) { 55 60 56 s += K[j, i] * r[j];61 s += K[j, i] * alpha[j]; 57 62 } 58 63 -
branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/VariousInstanceProvider.cs
r9112 r9124 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 using HeuristicLab.Algorithms.DataAnalysis; 25 26 … … 51 52 descriptorList.Add(new GaussianProcessSEIsoDependentNoise()); 52 53 53 var covs = new ICovarianceFunction[] { 54 new CovarianceSquaredExponentialIso(), 55 new CovarianceSquaredExponentialArd(), 56 new CovarianceLinear(), 57 new CovarianceLinearArd(), 58 new CovarianceMaternIso(), 59 new CovariancePeriodic(), 60 new CovarianceRationalQuadraticArd(), 61 new CovarianceRationalQuadraticIso() 62 }; 63 foreach (var cov in covs) { 64 descriptorList.Add(new GaussianProcessRegressionInstance(cov)); 54 { 55 var cov = new CovarianceSum(); 56 cov.Terms.Add(new CovarianceSquaredExponentialIso()); 57 cov.Terms.Add(new CovarianceSquaredExponentialIso()); 58 cov.Terms.Add(new CovarianceNoise()); 59 var hyp = new double[] { -2.8, -0.1, 0.5, 0.3, -1.5 }; 60 descriptorList.Add(new GaussianProcessRegressionInstance("SE+SE", cov, hyp)); 65 61 } 62 { 63 var cov = new CovarianceSum(); 64 cov.Terms.Add(new CovarianceRationalQuadraticIso()); 65 cov.Terms.Add(new CovarianceRationalQuadraticIso()); 66 cov.Terms.Add(new CovarianceNoise()); 67 var hyp = new double[] { -3, 0, 0, -1.5, 0, 2.5, -1.5 }; 68 descriptorList.Add(new GaussianProcessRegressionInstance("RQ+RQ", cov, hyp)); 69 } 70 { 71 var cov = new CovarianceSum(); 72 cov.Terms.Add(new CovariancePeriodic()); 73 cov.Terms.Add(new CovariancePeriodic()); 74 cov.Terms.Add(new CovarianceNoise()); 75 var hyp = new double[] { 0, -1.8, -1.5, 0, -0.5, -1, -2.1 }; 76 descriptorList.Add(new GaussianProcessRegressionInstance("Periodic+Periodic", cov, hyp)); 77 } 78 { 79 var cov = new CovarianceSum(); 80 cov.Terms.Add(new CovarianceMaternIso()); 81 cov.Terms.Add(new CovarianceMaternIso()); 82 cov.Terms.Add(new CovarianceNoise()); 83 var hyp = new double[] { 0, 0, -1, 1, -4 }; 84 descriptorList.Add(new GaussianProcessRegressionInstance("Matern1+Matern1", cov, hyp)); 85 } 86 { 87 var cov = new CovarianceSum(); 88 var m1 = new CovarianceMaternIso(); 89 m1.DParameter.Value = m1.DParameter.ValidValues.First(v => v.Value == 3); 90 var m2 = new CovarianceMaternIso(); 91 m2.DParameter.Value = m2.DParameter.ValidValues.First(v => v.Value == 3); 92 cov.Terms.Add(m1); 93 cov.Terms.Add(m2); 94 cov.Terms.Add(new CovarianceNoise()); 95 var hyp = new double[] { -2.7, 0, -1, 1, -1.5 }; 96 descriptorList.Add(new GaussianProcessRegressionInstance("Matern3+Matern3", cov, hyp)); 97 } 98 { 99 var cov = new CovarianceSum(); 100 cov.Terms.Add(new CovarianceRationalQuadraticIso()); 101 cov.Terms.Add(new CovarianceSquaredExponentialIso()); 102 cov.Terms.Add(new CovarianceNoise()); 103 var hyp = new double[] { -1.5, -0.5, -3, -1, -1, -3 }; 104 descriptorList.Add(new GaussianProcessRegressionInstance("RQ+SE", cov, hyp)); 105 } 106 { 107 var cov = new CovarianceSum(); 108 cov.Terms.Add(new CovarianceSquaredExponentialIso()); 109 var prod = new CovarianceProduct(); 110 prod.Factors.Add(new CovarianceLinear()); 111 prod.Factors.Add(new CovarianceNoise()); 112 cov.Terms.Add(prod); 113 cov.Terms.Add(new CovarianceNoise()); 114 var hyp = new double[] { -3, 0, 0, -1.5 }; 115 descriptorList.Add(new GaussianProcessRegressionInstance("SE+Linear*Noise", cov, hyp)); 116 } 117 { 118 var cov = new CovarianceSum(); 119 cov.Terms.Add(new CovarianceSquaredExponentialIso()); 120 cov.Terms.Add(new CovariancePeriodic()); 121 cov.Terms.Add(new CovarianceNoise()); 122 var hyp = new double[] { -1, 0, 0, -1.5, 0, -2 }; 123 descriptorList.Add(new GaussianProcessRegressionInstance("SE+Periodic", cov, hyp)); 124 } 125 66 126 67 127 return descriptorList;
Note: See TracChangeset
for help on using the changeset viewer.