Changeset 11594 for branches/Breadcrumbs/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer.cs
- Timestamp:
- 11/27/14 11:23:37 (10 years ago)
- Location:
- branches/Breadcrumbs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Breadcrumbs
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/Breadcrumbs/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
branches/Breadcrumbs/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer.cs
r9456 r11594 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 35 35 [Item("SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer", "An operator that analyzes the training best symbolic data analysis solution for single objective symbolic data analysis problems.")] 36 36 [StorableClass] 37 public abstract class SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer<T> : SymbolicDataAnalysisSingleObjectiveAnalyzer 37 public abstract class SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer<T> : SymbolicDataAnalysisSingleObjectiveAnalyzer, IIterationBasedOperator 38 38 39 where T : class, ISymbolicDataAnalysisSolution { 39 40 private const string TrainingBestSolutionParameterName = "Best training solution"; 40 41 private const string TrainingBestSolutionQualityParameterName = "Best training solution quality"; 42 private const string TrainingBestSolutionGenerationParameterName = "Best training solution generation"; 41 43 private const string UpdateAlwaysParameterName = "Always update best solution"; 44 private const string IterationsParameterName = "Iterations"; 45 private const string MaximumIterationsParameterName = "Maximum Iterations"; 42 46 43 47 #region parameter properties … … 48 52 get { return (ILookupParameter<DoubleValue>)Parameters[TrainingBestSolutionQualityParameterName]; } 49 53 } 54 public ILookupParameter<IntValue> TrainingBestSolutionGenerationParameter { 55 get { return (ILookupParameter<IntValue>)Parameters[TrainingBestSolutionGenerationParameterName]; } 56 } 50 57 public IFixedValueParameter<BoolValue> UpdateAlwaysParameter { 51 58 get { return (IFixedValueParameter<BoolValue>)Parameters[UpdateAlwaysParameterName]; } 59 } 60 public ILookupParameter<IntValue> IterationsParameter { 61 get { return (ILookupParameter<IntValue>)Parameters[IterationsParameterName]; } 62 } 63 public IValueLookupParameter<IntValue> MaximumIterationsParameter { 64 get { return (IValueLookupParameter<IntValue>)Parameters[MaximumIterationsParameterName]; } 52 65 } 53 66 #endregion … … 73 86 Parameters.Add(new LookupParameter<T>(TrainingBestSolutionParameterName, "The training best symbolic data analyis solution.")); 74 87 Parameters.Add(new LookupParameter<DoubleValue>(TrainingBestSolutionQualityParameterName, "The quality of the training best symbolic data analysis solution.")); 88 Parameters.Add(new LookupParameter<IntValue>(TrainingBestSolutionGenerationParameterName, "The generation in which the best training solution was found.")); 75 89 Parameters.Add(new FixedValueParameter<BoolValue>(UpdateAlwaysParameterName, "Determines if the best training solution should always be updated regardless of its quality.", new BoolValue(false))); 90 Parameters.Add(new LookupParameter<IntValue>(IterationsParameterName, "The number of performed iterations.")); 91 Parameters.Add(new ValueLookupParameter<IntValue>(MaximumIterationsParameterName, "The maximum number of performed iterations.") { Hidden = true }); 76 92 UpdateAlwaysParameter.Hidden = true; 77 93 } … … 83 99 UpdateAlwaysParameter.Hidden = true; 84 100 } 101 if (!Parameters.ContainsKey(TrainingBestSolutionGenerationParameterName)) 102 Parameters.Add(new LookupParameter<IntValue>(TrainingBestSolutionGenerationParameterName, "The generation in which the best training solution was found.")); 103 if (!Parameters.ContainsKey(IterationsParameterName)) 104 Parameters.Add(new LookupParameter<IntValue>(IterationsParameterName, "The number of performed iterations.")); 105 if (!Parameters.ContainsKey(MaximumIterationsParameterName)) 106 Parameters.Add(new ValueLookupParameter<IntValue>(MaximumIterationsParameterName, "The maximum number of performed iterations.") { Hidden = true }); 85 107 } 86 108 … … 104 126 TrainingBestSolution = CreateSolution(bestTree, bestQuality); 105 127 TrainingBestSolutionQuality = new DoubleValue(bestQuality); 128 if (IterationsParameter.ActualValue != null) 129 TrainingBestSolutionGenerationParameter.ActualValue = new IntValue(IterationsParameter.ActualValue.Value); 106 130 107 131 if (!results.ContainsKey(TrainingBestSolutionParameter.Name)) { 108 132 results.Add(new Result(TrainingBestSolutionParameter.Name, TrainingBestSolutionParameter.Description, TrainingBestSolution)); 109 133 results.Add(new Result(TrainingBestSolutionQualityParameter.Name, TrainingBestSolutionQualityParameter.Description, TrainingBestSolutionQuality)); 134 if (TrainingBestSolutionGenerationParameter.ActualValue != null) 135 results.Add(new Result(TrainingBestSolutionGenerationParameter.Name, TrainingBestSolutionGenerationParameter.Description, TrainingBestSolutionGenerationParameter.ActualValue)); 110 136 } else { 111 137 results[TrainingBestSolutionParameter.Name].Value = TrainingBestSolution; 112 138 results[TrainingBestSolutionQualityParameter.Name].Value = TrainingBestSolutionQuality; 139 if (TrainingBestSolutionGenerationParameter.ActualValue != null) 140 results[TrainingBestSolutionGenerationParameter.Name].Value = TrainingBestSolutionGenerationParameter.ActualValue; 141 113 142 } 114 143 }
Note: See TracChangeset
for help on using the changeset viewer.