Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8139


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
Files:
46 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)));
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs

    r7987 r8139  
    3535  [Content(typeof(IStringConvertibleMatrix), true)]
    3636  public partial class StringConvertibleMatrixView : AsynchronousContentView {
    37     private int[] virtualRowIndizes;
    38     private List<KeyValuePair<int, SortOrder>> sortedColumnIndizes;
     37    private int[] virtualRowIndices;
     38    private List<KeyValuePair<int, SortOrder>> sortedColumnIndices;
    3939    private RowComparer rowComparer;
    4040
     
    8282      errorProvider.SetIconAlignment(columnsTextBox, ErrorIconAlignment.MiddleLeft);
    8383      errorProvider.SetIconPadding(columnsTextBox, 2);
    84       sortedColumnIndizes = new List<KeyValuePair<int, SortOrder>>();
     84      sortedColumnIndices = new List<KeyValuePair<int, SortOrder>>();
    8585      rowComparer = new RowComparer();
    8686    }
     
    108108        dataGridView.Rows.Clear();
    109109        dataGridView.Columns.Clear();
    110         virtualRowIndizes = new int[0];
     110        virtualRowIndices = new int[0];
    111111      } else
    112112        UpdateData();
     
    128128      columnsTextBox.Text = Content.Columns.ToString();
    129129      columnsTextBox.Enabled = true;
    130       virtualRowIndizes = Enumerable.Range(0, Content.Rows).ToArray();
     130      virtualRowIndices = Enumerable.Range(0, Content.Rows).ToArray();
    131131
    132132      if (Content.Columns == 0 && dataGridView.ColumnCount != Content.Columns && !Content.ReadOnly)
     
    178178
    179179      while (updatedRows < count) {
    180         if (virtualRowIndizes[index] < Content.RowNames.Count())
    181           dataGridView.Rows[index].HeaderCell.Value = Content.RowNames.ElementAt(virtualRowIndizes[index]);
     180        if (virtualRowIndices[index] < Content.RowNames.Count())
     181          dataGridView.Rows[index].HeaderCell.Value = Content.RowNames.ElementAt(virtualRowIndices[index]);
    182182        else
    183183          dataGridView.Rows[index].HeaderCell.Value = "Row " + (index + 1);
     
    273273      if (!dataGridView.ReadOnly) {
    274274        string value = e.Value.ToString();
    275         int rowIndex = virtualRowIndizes[e.RowIndex];
     275        int rowIndex = virtualRowIndices[e.RowIndex];
    276276        e.ParsingApplied = Content.SetValue(value, rowIndex, e.ColumnIndex);
    277277        if (e.ParsingApplied) e.Value = Content.GetValue(rowIndex, e.ColumnIndex);
     
    283283    private void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) {
    284284      if (Content != null && e.RowIndex < Content.Rows && e.ColumnIndex < Content.Columns) {
    285         int rowIndex = virtualRowIndizes[e.RowIndex];
     285        int rowIndex = virtualRowIndices[e.RowIndex];
    286286        e.Value = Content.GetValue(rowIndex, e.ColumnIndex);
    287287      }
     
    340340
    341341      for (int i = minRowIndex; i <= maxRowIndex; i++) {
    342         int rowIndex = this.virtualRowIndizes[i];
     342        int rowIndex = this.virtualRowIndices[i];
    343343        if (addRowNames) {
    344344          s.Append(Content.RowNames.ElementAt(rowIndex));
     
    399399      if (Content != null) {
    400400        if (e.Button == MouseButtons.Left && Content.SortableView) {
    401           bool addToSortedIndizes = (Control.ModifierKeys & Keys.Control) == Keys.Control;
     401          bool addToSortedIndices = (Control.ModifierKeys & Keys.Control) == Keys.Control;
    402402          SortOrder newSortOrder = SortOrder.Ascending;
    403           if (sortedColumnIndizes.Any(x => x.Key == e.ColumnIndex)) {
    404             SortOrder oldSortOrder = sortedColumnIndizes.Where(x => x.Key == e.ColumnIndex).First().Value;
     403          if (sortedColumnIndices.Any(x => x.Key == e.ColumnIndex)) {
     404            SortOrder oldSortOrder = sortedColumnIndices.Where(x => x.Key == e.ColumnIndex).First().Value;
    405405            int enumLength = Enum.GetValues(typeof(SortOrder)).Length;
    406406            newSortOrder = oldSortOrder = (SortOrder)Enum.Parse(typeof(SortOrder), ((((int)oldSortOrder) + 1) % enumLength).ToString());
    407407          }
    408408
    409           if (!addToSortedIndizes)
    410             sortedColumnIndizes.Clear();
    411 
    412           if (sortedColumnIndizes.Any(x => x.Key == e.ColumnIndex)) {
    413             int sortedIndex = sortedColumnIndizes.FindIndex(x => x.Key == e.ColumnIndex);
     409          if (!addToSortedIndices)
     410            sortedColumnIndices.Clear();
     411
     412          if (sortedColumnIndices.Any(x => x.Key == e.ColumnIndex)) {
     413            int sortedIndex = sortedColumnIndices.FindIndex(x => x.Key == e.ColumnIndex);
    414414            if (newSortOrder != SortOrder.None)
    415               sortedColumnIndizes[sortedIndex] = new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder);
     415              sortedColumnIndices[sortedIndex] = new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder);
    416416            else
    417               sortedColumnIndizes.RemoveAt(sortedIndex);
     417              sortedColumnIndices.RemoveAt(sortedIndex);
    418418          } else
    419419            if (newSortOrder != SortOrder.None)
    420               sortedColumnIndizes.Add(new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder));
     420              sortedColumnIndices.Add(new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder));
    421421          Sort();
    422422        }
     
    425425
    426426    protected virtual void ClearSorting() {
    427       virtualRowIndizes = Enumerable.Range(0, Content.Rows).ToArray();
    428       sortedColumnIndizes.Clear();
     427      virtualRowIndices = Enumerable.Range(0, Content.Rows).ToArray();
     428      sortedColumnIndices.Clear();
    429429      UpdateSortGlyph();
    430430    }
    431431
    432432    private void Sort() {
    433       virtualRowIndizes = Sort(sortedColumnIndizes);
     433      virtualRowIndices = Sort(sortedColumnIndices);
    434434      UpdateSortGlyph();
    435435      UpdateRowHeaders();
     
    439439      int[] newSortedIndex = Enumerable.Range(0, Content.Rows).ToArray();
    440440      if (sortedColumns.Count() != 0) {
    441         rowComparer.SortedIndizes = sortedColumns;
     441        rowComparer.SortedIndices = sortedColumns;
    442442        rowComparer.Matrix = Content;
    443443        Array.Sort(newSortedIndex, rowComparer);
     
    448448      foreach (DataGridViewColumn col in this.dataGridView.Columns)
    449449        col.HeaderCell.SortGlyphDirection = SortOrder.None;
    450       foreach (KeyValuePair<int, SortOrder> p in sortedColumnIndizes)
     450      foreach (KeyValuePair<int, SortOrder> p in sortedColumnIndices)
    451451        this.dataGridView.Columns[p.Key].HeaderCell.SortGlyphDirection = p.Value;
    452452    }
     
    457457      }
    458458
    459       private List<KeyValuePair<int, SortOrder>> sortedIndizes;
    460       public IEnumerable<KeyValuePair<int, SortOrder>> SortedIndizes {
    461         get { return this.sortedIndizes; }
    462         set { sortedIndizes = new List<KeyValuePair<int, SortOrder>>(value); }
     459      private List<KeyValuePair<int, SortOrder>> sortedIndices;
     460      public IEnumerable<KeyValuePair<int, SortOrder>> SortedIndices {
     461        get { return this.sortedIndices; }
     462        set { sortedIndices = new List<KeyValuePair<int, SortOrder>>(value); }
    463463      }
    464464      private IStringConvertibleMatrix matrix;
     
    477477        if (matrix == null)
    478478          throw new InvalidOperationException("Could not sort IStringConvertibleMatrix if the matrix member is null.");
    479         if (sortedIndizes == null)
     479        if (sortedIndices == null)
    480480          return 0;
    481481
    482         foreach (KeyValuePair<int, SortOrder> pair in sortedIndizes.Where(p => p.Value != SortOrder.None)) {
     482        foreach (KeyValuePair<int, SortOrder> pair in sortedIndices.Where(p => p.Value != SortOrder.None)) {
    483483          string1 = matrix.GetValue(x, pair.Key);
    484484          string2 = matrix.GetValue(y, pair.Key);
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionTabularView.cs

    r7469 r8139  
    164164      RunCollectionRowComparer rowComparer = new RunCollectionRowComparer();
    165165      if (sortedColumns.Count() != 0) {
    166         rowComparer.SortedIndizes = sortedColumns;
     166        rowComparer.SortedIndices = sortedColumns;
    167167        rowComparer.Matrix = Content;
    168168        Array.Sort(newSortedIndex, rowComparer);
     
    194194      }
    195195
    196       private List<KeyValuePair<int, SortOrder>> sortedIndizes;
    197       public IEnumerable<KeyValuePair<int, SortOrder>> SortedIndizes {
    198         get { return this.sortedIndizes; }
    199         set { sortedIndizes = new List<KeyValuePair<int, SortOrder>>(value); }
     196      private List<KeyValuePair<int, SortOrder>> sortedIndices;
     197      public IEnumerable<KeyValuePair<int, SortOrder>> SortedIndices {
     198        get { return this.sortedIndices; }
     199        set { sortedIndices = new List<KeyValuePair<int, SortOrder>>(value); }
    200200      }
    201201      private RunCollection matrix;
     
    212212        if (matrix == null)
    213213          throw new InvalidOperationException("Could not sort IStringConvertibleMatrix if the matrix member is null.");
    214         if (sortedIndizes == null)
     214        if (sortedIndices == null)
    215215          return 0;
    216216
    217         foreach (KeyValuePair<int, SortOrder> pair in sortedIndizes.Where(p => p.Value != SortOrder.None)) {
     217        foreach (KeyValuePair<int, SortOrder> pair in sortedIndices.Where(p => p.Value != SortOrder.None)) {
    218218          value1 = matrix.GetValue(x, pair.Key);
    219219          value2 = matrix.GetValue(y, pair.Key);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs

    r7259 r8139  
    6969      var interpreter = Content.Model.Interpreter;
    7070      var dataset = Content.ProblemData.Dataset;
    71       var rows = Content.ProblemData.TrainingIndizes;
     71      var rows = Content.ProblemData.TrainingIndices;
    7272      string targetVariable = Content.ProblemData.TargetVariable;
    7373      Dictionary<ISymbolicExpressionTreeNode, double> impactValues = new Dictionary<ISymbolicExpressionTreeNode, double>();
     
    113113      start.AddSubtree((ISymbolicExpressionTreeNode)node.Clone());
    114114      var interpreter = Content.Model.Interpreter;
    115       var rows = Content.ProblemData.TrainingIndizes;
     115      var rows = Content.ProblemData.TrainingIndices;
    116116      return interpreter.GetSymbolicExpressionTreeValues(tempTree, Content.ProblemData.Dataset, rows).Median();
    117117    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs

    r7823 r8139  
    8181
    8282    private void UpdateEstimationLimits() {
    83       if (ProblemData.TrainingIndizes.Any()) {
    84         var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList();
     83      if (ProblemData.TrainingIndices.Any()) {
     84        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).ToList();
    8585        var mean = targetValues.Average();
    8686        var range = targetValues.Max() - targetValues.Min();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs

    r8130 r8139  
    9797
    9898    private void UpdateEstimationLimits() {
    99       if (ProblemData.TrainingIndizes.Any()) {
    100         var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList();
     99      if (ProblemData.TrainingIndices.Any()) {
     100        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).ToList();
    101101        var mean = targetValues.Average();
    102102        var range = targetValues.Max() - targetValues.Min();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationModel.cs

    r8030 r8139  
    125125      var dataset = problemData.Dataset;
    126126      var targetVariable = problemData.TargetVariable;
    127       var rows = problemData.TrainingIndizes;
     127      var rows = problemData.TrainingIndices;
    128128      var estimatedValues = model.Interpreter.GetSymbolicExpressionTreeValues(model.SymbolicExpressionTree, dataset, rows);
    129129      var targetValues = dataset.GetDoubleValues(targetVariable, rows);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs

    r7259 r8139  
    6666      var interpreter = Content.Model.Interpreter;
    6767      var dataset = Content.ProblemData.Dataset;
    68       var rows = Content.ProblemData.TrainingIndizes;
     68      var rows = Content.ProblemData.TrainingIndices;
    6969      string targetVariable = Content.ProblemData.TargetVariable;
    7070      Dictionary<ISymbolicExpressionTreeNode, double> impactValues = new Dictionary<ISymbolicExpressionTreeNode, double>();
     
    106106      start.AddSubtree((ISymbolicExpressionTreeNode)node.Clone());
    107107      var interpreter = Content.Model.Interpreter;
    108       var rows = Content.ProblemData.TrainingIndizes;
     108      var rows = Content.ProblemData.TrainingIndices;
    109109      return interpreter.GetSymbolicExpressionTreeValues(tempTree, Content.ProblemData.Dataset, rows).Median();
    110110    }
     
    122122
    123123    protected override void btnOptimizeConstants_Click(object sender, EventArgs e) {
    124       SymbolicRegressionConstantOptimizationEvaluator.OptimizeConstants(Content.Model.Interpreter, Content.Model.SymbolicExpressionTree, Content.ProblemData, Content.ProblemData.TrainingIndizes, 0.001, 0, 0.0001);
     124      SymbolicRegressionConstantOptimizationEvaluator.OptimizeConstants(Content.Model.Interpreter, Content.Model.SymbolicExpressionTree, Content.ProblemData, Content.ProblemData.TrainingIndices, 0.001, 0, 0.0001);
    125125      UpdateModel(Content.Model.SymbolicExpressionTree);
    126126    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionResponseFunctionView.cs

    r7259 r8139  
    142142      };
    143143
    144       var mainTrainingIndizes = (from row in Content.ProblemData.TrainingIndizes
     144      var mainTrainingIndices = (from row in Content.ProblemData.TrainingIndices
    145145                                 where NearMedianValue(row)
    146146                                 select row)
    147147        .ToArray();
    148       var mainTestIndizes = (from row in Content.ProblemData.TestIndizes
     148      var mainTestIndices = (from row in Content.ProblemData.TestIndices
    149149                             where NearMedianValue(row)
    150150                             select row)
    151151        .ToArray();
    152152
    153       var freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, mainTrainingIndizes).ToArray();
     153      var freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, mainTrainingIndices).ToArray();
    154154      var trainingValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable,
    155                                                                      mainTrainingIndizes).ToArray();
     155                                                                     mainTrainingIndices).ToArray();
    156156      Array.Sort(freeVariableValues, trainingValues);
    157157      responseChart.Series["Training Data"].Points.DataBindXY(freeVariableValues, trainingValues);
    158158
    159       freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, mainTestIndizes).ToArray();
     159      freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, mainTestIndices).ToArray();
    160160      var testValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable,
    161                                                                      mainTestIndizes).ToArray();
     161                                                                     mainTestIndices).ToArray();
    162162      Array.Sort(freeVariableValues, testValues);
    163163      responseChart.Series["Test Data"].Points.DataBindXY(freeVariableValues, testValues);
    164164
    165165      // draw scatter plots of remaining values
    166       freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, Content.ProblemData.TrainingIndizes).ToArray();
     166      freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, Content.ProblemData.TrainingIndices).ToArray();
    167167      trainingValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable,
    168                                                                      Content.ProblemData.TrainingIndizes).ToArray();
     168                                                                     Content.ProblemData.TrainingIndices).ToArray();
    169169      Array.Sort(freeVariableValues, trainingValues);
    170170      responseChart.Series["Training Data (edge)"].Points.DataBindXY(freeVariableValues, trainingValues);
    171171
    172       freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, Content.ProblemData.TestIndizes).ToArray();
     172      freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, Content.ProblemData.TestIndices).ToArray();
    173173      testValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable,
    174                                                                      Content.ProblemData.TestIndizes).ToArray();
     174                                                                     Content.ProblemData.TestIndices).ToArray();
    175175      Array.Sort(freeVariableValues, testValues);
    176176      responseChart.Series["Test Data (edge)"].Points.DataBindXY(freeVariableValues, testValues);
     
    187187      string freeVariable = (string)comboBox.SelectedItem;
    188188
    189       var freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, Content.ProblemData.TrainingIndizes).ToArray();
     189      var freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, Content.ProblemData.TrainingIndices).ToArray();
    190190      var responseValues = Content.Model.Interpreter.GetSymbolicExpressionTreeValues(clonedTree,
    191191                                                                              Content.ProblemData.Dataset,
    192                                                                               Content.ProblemData.TrainingIndizes)
     192                                                                              Content.ProblemData.TrainingIndices)
    193193                                                                              .ToArray();
    194194      Array.Sort(freeVariableValues, responseValues);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs

    r7823 r8139  
    8585
    8686    private void UpdateEstimationLimits() {
    87       if (ProblemData.TrainingIndizes.Any()) {
    88         var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList();
     87      if (ProblemData.TrainingIndices.Any()) {
     88        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).ToList();
    8989        var mean = targetValues.Average();
    9090        var range = targetValues.Max() - targetValues.Min();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs

    r8130 r8139  
    102102
    103103    private void UpdateEstimationLimits() {
    104       if (ProblemData.TrainingIndizes.Any()) {
    105         var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList();
     104      if (ProblemData.TrainingIndices.Any()) {
     105        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).ToList();
    106106        var mean = targetValues.Average();
    107107        var range = targetValues.Max() - targetValues.Min();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionModel.cs

    r8030 r8139  
    7373      var dataset = problemData.Dataset;
    7474      var targetVariable = problemData.TargetVariable;
    75       var rows = problemData.TrainingIndizes;
     75      var rows = problemData.TrainingIndices;
    7676      var estimatedValues = model.Interpreter.GetSymbolicExpressionTreeValues(model.SymbolicExpressionTree, dataset, rows);
    7777      var targetValues = dataset.GetDoubleValues(targetVariable, rows);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs

    r7259 r8139  
    7373      }
    7474
    75       int[] indizes;
     75      int[] indices;
    7676      double[] estimatedClassValues;
    7777
    7878      switch (SamplesComboBox.SelectedItem.ToString()) {
    7979        case SamplesComboBoxAllSamples: {
    80             indizes = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).ToArray();
     80            indices = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).ToArray();
    8181            estimatedClassValues = Content.EstimatedClassValues.ToArray();
    8282            break;
    8383          }
    8484        case SamplesComboBoxTrainingSamples: {
    85             indizes = Content.ProblemData.TrainingIndizes.ToArray();
     85            indices = Content.ProblemData.TrainingIndices.ToArray();
    8686            estimatedClassValues = Content.EstimatedTrainingClassValues.ToArray();
    8787            break;
    8888          }
    8989        case SamplesComboBoxTestSamples: {
    90             indizes = Content.ProblemData.TestIndizes.ToArray();
     90            indices = Content.ProblemData.TestIndices.ToArray();
    9191            estimatedClassValues = Content.EstimatedTestClassValues.ToArray();
    9292            break;
     
    9898      int classValuesCount = Content.ProblemData.ClassValues.Count;
    9999      int solutionsCount = Content.ClassificationSolutions.Count();
    100       string[,] values = new string[indizes.Length, 5 + classValuesCount + solutionsCount];
     100      string[,] values = new string[indices.Length, 5 + classValuesCount + solutionsCount];
    101101      double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
    102       List<List<double?>> estimatedValuesVector = GetEstimatedValues(SamplesComboBox.SelectedItem.ToString(), indizes,
     102      List<List<double?>> estimatedValuesVector = GetEstimatedValues(SamplesComboBox.SelectedItem.ToString(), indices,
    103103                                                            Content.ClassificationSolutions);
    104104
    105       for (int i = 0; i < indizes.Length; i++) {
    106         int row = indizes[i];
     105      for (int i = 0; i < indices.Length; i++) {
     106        int row = indices[i];
    107107        values[i, 0] = row.ToString();
    108108        values[i, 1] = target[i].ToString();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.cs

    r7259 r8139  
    107107        double[] predictedValues;
    108108        if (cmbSamples.SelectedItem.ToString() == TrainingSamples) {
    109           rows = Content.ProblemData.TrainingIndizes;
     109          rows = Content.ProblemData.TrainingIndices;
    110110          predictedValues = Content.EstimatedTrainingClassValues.ToArray();
    111111        } else if (cmbSamples.SelectedItem.ToString() == TestSamples) {
    112           rows = Content.ProblemData.TestIndizes;
     112          rows = Content.ProblemData.TestIndices;
    113113          predictedValues = Content.EstimatedTestClassValues.ToArray();
    114114        } else throw new InvalidOperationException();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionEstimatedClassValuesView.cs

    r7259 r8139  
    9696          var estimatedTraining = Content.EstimatedTrainingClassValues.GetEnumerator();
    9797          estimatedTraining.MoveNext();
    98           foreach (var trainingRow in Content.ProblemData.TrainingIndizes) {
     98          foreach (var trainingRow in Content.ProblemData.TrainingIndices) {
    9999            values[trainingRow, 3] = estimatedTraining.Current.ToString();
    100100            estimatedTraining.MoveNext();
     
    102102          var estimatedTest = Content.EstimatedTestClassValues.GetEnumerator();
    103103          estimatedTest.MoveNext();
    104           foreach (var testRow in Content.ProblemData.TestIndizes) {
     104          foreach (var testRow in Content.ProblemData.TestIndices) {
    105105            values[testRow, 4] = estimatedTest.Current.ToString();
    106106            estimatedTest.MoveNext();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs

    r7259 r8139  
    101101
    102102        if (cmbSamples.SelectedItem.ToString() == TrainingSamples) {
    103           rows = Content.ProblemData.TrainingIndizes;
     103          rows = Content.ProblemData.TrainingIndices;
    104104        } else if (cmbSamples.SelectedItem.ToString() == TestSamples) {
    105           rows = Content.ProblemData.TestIndizes;
     105          rows = Content.ProblemData.TestIndices;
    106106        } else throw new InvalidOperationException();
    107107
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionThresholdView.cs

    r7259 r8139  
    137137      var targetValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToList();
    138138
    139       foreach (int row in Content.ProblemData.TrainingIndizes) {
     139      foreach (int row in Content.ProblemData.TrainingIndices) {
    140140        double estimatedValue = estimatedValues[row];
    141141        double targetValue = targetValues[row];
     
    150150      }
    151151
    152       foreach (int row in Content.ProblemData.TestIndizes) {
     152      foreach (int row in Content.ProblemData.TestIndices) {
    153153        double estimatedValue = estimatedValues[row];
    154154        double targetValue = targetValues[row];
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs

    r8105 r8139  
    169169      switch (cmbSamples.SelectedItem.ToString()) {
    170170        case TrainingSamples:
    171           originalValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
     171          originalValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices);
    172172          break;
    173173        case TestSamples:
    174           originalValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes);
     174          originalValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndices);
    175175          break;
    176176        case AllSamples:
     
    234234
    235235    private IRegressionSolution CreateConstantModel() {
    236       double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).Average();
     236      double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).Average();
    237237      var solution = new ConstantRegressionModel(averageTrainingTarget).CreateRegressionSolution(ProblemData);
    238238      solution.Name = "Baseline";
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionEstimatedValuesView.cs

    r7259 r8139  
    9393          var estimated_test = Content.EstimatedTestValues.GetEnumerator();
    9494
    95           foreach (var row in Content.ProblemData.TrainingIndizes) {
     95          foreach (var row in Content.ProblemData.TrainingIndices) {
    9696            estimated_training.MoveNext();
    9797            values[row, 3] = estimated_training.Current.ToString();
    9898          }
    9999
    100           foreach (var row in Content.ProblemData.TestIndizes) {
     100          foreach (var row in Content.ProblemData.TestIndices) {
    101101            estimated_test.MoveNext();
    102102            values[row, 4] = estimated_test.Current.ToString();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs

    r7406 r8139  
    7272        this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].ChartType = SeriesChartType.FastLine;
    7373        this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].EmptyPointStyle.Color = this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Color;
    74         this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TrainingIndizes.ToArray(), Content.EstimatedTrainingValues.ToArray());
     74        this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TrainingIndices.ToArray(), Content.EstimatedTrainingValues.ToArray());
    7575        this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME]);
    7676        this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Tag = Content;
     
    7979        this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].LegendText = ESTIMATEDVALUES_TEST_SERIES_NAME;
    8080        this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].ChartType = SeriesChartType.FastLine;
    81         this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TestIndizes.ToArray(), Content.EstimatedTestValues.ToArray());
     81        this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TestIndices.ToArray(), Content.EstimatedTestValues.ToArray());
    8282        this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME]);
    8383        this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Tag = Content;
    8484        // series of remaining points
    85         int[] allIndizes = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).Except(Content.ProblemData.TrainingIndizes).Except(Content.ProblemData.TestIndizes).ToArray();
     85        int[] allIndices = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).Except(Content.ProblemData.TrainingIndices).Except(Content.ProblemData.TestIndices).ToArray();
    8686        var estimatedValues = Content.EstimatedValues.ToArray();
    87         List<double> allEstimatedValues = allIndizes.Select(index => estimatedValues[index]).ToList();
     87        List<double> allEstimatedValues = allIndices.Select(index => estimatedValues[index]).ToList();
    8888        this.chart.Series.Add(ESTIMATEDVALUES_ALL_SERIES_NAME);
    8989        this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].LegendText = ESTIMATEDVALUES_ALL_SERIES_NAME;
    9090        this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].ChartType = SeriesChartType.FastLine;
    91         this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Points.DataBindXY(allIndizes, allEstimatedValues);
     91        this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Points.DataBindXY(allIndices, allEstimatedValues);
    9292        this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]);
    9393        this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Tag = Content;
     
    170170
    171171      int[] attr = new int[Content.ProblemData.Dataset.Rows + 1]; // add a virtual last row that is again empty to simplify loop further down
    172       foreach (var row in Content.ProblemData.TrainingIndizes) {
     172      foreach (var row in Content.ProblemData.TrainingIndices) {
    173173        attr[row] += 1;
    174174      }
    175       foreach (var row in Content.ProblemData.TestIndizes) {
     175      foreach (var row in Content.ProblemData.TestIndices) {
    176176        attr[row] += 2;
    177177      }
     
    223223        string targetVariableName = Content.ProblemData.TargetVariable;
    224224
    225         IEnumerable<int> indizes = null;
     225        IEnumerable<int> indices = null;
    226226        IEnumerable<double> predictedValues = null;
    227227        switch (series.Name) {
    228228          case ESTIMATEDVALUES_ALL_SERIES_NAME:
    229             indizes = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).Except(Content.ProblemData.TrainingIndizes).Except(Content.ProblemData.TestIndizes).ToArray();
     229            indices = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).Except(Content.ProblemData.TrainingIndices).Except(Content.ProblemData.TestIndices).ToArray();
    230230            var estimatedValues = Content.EstimatedValues.ToArray();
    231             predictedValues = indizes.Select(index => estimatedValues[index]).ToList();
     231            predictedValues = indices.Select(index => estimatedValues[index]).ToList();
    232232            break;
    233233          case ESTIMATEDVALUES_TRAINING_SERIES_NAME:
    234             indizes = Content.ProblemData.TrainingIndizes.ToArray();
     234            indices = Content.ProblemData.TrainingIndices.ToArray();
    235235            predictedValues = Content.EstimatedTrainingValues.ToArray();
    236236            break;
    237237          case ESTIMATEDVALUES_TEST_SERIES_NAME:
    238             indizes = Content.ProblemData.TestIndizes.ToArray();
     238            indices = Content.ProblemData.TestIndices.ToArray();
    239239            predictedValues = Content.EstimatedTestValues.ToArray();
    240240            break;
    241241        }
    242         series.Points.DataBindXY(indizes, predictedValues);
     242        series.Points.DataBindXY(indices, predictedValues);
    243243        this.InsertEmptyPoints(series);
    244244        chart.Legends[series.Legend].ForeColor = Color.Black;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs

    r7990 r8139  
    148148        if (this.chart.Series[TRAINING_SERIES].Points.Count > 0)
    149149          this.chart.Series[TRAINING_SERIES].Points.DataBindXY(Content.EstimatedTrainingValues.ToArray(), "",
    150             dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TrainingIndizes).ToArray(), "");
     150            dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TrainingIndices).ToArray(), "");
    151151        if (this.chart.Series[TEST_SERIES].Points.Count > 0)
    152152          this.chart.Series[TEST_SERIES].Points.DataBindXY(Content.EstimatedTestValues.ToArray(), "",
    153            dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TestIndizes).ToArray(), "");
     153           dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TestIndices).ToArray(), "");
    154154
    155155        double max = Content.EstimatedTrainingValues.Concat(Content.EstimatedTestValues.Concat(Content.EstimatedValues.Concat(dataset.GetDoubleValues(targetVariableName)))).Max();
     
    196196          case TRAINING_SERIES:
    197197            predictedValues = Content.EstimatedTrainingValues.ToArray();
    198             targetValues = Content.ProblemData.Dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TrainingIndizes).ToArray();
     198            targetValues = Content.ProblemData.Dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TrainingIndices).ToArray();
    199199            break;
    200200          case TEST_SERIES:
    201201            predictedValues = Content.EstimatedTestValues.ToArray();
    202             targetValues = Content.ProblemData.Dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TestIndizes).ToArray();
     202            targetValues = Content.ProblemData.Dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TestIndices).ToArray();
    203203            break;
    204204        }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs

    r7259 r8139  
    148148    public override IEnumerable<double> EstimatedTrainingClassValues {
    149149      get {
    150         var rows = ProblemData.TrainingIndizes;
     150        var rows = ProblemData.TrainingIndices;
    151151        var estimatedValuesEnumerators = (from model in Model.Models
    152152                                          select new { Model = model, EstimatedValuesEnumerator = model.GetEstimatedClassValues(ProblemData.Dataset, rows).GetEnumerator() })
     
    167167    public override IEnumerable<double> EstimatedTestClassValues {
    168168      get {
    169         var rows = ProblemData.TestIndizes;
     169        var rows = ProblemData.TestIndices;
    170170        var estimatedValuesEnumerators = (from model in Model.Models
    171171                                          select new { Model = model, EstimatedValuesEnumerator = model.GetEstimatedClassValues(ProblemData.Dataset, rows).GetEnumerator() })
    172172                                         .ToList();
    173         var rowsEnumerator = ProblemData.TestIndizes.GetEnumerator();
     173        var rowsEnumerator = ProblemData.TestIndices.GetEnumerator();
    174174        // aggregate to make sure that MoveNext is called for all enumerators
    175175        while (rowsEnumerator.MoveNext() & estimatedValuesEnumerators.Select(en => en.EstimatedValuesEnumerator.MoveNext()).Aggregate(true, (acc, b) => acc & b)) {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolution.cs

    r7259 r8139  
    5151    }
    5252    public override IEnumerable<double> EstimatedTrainingClassValues {
    53       get { return GetEstimatedClassValues(ProblemData.TrainingIndizes); }
     53      get { return GetEstimatedClassValues(ProblemData.TrainingIndices); }
    5454    }
    5555    public override IEnumerable<double> EstimatedTestClassValues {
    56       get { return GetEstimatedClassValues(ProblemData.TestIndizes); }
     56      get { return GetEstimatedClassValues(ProblemData.TestIndices); }
    5757    }
    5858
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs

    r7259 r8139  
    8787    protected void CalculateResults() {
    8888      double[] estimatedTrainingClassValues = EstimatedTrainingClassValues.ToArray(); // cache values
    89       double[] originalTrainingClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();
     89      double[] originalTrainingClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).ToArray();
    9090      double[] estimatedTestClassValues = EstimatedTestClassValues.ToArray(); // cache values
    91       double[] originalTestClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();
     91      double[] originalTestClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndices).ToArray();
    9292
    9393      OnlineCalculatorError errorState;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolution.cs

    r7259 r8139  
    5959    }
    6060    public override IEnumerable<double> EstimatedTrainingClassValues {
    61       get { return GetEstimatedClassValues(ProblemData.TrainingIndizes); }
     61      get { return GetEstimatedClassValues(ProblemData.TrainingIndices); }
    6262    }
    6363    public override IEnumerable<double> EstimatedTestClassValues {
    64       get { return GetEstimatedClassValues(ProblemData.TestIndizes); }
     64      get { return GetEstimatedClassValues(ProblemData.TestIndices); }
    6565    }
    6666
     
    8282    }
    8383    public override IEnumerable<double> EstimatedTrainingValues {
    84       get { return GetEstimatedValues(ProblemData.TrainingIndizes); }
     84      get { return GetEstimatedValues(ProblemData.TrainingIndices); }
    8585    }
    8686    public override IEnumerable<double> EstimatedTestValues {
    87       get { return GetEstimatedValues(ProblemData.TestIndizes); }
     87      get { return GetEstimatedValues(ProblemData.TestIndices); }
    8888    }
    8989
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs

    r7259 r8139  
    103103    protected void CalculateRegressionResults() {
    104104      double[] estimatedTrainingValues = EstimatedTrainingValues.ToArray(); // cache values
    105       double[] originalTrainingValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();
     105      double[] originalTrainingValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).ToArray();
    106106      double[] estimatedTestValues = EstimatedTestValues.ToArray(); // cache values
    107       double[] originalTestValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();
     107      double[] originalTestValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndices).ToArray();
    108108
    109109      OnlineCalculatorError errorState;
     
    140140      double[] classValues;
    141141      double[] thresholds;
    142       var targetClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
     142      var targetClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices);
    143143      AccuracyMaximizationThresholdCalculator.CalculateThresholds(ProblemData, EstimatedTrainingValues, targetClassValues, out classValues, out thresholds);
    144144
     
    149149      double[] classValues;
    150150      double[] thresholds;
    151       var targetClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
     151      var targetClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices);
    152152      NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(ProblemData, EstimatedTrainingValues, targetClassValues, out classValues, out thresholds);
    153153
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringSolution.cs

    r7259 r8139  
    6868    public virtual IEnumerable<int> TrainingClusterValues {
    6969      get {
    70         return GetClusterValues(ProblemData.TrainingIndizes);
     70        return GetClusterValues(ProblemData.TrainingIndices);
    7171      }
    7272    }
     
    7474    public virtual IEnumerable<int> TestClusterValues {
    7575      get {
    76         return GetClusterValues(ProblemData.TestIndizes);
     76        return GetClusterValues(ProblemData.TestIndices);
    7777      }
    7878    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs

    r7265 r8139  
    7575    }
    7676
    77     public virtual IEnumerable<int> TrainingIndizes {
     77    public virtual IEnumerable<int> TrainingIndices {
    7878      get {
    7979        return Enumerable.Range(TrainingPartition.Start, Math.Max(0, TrainingPartition.End - TrainingPartition.Start))
     
    8181      }
    8282    }
    83     public virtual IEnumerable<int> TestIndizes {
     83    public virtual IEnumerable<int> TestIndices {
    8484      get {
    8585        return Enumerable.Range(TestPartition.Start, Math.Max(0, TestPartition.End - TestPartition.Start))
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs

    r7738 r8139  
    153153    public override IEnumerable<double> EstimatedTrainingValues {
    154154      get {
    155         var rows = ProblemData.TrainingIndizes;
     155        var rows = ProblemData.TrainingIndices;
    156156        var estimatedValuesEnumerators = (from model in Model.Models
    157157                                          select new { Model = model, EstimatedValuesEnumerator = model.GetEstimatedValues(ProblemData.Dataset, rows).GetEnumerator() })
     
    172172    public override IEnumerable<double> EstimatedTestValues {
    173173      get {
    174         var rows = ProblemData.TestIndizes;
     174        var rows = ProblemData.TestIndices;
    175175        var estimatedValuesEnumerators = (from model in Model.Models
    176176                                          select new { Model = model, EstimatedValuesEnumerator = model.GetEstimatedValues(ProblemData.Dataset, rows).GetEnumerator() })
    177177                                         .ToList();
    178         var rowsEnumerator = ProblemData.TestIndizes.GetEnumerator();
     178        var rowsEnumerator = ProblemData.TestIndices.GetEnumerator();
    179179        // aggregate to make sure that MoveNext is called for all enumerators
    180180        while (rowsEnumerator.MoveNext() & estimatedValuesEnumerators.Select(en => en.EstimatedValuesEnumerator.MoveNext()).Aggregate(true, (acc, b) => acc & b)) {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolution.cs

    r7735 r8139  
    5555    }
    5656    public override IEnumerable<double> EstimatedTrainingValues {
    57       get { return GetEstimatedValues(ProblemData.TrainingIndizes); }
     57      get { return GetEstimatedValues(ProblemData.TrainingIndices); }
    5858    }
    5959    public override IEnumerable<double> EstimatedTestValues {
    60       get { return GetEstimatedValues(ProblemData.TestIndizes); }
     60      get { return GetEstimatedValues(ProblemData.TestIndices); }
    6161    }
    6262
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs

    r7735 r8139  
    138138        OnlineCalculatorError errorState;
    139139        Add(new Result(TrainingMeanAbsoluteErrorResultName, "Mean of absolute errors of the model on the training partition", new DoubleValue()));
    140         double trainingMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTrainingValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes), out errorState);
     140        double trainingMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTrainingValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices), out errorState);
    141141        TrainingMeanAbsoluteError = errorState == OnlineCalculatorError.None ? trainingMAE : double.NaN;
    142142      }
     
    145145        OnlineCalculatorError errorState;
    146146        Add(new Result(TestMeanAbsoluteErrorResultName, "Mean of absolute errors of the model on the test partition", new DoubleValue()));
    147         double testMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTestValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes), out errorState);
     147        double testMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTestValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndices), out errorState);
    148148        TestMeanAbsoluteError = errorState == OnlineCalculatorError.None ? testMAE : double.NaN;
    149149      }
     
    152152        OnlineCalculatorError errorState;
    153153        Add(new Result(TrainingMeanErrorResultName, "Mean of errors of the model on the training partition", new DoubleValue()));
    154         double trainingME = OnlineMeanErrorCalculator.Calculate(EstimatedTrainingValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes), out errorState);
     154        double trainingME = OnlineMeanErrorCalculator.Calculate(EstimatedTrainingValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices), out errorState);
    155155        TrainingMeanError = errorState == OnlineCalculatorError.None ? trainingME : double.NaN;
    156156      }
     
    158158        OnlineCalculatorError errorState;
    159159        Add(new Result(TestMeanErrorResultName, "Mean of errors of the model on the test partition", new DoubleValue()));
    160         double testME = OnlineMeanErrorCalculator.Calculate(EstimatedTestValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes), out errorState);
     160        double testME = OnlineMeanErrorCalculator.Calculate(EstimatedTestValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndices), out errorState);
    161161        TestMeanError = errorState == OnlineCalculatorError.None ? testME : double.NaN;
    162162      }
     
    166166    protected void CalculateResults() {
    167167      IEnumerable<double> estimatedTrainingValues = EstimatedTrainingValues; // cache values
    168       IEnumerable<double> originalTrainingValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
     168      IEnumerable<double> originalTrainingValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices);
    169169      IEnumerable<double> estimatedTestValues = EstimatedTestValues; // cache values
    170       IEnumerable<double> originalTestValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes);
     170      IEnumerable<double> originalTestValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndices);
    171171
    172172      OnlineCalculatorError errorState;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs

    r7259 r8139  
    3636    IntRange TestPartition { get; }
    3737
    38     IEnumerable<int> TrainingIndizes { get; }
    39     IEnumerable<int> TestIndizes { get; }
     38    IEnumerable<int> TrainingIndices { get; }
     39    IEnumerable<int> TestIndices { get; }
    4040
    4141    bool IsTrainingSample(int index);
Note: See TracChangeset for help on using the changeset viewer.