- Timestamp:
- 09/03/09 15:25:09 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Modeling/3.2/VariableEvaluationImpactCalculator.cs
r2324 r2330 100 100 oldValues = dirtyDataset.ReplaceVariableValues(variableName, Enumerable.Repeat(mean, end - start), start, end); 101 101 newValues = predictor.Predict(dirtyDataset, start, end); 102 evaluationImpacts[variableName] = CalculateMSE(referenceValues, newValues);102 evaluationImpacts[variableName] = 1 - CalculateVAF(referenceValues, newValues); 103 103 dirtyDataset.ReplaceVariableValues(variableName, oldValues, start, end); 104 104 } 105 105 } 106 106 107 double impactsSum = evaluationImpacts.Values.Sum();108 if (impactsSum.IsAlmost(0.0)) impactsSum = 1.0;109 foreach (KeyValuePair<string, double> p in evaluationImpacts.ToList())110 evaluationImpacts[p.Key] = p.Value / impactsSum;111 112 107 return evaluationImpacts; 113 108 } 114 109 115 private static double Calculate MSE(double[] referenceValues, double[] newValues) {110 private static double CalculateVAF(double[] referenceValues, double[] newValues) { 116 111 try { 117 return Simple MSEEvaluator.Calculate(MatrixCreator<double>.CreateMatrix(referenceValues, newValues));112 return SimpleVarianceAccountedForEvaluator.Calculate(MatrixCreator<double>.CreateMatrix(referenceValues, newValues)); 118 113 } 119 114 catch (ArgumentException) {
Note: See TracChangeset
for help on using the changeset viewer.