Changeset 12771 for branches/PerformanceComparison/HeuristicLab.Analysis
- Timestamp:
- 07/17/15 09:25:44 (9 years ago)
- Location:
- branches/PerformanceComparison/HeuristicLab.Analysis/3.3
- Files:
-
- 1 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.Analysis/3.3/HeuristicLab.Analysis-3.3.csproj
r12764 r12771 211 211 <Compile Include="Properties\AssemblyInfo.cs" /> 212 212 <Compile Include="QualityAnalysis\QualityDistributionAnalyzer.cs" /> 213 <Compile Include="QualityAnalysis\QualityVsEvaluationsAnalyzer.cs" /> 213 <Compile Include="QualityAnalysis\QualityPerClockAnalyzer.cs" /> 214 <Compile Include="QualityAnalysis\QualityPerEvaluationsAnalyzer.cs" /> 214 215 <Compile Include="QualityAnalysis\ScaledQualityDifferenceAnalyzer.cs" /> 215 216 <Compile Include="Statistics\BonferroniHolm.cs" /> -
branches/PerformanceComparison/HeuristicLab.Analysis/3.3/QualityAnalysis/QualityPerClockAnalyzer.cs
r12764 r12771 30 30 31 31 namespace HeuristicLab.Analysis { 32 [Item("Quality VsEvaluationsAnalyzer", @"Creates a plot of the solution quality with respect to the number of evaluated solutions.")]32 [Item("QualityPerClockAnalyzer", @"Creates a plot of the solution quality with respect to the elapsed wall-clock time.")] 33 33 [StorableClass] 34 public class Quality VsEvaluationsAnalyzer : SingleSuccessorOperator, IAnalyzer, ISingleObjectiveOperator {34 public class QualityPerClockAnalyzer : SingleSuccessorOperator, IAnalyzer, ISingleObjectiveOperator { 35 35 public virtual bool EnabledByDefault { 36 36 get { return false; } … … 40 40 get { return (ILookupParameter<DoubleValue>)Parameters["BestQuality"]; } 41 41 } 42 public ILookupParameter<IntValue> EvaluatedSolutionsParameter { 43 get { return (ILookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; } 42 43 public IResultParameter<TimeSpanValue> ExecutionTimeParameter { 44 get { return (IResultParameter<TimeSpanValue>)Parameters["Execution Time"]; } 44 45 } 45 public IResultParameter<IndexedDataTable<int>> QualityVsEvaluationsParameter { 46 get { return (IResultParameter<IndexedDataTable<int>>)Parameters["QualityVsEvaluations"]; } 46 47 public IResultParameter<IndexedDataTable<double>> QualityPerClockParameter { 48 get { return (IResultParameter<IndexedDataTable<double>>)Parameters["QualityPerClock"]; } 47 49 } 48 50 49 51 [StorableConstructor] 50 protected Quality VsEvaluationsAnalyzer(bool deserializing) : base(deserializing) { }51 protected Quality VsEvaluationsAnalyzer(QualityVsEvaluationsAnalyzer original, Cloner cloner) : base(original, cloner) { }52 public Quality VsEvaluationsAnalyzer()52 protected QualityPerClockAnalyzer(bool deserializing) : base(deserializing) { } 53 protected QualityPerClockAnalyzer(QualityPerClockAnalyzer original, Cloner cloner) : base(original, cloner) { } 54 public QualityPerClockAnalyzer() 53 55 : base() { 54 56 Parameters.Add(new LookupParameter<DoubleValue>("BestQuality", "The quality value that should be compared.")); 55 Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The quality value that should be compared.")); 56 Parameters.Add(new ResultParameter<IndexedDataTable<int>>("QualityVsEvaluations", "Data table containing the first hitting graph with evaluations as the x-axis.")); 57 QualityVsEvaluationsParameter.DefaultValue = new IndexedDataTable<int>("Quality vs Evaluations") { 58 Rows = { new IndexedDataRow<int>("First-hit Graph") { VisualProperties = { ChartType = DataRowVisualProperties.DataRowChartType.StepLine } } } 57 Parameters.Add(new ResultParameter<TimeSpanValue>("Execution Time", "The execution time.")); 58 Parameters.Add(new ResultParameter<IndexedDataTable<double>>("QualityPerClock", "Data table containing the first hitting graph with elapsed wall clock time (in seconds) as the x-axis.")); 59 QualityPerClockParameter.DefaultValue = new IndexedDataTable<double>("Quality per Clock") { 60 VisualProperties = { 61 XAxisTitle = "Elapsed time [s]", 62 YAxisTitle = "Quality" 63 }, 64 Rows = { new IndexedDataRow<double>("First-hit Graph") { VisualProperties = { 65 ChartType = DataRowVisualProperties.DataRowChartType.StepLine, 66 LineWidth = 3 67 } } } 59 68 }; 60 69 } 61 70 62 71 public override IDeepCloneable Clone(Cloner cloner) { 63 return new Quality VsEvaluationsAnalyzer(this, cloner);72 return new QualityPerClockAnalyzer(this, cloner); 64 73 } 65 74 66 75 public override IOperation Apply() { 76 var executionTime = Math.Max(ExecutionTimeParameter.ResultValue.Value.TotalSeconds, 0.001); 67 77 var bestQuality = BestQualityParameter.ActualValue.Value; 68 var evaluations = EvaluatedSolutionsParameter.ActualValue.Value;69 78 70 var dataTable = Quality VsEvaluationsParameter.ResultValue;71 dataTable.Rows["First-hit Graph"].Values.Add(Tuple.Create(e valuations, bestQuality));79 var dataTable = QualityPerClockParameter.ResultValue; 80 dataTable.Rows["First-hit Graph"].Values.Add(Tuple.Create(executionTime, bestQuality)); 72 81 73 82 return base.Apply(); -
branches/PerformanceComparison/HeuristicLab.Analysis/3.3/QualityAnalysis/QualityPerEvaluationsAnalyzer.cs
r12764 r12771 30 30 31 31 namespace HeuristicLab.Analysis { 32 [Item("Quality VsEvaluationsAnalyzer", @"Creates a plot of the solution quality with respect to the number of evaluated solutions.")]32 [Item("QualityPerEvaluationsAnalyzer", @"Creates a plot of the solution quality with respect to the number of evaluated solutions.")] 33 33 [StorableClass] 34 public class Quality VsEvaluationsAnalyzer : SingleSuccessorOperator, IAnalyzer, ISingleObjectiveOperator {34 public class QualityPerEvaluationsAnalyzer : SingleSuccessorOperator, IAnalyzer, ISingleObjectiveOperator { 35 35 public virtual bool EnabledByDefault { 36 36 get { return false; } … … 43 43 get { return (ILookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; } 44 44 } 45 public IResultParameter<IndexedDataTable< int>> QualityVsEvaluationsParameter {46 get { return (IResultParameter<IndexedDataTable< int>>)Parameters["QualityVsEvaluations"]; }45 public IResultParameter<IndexedDataTable<double>> QualityPerEvaluationsParameter { 46 get { return (IResultParameter<IndexedDataTable<double>>)Parameters["QualityPerEvaluations"]; } 47 47 } 48 48 49 49 [StorableConstructor] 50 protected Quality VsEvaluationsAnalyzer(bool deserializing) : base(deserializing) { }51 protected Quality VsEvaluationsAnalyzer(QualityVsEvaluationsAnalyzer original, Cloner cloner) : base(original, cloner) { }52 public Quality VsEvaluationsAnalyzer()50 protected QualityPerEvaluationsAnalyzer(bool deserializing) : base(deserializing) { } 51 protected QualityPerEvaluationsAnalyzer(QualityPerEvaluationsAnalyzer original, Cloner cloner) : base(original, cloner) { } 52 public QualityPerEvaluationsAnalyzer() 53 53 : base() { 54 54 Parameters.Add(new LookupParameter<DoubleValue>("BestQuality", "The quality value that should be compared.")); 55 55 Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The quality value that should be compared.")); 56 Parameters.Add(new ResultParameter<IndexedDataTable<int>>("QualityVsEvaluations", "Data table containing the first hitting graph with evaluations as the x-axis.")); 57 QualityVsEvaluationsParameter.DefaultValue = new IndexedDataTable<int>("Quality vs Evaluations") { 58 Rows = { new IndexedDataRow<int>("First-hit Graph") { VisualProperties = { ChartType = DataRowVisualProperties.DataRowChartType.StepLine } } } 56 Parameters.Add(new ResultParameter<IndexedDataTable<double>>("QualityPerEvaluations", "Data table containing the first hitting graph with evaluations as the x-axis.")); 57 QualityPerEvaluationsParameter.DefaultValue = new IndexedDataTable<double>("Quality per Evaluations") { 58 VisualProperties = { 59 XAxisTitle = "Evaluations", 60 YAxisTitle = "Quality" 61 }, 62 Rows = { new IndexedDataRow<double>("First-hit Graph") { VisualProperties = { 63 ChartType = DataRowVisualProperties.DataRowChartType.StepLine, 64 LineWidth = 3 65 } } } 59 66 }; 60 67 } 61 68 62 69 public override IDeepCloneable Clone(Cloner cloner) { 63 return new Quality VsEvaluationsAnalyzer(this, cloner);70 return new QualityPerEvaluationsAnalyzer(this, cloner); 64 71 } 65 72 66 73 public override IOperation Apply() { 67 74 var bestQuality = BestQualityParameter.ActualValue.Value; 68 var evaluations = EvaluatedSolutionsParameter.ActualValue.Value;75 var evaluations = Math.Max(EvaluatedSolutionsParameter.ActualValue.Value, 1); 69 76 70 var dataTable = Quality VsEvaluationsParameter.ResultValue;71 dataTable.Rows["First-hit Graph"].Values.Add(Tuple.Create( evaluations, bestQuality));77 var dataTable = QualityPerEvaluationsParameter.ResultValue; 78 dataTable.Rows["First-hit Graph"].Values.Add(Tuple.Create((double)evaluations, bestQuality)); 72 79 73 80 return base.Apply();
Note: See TracChangeset
for help on using the changeset viewer.