Changeset 11205 for branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs
- Timestamp:
- 07/18/14 13:44:53 (10 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- 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/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs
r11203 r11205 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic 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. … … 52 52 chart.ChartAreas[0].CursorX.Interval = 0.01; 53 53 54 chart.ChartAreas[0].AxisY.Title = " Number of Samples";54 chart.ChartAreas[0].AxisY.Title = "Ratio of Residuals"; 55 55 chart.ChartAreas[0].AxisY.Minimum = 0.0; 56 56 chart.ChartAreas[0].AxisY.Maximum = 1.0; … … 99 99 chart.Series.Clear(); 100 100 chart.Annotations.Clear(); 101 101 102 if (Content == null) return; 102 103 var constantModel = CreateConstantModel();104 var originalValues = GetOriginalValues().ToList(); 105 var baselineEstimatedValues = GetEstimatedValues(constantModel);106 var baselineResiduals = GetResiduals(originalValues, baselineEstimatedValues);107 108 baselineResiduals.Sort();109 chart.ChartAreas[0].AxisX.Maximum = Math.Ceiling(baselineResiduals.Last());110 chart.ChartAreas[0].CursorX.Interval = baselineResiduals.First() / 100; 111 112 Series baselineSeries = new Series("Baseline");113 baselineSeries.ChartType = SeriesChartType.FastLine;114 UpdateSeries(baselineResiduals,baselineSeries);115 baselineSeries.ToolTip = "Area over Curve: " + CalculateAreaOverCurve(baselineSeries);116 baselineSeries.Tag = constantModel;117 baselineSeries.LegendToolTip = "Double-click to open model";118 chart.Series.Add(baselineSeries);103 if (cmbSamples.SelectedItem.ToString() == TrainingSamples && !ProblemData.TrainingIndices.Any()) return; 104 if (cmbSamples.SelectedItem.ToString() == TestSamples && !ProblemData.TestIndices.Any()) return; 105 106 if (Content.ProblemData.TrainingIndices.Any()) { 107 var constantModel = CreateConstantModel(); 108 var originalValues = GetOriginalValues().ToList(); 109 var baselineEstimatedValues = GetEstimatedValues(constantModel); 110 var baselineResiduals = GetResiduals(originalValues, baselineEstimatedValues); 111 112 Series baselineSeries = new Series("Baseline"); 113 baselineSeries.ChartType = SeriesChartType.FastLine; 114 UpdateSeries(baselineResiduals, baselineSeries); 115 baselineSeries.ToolTip = "Area over Curve: " + CalculateAreaOverCurve(baselineSeries); 116 baselineSeries.Tag = constantModel; 117 baselineSeries.LegendToolTip = "Double-click to open model"; 118 chart.Series.Add(baselineSeries); 119 } 119 120 120 121 AddRegressionSolution(Content); … … 127 128 solutionSeries.Tag = solution; 128 129 solutionSeries.ChartType = SeriesChartType.FastLine; 129 var estimatedValues = GetResiduals(GetOriginalValues(), GetEstimatedValues(solution)); 130 UpdateSeries(estimatedValues, solutionSeries); 130 var residuals = GetResiduals(GetOriginalValues(), GetEstimatedValues(solution)); 131 132 chart.ChartAreas[0].AxisX.Maximum = Math.Ceiling(residuals.Max()); 133 chart.ChartAreas[0].CursorX.Interval = residuals.Min() / 100; 134 135 UpdateSeries(residuals, solutionSeries); 136 131 137 solutionSeries.ToolTip = "Area over Curve: " + CalculateAreaOverCurve(solutionSeries); 132 138 solutionSeries.LegendToolTip = "Double-click to open model"; … … 236 242 double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).Average(); 237 243 var model = new ConstantRegressionModel(averageTrainingTarget); 238 var solution = new ConstantRegressionSolution(model, (IRegressionProblemData)ProblemData.Clone());244 var solution = new ConstantRegressionSolution(model, (IRegressionProblemData)ProblemData.Clone()); 239 245 solution.Name = "Baseline"; 240 246 return solution;
Note: See TracChangeset
for help on using the changeset viewer.