Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/02/12 17:27:46 (12 years ago)
Author:
gkronber
Message:

#1902 implemented LM-BFGS algorithm and improved GPR

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessHyperparameterInitializer.cs

    r8375 r8396  
    2424using HeuristicLab.Core;
    2525using HeuristicLab.Data;
     26using HeuristicLab.Encodings.RealVectorEncoding;
    2627using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2728using HeuristicLab.Operators;
     
    3233namespace HeuristicLab.Algorithms.DataAnalysis {
    3334  [StorableClass]
    34   [Item(Name = "GaussianProcessSetHyperparameterLength",
    35     Description = "Determines the length of the hyperparameter vector based on the mean function, covariance function, and number of allowed input variables.")]
    36   public sealed class GaussianProcessSetHyperparameterLength : SingleSuccessorOperator {
     35  [Item(Name = "GaussianProcessHyperparameterInitializer",
     36    Description = "Initializers the hyperparameter vector based on the mean function, covariance function, and number of allowed input variables.")]
     37  public sealed class GaussianProcessHyperparameterInitializer : SingleSuccessorOperator {
    3738    private const string MeanFunctionParameterName = "MeanFunction";
    3839    private const string CovarianceFunctionParameterName = "CovarianceFunction";
    3940    private const string ProblemDataParameterName = "ProblemData";
    40     private const string NumberOfHyperparameterParameterName = "NumberOfHyperparameter";
     41    private const string HyperparameterParameterName = "Hyperparameter";
    4142
    4243    #region Parameter Properties
     
    5253    }
    5354    // out
    54     public ILookupParameter<IntValue> NumberOfHyperparameterParameter {
    55       get { return (ILookupParameter<IntValue>)Parameters[NumberOfHyperparameterParameterName]; }
     55    public ILookupParameter<RealVector> HyperparameterParameter {
     56      get { return (ILookupParameter<RealVector>)Parameters[HyperparameterParameterName]; }
    5657    }
    5758    #endregion
     
    6465
    6566    [StorableConstructor]
    66     private GaussianProcessSetHyperparameterLength(bool deserializing) : base(deserializing) { }
    67     private GaussianProcessSetHyperparameterLength(GaussianProcessSetHyperparameterLength original, Cloner cloner) : base(original, cloner) { }
    68     public GaussianProcessSetHyperparameterLength()
     67    private GaussianProcessHyperparameterInitializer(bool deserializing) : base(deserializing) { }
     68    private GaussianProcessHyperparameterInitializer(GaussianProcessHyperparameterInitializer original, Cloner cloner) : base(original, cloner) { }
     69    public GaussianProcessHyperparameterInitializer()
    6970      : base() {
    7071      // in
     
    7374      Parameters.Add(new LookupParameter<IDataAnalysisProblemData>(ProblemDataParameterName, "The input data for the Gaussian process."));
    7475      // out
    75       Parameters.Add(new LookupParameter<IntValue>(NumberOfHyperparameterParameterName, "The length of the hyperparameter vector for the Gaussian process model."));
     76      Parameters.Add(new LookupParameter<RealVector>(HyperparameterParameterName, "The initial hyperparameter vector for the Gaussian process model."));
    7677    }
    7778
    7879    public override IDeepCloneable Clone(Cloner cloner) {
    79       return new GaussianProcessSetHyperparameterLength(this, cloner);
     80      return new GaussianProcessHyperparameterInitializer(this, cloner);
    8081    }
    8182
    82     public override IOperation Apply()
    83     {
     83    public override IOperation Apply() {
    8484      var inputVariablesCount = ProblemData.AllowedInputVariables.Count();
    8585      int l = 1 + MeanFunction.GetNumberOfParameters(inputVariablesCount) +
    8686              CovarianceFunction.GetNumberOfParameters(inputVariablesCount);
    87       NumberOfHyperparameterParameter.ActualValue = new IntValue(l);
     87      HyperparameterParameter.ActualValue = new RealVector(l);
    8888      return base.Apply();
    8989    }
Note: See TracChangeset for help on using the changeset viewer.