Changeset 8861
- Timestamp:
- 10/30/12 13:33:10 (12 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 added
- 6 edited
- 4 moved
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 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
r8833 r8861 164 164 <Compile Include="Interfaces\TimeSeriesPrognosis\ITimeSeriesPrognosisSolution.cs" /> 165 165 <Compile Include="OnlineCalculators\AutoCorrelationCalculator.cs" /> 166 <Compile Include="OnlineCalculators\DependencyCalculator\HoeffdingsDependenceCalculator.cs" /> 167 <Compile Include="OnlineCalculators\DependencyCalculator\PearsonsRDependenceCalculator.cs" /> 168 <Compile Include="OnlineCalculators\DependencyCalculator\PearsonsRSquaredDependenceCalculator.cs" /> 169 <Compile Include="OnlineCalculators\DependencyCalculator\SpearmansRankCorrelationCoefficientCalculator.cs" /> 166 170 <Compile Include="OnlineCalculators\OnlineBoundedMeanSquaredErrorCalculator.cs" /> 167 <Compile Include="OnlineCalculators\HoeffdingsDependenceCalculator.cs" />168 171 <Compile Include="OnlineCalculators\OnlineDirectionalSymmetryCalculator.cs" /> 169 172 <Compile Include="OnlineCalculators\OnlineMaxAbsoluteErrorCalculator.cs" /> … … 207 210 <Compile Include="OnlineCalculators\OnlineTheilsUStatisticCalculator.cs" /> 208 211 <Compile Include="OnlineCalculators\OnlineWeightedDirectionalSymmetryCalculator.cs" /> 209 <Compile Include="OnlineCalculators\PearsonsRDependenceCalculator.cs" />210 <Compile Include="OnlineCalculators\PearsonsRSquaredDependenceCalculator.cs" />211 <Compile Include="OnlineCalculators\SpearmansRankCorrelationCoefficientCalculator.cs" />212 212 <Compile Include="Plugin.cs" /> 213 213 <Compile Include="Implementation\Classification\ThresholdCalculators\AccuracyMaximizationThresholdCalculator.cs" /> -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDependencyCalculator.cs
r8833 r8861 21 21 22 22 using System.Collections.Generic; 23 using HeuristicLab.Data;24 23 25 24 namespace HeuristicLab.Problems.DataAnalysis { 26 25 public interface IDependencyCalculator { 27 DoubleRange Interval { get; } 26 double Maximum { get; } 27 double Minimum { get; } 28 28 string Name { get; } 29 29 -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/DependencyCalculator/HoeffdingsDependenceCalculator.cs
r8853 r8861 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Data;26 25 27 26 namespace HeuristicLab.Problems.DataAnalysis { 28 27 public class HoeffdingsDependenceCalculator : IDependencyCalculator { 29 28 30 public DoubleRange Interval { get { return new DoubleRange(1.0, -0.5); } } 29 public double Maximum { get { return 1.0; } } 30 31 public double Minimum { get { return -0.5; } } 31 32 32 33 public string Name { get { return "Hoeffdings Dependence"; } } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/DependencyCalculator/PearsonsRDependenceCalculator.cs
r8853 r8861 22 22 using System; 23 23 using System.Collections.Generic; 24 using HeuristicLab.Data;25 24 26 25 namespace HeuristicLab.Problems.DataAnalysis { 27 26 public class PearsonsRDependenceCalculator : IDependencyCalculator { 28 27 29 public DoubleRange Interval { get { return new DoubleRange(1.0, -1.0); } } 28 public double Maximum { get { return 1.0; } } 29 30 public double Minimum { get { return -1.0; } } 30 31 31 32 public string Name { get { return "Pearsons R"; } } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/DependencyCalculator/PearsonsRSquaredDependenceCalculator.cs
r8853 r8861 21 21 22 22 using System.Collections.Generic; 23 using HeuristicLab.Data;24 23 25 24 namespace HeuristicLab.Problems.DataAnalysis { 26 25 public class PearsonsRSquaredDependenceCalculator : IDependencyCalculator { 27 26 28 public DoubleRange Interval { get { return new DoubleRange(1.0, 0.0); } } 27 public double Maximum { get { return 1.0; } } 28 29 public double Minimum { get { return 0.0; } } 29 30 30 31 public string Name { get { return "Pearsons R Squared"; } } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/DependencyCalculator/SpearmansRankCorrelationCoefficientCalculator.cs
r8853 r8861 22 22 using System.Collections.Generic; 23 23 using System.Linq; 24 using HeuristicLab.Data;25 24 26 25 namespace HeuristicLab.Problems.DataAnalysis { 27 26 public class SpearmansRankCorrelationCoefficientCalculator : IDependencyCalculator { 28 27 29 public DoubleRange Interval { get { return new DoubleRange(1.0, -1.0); } } 28 public double Maximum { get { return 1.0; } } 29 30 public double Minimum { get { return -1.0; } } 30 31 31 32 public string Name { get { return "Spearmans Rank"; } }
Note: See TracChangeset
for help on using the changeset viewer.