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
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs

    r7259 r8139  
    6868      string targetVariable = problemData.TargetVariable;
    6969      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
    70       IEnumerable<int> rows = problemData.TrainingIndizes;
     70      IEnumerable<int> rows = problemData.TrainingIndices;
    7171      int nClasses = problemData.ClassNames.Count();
    7272      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows);
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs

    r7588 r8139  
    7272      string targetVariable = problemData.TargetVariable;
    7373      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
    74       IEnumerable<int> rows = problemData.TrainingIndizes;
     74      IEnumerable<int> rows = problemData.TrainingIndices;
    7575      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows);
    7676      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs

    r7259 r8139  
    6969      string targetVariable = problemData.TargetVariable;
    7070      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
    71       IEnumerable<int> rows = problemData.TrainingIndizes;
     71      IEnumerable<int> rows = problemData.TrainingIndices;
    7272      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows);
    7373      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
     
    8181      int nClasses = classValues.Count();
    8282      // map original class values to values [0..nClasses-1]
    83       Dictionary<double, double> classIndizes = new Dictionary<double, double>();
     83      Dictionary<double, double> classIndices = new Dictionary<double, double>();
    8484      for (int i = 0; i < nClasses; i++) {
    85         classIndizes[classValues[i]] = i;
     85        classIndices[classValues[i]] = i;
    8686      }
    8787      for (int row = 0; row < nRows; row++) {
    88         inputMatrix[row, nFeatures] = classIndizes[inputMatrix[row, nFeatures]];
     88        inputMatrix[row, nFeatures] = classIndices[inputMatrix[row, nFeatures]];
    8989      }
    9090      int info;
  • 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)))
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassification.cs

    r8121 r8139  
    185185      string targetVariable = problemData.TargetVariable;
    186186      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
    187       IEnumerable<int> rows = problemData.TrainingIndizes;
     187      IEnumerable<int> rows = problemData.TrainingIndices;
    188188      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows);
    189189      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
     
    195195      int nClasses = classValues.Count();
    196196      // map original class values to values [0..nClasses-1]
    197       Dictionary<double, double> classIndizes = new Dictionary<double, double>();
     197      Dictionary<double, double> classIndices = new Dictionary<double, double>();
    198198      for (int i = 0; i < nClasses; i++) {
    199         classIndizes[classValues[i]] = i;
     199        classIndices[classValues[i]] = i;
    200200      }
    201201      for (int row = 0; row < nRows; row++) {
    202         inputMatrix[row, nFeatures] = classIndizes[inputMatrix[row, nFeatures]];
     202        inputMatrix[row, nFeatures] = classIndices[inputMatrix[row, nFeatures]];
    203203      }
    204204
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleClassification.cs

    r8121 r8139  
    171171      string targetVariable = problemData.TargetVariable;
    172172      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
    173       IEnumerable<int> rows = problemData.TrainingIndizes;
     173      IEnumerable<int> rows = problemData.TrainingIndices;
    174174      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows);
    175175      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
     
    181181      int nClasses = classValues.Count();
    182182      // map original class values to values [0..nClasses-1]
    183       Dictionary<double, double> classIndizes = new Dictionary<double, double>();
     183      Dictionary<double, double> classIndices = new Dictionary<double, double>();
    184184      for (int i = 0; i < nClasses; i++) {
    185         classIndizes[classValues[i]] = i;
     185        classIndices[classValues[i]] = i;
    186186      }
    187187      for (int row = 0; row < nRows; row++) {
    188         inputMatrix[row, nFeatures] = classIndizes[inputMatrix[row, nFeatures]];
     188        inputMatrix[row, nFeatures] = classIndices[inputMatrix[row, nFeatures]];
    189189      }
    190190
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleRegression.cs

    r8121 r8139  
    170170      string targetVariable = problemData.TargetVariable;
    171171      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
    172       IEnumerable<int> rows = problemData.TrainingIndizes;
     172      IEnumerable<int> rows = problemData.TrainingIndices;
    173173      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows);
    174174      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkRegression.cs

    r8121 r8139  
    186186      string targetVariable = problemData.TargetVariable;
    187187      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
    188       IEnumerable<int> rows = problemData.TrainingIndizes;
     188      IEnumerable<int> rows = problemData.TrainingIndices;
    189189      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows);
    190190      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestClassification.cs

    r7259 r8139  
    9797      string targetVariable = problemData.TargetVariable;
    9898      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
    99       IEnumerable<int> rows = problemData.TrainingIndizes;
     99      IEnumerable<int> rows = problemData.TrainingIndices;
    100100      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows);
    101101      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
     
    111111      int nClasses = classValues.Count();
    112112      // map original class values to values [0..nClasses-1]
    113       Dictionary<double, double> classIndizes = new Dictionary<double, double>();
     113      Dictionary<double, double> classIndices = new Dictionary<double, double>();
    114114      for (int i = 0; i < nClasses; i++) {
    115         classIndizes[classValues[i]] = i;
     115        classIndices[classValues[i]] = i;
    116116      }
    117117      for (int row = 0; row < nRows; row++) {
    118         inputMatrix[row, nCols - 1] = classIndizes[inputMatrix[row, nCols - 1]];
     118        inputMatrix[row, nCols - 1] = classIndices[inputMatrix[row, nCols - 1]];
    119119      }
    120120      // execute random forest algorithm
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestRegression.cs

    r7259 r8139  
    9797      string targetVariable = problemData.TargetVariable;
    9898      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
    99       IEnumerable<int> rows = problemData.TrainingIndizes;
     99      IEnumerable<int> rows = problemData.TrainingIndices;
    100100      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows);
    101101      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorClassification.cs

    r8121 r8139  
    132132      Dataset dataset = problemData.Dataset;
    133133      string targetVariable = problemData.TargetVariable;
    134       IEnumerable<int> rows = problemData.TrainingIndizes;
     134      IEnumerable<int> rows = problemData.TrainingIndices;
    135135
    136136      //extract SVM parameters from scope and set them
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorRegression.cs

    r8121 r8139  
    140140      Dataset dataset = problemData.Dataset;
    141141      string targetVariable = problemData.TargetVariable;
    142       IEnumerable<int> rows = problemData.TrainingIndizes;
     142      IEnumerable<int> rows = problemData.TrainingIndices;
    143143
    144144      //extract SVM parameters from scope and set them
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClustering.cs

    r8080 r8139  
    8585      Dataset dataset = problemData.Dataset;
    8686      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
    87       IEnumerable<int> rows = problemData.TrainingIndizes;
     87      IEnumerable<int> rows = problemData.TrainingIndices;
    8888      int info;
    8989      double[,] centers;
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringSolution.cs

    r7259 r8139  
    5252    public KMeansClusteringSolution(KMeansClusteringModel model, IClusteringProblemData problemData)
    5353      : base(model, problemData) {
    54       double trainingIntraClusterSumOfSquares = KMeansClusteringUtil.CalculateIntraClusterSumOfSquares(model, problemData.Dataset, problemData.TrainingIndizes);
    55       double testIntraClusterSumOfSquares = KMeansClusteringUtil.CalculateIntraClusterSumOfSquares(model, problemData.Dataset, problemData.TestIndizes);
     54      double trainingIntraClusterSumOfSquares = KMeansClusteringUtil.CalculateIntraClusterSumOfSquares(model, problemData.Dataset, problemData.TrainingIndices);
     55      double testIntraClusterSumOfSquares = KMeansClusteringUtil.CalculateIntraClusterSumOfSquares(model, problemData.Dataset, problemData.TestIndices);
    5656      this.Add(new Result(TrainingIntraClusterSumOfSquaresResultName, "The sum of squared distances of points of the training partition to the cluster center (is minimized by k-Means).", new DoubleValue(trainingIntraClusterSumOfSquares)));
    5757      this.Add(new Result(TestIntraClusterSumOfSquaresResultName, "The sum of squared distances of points of the test partition to the cluster center (is minimized by k-Means).", new DoubleValue(testIntraClusterSumOfSquares)));
Note: See TracChangeset for help on using the changeset viewer.