Changeset 2368 for trunk/sources/HeuristicLab.Modeling/3.2
- Timestamp:
- 09/17/09 13:32:19 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Modeling/3.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Modeling/3.2/VariableEvaluationImpactCalculator.cs
r2330 r2368 97 97 foreach (string variableName in variables) { 98 98 if (variableName != targetVariableName) { 99 mean = dataset.GetMean(variableName, start, end); 100 oldValues = dirtyDataset.ReplaceVariableValues(variableName, Enumerable.Repeat(mean, end - start), start, end); 101 newValues = predictor.Predict(dirtyDataset, start, end); 102 evaluationImpacts[variableName] = 1 - CalculateVAF(referenceValues, newValues); 103 dirtyDataset.ReplaceVariableValues(variableName, oldValues, start, end); 99 if (dataset.CountMissingValues(variableName, start, end) < (end - start) && dataset.GetRange(variableName, start, end) > 0.0) { 100 mean = dataset.GetMean(variableName, start, end); 101 oldValues = dirtyDataset.ReplaceVariableValues(variableName, Enumerable.Repeat(mean, end - start), start, end); 102 newValues = predictor.Predict(dirtyDataset, start, end); 103 evaluationImpacts[variableName] = 1 - CalculateVAF(referenceValues, newValues); 104 dirtyDataset.ReplaceVariableValues(variableName, oldValues, start, end); 105 } else { 106 evaluationImpacts[variableName] = 0.0; 107 } 104 108 } 105 109 } -
trunk/sources/HeuristicLab.Modeling/3.2/VariableQualityImpactCalculator.cs
r2357 r2368 99 99 100 100 foreach (string variableName in variables) { 101 if (variableName != targetVariableName) { 101 if (dataset.CountMissingValues(variableName, start, end) < (end - start) && 102 dataset.GetRange(variableName, start, end) > 0.0 && 103 variableName != targetVariableName) { 102 104 mean = dataset.GetMean(variableName, start, end); 103 105 oldValues = dirtyDataset.ReplaceVariableValues(variableName, Enumerable.Repeat(mean, end - start), start, end); … … 106 108 evaluationImpacts[variableName] = newMSE / oldMSE; 107 109 dirtyDataset.ReplaceVariableValues(variableName, oldValues, start, end); 110 } else { 111 evaluationImpacts[variableName] = 1.0; 108 112 } 109 113 }
Note: See TracChangeset
for help on using the changeset viewer.