Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/21/09 20:23:47 (15 years ago)
Author:
gkronber
Message:

Refactored CEDMA dispatcher and CEDMA server view to allow different modeling scenarios for each variable. #754

File:
1 edited

Legend:

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

    r2363 r2375  
    2121
    2222using System;
     23using System.Linq;
    2324using System.Collections.Generic;
    2425using HeuristicLab.Core;
     
    5455          return CreateGPModel();
    5556      }
     57    }
     58    public IEnumerable<int> AllowedVariables {
     59      get {
     60        ItemList<IntData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<IntData>>("AllowedFeatures", null, false);
     61        return allowedVariables.Select(x => x.Data);
     62      }
     63      set {
     64        ItemList<IntData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<IntData>>("AllowedFeatures", null, false);
     65        foreach (int x in value) allowedVariables.Add(new IntData(x));
     66      }
     67    }
     68
     69    public int TrainingSamplesStart {
     70      get { return ProblemInjector.GetVariableValue<IntData>("TrainingSamplesStart", null, false).Data; }
     71      set { ProblemInjector.GetVariableValue<IntData>("TrainingSamplesStart", null, false).Data = value; }
     72    }
     73
     74    public int TrainingSamplesEnd {
     75      get { return ProblemInjector.GetVariableValue<IntData>("TrainingSamplesEnd", null, false).Data; }
     76      set { ProblemInjector.GetVariableValue<IntData>("TrainingSamplesEnd", null, false).Data = value; }
     77    }
     78
     79    public int ValidationSamplesStart {
     80      get { return ProblemInjector.GetVariableValue<IntData>("ValidationSamplesStart", null, false).Data; }
     81      set { ProblemInjector.GetVariableValue<IntData>("ValidationSamplesStart", null, false).Data = value; }
     82    }
     83
     84    public int ValidationSamplesEnd {
     85      get { return ProblemInjector.GetVariableValue<IntData>("ValidationSamplesEnd", null, false).Data; }
     86      set { ProblemInjector.GetVariableValue<IntData>("ValidationSamplesEnd", null, false).Data = value; }
     87    }
     88
     89    public int TestSamplesStart {
     90      get { return ProblemInjector.GetVariableValue<IntData>("TestSamplesStart", null, false).Data; }
     91      set { ProblemInjector.GetVariableValue<IntData>("TestSamplesStart", null, false).Data = value; }
     92    }
     93
     94    public int TestSamplesEnd {
     95      get { return ProblemInjector.GetVariableValue<IntData>("TestSamplesEnd", null, false).Data; }
     96      set { ProblemInjector.GetVariableValue<IntData>("TestSamplesEnd", null, false).Data = value; }
    5697    }
    5798
Note: See TracChangeset for help on using the changeset viewer.