- Timestamp:
- 05/28/14 15:09:26 (10 years ago)
- Location:
- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3
- Files:
-
- 6 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj
r10882 r10908 81 81 <Compile Include="Implementations\PreprocessingDataTable.cs" /> 82 82 <Compile Include="Interfaces\IFilteredPreprocessingData.cs" /> 83 <Compile Include="Implementations\CorrelationMatrixContent.cs" /> 83 84 <Compile Include="PreprocessingTransformator.cs" /> 84 85 <Compile Include="Utils\DataPreprocessingChangedEvent.cs" /> -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs
r10882 r10908 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 33 33 public class ChartLogic : IChartLogic { 34 34 private const int MAX_DISTINCT_VALUES_FOR_CLASSIFCATION = 20; 35 35 private ITransactionalPreprocessingData preprocessingData; 36 36 … … 63 63 } 64 64 65 public List<double> GetVariableValues(string variableName) {66 return preprocessingData.GetValues<double>(preprocessingData.GetColumnIndex(variableName)) .ToList();65 public IEnumerable<double> GetVariableValues(string variableName) { 66 return preprocessingData.GetValues<double>(preprocessingData.GetColumnIndex(variableName)); 67 67 } 68 68 … … 74 74 if (preprocessingData.IsType<double>(preprocessingData.GetColumnIndex(variableName))) 75 75 doubleVariableNames.Add(variableName); 76 } 77 78 return doubleVariableNames; 79 } 80 81 public IEnumerable<string> GetVariableNamesForHistogramClassification() { 82 List<string> doubleVariableNames = new List<string>(); 83 84 //only return variable names from type double 85 foreach (string variableName in preprocessingData.VariableNames) 86 { 87 int columnIndex = preprocessingData.GetColumnIndex(variableName); 88 bool isDouble = preprocessingData.IsType<double>(columnIndex); 89 double distinctValueCount = preprocessingData.GetValues<double>(columnIndex).GroupBy(x => x).Count(); 90 bool distinctValuesOk = distinctValueCount <= MAX_DISTINCT_VALUES_FOR_CLASSIFCATION; 91 92 if (isDouble && distinctValuesOk) 93 doubleVariableNames.Add(variableName); 76 94 } 77 95 … … 146 164 147 165 148 List<double> xValues = GetVariableValues(variableNameX) ;149 List<double> yValues = GetVariableValues(variableNameY) ;166 List<double> xValues = GetVariableValues(variableNameX).ToList(); 167 List<double> yValues = GetVariableValues(variableNameY).ToList(); 150 168 151 169 List<Point2D<double>> points = new List<Point2D<double>>(); -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/CorrelationMatrixContent.cs
r10870 r10908 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Problems.DataAnalysis; 25 26 26 27 namespace HeuristicLab.DataPreprocessing { 27 28 28 [Item("LineChart", "Represents the line chart grid.")] 29 public class LineChartContent : PreprocessingChartContent { 29 [Item("Feature Correlation Matrix", "Represents the feature correlation matrix.")] 30 public class CorrelationMatrixContent : Item, IViewShortcut 31 { 32 public DataAnalysisProblemData ProblemData { get; set; } 30 33 31 public LineChartContent(IChartLogic chartlogic)32 : base(chartlogic) {34 public CorrelationMatrixContent(DataAnalysisProblemData data) { 35 ProblemData = data; 33 36 } 34 37 35 public LineChartContent(LineChartContent content, Cloner cloner)36 : base( content, cloner) {37 38 public CorrelationMatrixContent(CorrelationMatrixContent original, Cloner cloner) 39 : base(original, cloner) { 40 38 41 } 39 42 40 43 public static new Image StaticItemImage { 41 get { return HeuristicLab.Common.Resources.VSImageLibrary. Performance; }44 get { return HeuristicLab.Common.Resources.VSImageLibrary.Gradient; } 42 45 } 43 46 44 47 public override IDeepCloneable Clone(Cloner cloner) { 45 return new LineChartContent(this, cloner);48 return new CorrelationMatrixContent(this, cloner); 46 49 } 47 48 50 } 49 51 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilterLogic.cs
r10900 r10908 27 27 namespace HeuristicLab.DataPreprocessing { 28 28 public class FilterLogic : IFilterLogic { 29 30 29 private IFilteredPreprocessingData preprocessingData; 31 30 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/HistogramContent.cs
r10871 r10908 36 36 public HistogramContent(HistogramContent content, Cloner cloner) 37 37 : base(content, cloner) { 38 39 38 } 40 39 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IChartLogic.cs
r10882 r10908 50 50 51 51 IEnumerable<string> GetVariableNames(); 52 List<double> GetVariableValues(string variableName); 52 IEnumerable<string> GetVariableNamesForHistogramClassification(); 53 54 IEnumerable<double> GetVariableValues(string variableName); 53 55 } 54 56 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/ProblemDataCreator.cs
r10772 r10908 26 26 27 27 namespace HeuristicLab.DataPreprocessing { 28 internalclass ProblemDataCreator {28 public class ProblemDataCreator { 29 29 30 30 private readonly IPreprocessingContext context;
Note: See TracChangeset
for help on using the changeset viewer.