Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/12/11 19:24:45 (13 years ago)
Author:
gkronber
Message:

#1656 implemented calculator to calculate the normalized Gini coefficient for classification solutions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs

    r6740 r6913  
    117117      double testR2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState);
    118118      TestRSquared = errorState == OnlineCalculatorError.None ? testR2 : double.NaN;
     119
     120      double trainingNormalizedGini = NormalizedGiniCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
     121      if (errorState != OnlineCalculatorError.None) trainingNormalizedGini = double.NaN;
     122      double testNormalizedGini = NormalizedGiniCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
     123      if (errorState != OnlineCalculatorError.None) testNormalizedGini = double.NaN;
     124
     125      TrainingNormalizedGiniCoefficient = trainingNormalizedGini;
     126      TestNormalizedGiniCoefficient = testNormalizedGini;
    119127    }
    120128
Note: See TracChangeset for help on using the changeset viewer.