Changeset 7850 for branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
- Timestamp:
- 05/21/12 10:30:41 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
r7726 r7850 32 32 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 33 33 using HeuristicLab.PluginInfrastructure; 34 using HeuristicLab.Problems.Instances; 34 35 35 36 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 36 37 [StorableClass] 37 public abstract class SymbolicDataAnalysisProblem<T, U, V> : HeuristicOptimizationProblem<U, V>, IDataAnalysisProblem<T>, ISymbolicDataAnalysisProblem, IStorableContent 38 public abstract class SymbolicDataAnalysisProblem<T, U, V> : HeuristicOptimizationProblem<U, V>, IDataAnalysisProblem<T>, ISymbolicDataAnalysisProblem, IStorableContent, 39 IProblemInstanceConsumer<T>, IProblemInstanceExporter<T> 38 40 where T : class, IDataAnalysisProblemData 39 41 where U : class, ISymbolicDataAnalysisEvaluator<T> … … 204 206 Operators.Add(new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer()); 205 207 Operators.Add(new SymbolicExpressionTreeLengthAnalyzer()); 208 Operators.Add(new GenerationalSlidingWindowAnalyzer<T>()); 206 209 ParameterizeOperators(); 207 210 } … … 318 321 op.EvaluatorParameter.ActualName = EvaluatorParameter.Name; 319 322 } 320 } 321 322 public abstract void ImportProblemDataFromFile(string fileName); 323 324 foreach (var op in operators.OfType<SlidingWindowAnalyzer<T>>()) { 325 op.FitnessCalculationPartitionParameter.ActualName = FitnessCalculationPartitionParameter.Name; 326 op.ProblemDataParameter.ActualName = ProblemDataParameter.Name; 327 328 var start = ProblemData.TrainingPartition.Start; 329 var end = ProblemData.TrainingPartition.End; 330 var size = (end - start) / 5; 331 op.SlidingWindowSize.Value = size; 332 op.SlidingWindowStepWidth.Value = size / 2; 333 } 334 } 335 336 #region Import & Export 337 public void Load(T data) { 338 Name = data.Name; 339 Description = data.Description; 340 ProblemData = data; 341 OnReset(); 342 } 343 344 public T Export() { 345 return ProblemData; 346 } 347 #endregion 323 348 } 324 349 }
Note: See TracChangeset
for help on using the changeset viewer.