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.Algorithms.DataAnalysis/3.4/Linear
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/AlglibUtil.cs

    r6002 r6740  
    3131
    3232      double[,] matrix = new double[rowsList.Count, variablesList.Count];
    33       for (int row = 0; row < rowsList.Count; row++) {
    34         int col = 0;
    35         foreach (string column in variables) {
    36           matrix[row, col] = dataset[column, rowsList[row]];
    37           col++;
     33
     34      int col = 0;
     35      foreach (string column in variables) {
     36        var values = dataset.GetDoubleValues(column, rows);
     37        int row = 0;
     38        foreach (var value in values) {
     39          matrix[row, col] = value;
     40          row++;
    3841        }
     42        col++;
    3943      }
     44
    4045      return matrix;
    4146    }
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs

    r6649 r6740  
    7878      int nRows = inputMatrix.GetLength(0);
    7979      int nFeatures = inputMatrix.GetLength(1) - 1;
    80       double[] classValues = dataset.GetVariableValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
     80      double[] classValues = dataset.GetDoubleValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
    8181      int nClasses = classValues.Count();
    8282      // map original class values to values [0..nClasses-1]
Note: See TracChangeset for help on using the changeset viewer.