Esempio n. 1
0
def test_prank_linear_kernel():
    est = KernelPRank(kernel="linear",
                      n_iter=10,
                      shuffle=False,
                      random_state=0)
    est.fit(X, y)
    np.testing.assert_almost_equal(est.score(X, y), 41.86, 2)
Esempio n. 2
0
def test_prank_rbf_kernel():
    est = KernelPRank(kernel="rbf",
                      gamma=100,
                      n_iter=10,
                      shuffle=False,
                      random_state=0)
    est.fit(X, y)
    np.testing.assert_almost_equal(est.score(X, y), 15.84, 2)
Esempio n. 3
0
def test_prank_rbf_kernel():
    est = KernelPRank(kernel="rbf", gamma=100, n_iter=10, shuffle=False,
                      random_state=0)
    est.fit(X, y)
    assert_almost_equal(est.score(X, y), 15.84, 2)
Esempio n. 4
0
def test_prank_linear_kernel():
    est = KernelPRank(kernel="linear", n_iter=10, shuffle=False,
                      random_state=0)
    est.fit(X, y)
    assert_almost_equal(est.score(X, y), 41.86, 2)