Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/27/12 17:34:17 (12 years ago)
Author:
mkommend
Message:

#1722: Renamed indizes to indices in the whole trunk solution.

Location:
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourClassification.cs

    r7259 r8139  
    8787      string targetVariable = problemData.TargetVariable;
    8888      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
    89       IEnumerable<int> rows = problemData.TrainingIndizes;
     89      IEnumerable<int> rows = problemData.TrainingIndices;
    9090      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows);
    9191      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
     
    9999      int nClasses = classValues.Count();
    100100      // map original class values to values [0..nClasses-1]
    101       Dictionary<double, double> classIndizes = new Dictionary<double, double>();
     101      Dictionary<double, double> classIndices = new Dictionary<double, double>();
    102102      for (int i = 0; i < nClasses; i++) {
    103         classIndizes[classValues[i]] = i;
     103        classIndices[classValues[i]] = i;
    104104      }
    105105      for (int row = 0; row < nRows; row++) {
    106         inputMatrix[row, nFeatures] = classIndizes[inputMatrix[row, nFeatures]];
     106        inputMatrix[row, nFeatures] = classIndices[inputMatrix[row, nFeatures]];
    107107      }
    108108      alglib.nearestneighbor.kdtreebuild(inputMatrix, nRows, inputMatrix.GetLength(1) - 1, 1, 2, kdtree);
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourRegression.cs

    r7259 r8139  
    8787      string targetVariable = problemData.TargetVariable;
    8888      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
    89       IEnumerable<int> rows = problemData.TrainingIndizes;
     89      IEnumerable<int> rows = problemData.TrainingIndices;
    9090      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows);
    9191      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
Note: See TracChangeset for help on using the changeset viewer.