Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9212


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

#1967: worked on Gaussian Process evolution problem

Location:
branches/HeuristicLab.Problems.GaussianProcessTuning
Files:
2 added
11 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GaussianProcessTuning/GaussianProcessDemo/Form1.cs

    r9124 r9212  
    2727
    2828      var sum = new CovarianceSum();
    29       sum.Terms.Add(new CovarianceSquaredExponentialIso());
    3029      sum.Terms.Add(new CovariancePeriodic());
    3130      sum.Terms.Add(new CovarianceNoise());
     
    5049
    5150    private void InitData() {
    52       int n = 100;
     51      int n = 20;
    5352      data = new List<List<double>>();
    5453      data.Add(ValueGenerator.GenerateSteps(0, 1, 1.0 / n).ToList());
  • branches/HeuristicLab.Problems.GaussianProcessTuning/GaussianProcessDemo/GaussianProcessDemo.csproj

    r9124 r9212  
    3131    <ErrorReport>prompt</ErrorReport>
    3232    <WarningLevel>4</WarningLevel>
     33  </PropertyGroup>
     34  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
     35    <DebugSymbols>true</DebugSymbols>
     36    <OutputPath>bin\x86\Debug\</OutputPath>
     37    <DefineConstants>DEBUG;TRACE</DefineConstants>
     38    <DebugType>full</DebugType>
     39    <PlatformTarget>x86</PlatformTarget>
     40    <ErrorReport>prompt</ErrorReport>
     41    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     42    <Prefer32Bit>true</Prefer32Bit>
     43  </PropertyGroup>
     44  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
     45    <OutputPath>bin\x86\Release\</OutputPath>
     46    <DefineConstants>TRACE</DefineConstants>
     47    <Optimize>true</Optimize>
     48    <DebugType>pdbonly</DebugType>
     49    <PlatformTarget>x86</PlatformTarget>
     50    <ErrorReport>prompt</ErrorReport>
     51    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     52    <Prefer32Bit>true</Prefer32Bit>
    3353  </PropertyGroup>
    3454  <ItemGroup>
  • branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning.sln

    r9124 r9212  
    173173    {D18AE898-F600-4754-B3B4-C0C7A364F973}.Release|Mixed Platforms.Build.0 = Release|Any CPU
    174174    {D18AE898-F600-4754-B3B4-C0C7A364F973}.Release|x64.ActiveCfg = Release|Any CPU
    175     {D18AE898-F600-4754-B3B4-C0C7A364F973}.Release|x86.ActiveCfg = Release|Any CPU
     175    {D18AE898-F600-4754-B3B4-C0C7A364F973}.Release|x86.ActiveCfg = Release|x86
     176    {D18AE898-F600-4754-B3B4-C0C7A364F973}.Release|x86.Build.0 = Release|x86
    176177    {D18AE898-F600-4754-B3B4-C0C7A364F973}.ReleaseBuild|Any CPU.ActiveCfg = Release|Any CPU
    177178    {D18AE898-F600-4754-B3B4-C0C7A364F973}.ReleaseBuild|Any CPU.Build.0 = Release|Any CPU
  • branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning/GaussianProcessTuning.csproj

    r9112 r9212  
    7171  </PropertyGroup>
    7272  <ItemGroup>
    73     <Reference Include="HeuristicLab.ALGLIB-3.6.0">
    74       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.ALGLIB-3.6.0.dll</HintPath>
    75       <Private>False</Private>
    76     </Reference>
    7773    <Reference Include="HeuristicLab.Algorithms.DataAnalysis-3.4">
    7874      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.DataAnalysis-3.4.dll</HintPath>
     
    9187      <Private>False</Private>
    9288    </Reference>
    93     <Reference Include="HeuristicLab.Common.Resources-3.3">
    94       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
    95       <Private>False</Private>
    96     </Reference>
    9789    <Reference Include="HeuristicLab.Core-3.3">
    9890      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
    99       <Private>False</Private>
    100     </Reference>
    101     <Reference Include="HeuristicLab.Core.Views-3.3">
    102       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Core.Views-3.3.dll</HintPath>
    10391      <Private>False</Private>
    10492    </Reference>
     
    11199      <Private>False</Private>
    112100    </Reference>
    113     <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4">
    114       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.dll</HintPath>
    115       <Private>False</Private>
    116     </Reference>
    117     <Reference Include="HeuristicLab.MainForm-3.3">
    118       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.MainForm-3.3.dll</HintPath>
    119       <Private>False</Private>
    120     </Reference>
    121     <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3">
    122       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath>
    123       <Private>False</Private>
    124     </Reference>
    125101    <Reference Include="HeuristicLab.Operators-3.3">
    126102      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
     
    129105    <Reference Include="HeuristicLab.Optimization-3.3">
    130106      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
    131       <Private>False</Private>
    132     </Reference>
    133     <Reference Include="HeuristicLab.Optimization.Operators-3.3">
    134       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
    135107      <Private>False</Private>
    136108    </Reference>
     
    151123      <Private>False</Private>
    152124    </Reference>
    153     <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4">
    154       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath>
    155       <Private>False</Private>
    156     </Reference>
    157     <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4">
    158       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.dll</HintPath>
    159       <Private>False</Private>
    160     </Reference>
    161125    <Reference Include="HeuristicLab.Random-3.3">
    162126      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
     
    174138    <Reference Include="System.Core" />
    175139    <Reference Include="System.Drawing" />
    176     <Reference Include="System.Windows.Forms" />
    177     <Reference Include="System.Xml.Linq" />
    178     <Reference Include="System.Data.DataSetExtensions" />
    179     <Reference Include="Microsoft.CSharp" />
    180     <Reference Include="System.Data" />
    181     <Reference Include="System.Xml" />
    182140  </ItemGroup>
    183141  <ItemGroup>
    184142    <Compile Include="BestSolutionAnalyzer.cs" />
    185143    <Compile Include="GaussianProcessRegressionModel.cs" />
    186     <Compile Include="GaussianProcessModelView.designer.cs" />
    187144    <Compile Include="Interpreter.cs">
    188145      <SubType>Code</SubType>
     
    196153    <Compile Include="Plugin.cs" />
    197154    <Compile Include="Properties\AssemblyInfo.cs" />
    198     <Compile Include="GaussianProcessModelView.cs">
    199       <SubType>UserControl</SubType>
    200     </Compile>
    201155    <Compile Include="Symbols.cs" />
    202156    <Compile Include="TreeNodes.cs" />
    203   </ItemGroup>
    204   <ItemGroup>
    205     <ProjectReference Include="..\HeuristicLab.Algorithms.DataAnalysis.Experimental\HeuristicLab.Algorithms.DataAnalysis.Experimental.csproj">
    206       <Project>{6142b24e-9c86-410b-a65a-1de65c8c2349}</Project>
    207       <Name>HeuristicLab.Algorithms.DataAnalysis.Experimental</Name>
    208     </ProjectReference>
    209157  </ItemGroup>
    210158  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning/Grammar.cs

    r8753 r9212  
    6565      covMatern5.Name = "CovMatern5";
    6666      var covPeriodic = new CovPeriodic();
     67      var covPeriodic1 = new CovPeriodic(1.0);
     68      covPeriodic1.Name = "CovPeriodic(1.0)";
     69      var covPeriodicCO = new CovPeriodic(0.021817864467425927);
     70      covPeriodicCO.Name = "CovPeriodicCO";
    6771      var covNoise = new CovNoise();
    6872      var covScale = new CovScale();
     
    97101                            covMatern5,
    98102                            covPeriodic,
     103                            covPeriodic1,
     104                            covPeriodicCO,
    99105                            covNoise,
    100106                            covScale,
     
    133139      }
    134140
    135       foreach (var covFunctionSymbol in new ISymbol[] { covSum, covProd, covMask, covScale }) {
     141      foreach (var covFunctionSymbol in new ISymbol[] { covSum, covProd, covScale }) {
    136142        foreach (var covSymbol in covSymbols) {
    137143          for (int i = 0; i < covFunctionSymbol.MaximumArity; i++) {
     
    140146        }
    141147      }
     148
     149      // mask
     150      foreach (var covSymbol in new List<ISymbol>()
     151                         {
     152                            covConst,
     153                            covLin,
     154                            covLinArd,
     155                            covSeArd,
     156                            covSeIso,
     157                            covRQiso,
     158                            covRQard,
     159                            covMatern1,
     160                            covMatern3,
     161                            covMatern5,
     162                            covPeriodic,
     163                            covPeriodic1,
     164                            covPeriodicCO,
     165                         }) {
     166        for (int i = 0; i < covMask.MaximumArity; i++) {
     167          AddAllowedChildSymbol(covMask, covSymbol, i);
     168        }
     169      }
     170
    142171    }
    143172
  • branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning/Interpreter.cs

    r9112 r9212  
    3636      gprAlg.GaussianProcessModelCreatorParameter.Value =
    3737        gprAlg.GaussianProcessModelCreatorParameter.ValidValues.First(
    38           v => v is TunedGaussianProcessRegressionModelCreator);
     38          v => v is GaussianProcessRegressionModelCreator);
    3939      gprAlg.MinimizationIterations = 50;
    4040
     
    6868    }
    6969
    70     /*
    71     public void EvaluateGaussianProcessConfiguration(ISymbolicExpressionTree tree, IRegressionProblemData trainingData, Dataset testData, IEnumerable<int> testRows,
    72       out double[] means, out double[] variances) {
    73       string meanExpression, meanHyperParameter;
    74       string covExpression, covHyperParameter;
    75       string likFunction, likHyperParameter;
    76       GetMeanFunction(tree, trainingData.AllowedInputVariables.Count(), out meanExpression, out meanHyperParameter);
    77       GetCovFunction(tree, trainingData.AllowedInputVariables.Count(), out covExpression, out covHyperParameter);
    78       GetLikelihoodFunction(tree, out likFunction, out likHyperParameter);
    79 
    80       double[,] y = new double[trainingData.TrainingIndices.Count(), 1];
    81       double[,] yImg = new double[trainingData.TrainingIndices.Count(), 1];
    82 
    83       int r, c;
    84       r = 0;
    85       foreach (var e in trainingData.Dataset.GetDoubleValues(trainingData.TargetVariable, trainingData.TrainingIndices)) {
    86         y[r++, 0] = e;
    87       }
    88       double[,] x = new double[y.Length, trainingData.AllowedInputVariables.Count()];
    89       double[,] xImg = new double[y.Length, trainingData.AllowedInputVariables.Count()];
    90       c = 0;
    91       foreach (var allowedInput in trainingData.AllowedInputVariables) {
    92         r = 0;
    93         foreach (var e in trainingData.Dataset.GetDoubleValues(allowedInput, trainingData.TrainingIndices)) {
    94           x[r++, c] = e;
    95         }
    96         c++;
    97       }
    98 
    99       double[,] xTest = new double[testRows.Count(), trainingData.AllowedInputVariables.Count()];
    100       double[,] xTestImg = new double[testRows.Count(), trainingData.AllowedInputVariables.Count()];
    101       c = 0;
    102       foreach (var allowedInput in trainingData.AllowedInputVariables) {
    103         r = 0;
    104         foreach (var e in testData.GetDoubleValues(allowedInput, testRows)) {
    105           xTest[r++, c] = e;
    106         }
    107         c++;
    108       }
    109 
    110       object oldX = null;
    111       try {
    112         oldX = MLApp.GetVariable("x", "base");
    113       }
    114       catch {
    115       }
    116       if (oldX == null || oldX is Missing || ((double[,])oldX).Length != x.Length) {
    117         MLApp.PutFullMatrix("y", "base", y, yImg);
    118         MLApp.PutFullMatrix("x", "base", x, xImg);
    119       }
    120       MLApp.PutFullMatrix("xTest", "base", xTest, xTestImg);
    121       ExecuteMatlab("hyp0 = " + GetHyperParameterString(meanHyperParameter, covHyperParameter, likHyperParameter) + ";");
    122       ExecuteMatlab("infFun =  " + GetInferenceMethodString(tree) + ";");
    123       ExecuteMatlab("meanExpr = " + meanExpression + ";");
    124       ExecuteMatlab("covExpr = " + covExpression + ";");
    125       ExecuteMatlab("likExp = " + likFunction + ";");
    126       ExecuteMatlab(
    127         "try " +
    128         "  hyp = minimize(hyp0,'gp', -50, infFun, meanExpr, covExpr, likExp, x, y);" +
    129         "  [ymu, ys2, fmu, fs2] = gp(hyp, infFun, meanExpr, covExpr, likExp, x, y, xTest); " +
    130         "catch " +
    131         "  ymu = zeros(size(xTest, 1), 1); " +
    132         "  ys2 = ones(size(xTest, 1), 1); " +
    133         "end");
    134       var meansMat = (double[,])MLApp.GetVariable("ymu", "base");
    135       var variancesMat = (double[,])MLApp.GetVariable("ys2", "base");
    136       means = new double[meansMat.GetLength(0)];
    137       for (int i = 0; i < means.Length; i++)
    138         means[i] = meansMat[i, 0];
    139       variances = new double[variancesMat.GetLength(0)];
    140       for (int i = 0; i < variances.Length; i++)
    141         variances[i] = variancesMat[i, 0];
    142     }
    143     */
    144     private string GetInferenceMethodString(ISymbolicExpressionTree tree) {
    145       return "'infEP'";
    146     }
    147 
    14870    private IMeanFunction GetMeanFunction(ISymbolicExpressionTree tree) {
    14971      return GetMeanFunction(tree.Root.GetSubtree(0).GetSubtree(0).GetSubtree(0));
     
    15375      return GetCovFunction(tree.Root.GetSubtree(0).GetSubtree(0).GetSubtree(1));
    15476    }
    155 
    156 
    157     private void GetLikelihoodFunction(ISymbolicExpressionTree tree, out string expression, out string hyperParameter) {
    158       var expressionBuilder = new StringBuilder();
    159       var hyperParameterBuilder = new StringBuilder();
    160       hyperParameterBuilder.Append("[");
    161       GetLikelihoodFunction(tree.Root.GetSubtree(0).GetSubtree(0).GetSubtree(2), expressionBuilder,
    162                                    hyperParameterBuilder);
    163       hyperParameterBuilder.Append("]");
    164       expression = expressionBuilder.ToString();
    165       hyperParameter = hyperParameterBuilder.ToString();
    166     }
    167 
    168     private void GetLikelihoodFunction(ISymbolicExpressionTreeNode node, StringBuilder expressionBuilder, StringBuilder hyperParameterBuilder) {
    169       if (node.Symbol is LikGauss) {
    170         var likNode = node as LikGaussTreeNode;
    171         expressionBuilder.Append("'likGauss'");
    172         hyperParameterBuilder.Append(likNode.Sigma);
    173       } else {
    174         throw new ArgumentException("unknown likelihood function " + node.Symbol);
    175       }
    176     }
    177 
    178     private string GetHyperParameterString(string meanHyp, string covHyp, string likHyp) {
    179       return "struct('mean', " + meanHyp +
    180              ", 'cov', " + covHyp +
    181              ", 'lik', " + likHyp +
    182              ")";
    183       ;
    184     }
    185 
    18677
    18778    private ICovarianceFunction GetCovFunction(ISymbolicExpressionTreeNode node) {
     
    18980        return new CovarianceConst();
    19081      } else if (node.Symbol is CovScale) {
    191         return new CovarianceScale();
     82        var cov = new CovarianceScale();
     83        cov.CovarianceFunctionParameter.Value = GetCovFunction(node.GetSubtree(0));
     84        return cov;
    19285      } else if (node.Symbol is CovMask) {
    19386        var maskNode = node as CovMaskTreeNode;
     
    19790                                                              where maskNode.Mask[i]
    19891                                                              select i).ToArray());
     92        cov.CovarianceFunctionParameter.Value = GetCovFunction(node.GetSubtree(0));
    19993        return cov;
    20094      } else if (node.Symbol is CovLin) {
     
    312206    //}
    313207
    314     private string ToVectorString(bool[] b) {
    315       var strBuilder = new StringBuilder();
    316       strBuilder.Append("[");
    317       if (b.Length == 1) // workaround for bug in GPML
    318       {
    319         if (!b[0]) strBuilder.Append("1");
    320       } else {
    321         for (int i = 0; i < b.Length; i++) {
    322           if (i > 0) strBuilder.Append(", ");
    323           strBuilder.Append(b[i] ? "0" : "1");
    324         }
    325       }
    326       strBuilder.Append("]");
    327       return strBuilder.ToString();
    328     }
    329     private string ToVectorString(double[] xs, bool[] mask) {
    330       if (xs.Length != mask.Length) throw new ArgumentException();
    331       var strBuilder = new StringBuilder();
    332       strBuilder.Append("[");
    333       for (int i = 0; i < xs.Length; i++)
    334         if (!mask[i]) {
    335           if (i > 0) strBuilder.Append("; ");
    336           strBuilder.Append(xs[i]);
    337         }
    338       strBuilder.Append("]");
    339       return strBuilder.ToString();
    340     }
    341208  }
    342209}
  • branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning/Plugin.cs

    r8879 r9212  
    55  [Plugin("HeuristicLab.Problems.GaussianProcessTuning", "Gaussian process configuration problem for genetic programming", "1.0.0")]
    66  [PluginFile("HeuristicLab.Problems.GaussianProcessTuning-1.0.dll", PluginFileType.Assembly)]
    7   [PluginDependency("HeuristicLab.ALGLIB", "3.6.0")]
    87  [PluginDependency("HeuristicLab.Algorithms.DataAnalysis", "3.4")]
    98  [PluginDependency("HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm", "3.3")]
    109  [PluginDependency("HeuristicLab.Collections", "3.3")]
    1110  [PluginDependency("HeuristicLab.Common", "3.3")]
    12   [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
    1311  [PluginDependency("HeuristicLab.Core", "3.3")]
    14   [PluginDependency("HeuristicLab.Core.Views", "3.3")]
    1512  [PluginDependency("HeuristicLab.Data", "3.3")]
    1613  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")]
    17   [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views", "3.4")]
    18   [PluginDependency("HeuristicLab.MainForm", "3.3")]
    19   [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
    2014  [PluginDependency("HeuristicLab.Operators", "3.3")]
    2115  [PluginDependency("HeuristicLab.Optimization", "3.3")]
    22   [PluginDependency("HeuristicLab.Optimization.Operators", "3.3")]
    2316  [PluginDependency("HeuristicLab.Parameters", "3.3")]
    2417  [PluginDependency("HeuristicLab.Persistence", "3.3")]
    2518  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
    26   [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")]
    27   [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic.Regression", "3.4")]
    2819  [PluginDependency("HeuristicLab.Random", "3.3")]
    2920  [PluginDependency("HeuristicLab.Selection", "3.3")]
  • branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning/Symbols.cs

    r8753 r9212  
    9898  [StorableClass]
    9999  public sealed class MeanConst : Symbol {
    100     [Storable]
    101     public double MinValue { get; set; }
    102     [Storable]
    103     public double MaxValue { get; set; }
    104     [Storable]
    105     public double ValueShakingMu { get; set; }
    106     [Storable]
    107     public double ValueShakingSigma { get; set; }
    108 
    109100    public override int MinimumArity {
    110101      get { return 0; }
     
    117108    private MeanConst(MeanConst original, Cloner cloner)
    118109      : base(original, cloner) {
    119       MinValue = original.MinValue;
    120       MaxValue = original.MaxValue;
    121       ValueShakingMu = original.ValueShakingMu;
    122       ValueShakingSigma = original.ValueShakingSigma;
    123110    }
    124111
    125112    public MeanConst()
    126113      : base("MeanConst", "Constant mean function") {
    127       MinValue = -100.0;
    128       MaxValue = 100.0;
    129       ValueShakingMu = 1.0;
    130       ValueShakingSigma = 1.0;
    131114    }
    132115    [StorableHook(HookType.AfterDeserialization)]
     
    144127  [StorableClass]
    145128  public sealed class MeanLinear : Symbol, IDimensionSymbol {
    146     [Storable]
    147     public double AlphaMu { get; set; }
    148     [Storable]
    149     public double AlphaSigma { get; set; }
    150     [Storable]
    151     public double AlphaShakingMu { get; set; }
    152     [Storable]
    153     public double AlphaShakingSigma { get; set; }
    154 
    155129    public override int MinimumArity {
    156130      get { return 0; }
     
    167141      : base(original, cloner) {
    168142      Dimension = original.Dimension;
    169       AlphaMu = original.AlphaMu;
    170       AlphaSigma = original.AlphaSigma;
    171       AlphaShakingMu = original.AlphaShakingMu;
    172       AlphaShakingSigma = original.AlphaShakingSigma;
    173143    }
    174144
     
    176146      : base("MeanLinear", "Linear mean function") {
    177147      this.Dimension = dimension;
    178       AlphaMu = 0.0;
    179       AlphaSigma = 1.0;
    180       AlphaShakingMu = 1.0;
    181       AlphaShakingSigma = 0.1;
    182148    }
    183149    [StorableHook(HookType.AfterDeserialization)]
     
    197163  [StorableClass]
    198164  public sealed class MeanScale : Symbol {
    199     [Storable]
    200     public double AlphaMu { get; set; }
    201     [Storable]
    202     public double AlphaSigma { get; set; }
    203     [Storable]
    204     public double AlphaShakingMu { get; set; }
    205     [Storable]
    206     public double AlphaShakingSigma { get; set; }
    207 
    208165    public override int MinimumArity {
    209166      get { return 1; }
     
    217174    private MeanScale(MeanScale original, Cloner cloner)
    218175      : base(original, cloner) {
    219       AlphaMu = original.AlphaMu;
    220       AlphaSigma = original.AlphaSigma;
    221       AlphaShakingMu = original.AlphaShakingMu;
    222       AlphaShakingSigma = original.AlphaShakingSigma;
    223176    }
    224177
    225178    public MeanScale()
    226179      : base("MeanScale", "Scaled version of a mean function") {
    227       AlphaMu = 0.0;
    228       AlphaSigma = 1.0;
    229       AlphaShakingMu = 1.0;
    230       AlphaShakingSigma = 1.0;
    231180    }
    232181    [StorableHook(HookType.AfterDeserialization)]
     
    372321  [StorableClass]
    373322  public sealed class CovConst : Symbol {
    374     [Storable]
    375     public double MinSigma { get; set; }
    376     [Storable]
    377     public double MaxSigma { get; set; }
    378     [Storable]
    379     public double SigmaShakingMu { get; set; }
    380     [Storable]
    381     public double SigmaShakingSigma { get; set; }
    382 
    383323    public override int MinimumArity {
    384324      get { return 0; }
     
    391331    private CovConst(CovConst original, Cloner cloner)
    392332      : base(original, cloner) {
    393       this.MaxSigma = original.MaxSigma;
    394       this.MinSigma = original.MinSigma;
    395       this.SigmaShakingMu = original.SigmaShakingMu;
    396       this.SigmaShakingSigma = original.SigmaShakingSigma;
    397333    }
    398334
    399335    public CovConst()
    400336      : base("CovConst", "Covariance for constant functions") {
    401       MinSigma = 0.0;
    402       MaxSigma = 100;
    403       SigmaShakingMu = 1;
    404       SigmaShakingSigma = 1;
    405337    }
    406338    [StorableHook(HookType.AfterDeserialization)]
     
    418350  [StorableClass]
    419351  public sealed class CovNoise : Symbol {
    420     [Storable]
    421     public double MinSigma { get; set; }
    422     [Storable]
    423     public double MaxSigma { get; set; }
    424     [Storable]
    425     public double SigmaShakingMu { get; set; }
    426     [Storable]
    427     public double SigmaShakingSigma { get; set; }
    428 
    429352    public override int MinimumArity {
    430353      get { return 0; }
     
    437360    private CovNoise(CovNoise original, Cloner cloner)
    438361      : base(original, cloner) {
    439       this.MaxSigma = original.MaxSigma;
    440       this.MinSigma = original.MinSigma;
    441       this.SigmaShakingMu = original.SigmaShakingMu;
    442       this.SigmaShakingSigma = original.SigmaShakingSigma;
    443362    }
    444363
    445364    public CovNoise()
    446365      : base("CovNoise", "Noise covariance function") {
    447       MinSigma = 0.0;
    448       MaxSigma = 100;
    449       SigmaShakingMu = 1;
    450       SigmaShakingSigma = 1;
    451366    }
    452367    [StorableHook(HookType.AfterDeserialization)]
     
    492407  [StorableClass]
    493408  public sealed class CovLinArd : Symbol, IDimensionSymbol {
    494     [Storable]
    495     public double LambdaMu { get; set; }
    496     [Storable]
    497     public double LambdaSigma { get; set; }
    498     [Storable]
    499     public double LambdaShakingMu { get; set; }
    500     [Storable]
    501     public double LambdaShakingSigma { get; set; }
    502409    public override int MinimumArity {
    503410      get { return 0; }
     
    515422      : base(original, cloner) {
    516423      Dimension = original.Dimension;
    517       LambdaMu = original.LambdaMu;
    518       LambdaSigma = original.LambdaSigma;
    519       LambdaShakingMu = original.LambdaShakingMu;
    520       LambdaShakingSigma = original.LambdaShakingSigma;
    521424    }
    522425
     
    524427      : base("CovLinArd", "linear covariance function with ARD") {
    525428      this.Dimension = dimension;
    526       LambdaMu = 0.0;
    527       LambdaSigma = 1.0;
    528       LambdaShakingMu = 1.0;
    529       LambdaShakingSigma = 0.1;
    530429    }
    531430    [StorableHook(HookType.AfterDeserialization)]
     
    542441  [StorableClass]
    543442  public sealed class CovSeArd : Symbol, IDimensionSymbol {
    544     [Storable]
    545     public double LambdaMu { get; set; }
    546     [Storable]
    547     public double LambdaSigma { get; set; }
    548     [Storable]
    549     public double LambdaShakingMu { get; set; }
    550     [Storable]
    551     public double LambdaShakingSigma { get; set; }
    552     [Storable]
    553     public double MinSigma { get; set; }
    554     [Storable]
    555     public double MaxSigma { get; set; }
    556     [Storable]
    557     public double SigmaShakingMu { get; set; }
    558     [Storable]
    559     public double SigmaShakingSigma { get; set; }
    560 
    561443    public override int MinimumArity {
    562444      get { return 0; }
     
    574456      : base(original, cloner) {
    575457      Dimension = original.Dimension;
    576       LambdaMu = original.LambdaMu;
    577       LambdaSigma = original.LambdaSigma;
    578       LambdaShakingMu = original.LambdaShakingMu;
    579       LambdaShakingSigma = original.LambdaShakingSigma;
    580       MinSigma = original.MinSigma;
    581       MaxSigma = original.MaxSigma;
    582       SigmaShakingMu = original.SigmaShakingMu;
    583       SigmaShakingSigma = original.SigmaShakingSigma;
    584458    }
    585459
     
    587461      : base("CovSeArd", "full squared exponential covariance function with ARD") {
    588462      this.Dimension = dimension;
    589       LambdaMu = 0.0;
    590       LambdaSigma = 1.0;
    591       LambdaShakingMu = 1.0;
    592       LambdaShakingSigma = 0.1;
    593       MinSigma = 0.0;
    594       MaxSigma = 100.0;
    595       SigmaShakingMu = 1.0;
    596       SigmaShakingSigma = 1.0;
    597463    }
    598464    [StorableHook(HookType.AfterDeserialization)]
     
    609475  [StorableClass]
    610476  public sealed class CovSeIso : Symbol {
    611     [Storable]
    612     public double MinSigma { get; set; }
    613     [Storable]
    614     public double MaxSigma { get; set; }
    615     [Storable]
    616     public double SigmaShakingMu { get; set; }
    617     [Storable]
    618     public double SigmaShakingSigma { get; set; }
    619     [Storable]
    620     public double MinL { get; set; }
    621     [Storable]
    622     public double MaxL { get; set; }
    623     [Storable]
    624     public double LShakingMu { get; set; }
    625     [Storable]
    626     public double LShakingSigma { get; set; }
    627 
    628477    public override int MinimumArity {
    629478      get { return 0; }
     
    637486    private CovSeIso(CovSeIso original, Cloner cloner)
    638487      : base(original, cloner) {
    639       MinSigma = original.MinSigma;
    640       MaxSigma = original.MaxSigma;
    641       SigmaShakingMu = original.SigmaShakingMu;
    642       SigmaShakingSigma = original.SigmaShakingSigma;
    643       MinL = original.MinL;
    644       MaxL = original.MaxL;
    645       LShakingMu = original.LShakingMu;
    646       LShakingSigma = original.LShakingSigma;
    647488    }
    648489
    649490    public CovSeIso()
    650491      : base("CovSeIso", "diagonal squared exponential covariance function") {
    651       MinSigma = 1.0;
    652       MaxSigma = 100.0;
    653       SigmaShakingMu = 1.0;
    654       SigmaShakingSigma = 1.0;
    655       MinL = 1.0;
    656       MaxL = 100.0;
    657       LShakingMu = 1.0;
    658       LShakingSigma = 1.0;
    659492    }
    660493    [StorableHook(HookType.AfterDeserialization)]
     
    672505  [StorableClass]
    673506  public sealed class CovMatern : Symbol {
    674     [Storable]
    675     public double MinSigma { get; set; }
    676     [Storable]
    677     public double MaxSigma { get; set; }
    678     [Storable]
    679     public double SigmaShakingMu { get; set; }
    680     [Storable]
    681     public double SigmaShakingSigma { get; set; }
    682     [Storable]
    683     public double MinL { get; set; }
    684     [Storable]
    685     public double MaxL { get; set; }
    686     [Storable]
    687     public double LShakingMu { get; set; }
    688     [Storable]
    689     public double LShakingSigma { get; set; }
    690 
    691507    [Storable]
    692508    public int D { get; set; }
     
    703519    private CovMatern(CovMatern original, Cloner cloner)
    704520      : base(original, cloner) {
    705       MinSigma = original.MinSigma;
    706       MaxSigma = original.MaxSigma;
    707       SigmaShakingMu = original.SigmaShakingMu;
    708       SigmaShakingSigma = original.SigmaShakingSigma;
    709       MinL = original.MinL;
    710       MaxL = original.MaxL;
    711       LShakingMu = original.LShakingMu;
    712       LShakingSigma = original.LShakingSigma;
    713521      D = original.D;
    714522    }
     
    716524    public CovMatern(int d)
    717525      : base("CovMatern", "Matern covariance function") {
    718       MinSigma = 1.0;
    719       MaxSigma = 100.0;
    720       SigmaShakingMu = 1.0;
    721       SigmaShakingSigma = 1.0;
    722       MinL = 1.0;
    723       MaxL = 100.0;
    724       LShakingMu = 1.0;
    725       LShakingSigma = 1.0;
    726526      this.D = d;
    727527    }
     
    740540  [StorableClass]
    741541  public sealed class CovPeriodic : Symbol {
    742     [Storable]
    743     public double MinSigma { get; set; }
    744     [Storable]
    745     public double MaxSigma { get; set; }
    746     [Storable]
    747     public double SigmaShakingMu { get; set; }
    748     [Storable]
    749     public double SigmaShakingSigma { get; set; }
    750     [Storable]
    751     public double MinL { get; set; }
    752     [Storable]
    753     public double MaxL { get; set; }
    754     [Storable]
    755     public double LShakingMu { get; set; }
    756     [Storable]
    757     public double LShakingSigma { get; set; }
    758     [Storable]
    759     public double MinPeriod { get; set; }
    760     [Storable]
    761     public double MaxPeriod { get; set; }
    762     [Storable]
    763     public double PeriodShakingMu { get; set; }
    764     [Storable]
    765     public double PeriodShakingSigma { get; set; }
    766 
    767     public override int MinimumArity {
    768       get { return 0; }
    769     }
    770     public override int MaximumArity {
    771       get { return 0; }
    772     }
     542    public override int MinimumArity {
     543      get { return 0; }
     544    }
     545    public override int MaximumArity {
     546      get { return 0; }
     547    }
     548
     549    [Storable]
     550    private double? period;
     551    public double? Period {
     552      get { return period; }
     553    }
     554
    773555
    774556    [StorableConstructor]
     
    776558    private CovPeriodic(CovPeriodic original, Cloner cloner)
    777559      : base(original, cloner) {
    778       MinSigma = original.MinSigma;
    779       MaxSigma = original.MaxSigma;
    780       SigmaShakingMu = original.SigmaShakingMu;
    781       SigmaShakingSigma = original.SigmaShakingSigma;
    782       MinL = original.MinL;
    783       MaxL = original.MaxL;
    784       LShakingMu = original.LShakingMu;
    785       LShakingSigma = original.LShakingSigma;
    786       MinPeriod = original.MinL;
    787       MaxPeriod = original.MaxL;
    788       PeriodShakingMu = original.PeriodShakingMu;
    789       PeriodShakingSigma = original.PeriodShakingSigma;
    790     }
    791 
    792     public CovPeriodic()
     560      period = original.period;
     561    }
     562
     563    public CovPeriodic(double? period = null)
    793564      : base("CovPeriodic", "Periodic covariance function") {
    794       MinSigma = 1.0;
    795       MaxSigma = 100.0;
    796       SigmaShakingMu = 1.0;
    797       SigmaShakingSigma = 1.0;
    798       MinL = 1.0;
    799       MaxL = 100.0;
    800       LShakingMu = 1.0;
    801       LShakingSigma = 1.0;
    802       MinPeriod = 1.0;
    803       MaxPeriod = 100.0;
    804       PeriodShakingMu = 1.0;
    805       PeriodShakingSigma = 1.0;
     565      this.period = period;
    806566    }
    807567    [StorableHook(HookType.AfterDeserialization)]
     
    818578  [StorableClass]
    819579  public sealed class CovRQArd : Symbol, IDimensionSymbol {
    820     [Storable]
    821     public double LambdaMu { get; set; }
    822     [Storable]
    823     public double LambdaSigma { get; set; }
    824     [Storable]
    825     public double LambdaShakingMu { get; set; }
    826     [Storable]
    827     public double LambdaShakingSigma { get; set; }
    828     [Storable]
    829     public double MinSigma { get; set; }
    830     [Storable]
    831     public double MaxSigma { get; set; }
    832     [Storable]
    833     public double SigmaShakingMu { get; set; }
    834     [Storable]
    835     public double SigmaShakingSigma { get; set; }
    836     [Storable]
    837     public double MinShape { get; set; }
    838     [Storable]
    839     public double MaxShape { get; set; }
    840     [Storable]
    841     public double ShapeShakingMu { get; set; }
    842     [Storable]
    843     public double ShapeShakingSigma { get; set; }
    844 
    845580    public override int MinimumArity {
    846581      get { return 0; }
     
    858593      : base(original, cloner) {
    859594      Dimension = original.Dimension;
    860       LambdaMu = original.LambdaMu;
    861       LambdaSigma = original.LambdaSigma;
    862       LambdaShakingMu = original.LambdaShakingMu;
    863       LambdaShakingSigma = original.LambdaShakingSigma;
    864       MinSigma = original.MinSigma;
    865       MaxSigma = original.MaxSigma;
    866       SigmaShakingMu = original.SigmaShakingMu;
    867       SigmaShakingSigma = original.SigmaShakingSigma;
    868       MinShape = original.MinShape;
    869       MaxShape = original.MaxShape;
    870       ShapeShakingMu = original.ShapeShakingMu;
    871       ShapeShakingSigma = original.ShapeShakingSigma;
    872595    }
    873596
     
    875598      : base("CovRQArd", "full rational quadratic covariance function with ARD") {
    876599      this.Dimension = dimension;
    877       LambdaMu = 0.0;
    878       LambdaSigma = 1.0;
    879       LambdaShakingMu = 1.0;
    880       LambdaShakingSigma = 0.1;
    881       MinSigma = 0.0;
    882       MaxSigma = 100.0;
    883       SigmaShakingMu = 1.0;
    884       SigmaShakingSigma = 1.0;
    885       MinShape = 1.0;
    886       MaxShape = 100.0;
    887       ShapeShakingMu = 1.0;
    888       ShapeShakingSigma = 1.0;
    889600    }
    890601    [StorableHook(HookType.AfterDeserialization)]
     
    901612  [StorableClass]
    902613  public sealed class CovRQIso : Symbol {
    903     [Storable]
    904     public double MinSigma { get; set; }
    905     [Storable]
    906     public double MaxSigma { get; set; }
    907     [Storable]
    908     public double SigmaShakingMu { get; set; }
    909     [Storable]
    910     public double SigmaShakingSigma { get; set; }
    911     [Storable]
    912     public double MinL { get; set; }
    913     [Storable]
    914     public double MaxL { get; set; }
    915     [Storable]
    916     public double LShakingMu { get; set; }
    917     [Storable]
    918     public double LShakingSigma { get; set; }
    919     [Storable]
    920     public double MinShape { get; set; }
    921     [Storable]
    922     public double MaxShape { get; set; }
    923     [Storable]
    924     public double ShapeShakingMu { get; set; }
    925     [Storable]
    926     public double ShapeShakingSigma { get; set; }
    927 
    928614    public override int MinimumArity {
    929615      get { return 0; }
     
    937623    private CovRQIso(CovRQIso original, Cloner cloner)
    938624      : base(original, cloner) {
    939       MinSigma = original.MinSigma;
    940       MaxSigma = original.MaxSigma;
    941       SigmaShakingMu = original.SigmaShakingMu;
    942       SigmaShakingSigma = original.SigmaShakingSigma;
    943       MinL = original.MinL;
    944       MaxL = original.MaxL;
    945       LShakingMu = original.LShakingMu;
    946       LShakingSigma = original.LShakingSigma;
    947       MinShape = original.MinShape;
    948       MaxShape = original.MaxShape;
    949       ShapeShakingMu = original.ShapeShakingMu;
    950       ShapeShakingSigma = original.ShapeShakingSigma;
    951625    }
    952626
    953627    public CovRQIso()
    954628      : base("CovRQIso", "Rational quadratic covariance function") {
    955       MinSigma = 1.0;
    956       MaxSigma = 100.0;
    957       SigmaShakingMu = 1.0;
    958       SigmaShakingSigma = 1.0;
    959       MinL = 1.0;
    960       MaxL = 100.0;
    961       LShakingMu = 1.0;
    962       LShakingSigma = 1.0;
    963       MinShape = 1.0;
    964       MaxShape = 100.0;
    965       ShapeShakingMu = 1.0;
    966       ShapeShakingSigma = 1.0;
    967629    }
    968630    [StorableHook(HookType.AfterDeserialization)]
     
    1034696  [StorableClass]
    1035697  public sealed class CovScale : Symbol {
    1036     [Storable]
    1037     public double AlphaMu { get; set; }
    1038     [Storable]
    1039     public double AlphaSigma { get; set; }
    1040     [Storable]
    1041     public double AlphaShakingMu { get; set; }
    1042     [Storable]
    1043     public double AlphaShakingSigma { get; set; }
    1044698
    1045699    public override int MinimumArity {
     
    1054708    private CovScale(CovScale original, Cloner cloner)
    1055709      : base(original, cloner) {
    1056       AlphaMu = original.AlphaMu;
    1057       AlphaSigma = original.AlphaSigma;
    1058       AlphaShakingMu = original.AlphaShakingMu;
    1059       AlphaShakingSigma = original.AlphaShakingSigma;
    1060710    }
    1061711
    1062712    public CovScale()
    1063713      : base("CovScale", "Scale a covariance function") {
    1064       AlphaMu = 0.0;
    1065       AlphaSigma = 1.0;
    1066       AlphaShakingMu = 1.0;
    1067       AlphaShakingSigma = 0.1;
    1068714    }
    1069715    [StorableHook(HookType.AfterDeserialization)]
     
    1122768  [StorableClass]
    1123769  public sealed class LikGauss : Symbol {
    1124     [Storable]
    1125     public double MinSigma { get; set; }
    1126     [Storable]
    1127     public double MaxSigma { get; set; }
    1128     [Storable]
    1129     public double SigmaShakingMu { get; set; }
    1130     [Storable]
    1131     public double SigmaShakingSigma { get; set; }
    1132770
    1133771    public override int MinimumArity {
     
    1142780    private LikGauss(LikGauss original, Cloner cloner)
    1143781      : base(original, cloner) {
    1144       this.MinSigma = original.MinSigma;
    1145       this.MaxSigma = original.MaxSigma;
    1146       this.SigmaShakingMu = original.SigmaShakingMu;
    1147       this.SigmaShakingSigma = original.SigmaShakingSigma;
    1148782    }
    1149783
    1150784    public LikGauss()
    1151785      : base("LikGauss", "Gaussian likelihood function") {
    1152       MinSigma = Math.Log(0.00001);
    1153       MaxSigma = Math.Log(100);
    1154       SigmaShakingMu = 1.0;
    1155       SigmaShakingSigma = 0.1;
    1156786    }
    1157787    [StorableHook(HookType.AfterDeserialization)]
  • branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning/TreeNodes.cs

    r8753 r9212  
    3030    public new MeanConst Symbol { get { return (MeanConst)base.Symbol; } }
    3131
    32     public override bool HasLocalParameters {
    33       get { return true; }
    34     }
    35 
    36     private double value;
    37     [Storable]
    38     public double Value { get { return value; } private set { this.value = value; } }
    39 
    4032    [StorableConstructor]
    4133    private MeanConstTreeNode(bool deserializing) : base(deserializing) { }
    4234    private MeanConstTreeNode(MeanConstTreeNode original, Cloner cloner)
    4335      : base(original, cloner) {
    44       this.value = original.value;
    4536    }
    4637
     
    5243    public override IDeepCloneable Clone(Cloner cloner) {
    5344      return new MeanConstTreeNode(this, cloner);
    54     }
    55     public override void ResetLocalParameters(IRandom random) {
    56       value = Symbol.MinValue + random.NextDouble() * (Symbol.MaxValue - Symbol.MinValue);
    57     }
    58     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    59       var normRandom = new NormalDistributedRandom(random, Symbol.ValueShakingMu, Symbol.ValueShakingSigma);
    60       value = Math.Max(Symbol.MinValue, Math.Min(Symbol.MaxValue, value + normRandom.NextDouble() * shakingFactor));
    6145    }
    6246  }
     
    6549    public new MeanLinear Symbol { get { return (MeanLinear)base.Symbol; } }
    6650
    67     public override bool HasLocalParameters {
    68       get { return true; }
    69     }
    70 
    71     [Storable]
    72     public double[] Alpha { get; set; }
    73 
    7451    [StorableConstructor]
    7552    private MeanLinearTreeNode(bool deserializing) : base(deserializing) { }
    7653    private MeanLinearTreeNode(MeanLinearTreeNode original, Cloner cloner)
    7754      : base(original, cloner) {
    78       Alpha = new double[original.Alpha.Length];
    79       Array.Copy(original.Alpha, Alpha, Alpha.Length);
    8055    }
    8156
    8257    public MeanLinearTreeNode(MeanLinear symbol)
    8358      : base(symbol) {
    84       Alpha = new double[symbol.Dimension];
    8559    }
    8660
     
    9064    public override IDeepCloneable Clone(Cloner cloner) {
    9165      return new MeanLinearTreeNode(this, cloner);
    92     }
    93     public override void ResetLocalParameters(IRandom random) {
    94       var normRandom = new NormalDistributedRandom(random, Symbol.AlphaMu, Symbol.AlphaSigma);
    95       for (int i = 0; i < Alpha.Length; i++)
    96         Alpha[i] = normRandom.NextDouble();
    97     }
    98     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    99       var normRandom = new NormalDistributedRandom(random, Symbol.AlphaShakingMu, Symbol.AlphaShakingSigma);
    100       int index = random.Next(Alpha.Length);
    101       Alpha[index] += shakingFactor * normRandom.NextDouble();
    10266    }
    10367  }
     
    10872    public new MeanScale Symbol { get { return (MeanScale)base.Symbol; } }
    10973
    110     public override bool HasLocalParameters {
    111       get { return true; }
    112     }
    113 
    114     private double alpha;
    115     [Storable]
    116     public double Alpha { get { return alpha; } private set { this.alpha = value; } }
    117 
    11874    [StorableConstructor]
    11975    private MeanScaleTreeNode(bool deserializing) : base(deserializing) { }
    12076    private MeanScaleTreeNode(MeanScaleTreeNode original, Cloner cloner)
    12177      : base(original, cloner) {
    122       this.alpha = original.alpha;
    12378    }
    12479
     
    13085    public override IDeepCloneable Clone(Cloner cloner) {
    13186      return new MeanScaleTreeNode(this, cloner);
    132     }
    133     public override void ResetLocalParameters(IRandom random) {
    134       var normRandom = new NormalDistributedRandom(random, Symbol.AlphaMu, Symbol.AlphaSigma);
    135       alpha = normRandom.NextDouble();
    136     }
    137     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    138       var normRandom = new NormalDistributedRandom(random, Symbol.AlphaShakingMu, Symbol.AlphaShakingSigma);
    139       alpha += shakingFactor * normRandom.NextDouble();
    14087    }
    14188  }
     
    184131    public new CovConst Symbol { get { return (CovConst)base.Symbol; } }
    185132
    186     public override bool HasLocalParameters {
    187       get { return true; }
    188     }
    189 
    190     private double sigma;
    191     [Storable]
    192     public double Sigma { get { return sigma; } private set { this.sigma = value; } }
    193 
    194133    [StorableConstructor]
    195134    private CovConstTreeNode(bool deserializing) : base(deserializing) { }
    196135    private CovConstTreeNode(CovConstTreeNode original, Cloner cloner)
    197136      : base(original, cloner) {
    198       this.sigma = original.sigma;
    199137    }
    200138
     
    206144    public override IDeepCloneable Clone(Cloner cloner) {
    207145      return new CovConstTreeNode(this, cloner);
    208     }
    209     public override void ResetLocalParameters(IRandom random) {
    210       sigma = random.Next((int)Symbol.MinSigma, (int)Symbol.MaxSigma);
    211     }
    212     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    213       var normRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
    214       sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, sigma + normRandom.NextDouble() * shakingFactor));
    215146    }
    216147  }
     
    219150    public new CovNoise Symbol { get { return (CovNoise)base.Symbol; } }
    220151
    221     public override bool HasLocalParameters {
    222       get { return true; }
    223     }
    224 
    225     private double sigma;
    226     [Storable]
    227     public double Sigma { get { return sigma; } private set { this.sigma = value; } }
    228 
    229152    [StorableConstructor]
    230153    private CovNoiseTreeNode(bool deserializing) : base(deserializing) { }
    231154    private CovNoiseTreeNode(CovNoiseTreeNode original, Cloner cloner)
    232155      : base(original, cloner) {
    233       this.sigma = original.sigma;
    234156    }
    235157
     
    241163    public override IDeepCloneable Clone(Cloner cloner) {
    242164      return new CovNoiseTreeNode(this, cloner);
    243     }
    244     public override void ResetLocalParameters(IRandom random) {
    245       sigma = random.Next((int)Symbol.MinSigma, (int)Symbol.MaxSigma);
    246     }
    247     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    248       var normRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
    249       sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, sigma + normRandom.NextDouble() * shakingFactor));
    250165    }
    251166  }
     
    254169    public new CovLinArd Symbol { get { return (CovLinArd)base.Symbol; } }
    255170
    256     public override bool HasLocalParameters {
    257       get { return true; }
    258     }
    259 
    260     [Storable]
    261     public double[] Lambda { get; set; }
    262 
    263171    [StorableConstructor]
    264172    private CovLinArdTreeNode(bool deserializing) : base(deserializing) { }
    265173    private CovLinArdTreeNode(CovLinArdTreeNode original, Cloner cloner)
    266174      : base(original, cloner) {
    267       Lambda = new double[original.Lambda.Length];
    268       Array.Copy(original.Lambda, Lambda, Lambda.Length);
    269175    }
    270176
    271177    public CovLinArdTreeNode(CovLinArd symbol)
    272178      : base(symbol) {
    273       Lambda = new double[symbol.Dimension];
    274179    }
    275180
     
    279184    public override IDeepCloneable Clone(Cloner cloner) {
    280185      return new CovLinArdTreeNode(this, cloner);
    281     }
    282     public override void ResetLocalParameters(IRandom random) {
    283       var normRandom = new NormalDistributedRandom(random, Symbol.LambdaMu, Symbol.LambdaSigma);
    284       for (int i = 0; i < Lambda.Length; i++)
    285         Lambda[i] = normRandom.NextDouble();
    286     }
    287     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    288       int index = random.Next(Lambda.Length);
    289       var normRandom = new NormalDistributedRandom(random, Symbol.LambdaShakingMu, Symbol.LambdaShakingSigma);
    290       Lambda[index] += shakingFactor * normRandom.NextDouble();
    291186    }
    292187  }
     
    294189  public sealed class CovSeArdTreeNode : SymbolicExpressionTreeTerminalNode {
    295190    public new CovSeArd Symbol { get { return (CovSeArd)base.Symbol; } }
    296 
    297     public override bool HasLocalParameters {
    298       get { return true; }
    299     }
    300 
    301     [Storable]
    302     public double[] Lambda { get; set; }
    303 
    304     [Storable]
    305     public double Sigma { get; set; }
    306 
    307191    [StorableConstructor]
    308192    private CovSeArdTreeNode(bool deserializing) : base(deserializing) { }
    309193    private CovSeArdTreeNode(CovSeArdTreeNode original, Cloner cloner)
    310194      : base(original, cloner) {
    311       Lambda = new double[original.Lambda.Length];
    312       Array.Copy(original.Lambda, Lambda, Lambda.Length);
    313       Sigma = original.Sigma;
    314195    }
    315196
    316197    public CovSeArdTreeNode(CovSeArd symbol)
    317198      : base(symbol) {
    318       Lambda = new double[symbol.Dimension];
    319199    }
    320200
     
    324204    public override IDeepCloneable Clone(Cloner cloner) {
    325205      return new CovSeArdTreeNode(this, cloner);
    326     }
    327     public override void ResetLocalParameters(IRandom random) {
    328       var normRandom = new NormalDistributedRandom(random, Symbol.LambdaMu, Symbol.LambdaSigma);
    329       for (int i = 0; i < Lambda.Length; i++)
    330         Lambda[i] = normRandom.NextDouble();
    331 
    332       Sigma = Symbol.MinSigma + random.NextDouble() * (Symbol.MaxSigma - Symbol.MinSigma);
    333     }
    334     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    335       int index = random.Next(Lambda.Length);
    336       var normRandom = new NormalDistributedRandom(random, Symbol.LambdaShakingMu, Symbol.LambdaShakingSigma);
    337       Lambda[index] += shakingFactor * normRandom.NextDouble();
    338 
    339       var sigmaRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
    340       Sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, Sigma + shakingFactor * sigmaRandom.NextDouble()));
    341206    }
    342207  }
     
    345210    public new CovSeIso Symbol { get { return (CovSeIso)base.Symbol; } }
    346211
    347     public override bool HasLocalParameters {
    348       get { return true; }
    349     }
    350 
    351     [Storable]
    352     public double L { get; set; }
    353 
    354     [Storable]
    355     public double Sigma { get; set; }
    356 
    357212    [StorableConstructor]
    358213    private CovSeIsoTreeNode(bool deserializing) : base(deserializing) { }
    359214    private CovSeIsoTreeNode(CovSeIsoTreeNode original, Cloner cloner)
    360215      : base(original, cloner) {
    361       L = original.L;
    362       Sigma = original.Sigma;
    363216    }
    364217
     
    372225    public override IDeepCloneable Clone(Cloner cloner) {
    373226      return new CovSeIsoTreeNode(this, cloner);
    374     }
    375     public override void ResetLocalParameters(IRandom random) {
    376       Sigma = Symbol.MinSigma + random.NextDouble() * (Symbol.MaxSigma - Symbol.MinSigma);
    377       L = Symbol.MinL + random.NextDouble() * (Symbol.MaxL - Symbol.MinL);
    378     }
    379     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    380       var sigmaRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
    381       Sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, Sigma + shakingFactor * sigmaRandom.NextDouble()));
    382 
    383       var lRandom = new NormalDistributedRandom(random, Symbol.LShakingMu, Symbol.LShakingSigma);
    384       L = Math.Max(Symbol.MinL, Math.Min(Symbol.MaxL, L + shakingFactor * lRandom.NextDouble()));
    385227    }
    386228  }
     
    389231    public new CovMatern Symbol { get { return (CovMatern)base.Symbol; } }
    390232
    391     public override bool HasLocalParameters {
    392       get { return true; }
    393     }
    394 
    395     [Storable]
    396     public double L { get; set; }
    397 
    398     [Storable]
    399     public double Sigma { get; set; }
    400 
    401233    [StorableConstructor]
    402234    private CovMaternTreeNode(bool deserializing) : base(deserializing) { }
    403235    private CovMaternTreeNode(CovMaternTreeNode original, Cloner cloner)
    404236      : base(original, cloner) {
    405       L = original.L;
    406       Sigma = original.Sigma;
    407237    }
    408238
     
    416246    public override IDeepCloneable Clone(Cloner cloner) {
    417247      return new CovMaternTreeNode(this, cloner);
    418     }
    419     public override void ResetLocalParameters(IRandom random) {
    420       Sigma = Symbol.MinSigma + random.NextDouble() * (Symbol.MaxSigma - Symbol.MinSigma);
    421       L = Symbol.MinL + random.NextDouble() * (Symbol.MaxL - Symbol.MinL);
    422     }
    423     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    424       var sigmaRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
    425       Sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, Sigma + shakingFactor * sigmaRandom.NextDouble()));
    426 
    427       var lRandom = new NormalDistributedRandom(random, Symbol.LShakingMu, Symbol.LShakingSigma);
    428       L = Math.Max(Symbol.MinL, Math.Min(Symbol.MaxL, L + shakingFactor * lRandom.NextDouble()));
    429248    }
    430249  }
     
    433252    public new CovPeriodic Symbol { get { return (CovPeriodic)base.Symbol; } }
    434253
    435     public override bool HasLocalParameters {
    436       get { return true; }
    437     }
    438 
    439     [Storable]
    440     public double L { get; set; }
    441 
    442     [Storable]
    443     public double Sigma { get; set; }
    444 
    445     [Storable]
    446     public double Period { get; set; }
    447 
    448254    [StorableConstructor]
    449255    private CovPeriodicTreeNode(bool deserializing) : base(deserializing) { }
    450256    private CovPeriodicTreeNode(CovPeriodicTreeNode original, Cloner cloner)
    451257      : base(original, cloner) {
    452       L = original.L;
    453       Sigma = original.Sigma;
    454       Period = original.Period;
    455258    }
    456259
     
    464267    public override IDeepCloneable Clone(Cloner cloner) {
    465268      return new CovPeriodicTreeNode(this, cloner);
    466     }
    467     public override void ResetLocalParameters(IRandom random) {
    468       Sigma = Symbol.MinSigma + random.NextDouble() * (Symbol.MaxSigma - Symbol.MinSigma);
    469       L = Symbol.MinL + random.NextDouble() * (Symbol.MaxL - Symbol.MinL);
    470       Period = Symbol.MinPeriod + random.NextDouble() * (Symbol.MaxPeriod - Symbol.MinPeriod);
    471     }
    472     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    473       var sigmaRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
    474       Sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, Sigma + shakingFactor * sigmaRandom.NextDouble()));
    475 
    476       var lRandom = new NormalDistributedRandom(random, Symbol.LShakingMu, Symbol.LShakingSigma);
    477       L = Math.Max(Symbol.MinL, Math.Min(Symbol.MaxL, L + shakingFactor * lRandom.NextDouble()));
    478 
    479       var pRandom = new NormalDistributedRandom(random, Symbol.PeriodShakingMu, Symbol.PeriodShakingSigma);
    480       Period = Math.Max(Symbol.MinPeriod, Math.Min(Symbol.MaxPeriod, Period + shakingFactor * pRandom.NextDouble()));
    481269    }
    482270  }
     
    486274    public new CovRQArd Symbol { get { return (CovRQArd)base.Symbol; } }
    487275
    488     public override bool HasLocalParameters {
    489       get { return true; }
    490     }
    491 
    492     [Storable]
    493     public double[] Lambda { get; set; }
    494 
    495     [Storable]
    496     public double Sigma { get; set; }
    497 
    498     [Storable]
    499     public double Shape { get; set; }
    500 
    501276    [StorableConstructor]
    502277    private CovRQArdTreeNode(bool deserializing) : base(deserializing) { }
    503278    private CovRQArdTreeNode(CovRQArdTreeNode original, Cloner cloner)
    504279      : base(original, cloner) {
    505       Lambda = new double[original.Lambda.Length];
    506       Array.Copy(original.Lambda, Lambda, Lambda.Length);
    507       Sigma = original.Sigma;
    508       Shape = original.Shape;
    509280    }
    510281
    511282    public CovRQArdTreeNode(CovRQArd symbol)
    512283      : base(symbol) {
    513       Lambda = new double[symbol.Dimension];
    514284    }
    515285
     
    519289    public override IDeepCloneable Clone(Cloner cloner) {
    520290      return new CovRQArdTreeNode(this, cloner);
    521     }
    522     public override void ResetLocalParameters(IRandom random) {
    523       var normRandom = new NormalDistributedRandom(random, Symbol.LambdaMu, Symbol.LambdaSigma);
    524       for (int i = 0; i < Lambda.Length; i++)
    525         Lambda[i] = normRandom.NextDouble();
    526 
    527       Sigma = Symbol.MinSigma + random.NextDouble() * (Symbol.MaxSigma - Symbol.MinSigma);
    528       Shape = Symbol.MinShape + random.NextDouble() * (Symbol.MaxShape - Symbol.MinShape);
    529     }
    530     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    531       int index = random.Next(Lambda.Length);
    532       var normRandom = new NormalDistributedRandom(random, Symbol.LambdaShakingMu, Symbol.LambdaShakingSigma);
    533       Lambda[index] += shakingFactor * normRandom.NextDouble();
    534 
    535       var sigmaRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
    536       Sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, Sigma + shakingFactor * sigmaRandom.NextDouble()));
    537 
    538       var shapeRandom = new NormalDistributedRandom(random, Symbol.ShapeShakingMu, Symbol.ShapeShakingSigma);
    539       Sigma = Math.Max(Symbol.MinShape, Math.Min(Symbol.MaxShape, Shape + shakingFactor * shapeRandom.NextDouble()));
    540291    }
    541292  }
     
    545296    public new CovRQIso Symbol { get { return (CovRQIso)base.Symbol; } }
    546297
    547     public override bool HasLocalParameters {
    548       get { return true; }
    549     }
    550 
    551     [Storable]
    552     public double L { get; set; }
    553 
    554     [Storable]
    555     public double Sigma { get; set; }
    556 
    557     [Storable]
    558     public double Shape { get; set; }
    559 
    560298    [StorableConstructor]
    561299    private CovRQisoTreeNode(bool deserializing) : base(deserializing) { }
    562300    private CovRQisoTreeNode(CovRQisoTreeNode original, Cloner cloner)
    563301      : base(original, cloner) {
    564       L = original.L;
    565       Sigma = original.Sigma;
    566       Shape = original.Shape;
    567302    }
    568303
     
    576311    public override IDeepCloneable Clone(Cloner cloner) {
    577312      return new CovRQisoTreeNode(this, cloner);
    578     }
    579     public override void ResetLocalParameters(IRandom random) {
    580       Sigma = Symbol.MinSigma + random.NextDouble() * (Symbol.MaxSigma - Symbol.MinSigma);
    581       L = Symbol.MinL + random.NextDouble() * (Symbol.MaxL - Symbol.MinL);
    582       Shape = Symbol.MinShape + random.NextDouble() * (Symbol.MaxShape - Symbol.MinShape);
    583     }
    584     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    585       var sigmaRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
    586       Sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, Sigma + shakingFactor * sigmaRandom.NextDouble()));
    587 
    588       var lRandom = new NormalDistributedRandom(random, Symbol.LShakingMu, Symbol.LShakingSigma);
    589       L = Math.Max(Symbol.MinL, Math.Min(Symbol.MaxL, L + shakingFactor * lRandom.NextDouble()));
    590 
    591       var shapeRandom = new NormalDistributedRandom(random, Symbol.ShapeShakingMu, Symbol.ShapeShakingSigma);
    592       Shape = Math.Max(Symbol.MinShape, Math.Min(Symbol.MaxShape, Shape + shakingFactor * shapeRandom.NextDouble()));
    593313    }
    594314  }
     
    597317    public new CovScale Symbol { get { return (CovScale)base.Symbol; } }
    598318
    599     public override bool HasLocalParameters {
    600       get { return true; }
    601     }
    602 
    603     private double alpha;
    604     [Storable]
    605     public double Alpha { get { return alpha; } private set { this.alpha = value; } }
    606 
    607319    [StorableConstructor]
    608320    private CovScaleTreeNode(bool deserializing) : base(deserializing) { }
    609321    private CovScaleTreeNode(CovScaleTreeNode original, Cloner cloner)
    610322      : base(original, cloner) {
    611       this.alpha = original.alpha;
    612323    }
    613324
     
    619330    public override IDeepCloneable Clone(Cloner cloner) {
    620331      return new CovScaleTreeNode(this, cloner);
    621     }
    622     public override void ResetLocalParameters(IRandom random) {
    623       var normRandom = new NormalDistributedRandom(random, Symbol.AlphaMu, Symbol.AlphaSigma);
    624       alpha = normRandom.NextDouble();
    625     }
    626     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    627       var normRandom = new NormalDistributedRandom(random, Symbol.AlphaShakingMu, Symbol.AlphaShakingSigma);
    628       alpha += shakingFactor * normRandom.NextDouble();
    629332    }
    630333  }
     
    674377    public new LikGauss Symbol { get { return (LikGauss)base.Symbol; } }
    675378
    676     public override bool HasLocalParameters {
    677       get { return true; }
    678     }
    679 
    680     private double sigma;
    681     [Storable]
    682     public double Sigma { get { return sigma; } private set { this.sigma = value; } }
    683 
    684379    [StorableConstructor]
    685380    private LikGaussTreeNode(bool deserializing) : base(deserializing) { }
    686381    private LikGaussTreeNode(LikGaussTreeNode original, Cloner cloner)
    687382      : base(original, cloner) {
    688       this.sigma = original.sigma;
    689383    }
    690384
     
    697391      return new LikGaussTreeNode(this, cloner);
    698392    }
    699     public override void ResetLocalParameters(IRandom random) {
    700       sigma = random.Next((int)Symbol.MinSigma, (int)Symbol.MaxSigma);
    701     }
    702     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    703       var normRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
    704       sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, sigma + normRandom.NextDouble() * shakingFactor));
    705     }
    706393  }
    707394}
  • branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/Instances.DataAnalysis.GaussianProcessRegression-3.3.csproj

    r9124 r9212  
    178178  </ItemGroup>
    179179  <ItemGroup>
     180    <Compile Include="GaussianProcessRegressionInstance1D.cs" />
     181    <Compile Include="GaussianProcessRegressionInstance2D.cs" />
    180182    <Compile Include="GaussianProcessSumOfRQIso.cs" />
    181183    <Compile Include="GaussianProcessSumOfSEIso.cs" />
  • branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/VariousInstanceProvider.cs

    r9124 r9212  
    2424using System.Linq;
    2525using HeuristicLab.Algorithms.DataAnalysis;
     26using HeuristicLab.Data;
    2627
    2728namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    124125      }
    125126
     127      {
     128        var cov = new CovarianceSum();
     129        cov.Terms.Add(new CovarianceSquaredExponentialIso());
     130        cov.Terms.Add(new CovarianceNoise());
     131        var hyp = new double[] { -2.5, 0, -7 };
     132        descriptorList.Add(new GaussianProcessRegressionInstance1D("1D: SE", cov, hyp));
     133      }
     134      {
     135        var cov = new CovarianceSum();
     136        cov.Terms.Add(new CovarianceRationalQuadraticIso());
     137        cov.Terms.Add(new CovarianceNoise());
     138        var hyp = new double[] { -2.5, 0, -2, -7 };
     139        descriptorList.Add(new GaussianProcessRegressionInstance1D("1D: RQ", cov, hyp));
     140      }
     141      {
     142        var cov = new CovarianceSum();
     143        cov.Terms.Add(new CovarianceMaternIso());
     144        cov.Terms.Add(new CovarianceNoise());
     145        var hyp = new double[] { -2, 0, -7 };
     146        descriptorList.Add(new GaussianProcessRegressionInstance1D("1D: Matern1", cov, hyp));
     147      }
     148      {
     149        var cov = new CovarianceSum();
     150        cov.Terms.Add(new CovariancePeriodic());
     151        cov.Terms.Add(new CovarianceNoise());
     152        var hyp = new double[] { 0, -1.3, 0, -7 };
     153        descriptorList.Add(new GaussianProcessRegressionInstance1D("1D: Periodic", cov, hyp));
     154      }
     155      {
     156        var cov = new CovarianceSum();
     157        cov.Terms.Add(new CovarianceSquaredExponentialIso());
     158        cov.Terms.Add(new CovarianceNoise());
     159        var hyp = new double[] { -2.5, 0, -7 };
     160        descriptorList.Add(new GaussianProcessRegressionInstance1D("1D: SE", cov, hyp));
     161      }
     162      {
     163        var cov = new CovarianceSum();
     164        var m1 = new CovarianceMask();
     165        m1.SelectedDimensionsParameter.Value = new IntArray(new int[] { 0 });
     166        m1.CovarianceFunctionParameter.Value = new CovarianceSquaredExponentialIso();
     167
     168        var m2 = new CovarianceMask();
     169        m2.SelectedDimensionsParameter.Value = new IntArray(new int[] { 1 });
     170        m2.CovarianceFunctionParameter.Value = new CovarianceRationalQuadraticIso();
     171
     172        cov.Terms.Add(m1);
     173        cov.Terms.Add(m2);
     174        cov.Terms.Add(new CovarianceNoise());
     175        var hyp = new double[] { -2.5, 0, -2.0, 0, -2, -7 };
     176        descriptorList.Add(new GaussianProcessRegressionInstance2D("2D: SE+RQ", cov, hyp));
     177      }
     178      {
     179        var cov = new CovarianceSum();
     180        var m1 = new CovarianceMask();
     181        m1.SelectedDimensionsParameter.Value = new IntArray(new int[] { 0 });
     182        m1.CovarianceFunctionParameter.Value = new CovarianceSquaredExponentialIso();
     183
     184        var m2 = new CovarianceMask();
     185        m2.SelectedDimensionsParameter.Value = new IntArray(new int[] { 1 });
     186        m2.CovarianceFunctionParameter.Value = new CovarianceMaternIso();
     187
     188        cov.Terms.Add(m1);
     189        cov.Terms.Add(m2);
     190        cov.Terms.Add(new CovarianceNoise());
     191        var hyp = new double[] { -2.5, 0, 2, 0, -7 };
     192        descriptorList.Add(new GaussianProcessRegressionInstance2D("2D: SE+Matern1", cov, hyp));
     193      }
     194      {
     195        var cov = new CovarianceSum();
     196        var m1 = new CovarianceMask();
     197        m1.SelectedDimensionsParameter.Value = new IntArray(new int[] { 0 });
     198        m1.CovarianceFunctionParameter.Value = new CovarianceSquaredExponentialIso();
     199
     200        var m2 = new CovarianceMask();
     201        m2.SelectedDimensionsParameter.Value = new IntArray(new int[] { 1 });
     202        m2.CovarianceFunctionParameter.Value = new CovariancePeriodic();
     203
     204        cov.Terms.Add(m1);
     205        cov.Terms.Add(m2);
     206        cov.Terms.Add(new CovarianceNoise());
     207        var hyp = new double[] { -2.5, 0, 0, -1.3, 0, -7 };
     208        descriptorList.Add(new GaussianProcessRegressionInstance2D("2D: SE+Periodic", cov, hyp));
     209      }
     210
     211
    126212
    127213      return descriptorList;
Note: See TracChangeset for help on using the changeset viewer.