Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/26/17 09:10:56 (7 years ago)
Author:
bwerth
Message:

#2745 implemented EGO as EngineAlgorithm + some simplifications in the IInfillCriterion interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/EfficientGlobalOptimization/HeuristicLab.Algorithms.EGO/InfillCriteria/PluginExpectedImprovement.cs

    r14818 r15064  
    2020#endregion
    2121
    22 using System;
    2322using System.Linq;
    2423using HeuristicLab.Common;
    2524using HeuristicLab.Core;
     25using HeuristicLab.Encodings.RealVectorEncoding;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727using HeuristicLab.Problems.DataAnalysis;
     
    3232  [StorableClass]
    3333  [Item("PluginExpectedImprovement", "Noisy InfillCriterion, Extension of the Expected Improvement by using the minimal prediction on the observed points\n rather than the minimal observed value as described in \n Global optimization based on noisy evaluations: An empirical study of two statistical approaches\r\nEmmanuel Vazqueza, Julien Villemonteixb, Maryan Sidorkiewiczb and Éric Walterc")]
    34   public class PluginExpectedImprovement : ExpectedImprovement {
    35 
     34  public class PluginExpectedImprovement : ExpectedImprovementBase {
    3635
    3736    #region HL-Constructors, Serialization and Cloning
    3837    [StorableConstructor]
    39     private PluginExpectedImprovement(bool deserializing) : base(deserializing) { }
    40     private PluginExpectedImprovement(PluginExpectedImprovement original, Cloner cloner) : base(original, cloner) { }
     38    protected PluginExpectedImprovement(bool deserializing) : base(deserializing) { }
     39    protected PluginExpectedImprovement(PluginExpectedImprovement original, Cloner cloner) : base(original, cloner) { }
    4140    public PluginExpectedImprovement() { }
    4241    public override IDeepCloneable Clone(Cloner cloner) {
     
    4544    #endregion
    4645
    47     protected override void Initialize() {
    48       if (ExpensiveMaximization) throw new NotImplementedException("PluginExpectedImprovement for maximization not yet implemented");
    49       var model = RegressionSolution.Model as IConfidenceRegressionModel;
    50       if (model == null) throw new ArgumentException("can not calculate EI without confidence measure");
    51       YMin = RegressionSolution.EstimatedTrainingValues.Min();
     46    protected override double FindBestFitness(IConfidenceRegressionSolution solution) {
     47      return ExpensiveMaximization ? RegressionSolution.EstimatedTrainingValues.Max() : RegressionSolution.EstimatedTrainingValues.Min();
     48    }
     49
     50    protected override double Evaluate(RealVector vector, double estimatedFitness, double estimatedStandardDeviation) {
     51      return GetEstimatedImprovement(BestFitness, estimatedFitness, estimatedStandardDeviation, ExploitationWeight, ExpensiveMaximization);
    5252    }
    5353  }
Note: See TracChangeset for help on using the changeset viewer.