chuanconggao / PrefixSpan-py

The shortest yet efficient Python implementation of the sequential pattern mining algorithm PrefixSpan, closed sequential pattern mining algorithm BIDE, and generator sequential pattern mining algorithm FEAT.
https://git.io/prefixspan
MIT License
414 stars 92 forks source link

Issue with key parameter input #22

Open WYannis opened 5 years ago

WYannis commented 5 years ago

Hello,

Thank you for your very convenient package. Computation time is great.

I'd like to count the occurrences of patterns in my database, not just the number of times they appear as prefixes. Thus, I wanted to specify a key function that could count this. Unfortunately, everytime i try to use the key parameter, the output is : 'NoneType' object is not callable'. I then tried to change the defaultkey in prefixspan.py to len(patt) instead of len(matches) and the same happened. I then changed it back to len(matches) and rather than going back to a normal output it was still 'NoneType object is not callable'.

Would you have any idea on where the problem comes from ?

I work on Oracle VM Ubuntu 16, Anaconda python 3.7, Spyder IDE

Thank you.

helenkimber commented 5 years ago

I am also having the same problem. Does anyone know what I'm doing wrong?

pheman commented 4 years ago

same issue, however it seems that the project is out of valid maintainence

chuanconggao commented 4 years ago

No sure exactly why without failed examples, as default key is used in algorithm. Can you share some examples?

BTW, this project is currently having low activities due to my busy work schedule, but I will keep it alive.

trmanish commented 4 years ago

how can one get rules of A---B form from this? This gives frequent sequences but how to get rules then