Sequence Analysis: Value Definition

In this step of the wizard you drag and drop your selected pattern numeric variable and then define the pattern.

You can select from the predefined 'longest' definitions or choose to set your pattern manually.

When defining selector and numeric patterns together, choosing a 'Longest' type sequence for the selector requires you to also select a 'Longest' option (although it can be different one) for the numeric sequence. Similarly, if the selector definition is manual, the numeric one must also be manual.

When manually defining a pattern, the pattern elements you can use to create sequences on a numeric variable are as follows.

Using booking Cost as the value variable in these examples:

  • Fixed numeric values - F200 to find transactions which are exactly £200 in value.

  • Fixed numeric ranges - F>100, F<1000, F500-800 to find bookings which cost more than £100, less than £1000 and between £500-800 respectively.

  • Relative numeric ranges - R10-30 to compare transactions and look for a transaction that is between £10-30 more than the previous transaction.

  • Percentage difference numeric ranges - P10, P10-20 to calculate that the next value in the list is 10%, or 10-20% bigger than the previous transaction.

It is possible to use the above in conjunction with one another to create a pattern, when appropriate:

In the case of the above defined settings:

  • Value 1 cost should be between £500-1000.

  • Value 2 cost should be between £50-100 more than value 1.

  • Value 3 cost should be more than 10% higher than value 2.

A number of positional wildcards are supported. Use:

? - to represent any single value in that position. Use where the actual value on this element of the pattern is not needed.
* -

to represent 0 or more of any value(s) when specifying and finding a desired sequence of transactions .

= - to match the previous value in the pattern
<> -

to specify that a value should be different to the value in the previous record.

?N - to represent any value the first time it is encountered in the pattern, and then all subsequent references to it must match the same value.

<

<=

>

>=

-

to compare the numeric value in this record to the numeric value in the previous record.

When creating a sequence using both selector and numeric variables, the value definitions must be internally consistent with each other.

Sequences using a selector and numeric together must be consistent with each other and you should ensure that:

  1. There are the same number of patterns in each of the selector and numeric pattern definitions.

  2. The patterns have the same name.

  3. The patterns have the same number of elements.

  4. Any * elements in the pattern are in the same position in both the selector and numeric patterns.

Click Next to go to the Sequence Analysis: Pattern Return Value step.