Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/23/16 22:51:27 (8 years ago)
Author:
abeham
Message:

#2457:

  • Renamed remaining files from ExpertSystem to KnowledgeCenter
  • Added ability to scatter plot to display a regression line
  • Allowed to execute multiple instances at once and displaying either only final result or tracking result
  • Split runs in seeded runs and instance runs
Location:
branches/PerformanceComparison/HeuristicLab.Analysis.Views/3.3
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.Analysis.Views/3.3/HeuristicLab.Analysis.Views-3.3.csproj

    r12764 r13722  
    105105  </PropertyGroup>
    106106  <ItemGroup>
     107    <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     108      <SpecificVersion>False</SpecificVersion>
     109      <HintPath>..\..\..\..\trunk\sources\bin\ALGLIB-3.7.0.dll</HintPath>
     110      <Private>False</Private>
     111    </Reference>
    107112    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    108113      <SpecificVersion>False</SpecificVersion>
     
    309314    <EmbeddedResource Include="HeatMapView.resx">
    310315      <DependentUpon>HeatMapView.cs</DependentUpon>
     316    </EmbeddedResource>
     317    <EmbeddedResource Include="ScatterPlotDataRowVisualPropertiesControl.resx">
     318      <DependentUpon>ScatterPlotDataRowVisualPropertiesControl.cs</DependentUpon>
    311319    </EmbeddedResource>
    312320  </ItemGroup>
  • branches/PerformanceComparison/HeuristicLab.Analysis.Views/3.3/Plugin.cs.frame

    r13475 r13722  
    2828  [Plugin("HeuristicLab.Analysis.Views", "3.3.13.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Analysis.Views-3.3.dll", PluginFileType.Assembly)]
     30  [PluginDependency("HeuristicLab.ALGLIB", "3.7.0")]
    3031  [PluginDependency("HeuristicLab.Analysis", "3.3")]
    3132  [PluginDependency("HeuristicLab.Collections", "3.3")]
  • branches/PerformanceComparison/HeuristicLab.Analysis.Views/3.3/ScatterPlotDataRowVisualPropertiesControl.Designer.cs

    r12012 r13722  
    5656      this.label9 = new System.Windows.Forms.Label();
    5757      this.label7 = new System.Windows.Forms.Label();
     58      this.label4 = new System.Windows.Forms.Label();
     59      this.regressionLineCheckBox = new System.Windows.Forms.CheckBox();
    5860      ((System.ComponentModel.ISupportInitialize)(this.pointSizeNumericUpDown)).BeginInit();
    5961      this.SuspendLayout();
     
    171173      this.label7.Text = "&Visible in Legend:";
    172174      //
     175      // label4
     176      //
     177      this.label4.AutoSize = true;
     178      this.label4.Location = new System.Drawing.Point(3, 136);
     179      this.label4.Name = "label4";
     180      this.label4.Size = new System.Drawing.Size(86, 13);
     181      this.label4.TabIndex = 2;
     182      this.label4.Text = "&Regression Line:";
     183      //
     184      // regressionLineCheckBox
     185      //
     186      this.regressionLineCheckBox.AutoSize = true;
     187      this.regressionLineCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
     188      this.regressionLineCheckBox.Location = new System.Drawing.Point(99, 136);
     189      this.regressionLineCheckBox.Name = "regressionLineCheckBox";
     190      this.regressionLineCheckBox.Size = new System.Drawing.Size(15, 14);
     191      this.regressionLineCheckBox.TabIndex = 3;
     192      this.regressionLineCheckBox.UseVisualStyleBackColor = true;
     193      this.regressionLineCheckBox.CheckedChanged += new System.EventHandler(this.regressionLineCheckBox_CheckedChanged);
     194      //
    173195      // ScatterPlotDataRowVisualPropertiesControl
    174196      //
    175197      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    176198      this.Controls.Add(this.pointSizeNumericUpDown);
     199      this.Controls.Add(this.regressionLineCheckBox);
    177200      this.Controls.Add(this.isVisibleInLegendCheckBox);
    178201      this.Controls.Add(this.label9);
    179202      this.Controls.Add(this.label3);
     203      this.Controls.Add(this.label4);
    180204      this.Controls.Add(this.pointStyleComboBox);
    181205      this.Controls.Add(this.label7);
     
    185209      this.Controls.Add(this.colorButton);
    186210      this.Name = "ScatterPlotDataRowVisualPropertiesControl";
    187       this.Size = new System.Drawing.Size(342, 135);
     211      this.Size = new System.Drawing.Size(342, 157);
    188212      ((System.ComponentModel.ISupportInitialize)(this.pointSizeNumericUpDown)).EndInit();
    189213      this.ResumeLayout(false);
     
    205229    private System.Windows.Forms.Label label9;
    206230    private System.Windows.Forms.Label label3;
     231    private System.Windows.Forms.Label label4;
     232    private System.Windows.Forms.CheckBox regressionLineCheckBox;
    207233  }
    208234}
  • branches/PerformanceComparison/HeuristicLab.Analysis.Views/3.3/ScatterPlotDataRowVisualPropertiesControl.cs

    r12012 r13722  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
     22using HeuristicLab.MainForm;
    2223using System;
    2324using System.Drawing;
    2425using System.Windows.Forms;
    25 using HeuristicLab.MainForm;
    26 using HeuristicLab.MainForm.WindowsForms;
    2726
    2827namespace HeuristicLab.Analysis.Views {
     
    5756          pointSizeNumericUpDown.Value = 1;
    5857          displayNameTextBox.Text = String.Empty;
     58          regressionLineCheckBox.Checked = false;
    5959        } else {
    6060          displayNameTextBox.Text = Content.DisplayName;
     
    6969          pointSizeNumericUpDown.Value = Content.PointSize;
    7070          isVisibleInLegendCheckBox.Checked = Content.IsVisibleInLegend;
     71          regressionLineCheckBox.Checked = Content.ShowRegressionLine;
    7172        }
    7273      }
     
    8283      pointSizeNumericUpDown.Enabled = Content != null;
    8384      displayNameTextBox.Enabled = Content != null;
     85      regressionLineCheckBox.Enabled = Content != null;
    8486    }
    8587
     
    121123      }
    122124    }
     125
     126    private void regressionLineCheckBox_CheckedChanged(object sender, EventArgs e) {
     127      if (!SuppressEvents && Content != null) {
     128        Content.ShowRegressionLine = regressionLineCheckBox.Checked;
     129      }
     130    }
    123131    #endregion
    124132  }
  • branches/PerformanceComparison/HeuristicLab.Analysis.Views/3.3/ScatterPlotView.cs

    r12679 r13722  
    2020#endregion
    2121
     22using HeuristicLab.Collections;
     23using HeuristicLab.Common;
     24using HeuristicLab.Core.Views;
     25using HeuristicLab.MainForm;
    2226using System;
    2327using System.Collections.Generic;
     
    2630using System.Windows.Forms;
    2731using System.Windows.Forms.DataVisualization.Charting;
    28 using HeuristicLab.Collections;
    29 using HeuristicLab.Common;
    30 using HeuristicLab.Core.Views;
    31 using HeuristicLab.MainForm;
    3232
    3333namespace HeuristicLab.Analysis.Views {
     
    141141        DeregisterScatterPlotDataRowEvents(row);
    142142        Series series = chart.Series[row.Name];
     143        if (chart.Series.IsUniqueName(series.Name + ".lr"))
     144          chart.Series.Remove(chart.Series[series.Name + ".lr"]);
    143145        chart.Series.Remove(series);
    144146        if (invisibleSeries.Contains(series))
     
    460462
    461463    private void FillSeriesWithRowValues(Series series, ScatterPlotDataRow row) {
     464      if (row.VisualProperties.ShowRegressionLine) {
     465        var xs = row.Points.Select(p => p.X).ToArray();
     466        var xsMin = xs.Min();
     467        var xsMax = xs.Max();
     468        var ys = row.Points.Select(p => p.Y).ToArray();
     469        var corr = alglib.pearsoncorr2(xs, ys);
     470        var slope = corr * ys.StandardDeviation() / xs.StandardDeviation();
     471        if (!double.IsNaN(slope) && !double.IsInfinity(slope)) {
     472          var off = ys.Average() - slope * xs.Average();
     473
     474          Series lrSeries;
     475          if (chart.Series.IsUniqueName(series.Name + ".lr")) {
     476            lrSeries = new Series(series.Name + ".lr") {IsVisibleInLegend = false, ChartType = SeriesChartType.FastLine};
     477            chart.Series.Add(lrSeries);
     478          } else lrSeries = chart.Series[series.Name + ".lr"];
     479          lrSeries.Points.Clear();
     480          lrSeries.Points.AddXY(xsMin, slope * xsMin + off);
     481          lrSeries.Points.AddXY(xsMax, slope * xsMax + off);
     482        }
     483      } else if (!chart.Series.IsUniqueName(series.Name + ".lr"))
     484        chart.Series.Remove(chart.Series[series.Name + ".lr"]);
     485
    462486      for (int i = 0; i < row.Points.Count; i++) {
    463487        var value = row.Points[i];
Note: See TracChangeset for help on using the changeset viewer.