ymoch / apyori

A simple implementation of Apriori algorithm by Python.
MIT License
248 stars 93 forks source link

Relevance of the rules #36

Closed TLOshini closed 6 years ago

TLOshini commented 6 years ago

Hi,

Can I please know if the rules returned from the algorithm are sorted by any measure? Or if there's a method to retrieve the top-n most relevant rules?

ymoch commented 6 years ago

I'm sorry for my TOO LATE response... Apyori has no methods to sort results. The major reason is that most of processes are lazily evaluated. You can sort them by native sorted method (note that sorted will buffer all items, which results in memory consumption).