Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/15/09 16:23:29 (15 years ago)
Author:
gkronber
Message:

Implemented #704 (Shuffling of training data (only) in (non-timeseries) modeling algorithms)

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

Legend:

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

    r2130 r2161  
    3535namespace HeuristicLab.GP.StructureIdentification.TimeSeries {
    3636  public class OffspringSelectionGP : HeuristicLab.GP.StructureIdentification.OffspringSelectionGP, ITimeSeriesAlgorithm {
     37    public override IOperator ProblemInjector {
     38      get {
     39        CombinedOperator algo = (CombinedOperator)Engine.OperatorGraph.InitialOperator;
     40        return algo.OperatorGraph.InitialOperator.SubOperators[1];
     41      }
     42      set {
     43        CombinedOperator algo = (CombinedOperator)Engine.OperatorGraph.InitialOperator;
     44        algo.OperatorGraph.InitialOperator.RemoveSubOperator(1);
     45        value.Name = "ProblemInjector";
     46        algo.OperatorGraph.InitialOperator.AddSubOperator(value, 1);
     47      }
     48    }
     49
    3750    protected override IOperator CreateFunctionLibraryInjector() {
    3851      return new FunctionLibraryInjector();
  • trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/StandardGP.cs

    r2130 r2161  
    3535namespace HeuristicLab.GP.StructureIdentification.TimeSeries {
    3636  public class StandardGP : HeuristicLab.GP.StructureIdentification.StandardGP, ITimeSeriesAlgorithm {
     37    public override IOperator ProblemInjector {
     38      get {
     39        CombinedOperator algo = (CombinedOperator)Engine.OperatorGraph.InitialOperator;
     40        return algo.OperatorGraph.InitialOperator.SubOperators[1];
     41      }
     42      set {
     43        CombinedOperator algo = (CombinedOperator)Engine.OperatorGraph.InitialOperator;
     44        algo.OperatorGraph.InitialOperator.RemoveSubOperator(1);
     45        value.Name = "ProblemInjector";
     46        algo.OperatorGraph.InitialOperator.AddSubOperator(value, 1);
     47      }
     48    }
     49   
    3750    protected override IOperator CreateFunctionLibraryInjector() {
    3851      return new FunctionLibraryInjector();
     
    6174        SequentialProcessor seq = new SequentialProcessor();
    6275        TheilInequalityCoefficientEvaluator trainingTheil = new TheilInequalityCoefficientEvaluator();
    63         trainingTheil.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart";
    64         trainingTheil.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";
     76        trainingTheil.GetVariableInfo("SamplesStart").ActualName = "ActualTrainingSamplesStart";
     77        trainingTheil.GetVariableInfo("SamplesEnd").ActualName = "ActualTrainingSamplesEnd";
    6578        trainingTheil.GetVariableInfo("TheilInequalityCoefficient").ActualName = "TrainingTheilInequalityCoefficient";
    6679        trainingTheil.GetVariableInfo("TheilInequalityCoefficientBias").ActualName = "TrainingTheilInequalityCoefficientBias";
     
    6982
    7083        TheilInequalityCoefficientEvaluator validationTheil = new TheilInequalityCoefficientEvaluator();
    71         validationTheil.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
    72         validationTheil.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
     84        validationTheil.GetVariableInfo("SamplesStart").ActualName = "ActualValidationSamplesStart";
     85        validationTheil.GetVariableInfo("SamplesEnd").ActualName = "ActualValidationSamplesEnd";
    7386        validationTheil.GetVariableInfo("TheilInequalityCoefficient").ActualName = "ValidationTheilInequalityCoefficient";
    7487        validationTheil.GetVariableInfo("TheilInequalityCoefficientBias").ActualName = "ValidationTheilInequalityCoefficientBias";
     
    7790
    7891        TheilInequalityCoefficientEvaluator testTheil = new TheilInequalityCoefficientEvaluator();
    79         testTheil.GetVariableInfo("SamplesStart").ActualName = "TestSamplesStart";
    80         testTheil.GetVariableInfo("SamplesEnd").ActualName = "TestSamplesEnd";
     92        testTheil.GetVariableInfo("SamplesStart").ActualName = "ActualTestSamplesStart";
     93        testTheil.GetVariableInfo("SamplesEnd").ActualName = "ActualTestSamplesEnd";
    8194        testTheil.GetVariableInfo("TheilInequalityCoefficient").ActualName = "TestTheilInequalityCoefficient";
    8295        testTheil.GetVariableInfo("TheilInequalityCoefficientBias").ActualName = "TestTheilInequalityCoefficientBias";
     
    8598
    8699        SimpleEvaluator trainingEvaluator = new SimpleEvaluator();
    87         trainingEvaluator.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart";
    88         trainingEvaluator.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";
     100        trainingEvaluator.GetVariableInfo("SamplesStart").ActualName = "ActualTrainingSamplesStart";
     101        trainingEvaluator.GetVariableInfo("SamplesEnd").ActualName = "ActualTrainingSamplesEnd";
    89102        trainingEvaluator.GetVariableInfo("Values").ActualName = "PredictedValuesTraining";
    90103
Note: See TracChangeset for help on using the changeset viewer.