Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/01/10 19:06:18 (15 years ago)
Author:
gkronber
Message:

Remove usage of UseEstimatedTargetValue parameter. #825 (UseEstimatedTargetValue parameter should be removed from evaluation operators.)

Location:
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/AveragePercentageChangeEvaluator.cs

    r2222 r2577  
    3838    }
    3939
    40     public override void Evaluate(IScope scope, ITreeEvaluator evaluator, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {
     40    public override void Evaluate(IScope scope, ITreeEvaluator evaluator, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, int start, int end) {
    4141      bool differential = GetVariableValue<BoolData>("Differential", scope, true).Data;
    4242      DoubleData apc = GetVariableValue<DoubleData>("APC", scope, false, false);
     
    5555          originalPercentageChange = (dataset.GetValue(sample, targetVariable) - prevOriginal) / prevOriginal;
    5656          estimatedPercentageChange = (evaluator.Evaluate(sample) - prevOriginal) / prevOriginal;
    57           if (updateTargetValues) {
    58             dataset.SetValue(sample, targetVariable, estimatedPercentageChange * prevOriginal + prevOriginal);
    59           }
     57         
    6058        } else {
    6159          originalPercentageChange = dataset.GetValue(sample, targetVariable);
    6260          estimatedPercentageChange = evaluator.Evaluate(sample);
    63           if (updateTargetValues) {
    64             dataset.SetValue(sample, targetVariable, estimatedPercentageChange);
    65           }
     61         
    6662        }
    6763        if (!double.IsNaN(originalPercentageChange) && !double.IsInfinity(originalPercentageChange)) {
  • trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/OffspringSelectionGPTimeSeriesPrognosis.cs

    r2566 r2577  
    4545    }
    4646
    47     public bool UseEstimatedTargetValue {
    48       get { return GetVariableInjector().GetVariable("UseEstimatedTargetValue").GetValue<BoolData>().Data; }
    49       set { GetVariableInjector().GetVariable("UseEstimatedTargetValue").GetValue<BoolData>().Data = value; }
    50     }
    51 
    5247    protected override IOperator CreateProblemInjector() {
    5348      return DefaultTimeSeriesOperators.CreateProblemInjector();
     
    7166      injector.AddVariable(new HeuristicLab.Core.Variable("MinTimeOffset", new IntData()));
    7267      injector.AddVariable(new HeuristicLab.Core.Variable("MaxTimeOffset", new IntData()));
    73       injector.AddVariable(new HeuristicLab.Core.Variable("UseEstimatedTargetValue", new BoolData()));
    7468      return injector;
    7569    }
  • trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/ProfitEvaluator.cs

    r2222 r2577  
    3838    }
    3939
    40     public override void Evaluate(IScope scope, ITreeEvaluator evaluator, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {
     40    public override void Evaluate(IScope scope, ITreeEvaluator evaluator, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, int start, int end) {
    4141      int exchangeRateVarIndex = GetVariableValue<IntData>("ExchangeRate", scope, true).Data;
    4242      double transactionCost = GetVariableValue<DoubleData>("TransactionCost", scope, true).Data;
     
    5454        double originalPercentageChange = dataset.GetValue(sample, targetVariable);
    5555        double estimatedPercentageChange = evaluator.Evaluate(sample);
    56         if (updateTargetValues) {
    57           dataset.SetValue(sample, targetVariable, estimatedPercentageChange);
    58         }
     56       
    5957        if (!double.IsNaN(originalPercentageChange) && !double.IsInfinity(originalPercentageChange)) {
    6058          if (estimatedPercentageChange > 0) {
  • trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/StandardGPTimeSeriesPrognosis.cs

    r2566 r2577  
    4545    }
    4646
    47     public bool UseEstimatedTargetValue {
    48       get { return GetVariableInjector().GetVariable("UseEstimatedTargetValue").GetValue<BoolData>().Data; }
    49       set { GetVariableInjector().GetVariable("UseEstimatedTargetValue").GetValue<BoolData>().Data = value; }
    50     }
    51 
    5247    protected override IOperator CreateProblemInjector() {
    5348      return DefaultTimeSeriesOperators.CreateProblemInjector();
     
    7570      injector.AddVariable(new HeuristicLab.Core.Variable("MinTimeOffset", new IntData()));
    7671      injector.AddVariable(new HeuristicLab.Core.Variable("MaxTimeOffset", new IntData()));
    77       injector.AddVariable(new HeuristicLab.Core.Variable("UseEstimatedTargetValue", new BoolData()));
    7872      return injector;
    7973    }
Note: See TracChangeset for help on using the changeset viewer.