Changeset 8549 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective
- Timestamp:
- 08/31/12 13:47:32 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePenaltyScoreEvaluator.cs
r8548 r8549 52 52 if (!estimations.MoveNext()) return double.NaN; 53 53 54 double penalty = 0.0; 54 var penalty = 0.0; 55 var count = 0; 55 56 foreach (var r in rows) { 56 57 var actualClass = problemData.Dataset.GetDoubleValue(problemData.TargetVariable, r); 57 58 penalty += problemData.GetClassificationPenalty(actualClass, estimations.Current); 58 59 estimations.MoveNext(); 60 count++; 59 61 } 60 return penalty ;62 return penalty / count; 61 63 } 62 64
Note: See TracChangeset
for help on using the changeset viewer.