Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8834


Ignore:
Timestamp:
10/23/12 10:28:42 (12 years ago)
Author:
sforsten
Message:

#1292: changed CalculateHoeffdingsDTest due to a change in the name of a static method

File:
1 edited

Legend:

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

    r8355 r8834  
    146146      var xs = new double[] { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
    147147      var ys = new double[] { 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0 };
    148       var d = HoeffdingsDependenceCalculator.Calculate(xs, ys, out error);
     148      var d = HoeffdingsDependenceCalculator.CalculateHoeffdings(xs, ys, out error);
    149149      Assert.AreEqual(error, OnlineCalculatorError.None);
    150150      Assert.AreEqual(d, 1.0, 1E-5);
     
    152152      // perfect negative dependency
    153153      ys = xs.Select(x => -x).ToArray();
    154       d = HoeffdingsDependenceCalculator.Calculate(xs, ys, out error);
     154      d = HoeffdingsDependenceCalculator.CalculateHoeffdings(xs, ys, out error);
    155155      Assert.AreEqual(error, OnlineCalculatorError.None);
    156156      Assert.AreEqual(d, 1.0, 1E-5);
     
    159159      xs = new double[] { 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0, 5.0 };
    160160      ys = new double[] { 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0, 6.0, 6.0, 6.0 };
    161       d = HoeffdingsDependenceCalculator.Calculate(xs, ys, out error);
     161      d = HoeffdingsDependenceCalculator.CalculateHoeffdings(xs, ys, out error);
    162162      Assert.AreEqual(error, OnlineCalculatorError.None);
    163163      Assert.AreEqual(d, 0.6783, 1E-5);
     
    166166      xs = new double[] { 1.0, 1.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 6.0, 6.0 };
    167167      ys = xs.Select(x => x * x).ToArray();
    168       d = HoeffdingsDependenceCalculator.Calculate(xs, ys, out error);
     168      d = HoeffdingsDependenceCalculator.CalculateHoeffdings(xs, ys, out error);
    169169      Assert.AreEqual(error, OnlineCalculatorError.None);
    170170      Assert.AreEqual(d, 0.75, 1E-5);
     
    173173      xs = new double[] { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 };
    174174      ys = new double[] { 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0 };
    175       d = HoeffdingsDependenceCalculator.Calculate(xs, ys, out error);
     175      d = HoeffdingsDependenceCalculator.CalculateHoeffdings(xs, ys, out error);
    176176      Assert.AreEqual(error, OnlineCalculatorError.None);
    177177      Assert.AreEqual(d, -0.3516, 1E-4);
     
    184184
    185185      // independent
    186       d = HoeffdingsDependenceCalculator.Calculate(xs, ys, out error);
     186      d = HoeffdingsDependenceCalculator.CalculateHoeffdings(xs, ys, out error);
    187187      Assert.AreEqual(error, OnlineCalculatorError.None);
    188188      Assert.AreEqual(d, -0.00023, 1E-5);
     
    192192      ys = xs.Select(x => x * x).ToArray();
    193193
    194       d = HoeffdingsDependenceCalculator.Calculate(xs, ys, out error);
     194      d = HoeffdingsDependenceCalculator.CalculateHoeffdings(xs, ys, out error);
    195195      Assert.AreEqual(error, OnlineCalculatorError.None);
    196196      Assert.AreEqual(d, 0.25071, 1E-5);
    197197
    198198      // symmetric?
    199       d = HoeffdingsDependenceCalculator.Calculate(ys, xs, out error);
     199      d = HoeffdingsDependenceCalculator.CalculateHoeffdings(ys, xs, out error);
    200200      Assert.AreEqual(error, OnlineCalculatorError.None);
    201201      Assert.AreEqual(d, 0.25071, 1E-5);
Note: See TracChangeset for help on using the changeset viewer.