Changeset 7866 for branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4
- Timestamp:
- 05/22/12 10:36:20 (12 years ago)
- Location:
- branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views
- Files:
-
- 2 deleted
- 7 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
-
branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs
r7562 r7866 57 57 matrixView.DataGridView.RowPrePaint += new DataGridViewRowPrePaintEventHandler(DataGridView_RowPrePaint); 58 58 } 59 60 61 59 62 60 private void SamplesComboBox_SelectedIndexChanged(object sender, EventArgs e) { -
branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
r7729 r7866 161 161 </Compile> 162 162 <Compile Include="Plugin.cs" /> 163 <Compile Include="Regression\RegressionEnsembleSolutionModelView.cs"> 164 <SubType>UserControl</SubType> 165 </Compile> 166 <Compile Include="Regression\RegressionEnsembleSolutionModelView.Designer.cs"> 167 <DependentUpon>RegressionEnsembleSolutionModelView.cs</DependentUpon> 168 </Compile> 163 169 <Compile Include="Regression\RegressionSolutionErrorCharacteristicsCurveView.cs"> 164 170 <SubType>UserControl</SubType> … … 167 173 <DependentUpon>RegressionSolutionErrorCharacteristicsCurveView.cs</DependentUpon> 168 174 </Compile> 169 <Compile Include="Regression\RegressionEnsembleSolutionModelView.cs"> 170 <SubType>UserControl</SubType> 171 </Compile> 172 <Compile Include="Regression\RegressionEnsembleSolutionModelView.Designer.cs"> 173 <DependentUpon>RegressionEnsembleSolutionModelView.cs</DependentUpon> 175 <Compile Include="Regression\RegressionSolutionEstimatedValuesView.cs"> 176 <SubType>UserControl</SubType> 177 </Compile> 178 <Compile Include="Regression\RegressionSolutionEstimatedValuesView.Designer.cs"> 179 <DependentUpon>RegressionSolutionEstimatedValuesView.cs</DependentUpon> 180 </Compile> 181 <Compile Include="Regression\RegressionSolutionLineChartView.cs"> 182 <SubType>UserControl</SubType> 183 </Compile> 184 <Compile Include="Regression\RegressionSolutionLineChartView.Designer.cs"> 185 <DependentUpon>RegressionSolutionLineChartView.cs</DependentUpon> 186 </Compile> 187 <Compile Include="Regression\RegressionSolutionResidualHistogram.cs"> 188 <SubType>UserControl</SubType> 189 </Compile> 190 <Compile Include="Regression\RegressionSolutionResidualHistogram.Designer.cs"> 191 <DependentUpon>RegressionSolutionResidualHistogram.cs</DependentUpon> 192 </Compile> 193 <Compile Include="Regression\RegressionSolutionScatterPlotView.cs"> 194 <SubType>UserControl</SubType> 195 </Compile> 196 <Compile Include="Regression\RegressionSolutionScatterPlotView.Designer.cs"> 197 <DependentUpon>RegressionSolutionScatterPlotView.cs</DependentUpon> 174 198 </Compile> 175 199 <Compile Include="Solution Views\ClassificationSolutionView.cs"> … … 265 289 <DependentUpon>RegressionSolutionView.cs</DependentUpon> 266 290 </Compile> 267 <Compile Include="Regression\RegressionSolutionEstimatedValuesView.cs">268 <SubType>UserControl</SubType>269 </Compile>270 <Compile Include="Regression\RegressionSolutionEstimatedValuesView.Designer.cs">271 <DependentUpon>RegressionSolutionEstimatedValuesView.cs</DependentUpon>272 </Compile>273 <Compile Include="Regression\RegressionSolutionLineChartView.cs">274 <SubType>UserControl</SubType>275 </Compile>276 <Compile Include="Regression\RegressionSolutionLineChartView.Designer.cs">277 <DependentUpon>RegressionSolutionLineChartView.cs</DependentUpon>278 </Compile>279 <Compile Include="Regression\RegressionSolutionScatterPlotView.cs">280 <SubType>UserControl</SubType>281 </Compile>282 <Compile Include="Regression\RegressionSolutionScatterPlotView.Designer.cs">283 <DependentUpon>RegressionSolutionScatterPlotView.cs</DependentUpon>284 </Compile>285 291 <None Include="HeuristicLab.snk" /> 286 292 <None Include="Plugin.cs.frame" /> 287 293 <None Include="Properties\AssemblyInfo.cs.frame" /> 288 <Compile Include="DataAnalysisProblemView.cs">289 <SubType>UserControl</SubType>290 </Compile>291 <Compile Include="DataAnalysisProblemView.Designer.cs">292 <DependentUpon>DataAnalysisProblemView.cs</DependentUpon>293 </Compile>294 294 <Compile Include="Properties\AssemblyInfo.cs" /> 295 295 </ItemGroup> … … 317 317 <Install>true</Install> 318 318 </BootstrapperPackage> 319 </ItemGroup> 320 <ItemGroup> 321 <Folder Include="obj\" /> 319 322 </ItemGroup> 320 323 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/MenuItems/CreateEnsembleMenuItem.cs
r7259 r7866 73 73 .First() 74 74 .ProblemData.Clone(); 75 var ensemble = new RegressionEnsembleSolution( Enumerable.Empty<IRegressionModel>(),problemData);75 var ensemble = new RegressionEnsembleSolution(problemData); 76 76 ensemble.Name = group.Key + " ensemble"; 77 77 var nestedSolutions = group.OfType<RegressionEnsembleSolution>().SelectMany(e => e.RegressionSolutions); -
branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.Designer.cs
r7043 r7866 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 this.chart.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.Chart_MouseDoubleClick); 52 this.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart_MouseMove); 52 53 // 53 54 // label1 -
branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs
r7259 r7866 27 27 using HeuristicLab.MainForm; 28 28 using HeuristicLab.MainForm.WindowsForms; 29 29 30 namespace HeuristicLab.Problems.DataAnalysis.Views { 30 31 [View("Error Characteristics Curve")] … … 104 105 var originalValues = GetOriginalValues().ToList(); 105 106 constantModel = CreateConstantModel(); 106 var meanModelEstimatedValues = GetEstimatedValues(constantModel);107 var meanModelResiduals = GetResiduals(originalValues, meanModelEstimatedValues);108 109 meanModelResiduals.Sort();110 chart.ChartAreas[0].AxisX.Maximum = Math.Ceiling( meanModelResiduals.Last());111 chart.ChartAreas[0].CursorX.Interval = meanModelResiduals.First() / 100;112 113 Series meanModelSeries = new Series("Mean Model");114 meanModelSeries.ChartType = SeriesChartType.FastLine;115 UpdateSeries( meanModelResiduals, meanModelSeries);116 meanModelSeries.ToolTip = "Area over Curve: " + CalculateAreaOverCurve(meanModelSeries);117 meanModelSeries.Tag = constantModel;118 chart.Series.Add( meanModelSeries);107 var baselineEstimatedValues = GetEstimatedValues(constantModel); 108 var baselineResiduals = GetResiduals(originalValues, baselineEstimatedValues); 109 110 baselineResiduals.Sort(); 111 chart.ChartAreas[0].AxisX.Maximum = Math.Ceiling(baselineResiduals.Last()); 112 chart.ChartAreas[0].CursorX.Interval = baselineResiduals.First() / 100; 113 114 Series baselineSeries = new Series("Baseline"); 115 baselineSeries.ChartType = SeriesChartType.FastLine; 116 UpdateSeries(baselineResiduals, baselineSeries); 117 baselineSeries.ToolTip = "Area over Curve: " + CalculateAreaOverCurve(baselineSeries); 118 baselineSeries.Tag = constantModel; 119 chart.Series.Add(baselineSeries); 119 120 120 121 AddRegressionSolution(Content); … … 200 201 } 201 202 202 protected IEnumerable<double> Get MeanModelEstimatedValues(IEnumerable<double> originalValues) {203 protected IEnumerable<double> GetbaselineEstimatedValues(IEnumerable<double> originalValues) { 203 204 double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).Average(); 204 205 return Enumerable.Repeat(averageTrainingTarget, originalValues.Count()); … … 229 230 } 230 231 231 #region Mean Model 232 private void chart_MouseDown(object sender, MouseEventArgs e) { 233 if (e.Clicks < 2) return; 232 #region Baseline 233 private void Chart_MouseDoubleClick(object sender, MouseEventArgs e) { 234 234 HitTestResult result = chart.HitTest(e.X, e.Y); 235 235 if (result.ChartElementType != ChartElementType.LegendItem) return; 236 if (result.Series.Name != constantModel.Name) return;237 236 238 237 MainFormManager.MainForm.ShowContent((IRegressionSolution)result.Series.Tag); … … 242 241 double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).Average(); 243 242 var solution = new ConstantRegressionModel(averageTrainingTarget).CreateRegressionSolution(ProblemData); 244 solution.Name = " Mean Model";243 solution.Name = "Baseline"; 245 244 return solution; 246 245 } 247 246 #endregion 247 248 private void chart_MouseMove(object sender, MouseEventArgs e) { 249 HitTestResult result = chart.HitTest(e.X, e.Y); 250 if (result.ChartElementType == ChartElementType.LegendItem) 251 Cursor = Cursors.Hand; 252 else 253 Cursor = Cursors.Default; 254 } 248 255 } 249 256 } -
branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationEnsembleSolutionView.cs
r7549 r7866 51 51 if (cmbWeightCalculator.Items.Count == 0) { 52 52 cmbWeightCalculator.Items.AddRange(ApplicationManager.Manager.GetInstances<IClassificationEnsembleSolutionWeightCalculator>().OrderBy(b => b.Name, new NaturalStringComparer()).ToArray()); 53 if (cmbWeightCalculator.Items.Count > 0) 53 if (cmbWeightCalculator.Items.Count > 0) { 54 54 cmbWeightCalculator.SelectedIndex = 0; 55 } 55 56 } else { 56 57 Content.WeightCalculator = (IClassificationEnsembleSolutionWeightCalculator)cmbWeightCalculator.SelectedItem; … … 59 60 60 61 protected void cmbWeightCalculator_SelectedIndexChanged(object sender, System.EventArgs e) { 61 if (cmbWeightCalculator.SelectedItem != null) 62 if (cmbWeightCalculator.SelectedItem != null) { 62 63 Content.WeightCalculator = (IClassificationEnsembleSolutionWeightCalculator)cmbWeightCalculator.SelectedItem; 64 } 63 65 } 64 66
Note: See TracChangeset
for help on using the changeset viewer.