Changeset 2130
- Timestamp:
- 07/02/09 13:17:14 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 6 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs
r2119 r2130 167 167 algo.ProblemInjector.GetVariable("TestSamplesEnd").GetValue<IntData>().Data = problem.TestSamplesEnd; 168 168 ItemList<IntData> allowedFeatures = algo.ProblemInjector.GetVariable("AllowedFeatures").GetValue<ItemList<IntData>>(); 169 foreach (int inputVariable in inputVariables) allowedFeatures.Add(new IntData(inputVariable)); 169 foreach (int inputVariable in inputVariables) { 170 if (inputVariable != targetVariable) { 171 allowedFeatures.Add(new IntData(inputVariable)); 172 } 173 } 170 174 171 175 if (problem.LearningTask == LearningTask.TimeSeries) { … … 173 177 algo.ProblemInjector.GetVariable("MinTimeOffset").GetValue<IntData>().Data = problem.MinTimeOffset; 174 178 algo.ProblemInjector.GetVariable("MaxTimeOffset").GetValue<IntData>().Data = problem.MaxTimeOffset; 179 if (problem.AutoRegressive) { 180 allowedFeatures.Add(new IntData(targetVariable)); 181 } 175 182 } else if (problem.LearningTask == LearningTask.Classification) { 176 183 ItemList<DoubleData> classValues = algo.ProblemInjector.GetVariable("TargetClassValues").GetValue<ItemList<DoubleData>>(); -
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/HeuristicLab.GP.StructureIdentification.TimeSeries-3.3.csproj
r1908 r2130 85 85 <Compile Include="HeuristicLabGPTimeSeriesPlugin.cs" /> 86 86 <Compile Include="OffspringSelectionGP.cs" /> 87 <Compile Include="OffspringSelectionGpEditor.cs">88 <SubType>UserControl</SubType>89 </Compile>90 <Compile Include="OffspringSelectionGpEditor.Designer.cs">91 <DependentUpon>OffspringSelectionGpEditor.cs</DependentUpon>92 </Compile>93 87 <Compile Include="ProfitEvaluator.cs" /> 94 88 <Compile Include="Properties\AssemblyInfo.cs" /> 95 89 <Compile Include="StandardGP.cs" /> 96 <Compile Include="StandardGpEditor.cs">97 <SubType>UserControl</SubType>98 </Compile>99 <Compile Include="StandardGpEditor.Designer.cs">100 <DependentUpon>StandardGpEditor.cs</DependentUpon>101 </Compile>102 90 <Compile Include="TheilInequalityCoefficientEvaluator.cs" /> 103 91 </ItemGroup> … … 148 136 <None Include="Properties\AssemblyInfo.frame" /> 149 137 </ItemGroup> 150 <ItemGroup>151 <EmbeddedResource Include="OffspringSelectionGpEditor.resx">152 <DependentUpon>OffspringSelectionGpEditor.cs</DependentUpon>153 </EmbeddedResource>154 <EmbeddedResource Include="StandardGpEditor.resx">155 <DependentUpon>StandardGpEditor.cs</DependentUpon>156 </EmbeddedResource>157 </ItemGroup>158 138 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 159 139 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/OffspringSelectionGP.cs
r1857 r2130 35 35 namespace HeuristicLab.GP.StructureIdentification.TimeSeries { 36 36 public class OffspringSelectionGP : HeuristicLab.GP.StructureIdentification.OffspringSelectionGP, ITimeSeriesAlgorithm { 37 public virtual bool Autoregressive {38 get { return ProblemInjector.GetVariable("Autoregressive").GetValue<BoolData>().Data; }39 set { ProblemInjector.GetVariable("Autoregressive").GetValue<BoolData>().Data = value; }40 }41 42 37 protected override IOperator CreateFunctionLibraryInjector() { 43 38 return new FunctionLibraryInjector(); -
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/StandardGP.cs
r1857 r2130 35 35 namespace HeuristicLab.GP.StructureIdentification.TimeSeries { 36 36 public class StandardGP : HeuristicLab.GP.StructureIdentification.StandardGP, ITimeSeriesAlgorithm { 37 public bool Autoregressive {38 get { return ProblemInjector.GetVariable("Autoregressive").GetValue<BoolData>().Data; }39 set { ProblemInjector.GetVariable("Autoregressive").GetValue<BoolData>().Data = value; }40 }41 42 37 protected override IOperator CreateFunctionLibraryInjector() { 43 38 return new FunctionLibraryInjector(); -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/GPEvaluatorBase.cs
r2038 r2130 44 44 AddVariableInfo(new VariableInfo("SamplesStart", "Start index of samples in dataset to evaluate", typeof(IntData), VariableKind.In)); 45 45 AddVariableInfo(new VariableInfo("SamplesEnd", "End index of samples in dataset to evaluate", typeof(IntData), VariableKind.In)); 46 AddVariableInfo(new VariableInfo("UseEstimatedTargetValue", "Wether to use the original (measured) or the estimated (calculated) value for the targ at variable when doingautoregressive modelling", typeof(BoolData), VariableKind.In));46 AddVariableInfo(new VariableInfo("UseEstimatedTargetValue", "Wether to use the original (measured) or the estimated (calculated) value for the target variable for autoregressive modelling", typeof(BoolData), VariableKind.In)); 47 47 } 48 48 -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/FunctionLibraryInjector.cs
r1911 r2130 35 35 private const string TARGETVARIABLE = "TargetVariable"; 36 36 private const string ALLOWEDFEATURES = "AllowedFeatures"; 37 private const string AUTOREGRESSIVE = "Autoregressive";38 37 private const string MINTIMEOFFSET = "MinTimeOffset"; 39 38 private const string MAXTIMEOFFSET = "MaxTimeOffset"; … … 73 72 AddVariableInfo(new VariableInfo(TARGETVARIABLE, "The target variable", typeof(IntData), VariableKind.In)); 74 73 AddVariableInfo(new VariableInfo(ALLOWEDFEATURES, "List of indexes of allowed features", typeof(ItemList<IntData>), VariableKind.In)); 75 AddVariableInfo(new Core.VariableInfo(AUTOREGRESSIVE, "Switch to turn on/off autoregressive modeling (wether to allow the target variable as input)", typeof(BoolData), Core.VariableKind.In));76 74 AddVariableInfo(new Core.VariableInfo(MINTIMEOFFSET, "Minimal time offset for all features", typeof(IntData), Core.VariableKind.In)); 77 75 AddVariableInfo(new Core.VariableInfo(MAXTIMEOFFSET, "Maximal time offset for all feature", typeof(IntData), Core.VariableKind.In)); … … 123 121 IItem maxTimeOffsetItem = GetVariableValue(MAXTIMEOFFSET, scope, true, false); 124 122 int maxTimeOffset = maxTimeOffsetItem == null ? 0 : ((IntData)maxTimeOffsetItem).Data; 125 // try to get flag autoregressive (use false as default if not available)126 IItem autoRegItem = GetVariableValue(AUTOREGRESSIVE, scope, true, false);127 bool autoregressive = autoRegItem == null ? false : ((BoolData)autoRegItem).Data;128 129 if (autoregressive) {130 // make sure the target-variable occures in list of allowed features131 if (!allowedFeatures.Exists(d => d.Data == targetVariable)) allowedFeatures.Add(new IntData(targetVariable));132 } else {133 // remove the target-variable in case it occures in allowed features134 List<IntData> ts = allowedFeatures.FindAll(d => d.Data == targetVariable);135 foreach (IntData t in ts) allowedFeatures.Remove(t);136 }137 123 138 124 variable = new StructId.Variable(); -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/OffspringSelectionGP.cs
r1857 r2130 75 75 PopulationSize = 1000; 76 76 Parents = 20; 77 MaxEvaluatedSolutions = 1000000;78 SelectionPressureLimit = 300;77 MaxEvaluatedSolutions = 5000000; 78 SelectionPressureLimit = 400; 79 79 ComparisonFactor = 1.0; 80 80 SuccessRatioLimit = 1.0; -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGP.cs
r1922 r2130 99 99 : base() { 100 100 PopulationSize = 10000; 101 MaxGenerations = 100;101 MaxGenerations = 500; 102 102 TournamentSize = 7; 103 103 MutationRate = 0.15; -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.4/Evaluators/GPEvaluatorBase.cs
r1891 r2130 42 42 AddVariableInfo(new VariableInfo("SamplesStart", "Start index of samples in dataset to evaluate", typeof(IntData), VariableKind.In)); 43 43 AddVariableInfo(new VariableInfo("SamplesEnd", "End index of samples in dataset to evaluate", typeof(IntData), VariableKind.In)); 44 AddVariableInfo(new VariableInfo("UseEstimatedTargetValue", "Wether to use the original (measured) or the estimated (calculated) value for the targ at variable when doingautoregressive modelling", typeof(BoolData), VariableKind.In));44 AddVariableInfo(new VariableInfo("UseEstimatedTargetValue", "Wether to use the original (measured) or the estimated (calculated) value for the target variable for autoregressive modelling", typeof(BoolData), VariableKind.In)); 45 45 } 46 46 -
trunk/sources/HeuristicLab.Modeling/3.2/TimeSeriesProblemInjector.cs
r1856 r2130 39 39 public TimeSeriesProblemInjector() 40 40 : base() { 41 AddVariableInfo(new Core.VariableInfo("Autoregressive", "Autoregressive modelling includes previous values of the target variable to predict future values.", typeof(BoolData), Core.VariableKind.New));42 GetVariableInfo("Autoregressive").Local = true;43 AddVariable(new Core.Variable("Autoregressive", new BoolData()));44 45 41 AddVariableInfo(new Core.VariableInfo("MaxTimeOffset", "MaxTimeOffset", typeof(IntData), Core.VariableKind.New)); 46 42 GetVariableInfo("MaxTimeOffset").Local = true; -
trunk/sources/HeuristicLab.Modeling/3.3/TimeSeriesProblemInjector.cs
r1856 r2130 39 39 public TimeSeriesProblemInjector() 40 40 : base() { 41 AddVariableInfo(new Core.VariableInfo("Autoregressive", "Autoregressive modelling includes previous values of the target variable to predict future values.", typeof(BoolData), Core.VariableKind.New));42 GetVariableInfo("Autoregressive").Local = true;43 AddVariable(new Core.Variable("Autoregressive", new BoolData()));44 45 41 AddVariableInfo(new Core.VariableInfo("MaxTimeOffset", "MaxTimeOffset", typeof(IntData), Core.VariableKind.New)); 46 42 GetVariableInfo("MaxTimeOffset").Local = true;
Note: See TracChangeset
for help on using the changeset viewer.