- Timestamp:
- 10/30/12 13:33:10 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.cs
r8833 r8861 23 23 using System.Linq; 24 24 using System.Windows.Forms; 25 using HeuristicLab. Analysis;25 using HeuristicLab.Data; 26 26 using HeuristicLab.MainForm; 27 27 using HeuristicLab.MainForm.WindowsForms; … … 33 33 public abstract partial class AbstractFeatureCorrelationView : AsynchronousContentView { 34 34 protected FeatureCorrelationCalculator fcc; 35 protected HeatMapcurrentCorrelation;35 protected DoubleMatrix currentCorrelation; 36 36 37 37 public new DataAnalysisProblemData Content { … … 72 72 CalculateCorrelation(); 73 73 } else { 74 dataView.Maximum = 0; 75 dataView.Minimum = 0; 74 76 dataView.Content = null; 75 77 dataView.ResetVisibility(); … … 98 100 99 101 protected void UpdateDataView() { 100 maximumLabel.Text = currentCorrelation.Maximum.ToString(); 101 minimumLabel.Text = currentCorrelation.Minimum.ToString(); 102 IDependencyCalculator calc = (IDependencyCalculator)CorrelationCalcComboBox.SelectedValue; 103 maximumLabel.Text = calc.Maximum.ToString(); 104 minimumLabel.Text = calc.Minimum.ToString(); 102 105 103 106 currentCorrelation.SortableView = true; 107 dataView.Maximum = calc.Maximum; 108 dataView.Minimum = calc.Minimum; 104 109 dataView.Content = currentCorrelation; 105 110 dataView.Enabled = true; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/EnhancedStringConvertibleMatrixView.cs
r8833 r8861 25 25 using System.Linq; 26 26 using System.Windows.Forms; 27 using HeuristicLab.Analysis;28 27 using HeuristicLab.Common; 28 using HeuristicLab.Data; 29 29 using HeuristicLab.Data.Views; 30 30 … … 39 39 public IEnumerable<bool> RowVisibility { set { rowVisibility = value; } } 40 40 41 public new HeatMap Content { 42 get { return (HeatMap)base.Content; } 41 public double Maximum { get; set; } 42 public double Minimum { get; set; } 43 44 public new DoubleMatrix Content { 45 get { return (DoubleMatrix)base.Content; } 43 46 set { base.Content = value; } 44 47 } … … 94 97 95 98 int rowIndex = virtualRowIndices[e.RowIndex]; 96 Color backColor = GetDataPointColor(Content[rowIndex, e.ColumnIndex], Content.Minimum, Content.Maximum);99 Color backColor = GetDataPointColor(Content[rowIndex, e.ColumnIndex], Minimum, Maximum); 97 100 using (Brush backColorBrush = new SolidBrush(backColor)) { 98 101 e.Graphics.FillRectangle(backColorBrush, e.CellBounds); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.cs
r8833 r8861 23 23 using System.Collections.Generic; 24 24 using System.Windows.Forms; 25 using HeuristicLab.Analysis;26 25 using HeuristicLab.Data; 27 26 using HeuristicLab.MainForm; … … 61 60 } else { 62 61 fcc.TryCancelCalculation(); 63 SetNewCorrelation(corr , calc);62 SetNewCorrelation(corr); 64 63 UpdateDataView(); 65 64 } … … 67 66 } 68 67 69 private void SetNewCorrelation(double[,] elements, IDependencyCalculator calc) { 70 DoubleRange range = calc.Interval; 71 HeatMap hm = new HeatMap(elements, "", range.End, range.Start); 72 hm.RowNames = Content.Dataset.DoubleVariables; 73 hm.ColumnNames = Content.Dataset.DoubleVariables; 74 currentCorrelation = hm; 68 private void SetNewCorrelation(double[,] elements) { 69 currentCorrelation = new DoubleMatrix(elements, 70 Content.Dataset.DoubleVariables, 71 Content.Dataset.DoubleVariables); 75 72 } 76 73 … … 80 77 } else { 81 78 correlationCache.SetCorrelation(e.Calculcator, e.Partition, e.Correlation); 82 SetNewCorrelation(e.Correlation , e.Calculcator);79 SetNewCorrelation(e.Correlation); 83 80 UpdateDataView(); 84 81 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.cs
r8833 r8861 24 24 using System.Linq; 25 25 using System.Windows.Forms; 26 using HeuristicLab.Analysis;27 26 using HeuristicLab.Data; 28 27 using HeuristicLab.MainForm; … … 101 100 Array.Copy(elements, i * elements.GetLength(1), neededValues, i * neededValues.GetLength(1), frames + 1); 102 101 } 103 SetNewCorrelation(neededValues , calc);102 SetNewCorrelation(neededValues); 104 103 } 105 104 106 private void SetNewCorrelation(double[,] elements, IDependencyCalculator calc) { 107 DoubleRange range = calc.Interval; 108 HeatMap hm = new HeatMap(elements, "", range.End, range.Start); 109 hm.RowNames = Content.Dataset.DoubleVariables; 110 hm.ColumnNames = Enumerable.Range(0, elements.GetLength(1)).Select(x => x.ToString()); 111 currentCorrelation = hm; 105 private void SetNewCorrelation(double[,] elements) { 106 currentCorrelation = new DoubleMatrix(elements, 107 Enumerable.Range(0, elements.GetLength(1)).Select(x => x.ToString()), 108 Content.Dataset.DoubleVariables); 112 109 } 113 110 … … 117 114 } else { 118 115 correlationTimeframCache.SetTimeframeCorrelation(e.Calculcator, e.Partition, e.Variable, e.Correlation); 119 SetNewCorrelation(e.Correlation , e.Calculcator);116 SetNewCorrelation(e.Correlation); 120 117 UpdateDataView(); 121 118 }
Note: See TracChangeset
for help on using the changeset viewer.