Changeset 11203 for branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs
- Timestamp:
- 07/18/14 12:35:00 (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.dll11 10 HeuristicLab 3.3.5.1.ReSharper.user 12 11 HeuristicLab 3.3.6.0.ReSharper.user 13 12 HeuristicLab.4.5.resharper.user 14 13 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development16 14 HeuristicLab.resharper.user 17 15 ProtoGen.exe … … 19 17 _ReSharper.HeuristicLab 20 18 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests22 19 _ReSharper.HeuristicLab.ExtLibs 23 20 bin 24 21 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests 23 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
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 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 = " Ratio of Residuals";54 chart.ChartAreas[0].AxisY.Title = "Number of Samples"; 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 102 101 if (Content == null) return; 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 }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); 120 119 121 120 AddRegressionSolution(Content); … … 128 127 solutionSeries.Tag = solution; 129 128 solutionSeries.ChartType = SeriesChartType.FastLine; 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 129 var estimatedValues = GetResiduals(GetOriginalValues(), GetEstimatedValues(solution)); 130 UpdateSeries(estimatedValues, solutionSeries); 137 131 solutionSeries.ToolTip = "Area over Curve: " + CalculateAreaOverCurve(solutionSeries); 138 132 solutionSeries.LegendToolTip = "Double-click to open model"; … … 242 236 double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).Average(); 243 237 var model = new ConstantRegressionModel(averageTrainingTarget); 244 var solution = new ConstantRegressionSolution(model, 238 var solution = new ConstantRegressionSolution(model,(IRegressionProblemData)ProblemData.Clone()); 245 239 solution.Name = "Baseline"; 246 240 return solution;
Note: See TracChangeset
for help on using the changeset viewer.