SPMF Implementation of VMSP
Posted: Mon Jan 09, 2023 2:59 pm
Hi all,
I have been implementing VMSP in typescript for the past few days (I'd like to thank the authors for creating and implementing this algorithm in SPMF), and I have a question regarding how it was implemented in Java.
When saving a pattern p, the condition to decide whether another pattern pPrime is a super-pattern of p involves checking that the support of p is superior or equal to the support of pPrime (lines 774-778 of AlgoVMSP.java):
Why the support of p must be superior or equal to the support of pPrime for pPrime to be a superpattern of p? More generally, why is the support involved here? My understanding of maximal sequential patterns is that they are not contained by another pattern w.r.t. minsup.
As a result, the java implementation returns the following two patterns:
41 -1 42 -1 support : 302
41 -1 8 -1 42 -1 support : 307
It is clear that the first is contained in the second (I have maxGap set to 5), but because the support of the first is lower than the support of the second, p.bitmap.getSupport() >= pPrime.support is false and thus the superpattern check fails.
Is this a bug or did I miss something?
Thank you so much for your time.
I have been implementing VMSP in typescript for the past few days (I'd like to thank the authors for creating and implementing this algorithm in SPMF), and I have a question regarding how it was implemented in Java.
When saving a pattern p, the condition to decide whether another pattern pPrime is a super-pattern of p involves checking that the support of p is superior or equal to the support of pPrime (lines 774-778 of AlgoVMSP.java):
Code: Select all
if (p.prefix.sumOfEvenItems <= pPrime.prefix.sumOfEvenItems
&& p.prefix.sumOfOddItems <= pPrime.prefix.sumOfOddItems && p.bitmap.getSupport() >= pPrime.support
&& strictlyContains(pPrime.prefix, p.prefix)) {
return true;
}
As a result, the java implementation returns the following two patterns:
41 -1 42 -1 support : 302
41 -1 8 -1 42 -1 support : 307
It is clear that the first is contained in the second (I have maxGap set to 5), but because the support of the first is lower than the support of the second, p.bitmap.getSupport() >= pPrime.support is false and thus the superpattern check fails.
Is this a bug or did I miss something?
Thank you so much for your time.