Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/12/11 13:48:31 (13 years ago)
Author:
mkommend
Message:

#1597, #1609, #1640:

  • Corrected TableFileParser to handle empty rows correctly.
  • Refactored DataSet to store values in List<List> instead of a two-dimensional array.
  • Enable importing and storing string and datetime values.
  • Changed data access methods in dataset and adapted all concerning classes.
  • Changed interpreter to store the variable values for all rows during the compilation step.
Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs

    r6680 r6740  
    9898      int modelCount = Content.Model.Models.Count();
    9999      string[,] values = new string[indizes.Length, 5 + classValuesCount + modelCount];
    100       double[] target = Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable);
     100      double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
    101101      List<List<double?>> estimatedValuesVector = GetEstimatedValues(SamplesComboBox.SelectedItem.ToString(), indizes,
    102102                                                            Content.ClassificationSolutions);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.cs

    r6642 r6740  
    114114        } else throw new InvalidOperationException();
    115115
    116         double[] targetValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(Content.ProblemData.TargetVariable, rows).ToArray();
     116        double[] targetValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable, rows).ToArray();
    117117
    118118        Dictionary<double, int> classValueIndexMapping = new Dictionary<double, int>();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionEstimatedClassValuesView.cs

    r6642 r6740  
    8686          string[,] values = new string[Content.ProblemData.Dataset.Rows, 5];
    8787
    88           double[] target = Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable);
     88          double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
    8989          double[] estimated = Content.EstimatedClassValues.ToArray();
    9090          for (int row = 0; row < target.Length; row++) {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs

    r6642 r6740  
    107107
    108108        double[] estimatedValues = Content.GetEstimatedValues(rows).ToArray();
    109         double[] targetClassValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(Content.ProblemData.TargetVariable, rows).ToArray();
     109        double[] targetClassValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable, rows).ToArray();
    110110        double minThreshold = estimatedValues.Min();
    111111        double maxThreshold = estimatedValues.Max();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionEstimatedClassValuesView.cs

    r6642 r6740  
    5151          string[,] values = new string[Content.ProblemData.Dataset.Rows, 4];
    5252
    53           double[] target = Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable);
     53          double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
    5454          double[] estimatedClassValues = Content.EstimatedClassValues.ToArray();
    5555          double[] estimatedValues = Content.EstimatedValues.ToArray();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionThresholdView.cs

    r6729 r6740  
    135135    private void FillSeriesWithDataPoints(Series series) {
    136136      List<double> estimatedValues = Content.EstimatedValues.ToList();
     137      var targetValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToList();
     138
    137139      foreach (int row in Content.ProblemData.TrainingIndizes) {
    138140        double estimatedValue = estimatedValues[row];
    139         double targetValue = Content.ProblemData.Dataset[Content.ProblemData.TargetVariable, row];
     141        double targetValue = targetValues[row];
    140142        if (targetValue.IsAlmost((double)series.Tag)) {
    141143          double jitterValue = random.NextDouble() * 2.0 - 1.0;
     
    150152      foreach (int row in Content.ProblemData.TestIndizes) {
    151153        double estimatedValue = estimatedValues[row];
    152         double targetValue = Content.ProblemData.Dataset[Content.ProblemData.TargetVariable, row];
    153         if (targetValue == (double)series.Tag) {
     154        double targetValue = targetValues[row];
     155        if (targetValue.IsAlmost((double)series.Tag)) {
    154156          double jitterValue = random.NextDouble() * 2.0 - 1.0;
    155157          DataPoint point = new DataPoint();
Note: See TracChangeset for help on using the changeset viewer.