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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineUtil.cs

    r6002 r6740  
    3434    public static SVM.Problem CreateSvmProblem(Dataset dataset, string targetVariable, IEnumerable<string> inputVariables, IEnumerable<int> rowIndices) {
    3535      double[] targetVector =
    36         dataset.GetEnumeratedVariableValues(targetVariable, rowIndices)
    37         .ToArray();
     36        dataset.GetDoubleValues(targetVariable, rowIndices).ToArray();
    3837
    3938      SVM.Node[][] nodes = new SVM.Node[targetVector.Length][];
     
    4645        int colIndex = 1; // make sure the smallest node index for SVM = 1
    4746        foreach (var inputVariable in inputVariablesList) {
    48           double value = dataset[row, dataset.GetVariableIndex(inputVariable)];
     47          double value = dataset.GetDoubleValue(inputVariable, row);
    4948          // SVM also works with missing values
    5049          // => don't add NaN values in the dataset to the sparse SVM matrix representation
Note: See TracChangeset for help on using the changeset viewer.