Adds the sequence length (number of transitions) and total number of events of event sequences to the data attribute of a
subseqelist event sequence object.
Logical: Should a column with average number of occurrences also be added?
An event sequence object is an ordered list of transitions, with each transition a non-ordered list of events occurring at a same position.
Average occurrences by sequence may be useful when counts report number of occurrences rather than number of sequences containing the subsequence.
fsubseq updated with the additional information.
Nicolas Müller and Gilbert Ritschard
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
data(actcal.tse) actcal.seqe <- seqecreate(actcal.tse[1:500,]) ##Searching for frequent subsequences appearing at least 30 times fsubseq <- seqefsub(actcal.seqe, min.support=10) fsubseq <- seqentrans(fsubseq) ## dispaying only those with at least 3 transitions fsubseq[fsubseq$data$ntrans>2] ## dispaying only those with at least 3 events fsubseq[fsubseq$data$nevent>2] ## Average occurrences when counting distinct occurrences ct <- seqeconstraint(count.method="CDIST_O") fsb <- seqefsub(actcal.seqe, min.support=10, constraint=ct) fsb <- seqentrans(fsb, avg.occ=TRUE) fsb[1:10,]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.