Changeset 14498 for branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression
- Timestamp:
- 12/17/16 15:42:19 (8 years ago)
- Location:
- branches/symbreg-factors-2650
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/symbreg-factors-2650
- Property svn:mergeinfo changed
/trunk/sources merged: 14457-14458,14463-14465,14468-14469,14475-14476,14478-14479,14481-14483,14486,14493-14494
- Property svn:mergeinfo changed
-
branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis merged: 14463,14465
- Property svn:mergeinfo changed
-
branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionVariableImpactsCalculator.cs
r14351 r14498 122 122 } 123 123 124 125 124 var impacts = new Dictionary<string, double>(); 126 125 var modifiableDataset = ((Dataset)dataset).ToModifiable(); 127 126 127 var inputvariables = new HashSet<string>(problemData.AllowedInputVariables.Union(solution.Model.VariablesUsedForPrediction)); 128 var allowedInputVariables = dataset.VariableNames.Where(v => inputvariables.Contains(v)).ToList(); 129 128 130 // calculate impacts for double variables 129 foreach (var inputVariable in problemData.AllowedInputVariables.Where(problemData.Dataset.VariableHasType<double>)) {131 foreach (var inputVariable in allowedInputVariables.Where(problemData.Dataset.VariableHasType<double>)) { 130 132 var newEstimates = EvaluateModelWithReplacedVariable(solution.Model, inputVariable, modifiableDataset, rows, replacementMethod); 131 133 var newR2 = OnlinePearsonsRCalculator.Calculate(targetValues, newEstimates, out error); … … 137 139 } 138 140 // calculate impacts for factor variables 139 foreach (var inputVariable in problemData.AllowedInputVariables.Where(problemData.Dataset.VariableHasType<string>)) {141 foreach (var inputVariable in allowedInputVariables.Where(problemData.Dataset.VariableHasType<string>)) { 140 142 var smallestImpact = double.PositiveInfinity; 141 143 foreach (var repl in problemData.Dataset.GetStringValues(inputVariable, rows).Distinct()) {
Note: See TracChangeset
for help on using the changeset viewer.