Changeset 7043
- Timestamp:
- 11/22/11 16:21:11 (13 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.Designer.cs
r6642 r7043 49 49 this.chart.TabIndex = 0; 50 50 this.chart.Text = "chart"; 51 this.chart.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDown); 51 52 // 52 53 // label1 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs
r6982 r7043 31 31 [Content(typeof(IRegressionSolution))] 32 32 public partial class RegressionSolutionErrorCharacteristicsCurveView : DataAnalysisSolutionEvaluationView { 33 private IRegressionSolution constantModel; 33 34 protected const string TrainingSamples = "Training"; 34 35 protected const string TestSamples = "Test"; … … 101 102 if (Content == null) return; 102 103 103 var originalValues = GetOriginalValues(); 104 var meanModelEstimatedValues = GetMeanModelEstimatedValues(originalValues); 104 var originalValues = GetOriginalValues().ToList(); 105 constantModel = CreateConstantModel(); 106 var meanModelEstimatedValues = GetEstimatedValues(constantModel); 105 107 var meanModelResiduals = GetResiduals(originalValues, meanModelEstimatedValues); 106 108 … … 113 115 UpdateSeries(meanModelResiduals, meanModelSeries); 114 116 meanModelSeries.ToolTip = "Area over Curve: " + CalculateAreaOverCurve(meanModelSeries); 117 meanModelSeries.Tag = constantModel; 115 118 chart.Series.Add(meanModelSeries); 116 119 … … 225 228 else UpdateChart(); 226 229 } 230 231 #region Mean Model 232 private void chart_MouseDown(object sender, MouseEventArgs e) { 233 if (e.Clicks < 2) return; 234 HitTestResult result = chart.HitTest(e.X, e.Y); 235 if (result.ChartElementType != ChartElementType.LegendItem) return; 236 if (result.Series.Name != constantModel.Name) return; 237 238 MainFormManager.MainForm.ShowContent((IRegressionSolution)result.Series.Tag); 239 } 240 241 private IRegressionSolution CreateConstantModel() { 242 double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).Average(); 243 var solution = new ConstantRegressionModel(averageTrainingTarget).CreateRegressionSolution(ProblemData); 244 solution.Name = "Mean Model"; 245 return solution; 246 } 247 #endregion 227 248 } 228 249 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
r6974 r7043 122 122 <Compile Include="Implementation\Clustering\ClusteringProblemData.cs" /> 123 123 <Compile Include="Implementation\Clustering\ClusteringSolution.cs" /> 124 <Compile Include="Implementation\Regression\ConstantRegressionModel.cs" /> 125 <Compile Include="Implementation\Regression\ConstantRegressionSolution.cs" /> 124 126 <Compile Include="Implementation\Regression\RegressionEnsembleProblemData.cs" /> 125 127 <Compile Include="Implementation\Regression\RegressionEnsembleModel.cs"> -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleProblemData.cs
r6672 r7043 43 43 44 44 private static readonly ClassificationEnsembleProblemData emptyProblemData; 45 public static ClassificationEnsembleProblemData EmptyProblemData {45 public static new ClassificationEnsembleProblemData EmptyProblemData { 46 46 get { return emptyProblemData; } 47 47 }
Note: See TracChangeset
for help on using the changeset viewer.