Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/16/11 12:00:36 (13 years ago)
Author:
mkommend
Message:

#1479: Integrated trunk changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineUtil.cs

    r6002 r6784  
    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.