Description Usage Arguments Details Value Author(s) References See Also

View source: R/seqeconstraint.R

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.

1 2 3 | ```
seqeconstraint(max.gap = -1, window.size = -1, age.min = -1, age.max = -1,
age.max.end = -1, count.method = 1, maxGap, windowSize, ageMin, ageMax,
ageMaxEnd, countMethod)
``` |

`max.gap` |
The maximum time gap between two events |

`window.size` |
The maximum time span accepted for subsequences |

`age.min` |
Minimal start time position allowed for subsequences. Ignored when equal to -1 (default). |

`age.max` |
Maximal start time position allowed for subsequences. Ignored when equal to -1 (default). |

`age.max.end` |
Maximal end time position allowed for subsequences. Ignored when equal to -1 (default). |

`count.method` |
By default, subsequences are counted only
one time by sequence ( |

`maxGap` |
Deprecated. Use |

`windowSize` |
Deprecated. Use |

`ageMin` |
Deprecated. Use |

`ageMax` |
Deprecated. Use |

`ageMaxEnd` |
Deprecated. Use |

`countMethod` |
Deprecated. Use |

`max.gap`

, `window.size`

, `age.min`

, `age.max`

and
`age.max.end`

. If so, two events should not be separated by more
than `max.gap`

and the whole subsequence should not exceed a
`window.size`

time span.
The other parameters specify the start and end age of the subsequence,
it should start between `age.min`

and `age.max`

and finish
before `age.max.end`

.
Parameters `age.min`

, `age.max`

and `age.max.end`

are
interpreted as the number of positions (time units) from the beginning
of the sequence.

There are 5 options for the `count.method`

argument. (1) By default,
the count is the number of sequences that contain the subsequence (`"COBJ"`

method).
Alternatives are (2) `"CDIST_O"`

(counts all distinct occurrences in each sequence including possibly overlapping occurrences, i.e., occurrences sharing a same event occurrence), (3) `"CWIN"`

(number of slidden windows of length `window.size`

that contain an occurrence of the subsequence),
(4) `"CMINWIN"`

(number of minimal windows of occurrence) and (5) `"CDIST"`

(distinct occurrences without event occurrences overlap). See
references.

A constraint object containing one item per constraint type.

Matthias Studer, Nicolas S. M<c3><bc>ller and Reto B<c3><bc>rgin (alternative counting methods) (with Gilbert Ritschard for the help page)

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.

Ritschard, G., A. Gabadinho, N.S. M<c3><bc>ller and M. Studer (2008), Mining event sequences: A social science perspective, *International Journal of Data Mining, Modelling and Management, IJDMMM*, 1(1), 68-90.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.