Free cookie consent management tool by TermsFeed Policy Generator

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

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

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • 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        }
Note: See TracChangeset for help on using the changeset viewer.