Example #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)
Example #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)
Example #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)
Example #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)