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

Configure minlen, maxlen outside instead of hardcode to 1 and 1000 respectively #30

Open
abhi-rawat1 opened this issue Jun 29, 2020 · 2 comments

Comments

@abhi-rawat1
Copy link

Hello,

I do have a requirement where I need to find matching patterns (along with theirs frequency counters) from given input list stating each matched pattern length should be greater than 5. I noticed that there is an one parameter named as 'minlen' that can be used for this purpose.

So is it possible to configure minlen, maxlen outside instead of hardcode to 1 and 1000 respectively? Or is there any other way to achieve this requirement?

Please let me know if you need any details on that.

@avijit1258
Copy link

I have the same query. I can see that from cli this two parameters can be set. But is there any way to set them in the API? Having the way in the documentation might improve the quality as well. Thanks in advance.

@avijit1258
Copy link

Hello @abhi-rawat1,

I found a work around for setting the minlen, maxlen from digging into the codebase.
Screen Shot 2020-07-25 at 2 48 15 AM

preprocess = self.execution_paths
ps = PrefixSpan(preprocess)
ps.minlen = 5
ps.maxlen = 15
top5 = ps.topk(40, closed = True)

See the sample code.

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

Successfully merging a pull request may close this issue.

2 participants