Changeset 6784 for branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine
- Timestamp:
- 09/16/11 12:00:36 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineUtil.cs
r6002 r6784 34 34 public static SVM.Problem CreateSvmProblem(Dataset dataset, string targetVariable, IEnumerable<string> inputVariables, IEnumerable<int> rowIndices) { 35 35 double[] targetVector = 36 dataset.GetEnumeratedVariableValues(targetVariable, rowIndices) 37 .ToArray(); 36 dataset.GetDoubleValues(targetVariable, rowIndices).ToArray(); 38 37 39 38 SVM.Node[][] nodes = new SVM.Node[targetVector.Length][]; … … 46 45 int colIndex = 1; // make sure the smallest node index for SVM = 1 47 46 foreach (var inputVariable in inputVariablesList) { 48 double value = dataset [row, dataset.GetVariableIndex(inputVariable)];47 double value = dataset.GetDoubleValue(inputVariable, row); 49 48 // SVM also works with missing values 50 49 // => don't add NaN values in the dataset to the sparse SVM matrix representation
Note: See TracChangeset
for help on using the changeset viewer.