Ignore:
Timestamp:
03/08/09 12:48:18 (11 years ago)
Author:
gkronber
Message:

Merged change sets from CEDMA branch to trunk:

File:
1 copied

Legend:

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

    r1245 r1287  
    3030using HeuristicLab.Data;
    3131using HeuristicLab.Operators;
     32using HeuristicLab.Logging;
    3233
    3334namespace HeuristicLab.GP.StructureIdentification.TimeSeries {
    3435  public class OffspringSelectionGP : HeuristicLab.GP.StructureIdentification.OffspringSelectionGP {
     36    public virtual bool Autoregressive {
     37      get { return ProblemInjector.GetVariable("Autoregressive").GetValue<BoolData>().Data; }
     38      set { ProblemInjector.GetVariable("Autoregressive").GetValue<BoolData>().Data = value; }
     39    }
     40
    3541    protected override IOperator CreateFunctionLibraryInjector() {
    3642      return new FunctionLibraryInjector();
    3743    }
    3844
     45    protected override IOperator CreateProblemInjector() {
     46      return new ProblemInjector();
     47    }
     48
    3949    protected override IOperator CreateBestSolutionProcessor() {
    4050      IOperator seq = base.CreateBestSolutionProcessor();
    41       TheilInequalityCoefficientEvaluator trainingTheil = new TheilInequalityCoefficientEvaluator();
    42       trainingTheil.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart";
    43       trainingTheil.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";
    44       trainingTheil.GetVariableInfo("TheilInequalityCoefficient").ActualName = "TrainingTheilInequalityCoefficient";
    45       trainingTheil.GetVariableInfo("TheilInequalityCoefficientBias").ActualName = "TrainingTheilInequalityCoefficientBias";
    46       trainingTheil.GetVariableInfo("TheilInequalityCoefficientVariance").ActualName = "TrainingTheilInequalityCoefficientVariance";
    47       trainingTheil.GetVariableInfo("TheilInequalityCoefficientCovariance").ActualName = "TrainingTheilInequalityCoefficientCovariance";
     51      seq.AddSubOperator(StandardGP.BestSolutionProcessor);
     52      return seq;
     53    }
    4854
    49       TheilInequalityCoefficientEvaluator validationTheil = new TheilInequalityCoefficientEvaluator();
    50       validationTheil.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
    51       validationTheil.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
    52       validationTheil.GetVariableInfo("TheilInequalityCoefficient").ActualName = "ValidationTheilInequalityCoefficient";
    53       validationTheil.GetVariableInfo("TheilInequalityCoefficientBias").ActualName = "ValidationTheilInequalityCoefficientBias";
    54       validationTheil.GetVariableInfo("TheilInequalityCoefficientVariance").ActualName = "ValidationTheilInequalityCoefficientVariance";
    55       validationTheil.GetVariableInfo("TheilInequalityCoefficientCovariance").ActualName = "ValidationTheilInequalityCoefficientCovariance";
     55    public override IEditor CreateEditor() {
     56      return new OffspringSelectionGpEditor(this);
     57    }
    5658
    57       TheilInequalityCoefficientEvaluator testTheil = new TheilInequalityCoefficientEvaluator();
    58       testTheil.GetVariableInfo("SamplesStart").ActualName = "TestSamplesStart";
    59       testTheil.GetVariableInfo("SamplesEnd").ActualName = "TestSamplesEnd";
    60       testTheil.GetVariableInfo("TheilInequalityCoefficient").ActualName = "TestTheilInequalityCoefficient";
    61       testTheil.GetVariableInfo("TheilInequalityCoefficientBias").ActualName = "TestTheilInequalityCoefficientBias";
    62       testTheil.GetVariableInfo("TheilInequalityCoefficientVariance").ActualName = "TestTheilInequalityCoefficientVariance";
    63       testTheil.GetVariableInfo("TheilInequalityCoefficientCovariance").ActualName = "TestTheilInequalityCoefficientCovariance";
    64 
    65       seq.AddSubOperator(trainingTheil);
    66       seq.AddSubOperator(validationTheil);
    67       seq.AddSubOperator(testTheil);
    68 
    69       return seq;
     59    public override IView CreateView() {
     60      return new OffspringSelectionGpEditor(this);
    7061    }
    7162  }
Note: See TracChangeset for help on using the changeset viewer.