コード例 #1
0
def test_get_support():
    db = [[2, 1, 3, 4], [1, 2, 4], [1, 2, 4], [1, 2, 4], [2, 4], [2, 4], [1],
          [1], [3]]
    database = DatabaseSlim(db)
    a = database.get_support(PatternSlim(1))
    b = database.get_support(PatternSlim(2))
    c = database.get_support(PatternSlim(3))
    d = database.get_support(PatternSlim(4))
    assert a == 6
    assert b == 6
    assert c == 2
    assert d == 6
コード例 #2
0
def test_get_support_iris():
    file = Files("iris")
    database = DatabaseSlim(file.list_int)
    a = database.get_support(PatternSlim(6))
    assert a == 67