Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7771


Ignore:
Timestamp:
04/30/12 13:09:15 (13 years ago)
Author:
sforsten
Message:

#1784: merged everything from trunk revision 7770 to branch ProblemInstancesRegressionAndClassification

Location:
branches/ProblemInstancesRegressionAndClassification
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Optimization.Views

  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Optimization.Views/3.3/RunView.cs

    r7259 r7771  
    4444    }
    4545
    46     public override bool ReadOnly {
    47       get { return true; }
    48       set { /*not needed because runs are always readonly */}
    49     }
    50 
    5146    /// <summary>
    5247    /// Initializes a new instance of <see cref="VariableView"/> with caption "Variable".
     
    8378      listView.Enabled = Content != null;
    8479      detailsGroupBox.Enabled = (Content != null) && (listView.SelectedItems.Count == 1);
    85       viewHost.Enabled = Content != null;
    86       viewHost.ReadOnly = ReadOnly;
    8780      changeColorButton.Enabled = Content != null;
    8881      showAlgorithmButton.Enabled = Content != null && Content.Algorithm != null && !Locked;
     82    }
     83
     84    protected override void PropagateStateChanges(Control control, Type type, System.Reflection.PropertyInfo propertyInfo) {
     85      if (propertyInfo.Name == "ReadOnly") return;
     86      base.PropagateStateChanges(control, type, propertyInfo);
    8987    }
    9088
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Views

  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Views/3.4/MenuItems/CreateEnsembleMenuItem.cs

    r7259 r7771  
    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/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.Designer.cs

    r7043 r7771  
    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/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs

    r7259 r7771  
    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/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances

  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.TSPLIB.Views

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances/3.3/HeuristicLab.Problems.Instances-3.3.csproj

    r7759 r7771  
    1818    <DebugType>full</DebugType>
    1919    <Optimize>false</Optimize>
    20     <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     20    <OutputPath>..\..\bin\</OutputPath>
    2121    <DefineConstants>DEBUG;TRACE</DefineConstants>
    2222    <ErrorReport>prompt</ErrorReport>
     
    2626    <DebugType>pdbonly</DebugType>
    2727    <Optimize>true</Optimize>
    28     <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     28    <OutputPath>..\..\bin\</OutputPath>
    2929    <DefineConstants>TRACE</DefineConstants>
    3030    <ErrorReport>prompt</ErrorReport>
     
    4343    <DebugType>full</DebugType>
    4444    <PlatformTarget>x64</PlatformTarget>
    45     <CodeAnalysisLogFile>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
     45    <CodeAnalysisLogFile>..\..\bin\HeuristicLab.Problems.Instances-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
    4646    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    4747    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
     
    6060    <DebugType>pdbonly</DebugType>
    6161    <PlatformTarget>x64</PlatformTarget>
    62     <CodeAnalysisLogFile>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
     62    <CodeAnalysisLogFile>..\..\bin\HeuristicLab.Problems.Instances-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
    6363    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    6464    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
     
    7777    <DebugType>full</DebugType>
    7878    <PlatformTarget>x86</PlatformTarget>
    79     <CodeAnalysisLogFile>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
     79    <CodeAnalysisLogFile>..\..\bin\HeuristicLab.Problems.Instances-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
    8080    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    8181    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
     
    9494    <DebugType>pdbonly</DebugType>
    9595    <PlatformTarget>x86</PlatformTarget>
    96     <CodeAnalysisLogFile>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
     96    <CodeAnalysisLogFile>..\..\bin\HeuristicLab.Problems.Instances-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
    9797    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    9898    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.QuadraticAssignment.Views

  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QAPVisualizationControl.cs

    r7416 r7771  
    308308        using (Graphics graphics = Graphics.FromImage(newBitmap)) {
    309309          graphics.Clear(Color.White);
    310           graphics.DrawString("Showing locations spaced out according to their distances", Font, Brushes.Black, 5, 2);
     310          graphics.DrawString("Showing locations layed out according to their distances", Font, Brushes.Black, 5, 2);
    311311
    312312          for (int i = 0; i < coordinates.Rows - 1; i++) {
     
    402402        using (Graphics graphics = Graphics.FromImage(newBitmap)) {
    403403          graphics.Clear(Color.White);
    404           graphics.DrawString("Showing facilities spaced out according to their weights", Font, Brushes.Black, 5, 2);
     404          graphics.DrawString("Showing facilities layed out according to their weights", Font, Brushes.Black, 5, 2);
    405405
    406406          for (int i = 0; i < coordinates.Rows - 1; i++) {
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.TravelingSalesman.Views

    • Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset for help on using the changeset viewer.