Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4394


Ignore:
Timestamp:
09/15/10 13:08:12 (14 years ago)
Author:
mkommend
Message:

updated classification views (ticket #939)

Location:
branches/HeuristicLab.Classification/HeuristicLab.Problems.DataAnalysis.Classfication.Views/3.3
Files:
2 added
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Classification/HeuristicLab.Problems.DataAnalysis.Classfication.Views/3.3/ConfusionMatrixView.Designer.cs

    r4367 r4394  
    4545      // cmbSamples
    4646      //
     47      this.cmbSamples.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    4748      this.cmbSamples.FormattingEnabled = true;
    4849      this.cmbSamples.Location = new System.Drawing.Point(56, 3);
  • branches/HeuristicLab.Classification/HeuristicLab.Problems.DataAnalysis.Classfication.Views/3.3/HeuristicLab.Problems.DataAnalysis.Classification.Views-3.3.csproj

    r4367 r4394  
    113113      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
    114114    </Reference>
    115     <Reference Include="HeuristicLab.Problems.DataAnalysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=AMD64" />
     115    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86" />
     116    <Reference Include="HeuristicLab.Problems.DataAnalysis.Regression-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86" />
    116117    <Reference Include="System" />
    117118    <Reference Include="System.Core" />
     
    133134    <Compile Include="HeuristicLabProblemsDataAnalysisClassificationViewsPlugin.cs" />
    134135    <Compile Include="Properties\AssemblyInfo.cs" />
     136    <Compile Include="RocCurvesView.cs">
     137      <SubType>UserControl</SubType>
     138    </Compile>
     139    <Compile Include="RocCurvesView.Designer.cs">
     140      <DependentUpon>RocCurvesView.cs</DependentUpon>
     141    </Compile>
    135142    <Compile Include="SymbolicClassificationSolutionView.cs">
    136143      <SubType>UserControl</SubType>
     
    146153  </ItemGroup>
    147154  <ItemGroup>
    148     <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Classification\3.3\HeuristicLab.Problems.DataAnalysis.Classification.csproj">
     155    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Classification\3.3\HeuristicLab.Problems.DataAnalysis.Classification-3.3.csproj">
    149156      <Project>{D35FD6DB-D704-4BEA-BDAE-C40ABFB5B13E}</Project>
    150       <Name>HeuristicLab.Problems.DataAnalysis.Classification</Name>
     157      <Name>HeuristicLab.Problems.DataAnalysis.Classification-3.3</Name>
    151158    </ProjectReference>
    152159  </ItemGroup>
  • branches/HeuristicLab.Classification/HeuristicLab.Problems.DataAnalysis.Classfication.Views/3.3/SymbolicClassificationSolutionView.cs

    r4367 r4394  
    2626using System.Windows.Forms;
    2727using System.Windows.Forms.DataVisualization.Charting;
     28using HeuristicLab.Common;
    2829using HeuristicLab.MainForm;
    2930using HeuristicLab.MainForm.WindowsForms;
     
    6970      CustomLabel trainingLabel = new CustomLabel();
    7071      trainingLabel.Text = TrainingLabelText;
    71       trainingLabel.GridTicks = GridTickTypes.TickMark;
    7272      trainingLabel.FromPosition = TrainingAxisValue - TrainingTestBorder;
    7373      trainingLabel.ToPosition = TrainingAxisValue + TrainingTestBorder;
     
    7676      CustomLabel testLabel = new CustomLabel();
    7777      testLabel.Text = TestLabelText;
    78       testLabel.GridTicks = GridTickTypes.TickMark;
    7978      testLabel.FromPosition = TestAxisValue - TrainingTestBorder;
    8079      testLabel.ToPosition = TestAxisValue + TrainingTestBorder;
     
    160159        row++;
    161160      }
     161      UpdateCursorInterval();
    162162    }
    163163
     
    245245      Content.Thresholds = thresholds;
    246246    }
     247
     248    private void UpdateCursorInterval() {
     249      Series series = chart.Series[0];
     250      double[] xValues = (from point in series.Points
     251                          where !point.IsEmpty
     252                          select point.XValue)
     253                    .DefaultIfEmpty(1.0)
     254                    .ToArray();
     255      double[] yValues = (from point in series.Points
     256                          where !point.IsEmpty
     257                          select point.YValues[0])
     258                    .DefaultIfEmpty(1.0)
     259                    .ToArray();
     260
     261      double xRange = xValues.Max() - xValues.Min();
     262      double yRange = yValues.Max() - yValues.Min();
     263      if (xRange.IsAlmost(0.0)) xRange = 1.0;
     264      if (yRange.IsAlmost(0.0)) yRange = 1.0;
     265      double xDigits = (int)Math.Log10(xRange) - 3;
     266      double yDigits = (int)Math.Log10(yRange) - 3;
     267      double xZoomInterval = Math.Pow(10, xDigits);
     268      double yZoomInterval = Math.Pow(10, yDigits);
     269      this.chart.ChartAreas[0].CursorX.Interval = xZoomInterval;
     270      this.chart.ChartAreas[0].CursorY.Interval = yZoomInterval;
     271    }
    247272  }
    248273}
Note: See TracChangeset for help on using the changeset viewer.