Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/16/12 20:59:55 (12 years ago)
Author:
gkronber
Message:

#1925 used symbolic solution from MATLAB for calculation of cut points. Fixed numerical problem with calculation of NormalCDF by calculating / approximated the logarithm of the normal CDF.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/ThresholdCalculatorsTest.cs

    r8658 r8917  
    7979      {
    8080        // constant output values for all classes
    81         double[] estimatedValues = new double[] { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 };
    82         double[] targetClassValues = new double[] { 2.0, 2.0, 2.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 };
     81        // most frequent class is 0
     82        double[] estimatedValues = new double[] { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 };
     83        double[] targetClassValues = new double[] { 2.0, 2.0, 2.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 };
    8384        double[] classValues;
    8485        double[] thresholds;
     
    179180
    180181
    181         var expectedClassValues = new double[] { 2.0, 1.0, 2.0, 3.0 };
    182         var expectedTresholds = new double[] { double.NegativeInfinity, -18.365068542315438, 1.6573010498191565, 2.314962133866949 };
     182        var expectedClassValues = new double[] { 3.0, 1.0, 2.0, 3.0 };
     183        var expectedTresholds = new double[] { double.NegativeInfinity, -18.36483129043598, 1.6574168546810319, 2.3148463106026012 };
    183184
    184185        AssertEqual(expectedClassValues, classValues);
Note: See TracChangeset for help on using the changeset viewer.