Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/14/12 13:25:17 (12 years ago)
Author:
gkronber
Message:

#1902 changed interface for covariance functions to improve readability, fixed several bugs in the covariance functions and in the line chart for Gaussian process models.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/GaussianProcessFunctionsTest.cs

    r8473 r8484  
    904904      var hyp = Enumerable.Repeat(hypValue, nHyp).ToArray();
    905905      cf.SetParameter(hyp);
    906       cf.SetData(x, xt);
    907906
    908907      int rows0 = x.GetLength(0);
     
    911910      for (int i = 0; i < rows0; i++)
    912911        for (int j = 0; j < rows1; j++)
    913           actualCov[i, j] = cf.GetCovariance(i, j);
     912          actualCov[i, j] = cf.GetCrossCovariance(x, xt, i, j);
    914913
    915914      AssertEqual(expectedCov, actualCov, delta);
     
    917916      for (int i = 0; i < rows0; i++)
    918917        for (int j = 0; j < rows1; j++) {
     918          var g = cf.GetGradient(x, i, j).ToArray();
    919919          for (int k = 0; k < nHyp; k++)
    920             Assert.AreEqual(expectedGradients[k][i, j], cf.GetGradient(i, j, k), delta);
     920            Assert.AreEqual(expectedGradients[k][i, j], g[k], delta);
    921921        }
    922922    }
Note: See TracChangeset for help on using the changeset viewer.