You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, I'm hoping you can help me find the support for all sequences of any length in my database (db) that end with a particular item (e.g., 'LATE').
Is the best method to do this as shown below? (note: 'LATE' is always the final item in the sequence if it is present)
ps = PrefixSpan(db)
LATE_results = ps.frequent(1, filter=lambda patt, matches: 'LATE' in patt == True)
Second, after achieving the result above, what is the best way to take every sequence present in LATE_results, remove 'LATE' from the sequence, and then calculate the support of the remaining subsequence in the original db? I'm not sure whether to use the filter, key, or callback options for this.
Ultimately, I am trying to use your great package to perform sequential rule mining. In other words, I want to calculate support(subsequence_i --> LATE) / support(subsequence_i) for all sequences that end in 'LATE'. Another example of this would look like support (A --> B --> F --> G --> LATE) / support(A --> B --> F --> G).
Thank you in advance for any guidance you can provide!
The text was updated successfully, but these errors were encountered:
Hi,
First, I'm hoping you can help me find the support for all sequences of any length in my database (db) that end with a particular item (e.g., 'LATE').
Is the best method to do this as shown below? (note: 'LATE' is always the final item in the sequence if it is present)
ps = PrefixSpan(db)
LATE_results = ps.frequent(1, filter=lambda patt, matches: 'LATE' in patt == True)
Second, after achieving the result above, what is the best way to take every sequence present in LATE_results, remove 'LATE' from the sequence, and then calculate the support of the remaining subsequence in the original db? I'm not sure whether to use the filter, key, or callback options for this.
Ultimately, I am trying to use your great package to perform sequential rule mining. In other words, I want to calculate support(subsequence_i --> LATE) / support(subsequence_i) for all sequences that end in 'LATE'. Another example of this would look like support (A --> B --> F --> G --> LATE) / support(A --> B --> F --> G).
Thank you in advance for any guidance you can provide!
The text was updated successfully, but these errors were encountered: