def test_score_matching_matches_sym():
    sigma = 1.
    lmbda = 1.
    Z = np.random.randn(100, 2)

    a_sym = develop_gaussian.fit_sym(Z, sigma, lmbda)
    a = gaussian.fit(Z, Z, sigma, lmbda)

    assert_allclose(a, a_sym)
示例#2
0
def test_score_matching_matches_sym():
    sigma = 1.
    lmbda = 1.
    Z = np.random.randn(100, 2)
    
    a_sym = develop_gaussian.fit_sym(Z, sigma, lmbda)
    a = gaussian.fit(Z, Z, sigma, lmbda)
    
    assert_allclose(a, a_sym)
def test_score_matching_objective_matches_sym():
    sigma = 1.
    lmbda = 1.
    Z = np.random.randn(100, 2)

    K = gaussian_kernel(Z, sigma=sigma)
    J_sym = develop_gaussian.fit_sym(Z, sigma, lmbda, K)
    J = gaussian.fit(Z, Z, sigma, lmbda, K)

    assert_allclose(J, J_sym)
示例#4
0
def test_score_matching_objective_matches_sym():
    sigma = 1.
    lmbda = 1.
    Z = np.random.randn(100, 2)
    
    K = gaussian_kernel(Z, sigma=sigma)
    J_sym = develop_gaussian.fit_sym(Z, sigma, lmbda, K)
    J = gaussian.fit(Z, Z, sigma, lmbda, K)
    
    assert_allclose(J, J_sym)