Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/22/12 10:36:20 (12 years ago)
Author:
sforsten
Message:

#1776:

  • merged r7454:7863 trunk into branch to make it compatible again
  • adjusted GetConfidence of MajorityVoteWeightCalculator to be in an interval of [0, 1]
Location:
branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views
Files:
2 deleted
7 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views

  • branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs

    r7562 r7866  
    5757      matrixView.DataGridView.RowPrePaint += new DataGridViewRowPrePaintEventHandler(DataGridView_RowPrePaint);
    5858    }
    59 
    60 
    6159
    6260    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  
    161161    </Compile>
    162162    <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>
    163169    <Compile Include="Regression\RegressionSolutionErrorCharacteristicsCurveView.cs">
    164170      <SubType>UserControl</SubType>
     
    167173      <DependentUpon>RegressionSolutionErrorCharacteristicsCurveView.cs</DependentUpon>
    168174    </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>
    174198    </Compile>
    175199    <Compile Include="Solution Views\ClassificationSolutionView.cs">
     
    265289      <DependentUpon>RegressionSolutionView.cs</DependentUpon>
    266290    </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>
    285291    <None Include="HeuristicLab.snk" />
    286292    <None Include="Plugin.cs.frame" />
    287293    <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>
    294294    <Compile Include="Properties\AssemblyInfo.cs" />
    295295  </ItemGroup>
     
    317317      <Install>true</Install>
    318318    </BootstrapperPackage>
     319  </ItemGroup>
     320  <ItemGroup>
     321    <Folder Include="obj\" />
    319322  </ItemGroup>
    320323  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/MenuItems/CreateEnsembleMenuItem.cs

    r7259 r7866  
    7373              .First()
    7474              .ProblemData.Clone();
    75             var ensemble = new RegressionEnsembleSolution(Enumerable.Empty<IRegressionModel>(), problemData);
     75            var ensemble = new RegressionEnsembleSolution(problemData);
    7676            ensemble.Name = group.Key + " ensemble";
    7777            var nestedSolutions = group.OfType<RegressionEnsembleSolution>().SelectMany(e => e.RegressionSolutions);
  • branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.Designer.cs

    r7043 r7866  
    4949      this.chart.TabIndex = 0;
    5050      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);
    5253      //
    5354      // label1
  • branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs

    r7259 r7866  
    2727using HeuristicLab.MainForm;
    2828using HeuristicLab.MainForm.WindowsForms;
     29
    2930namespace HeuristicLab.Problems.DataAnalysis.Views {
    3031  [View("Error Characteristics Curve")]
     
    104105      var originalValues = GetOriginalValues().ToList();
    105106      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);
    119120
    120121      AddRegressionSolution(Content);
     
    200201    }
    201202
    202     protected IEnumerable<double> GetMeanModelEstimatedValues(IEnumerable<double> originalValues) {
     203    protected IEnumerable<double> GetbaselineEstimatedValues(IEnumerable<double> originalValues) {
    203204      double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).Average();
    204205      return Enumerable.Repeat(averageTrainingTarget, originalValues.Count());
     
    229230    }
    230231
    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) {
    234234      HitTestResult result = chart.HitTest(e.X, e.Y);
    235235      if (result.ChartElementType != ChartElementType.LegendItem) return;
    236       if (result.Series.Name != constantModel.Name) return;
    237236
    238237      MainFormManager.MainForm.ShowContent((IRegressionSolution)result.Series.Tag);
     
    242241      double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).Average();
    243242      var solution = new ConstantRegressionModel(averageTrainingTarget).CreateRegressionSolution(ProblemData);
    244       solution.Name = "Mean Model";
     243      solution.Name = "Baseline";
    245244      return solution;
    246245    }
    247246    #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    }
    248255  }
    249256}
  • branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationEnsembleSolutionView.cs

    r7549 r7866  
    5151      if (cmbWeightCalculator.Items.Count == 0) {
    5252        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) {
    5454          cmbWeightCalculator.SelectedIndex = 0;
     55        }
    5556      } else {
    5657        Content.WeightCalculator = (IClassificationEnsembleSolutionWeightCalculator)cmbWeightCalculator.SelectedItem;
     
    5960
    6061    protected void cmbWeightCalculator_SelectedIndexChanged(object sender, System.EventArgs e) {
    61       if (cmbWeightCalculator.SelectedItem != null)
     62      if (cmbWeightCalculator.SelectedItem != null) {
    6263        Content.WeightCalculator = (IClassificationEnsembleSolutionWeightCalculator)cmbWeightCalculator.SelectedItem;
     64      }
    6365    }
    6466
Note: See TracChangeset for help on using the changeset viewer.