Learn R Programming

TraMineR (version 1.8-9)

seqeconstraint: Setting time constraints and the counting method

Description

Function used to set time constraints and the counting method in methods (seqe..) for event sequences such as seqefsub for searching frequent subsequences or seqeapplysub for checking occurrences of subsequences.

Usage

seqeconstraint(maxGap = -1, windowSize = -1, ageMin = -1,
     ageMax = -1, ageMaxEnd = -1, countMethod = 1)

Arguments

maxGap
The maximum time gap between two events
windowSize
The maximum time span accepted for subsequences
ageMin
Minimal start time position allowed for subsequences. Ignored when equal to -1 (default).
ageMax
Maximal start time position allowed for subsequences. Ignored when equal to -1 (default).
ageMaxEnd
Maximal end time position allowed for subsequences. Ignored when equal to -1 (default).
countMethod
By default, subsequences are counted only one time by sequence ('COBJ' method). Alternative counting methods can be called by setting this argument to 'CDIST_O', 'CWIN', 'CMINWIN' or

Value

  • A constraint object containing one item per constraint type.

Details

maxGap, windowSize, ageMin, ageMax and ageMaxEnd. If so, two events should not be separated by more than maxGap and the whole subsequence should not exceed a windowSize time span. The other parameters specify the start and end age of the subsequence, it should start between ageMin and ageMax and finish before ageMaxEnd. Parameters ageMin, ageMax and ageMaxEnd are interpreted as the number of positions (time units) from the beginning of the sequence. There are 5 options for the countMethod argument. (1) By default, subsequences are counted by occurrence by object ("COBJ" method). Alternatives are (2) "CDIST_O" (distinct occurrences with possibility of event-timestamp overlap), (3) "CWIN" (one occurrence of span-window), (4) "CMINWIN" (number of minimal windows of occurrence) and (5) "CDIST" (distinct occurrences without event-timestamp overlap). See references.

References

Joshi, Mahesh V., George Karypis, and Vipin Kumar (2001) A Universal Formulation of Sequential Patterns Proceedings of the KDD'2001 Workshop on Temporal Data Mining, San Francisco.

See Also

seqefsub, seqeapplysub