- Timestamp:
- 09/16/11 12:00:36 (13 years ago)
- Location:
- branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/AlglibUtil.cs
r6002 r6784 31 31 32 32 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++; 38 41 } 42 col++; 39 43 } 44 40 45 return matrix; 41 46 } -
branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs
r6675 r6784 78 78 int nRows = inputMatrix.GetLength(0); 79 79 int nFeatures = inputMatrix.GetLength(1) - 1; 80 double[] classValues = dataset.Get VariableValues(targetVariable).Distinct().OrderBy(x => x).ToArray();80 double[] classValues = dataset.GetDoubleValues(targetVariable).Distinct().OrderBy(x => x).ToArray(); 81 81 int nClasses = classValues.Count(); 82 82 // map original class values to values [0..nClasses-1]
Note: See TracChangeset
for help on using the changeset viewer.