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

How are intrepreting this as sequential data bases #38

Open
xander412 opened this issue Jul 21, 2022 · 4 comments
Open

How are intrepreting this as sequential data bases #38

xander412 opened this issue Jul 21, 2022 · 4 comments

Comments

@xander412
Copy link

xander412 commented Jul 21, 2022

Actually sequential databases are like
[
[[1, 2], [1], [1, 3]],
[[1, 2, 4], [3]],
[[4, 5], [1], [4,5,6]]
]
How can we give this as input to this algorithm?

@LeCarteloo
Copy link

Hey, did you figure it out? I got the same problem.

@xander412
Copy link
Author

xander412 commented Jan 13, 2023 via email

@KASDmusic
Copy link

I gonna do the same thing and I'm about to transform each item into a string representation
ex :
[
["1,2","1","1,3"],
["1,2,4", "3"],
["4,5", "1", "4,5,6"]
]

if the order can change just sort it each time before convert to string.

@kittentronic
Copy link

The readme says Outputs traditional single-item sequential patterns, in other words I don't think this implementation currently supports itemsets. As @KASDmusic suggests, you can use strings (or any Python hashable type, such as frozensets) instead of integers as your sequence items, but then you will not find subsequences with subsets of those itemsets e.g. in the sequence ["4,5", "1", "4,5,6"] you will not find the subsequence ["4", "1", "5, 6"] which should be a valid subsequence according to the PrefixSpan paper.

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

4 participants