Changeset 2375 for trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/OffspringSelectionGPRegression.cs
- Timestamp:
- 09/21/09 20:23:47 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/OffspringSelectionGPRegression.cs
r2363 r2375 21 21 22 22 using System; 23 using System.Linq; 23 24 using System.Collections.Generic; 24 25 using HeuristicLab.Core; … … 54 55 return CreateGPModel(); 55 56 } 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; } 56 97 } 57 98
Note: See TracChangeset
for help on using the changeset viewer.