Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect result #34

Open
yang170 opened this issue Oct 22, 2021 · 1 comment
Open

Incorrect result #34

yang170 opened this issue Oct 22, 2021 · 1 comment

Comments

@yang170
Copy link

yang170 commented Oct 22, 2021

Data

a a b c a c
a d c b c a
e f a b d f

Running prefixspan-cli frequent 3 --text fmt-db1.txt gives me

e : 3
e e : 3
e b : 3
b : 3
@feng-1985
Copy link

feng-1985 commented Nov 25, 2021

replace with numbers, you can get the correct results
cat fmt-db1.txt
1 1 2 3 1 3
1 4 3 2 3 1
5 6 1 2 4 6

prefixspan-cli frequent 3 fmt-db1.txt
1 : 3
1 2 : 3
2 : 3

or use python

from prefixspan import PrefixSpan

db = [
... ['a','a','b','c','a','c'],
... ['a','d','c','b','c','a'],
... ['e','f','a','b','d','f']
... ]

ps = PrefixSpan(db)

print(ps.frequent(3))
[(3, ['a']), (3, ['a', 'b']), (3, ['b'])]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants