Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14463 for trunk/sources


Ignore:
Timestamp:
12/07/16 16:10:25 (8 years ago)
Author:
mkommend
Message:

#2673: Minor changes in RegressionSolutionVariableImpactCalculation to includes variables the are used for prediction but not allowed as input variables in the problem data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionVariableImpactsCalculator.cs

    r14348 r14463  
    122122      }
    123123
    124 
    125124      var impacts = new Dictionary<string, double>();
    126125      var modifiableDataset = ((Dataset)dataset).ToModifiable();
    127126
    128       foreach (var inputVariable in problemData.AllowedInputVariables) {
     127      var inputvariables = new HashSet<string>(problemData.AllowedInputVariables.Union(solution.Model.VariablesUsedForPrediction));
     128      var allowedInputVariables = dataset.VariableNames.Where(v => inputvariables.Contains(v)).ToList();
     129
     130      foreach (var inputVariable in allowedInputVariables) {
    129131        var newEstimates = EvaluateModelWithReplacedVariable(solution.Model, inputVariable, modifiableDataset, rows, replacement);
    130132        var newR2 = OnlinePearsonsRCalculator.Calculate(targetValues, newEstimates, out error);
Note: See TracChangeset for help on using the changeset viewer.