コード例 #1
0
ファイル: test_meta_des.py プロジェクト: marianaasouza/DESlib
def test_sample_selection_working():
    meta_test = METADES(
        create_pool_all_agree(0, 10) + create_pool_all_agree(1, 5))
    meta_test.processed_dsel = np.ones((5, 15))
    meta_test.processed_dsel[(1, 3, 4), 5:] = 0
    expected = np.asarray([1, 1 / 3, 1, 1 / 3, 1 / 3])
    value = meta_test._sample_selection_agreement()
    assert np.array_equal(value, expected)
コード例 #2
0
ファイル: test_meta_des.py プロジェクト: postyear/DES
def test_sample_selection_working():
    meta_test = METADES()
    meta_test.n_classifiers_ = 15
    meta_test.DSEL_processed_ = np.ones((5, 15))
    meta_test.DSEL_processed_[(1, 3, 4), 5:] = 0
    expected = np.asarray([1, 1 / 3, 1, 1 / 3, 1 / 3])
    value = meta_test._sample_selection_agreement()
    assert np.array_equal(value, expected)
コード例 #3
0
def test_sample_selection_working():
    pool_classifiers = create_pool_all_agree(0, 10) + create_pool_all_agree(
        1, 5)
    meta_test = METADES(pool_classifiers=pool_classifiers)
    meta_test.n_classifiers_ = len(pool_classifiers)
    meta_test.DSEL_processed_ = np.ones((5, 15))
    meta_test.DSEL_processed_[(1, 3, 4), 5:] = 0
    expected = np.asarray([1, 1 / 3, 1, 1 / 3, 1 / 3])
    value = meta_test._sample_selection_agreement()
    assert np.array_equal(value, expected)
コード例 #4
0
ファイル: test_meta_des.py プロジェクト: qhduan/DESlib
def test_sample_selection():
    meta_test = METADES(
        create_pool_all_agree(0, 10) + create_pool_all_agree(1, 5))
    meta_test.processed_dsel = dsel_processed_ex1
    value = meta_test._sample_selection_agreement(0)
    assert value == 0.2