Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9124


Ignore:
Timestamp:
01/08/13 11:01:56 (12 years ago)
Author:
gkronber
Message:

#1967 implemented utility app to draw random samples using a GP prior

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  
    182182
    183183        // 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        }
    185191        if (chol == null || chol.IsEmpty || !chol.Size.Equals(myL.Size))
    186192          throw new ArgumentException("covariance matrix not positive definite");
    187 
    188193        this.l = new double[n * n];
    189194        chol.ExportValues(ref l);
  • branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning.sln

    r9112 r9124  
    2727Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.DataAnalysis.Experimental", "HeuristicLab.Algorithms.DataAnalysis.Experimental\HeuristicLab.Algorithms.DataAnalysis.Experimental.csproj", "{6142B24E-9C86-410B-A65A-1DE65C8C2349}"
    2828EndProject
     29Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GaussianProcessDemo", "GaussianProcessDemo\GaussianProcessDemo.csproj", "{D18AE898-F600-4754-B3B4-C0C7A364F973}"
     30EndProject
    2931Global
    3032  GlobalSection(TestCaseManagementSettings) = postSolution
     
    3335  GlobalSection(SolutionConfigurationPlatforms) = preSolution
    3436    Debug|Any CPU = Debug|Any CPU
     37    Debug|Mixed Platforms = Debug|Mixed Platforms
    3538    Debug|x64 = Debug|x64
    3639    Debug|x86 = Debug|x86
    3740    Release|Any CPU = Release|Any CPU
     41    Release|Mixed Platforms = Release|Mixed Platforms
    3842    Release|x64 = Release|x64
    3943    Release|x86 = Release|x86
    4044    ReleaseBuild|Any CPU = ReleaseBuild|Any CPU
     45    ReleaseBuild|Mixed Platforms = ReleaseBuild|Mixed Platforms
    4146    ReleaseBuild|x64 = ReleaseBuild|x64
    4247    ReleaseBuild|x86 = ReleaseBuild|x86
     
    4550    {9A04599C-D608-4240-8DA6-D41F51C515A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    4651    {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
    4754    {9A04599C-D608-4240-8DA6-D41F51C515A3}.Debug|x64.ActiveCfg = Debug|x64
    4855    {9A04599C-D608-4240-8DA6-D41F51C515A3}.Debug|x64.Build.0 = Debug|x64
     
    5158    {9A04599C-D608-4240-8DA6-D41F51C515A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
    5259    {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
    5362    {9A04599C-D608-4240-8DA6-D41F51C515A3}.Release|x64.ActiveCfg = Release|x64
    5463    {9A04599C-D608-4240-8DA6-D41F51C515A3}.Release|x64.Build.0 = Release|x64
     
    5766    {9A04599C-D608-4240-8DA6-D41F51C515A3}.ReleaseBuild|Any CPU.ActiveCfg = Release|Any CPU
    5867    {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
    5970    {9A04599C-D608-4240-8DA6-D41F51C515A3}.ReleaseBuild|x64.ActiveCfg = Release|Any CPU
    6071    {9A04599C-D608-4240-8DA6-D41F51C515A3}.ReleaseBuild|x86.ActiveCfg = Release|Any CPU
    6172    {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    6273    {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
    6376    {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Debug|x64.ActiveCfg = Debug|x64
    6477    {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Debug|x64.Build.0 = Debug|x64
     
    6780    {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
    6881    {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
    6984    {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Release|x64.ActiveCfg = Release|x64
    7085    {98C8AD2B-B035-4863-A01E-B659465FF6B2}.Release|x64.Build.0 = Release|x64
     
    7388    {98C8AD2B-B035-4863-A01E-B659465FF6B2}.ReleaseBuild|Any CPU.ActiveCfg = Release|Any CPU
    7489    {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
    7592    {98C8AD2B-B035-4863-A01E-B659465FF6B2}.ReleaseBuild|x64.ActiveCfg = Release|Any CPU
    7693    {98C8AD2B-B035-4863-A01E-B659465FF6B2}.ReleaseBuild|x86.ActiveCfg = Release|Any CPU
    7794    {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    7895    {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
    7998    {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Debug|x64.ActiveCfg = Debug|x64
    8099    {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Debug|x64.Build.0 = Debug|x64
     
    83102    {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Release|Any CPU.ActiveCfg = Release|Any CPU
    84103    {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
    85106    {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Release|x64.ActiveCfg = Release|x64
    86107    {94C7714E-29D4-4D6D-B213-2C18D627AB75}.Release|x64.Build.0 = Release|x64
     
    89110    {94C7714E-29D4-4D6D-B213-2C18D627AB75}.ReleaseBuild|Any CPU.ActiveCfg = Release|Any CPU
    90111    {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
    91114    {94C7714E-29D4-4D6D-B213-2C18D627AB75}.ReleaseBuild|x64.ActiveCfg = Release|x64
    92115    {94C7714E-29D4-4D6D-B213-2C18D627AB75}.ReleaseBuild|x64.Build.0 = Release|x64
     
    95118    {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    96119    {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
    97122    {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Debug|x64.ActiveCfg = Debug|x64
    98123    {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Debug|x64.Build.0 = Debug|x64
     
    101126    {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
    102127    {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
    103130    {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Release|x64.ActiveCfg = Release|x64
    104131    {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.Release|x64.Build.0 = Release|x64
     
    107134    {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.ReleaseBuild|Any CPU.ActiveCfg = ReleaseBuild|Any CPU
    108135    {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
    109138    {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.ReleaseBuild|x64.ActiveCfg = ReleaseBuild|x64
    110139    {93B4A10E-8979-4028-8CCF-49D88D6FAC0C}.ReleaseBuild|x64.Build.0 = ReleaseBuild|x64
     
    113142    {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    114143    {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
    115146    {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Debug|x64.ActiveCfg = Debug|x64
    116147    {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Debug|x64.Build.0 = Debug|x64
     
    119150    {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Release|Any CPU.ActiveCfg = Release|Any CPU
    120151    {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
    121154    {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Release|x64.ActiveCfg = Release|x64
    122155    {6142B24E-9C86-410B-A65A-1DE65C8C2349}.Release|x64.Build.0 = Release|x64
     
    125158    {6142B24E-9C86-410B-A65A-1DE65C8C2349}.ReleaseBuild|Any CPU.ActiveCfg = Release|Any CPU
    126159    {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
    127162    {6142B24E-9C86-410B-A65A-1DE65C8C2349}.ReleaseBuild|x64.ActiveCfg = Release|Any CPU
    128163    {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
    129182  EndGlobalSection
    130183  GlobalSection(SolutionProperties) = preSolution
  • branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessRegressionInstance.cs

    r9112 r9124  
    3030
    3131    public override string Name {
    32       get { return "Gaussian Process " + covarianceFunction.ItemName; }
     32      get { return "Gaussian Process " + name; }
    3333    }
    3434    public override string Description {
     
    3636    }
    3737    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" }; } }
    4040    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; } }
    4444
    45     private ICovarianceFunction covarianceFunction;
     45    private ParameterizedCovarianceFunction cov;
     46    private string name;
    4647
    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);
    4951    }
    5052
     
    5355      List<List<double>> data = new List<List<double>>();
    5456      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());
    5759      }
    5860      var mt = new MersenneTwister();
    5961
    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);
    6962
    7063      var target = Util.SampleGaussianProcess(mt, cov, data);
  • branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/Instances.DataAnalysis.GaussianProcessRegression-3.3.csproj

    r9112 r9124  
    178178  </ItemGroup>
    179179  <ItemGroup>
     180    <Compile Include="GaussianProcessSumOfRQIso.cs" />
     181    <Compile Include="GaussianProcessSumOfSEIso.cs" />
    180182    <Compile Include="GaussianProcessRegressionInstance.cs" />
    181183    <Compile Include="GaussianProcessSEIso6.cs" />
  • branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/Util.cs

    r9099 r9124  
    3131
    3232
     33    public static List<double> SampleGaussianProcess(IRandom random, ParameterizedCovarianceFunction covFunction, List<List<double>> data) {
     34      int n = data[0].Count;
    3335
    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();
    3544
    3645      double[,] x = new double[data[0].Count, data.Count];
     
    4352          K[i, j] = covFunction.Covariance(x, i, j);
    4453
    45       var normalRand = new NormalDistributedRandom(random, 0, 1);
    46 
    4754      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();
    5055
    5156      List<double> target = new List<double>(K.GetLength(0));
     
    5459        for (int j = K.GetLength(0) - 1; j >= 0; j--) {
    5560
    56           s += K[j, i] * r[j];
     61          s += K[j, i] * alpha[j];
    5762        }
    5863
  • branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/VariousInstanceProvider.cs

    r9112 r9124  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425using HeuristicLab.Algorithms.DataAnalysis;
    2526
     
    5152      descriptorList.Add(new GaussianProcessSEIsoDependentNoise());
    5253
    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));
    6561      }
     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
    66126
    67127      return descriptorList;
Note: See TracChangeset for help on using the changeset viewer.