Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13845


Ignore:
Timestamp:
05/11/16 17:17:04 (9 years ago)
Author:
pfleck
Message:

#2597

  • All used variables of a model are initially checked when opening the Target Response Gradient View.
  • Fixed a bug on axis scaling.
Location:
branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/GradientChart.cs

    r13843 r13845  
    278278      axis.Interval = (axis.Maximum - axis.Minimum) / ticks;
    279279
    280       chart.ChartAreas[0].RecalculateAxesScale();
     280      try {
     281        chart.ChartAreas[0].RecalculateAxesScale();
     282      }
     283      catch (InvalidOperationException) {
     284        // Can occur if eg. axis min == axis max
     285      }
    281286    }
    282287
  • branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/RegressionSolutionTargetResponseGradientView.cs

    r13843 r13845  
    6565      var problemData = Content.ProblemData;
    6666      // create dataset
    67       var variableNames = Content.GetUsedVariablesForPrediction().ToList();
    68       var variableValues = variableNames.Select(x => new List<double> { problemData.Dataset.GetDoubleValues(x, problemData.TrainingIndices).Median() });
    69       var sharedFixedVariables = new ModifiableDataset(variableNames, variableValues);
     67      var allowedInputVariables = Content.ProblemData.AllowedInputVariables;
     68      var variableValues = allowedInputVariables.Select(x => new List<double> { problemData.Dataset.GetDoubleValues(x, problemData.TrainingIndices).Median() });
     69      var sharedFixedVariables = new ModifiableDataset(allowedInputVariables, variableValues);
    7070      // create charts
    7171      charts.Clear();
    72       foreach (var variableName in variableNames) {
     72      foreach (var variableName in allowedInputVariables) {
    7373        var gradientChart = new GradientChart {
    7474          Dock = DockStyle.Fill,
     
    9494      // update variable list
    9595      variableListView.Items.Clear();
    96       variableListView.Items.AddRange(variableNames.Select(x => new ListViewItem(x, 0)).ToArray());
     96      foreach (var variable in allowedInputVariables)
     97        variableListView.Items.Add(key: variable, text: variable, imageIndex: 0);
     98
     99      foreach (var variable in Content.GetUsedVariablesForPrediction())
     100        variableListView.Items[variable].Checked = true;
    97101    }
    98102
Note: See TracChangeset for help on using the changeset viewer.