# Symbolic

Features based on a discrete symbolisation of real-valued time-series data.

*catch22* contains** 4** features which are each based on a discrete symbolisation of real-valued time-series data. Select one of the cards below to discover more information:

## 1. `entropy_pairs`

`entropy_pairs`

### What it does

is computed as the following:

Converts each value in the time series into one of three symbols ('A', 'B', or 'C') using an equi-probable binning in which the lowest 3rd of values are assigned 'A', the middle 3rd 'B', and the highest 3rd of values are given 'C'.

It then analyses the probabilities of all two-letter sequences ('AA', 'AB', 'BB', …) and outputs the entropy of this set of probabilities.

This feature is based on the *hctsa* code `SB_MotifThree(x_z,'quantile')`

, returning the `hh`

output.

Time series that have predictable two-letter sequences (i.e., some sequences are far more probable than others) will have low values, and time series that are less predictable (i.e., all two-letter sequences are approximately equi-probable) will have high values.

This Ricker map is highly predictable, with letters (A=red, B=blue, C=green) shown below, converting to "ABCABCABCABC…", such that "AB", "BC", and "CA" become highly probable sequences. It has a very **low value** for this feature:

**Feature output: ****entropy_pairs =**

`1.099`

**Feature output:**

**entropy_pairs =**

`1.099`

## 2. **transition_variance**

**transition_variance**

### What it does

## Consecutive Stretches

*catch22* contains two features that capture the maximum length of time over which similar consecutive local patterns are observed:

`stretch_high`

measures the longest successive period of above-average values.The feature called

`SB_BinaryStats_mean_longstretch1`

in*hctsa*(the`longstretch1`

output from running`SB_BinaryStats(x_z,'mean')`

in*hctsa*);

`stretch_decreasing`

measures the longest successive period of successive decreases.The feature called

`SB_BinaryStats_diff_longstretch0`

in*hctsa*(the`longstretch0`

output from running`SB_BinaryStats(x_z,'diff')`

in*hctsa*).

## 3. `stretch_high`

`stretch_high`

### What it does

`stretch_high`

computes the longest sequence of successive values in the time series that are greater than the mean. Algorithmically, this is achieved in two steps:

Transform the time series into a binary sequence: time-series values that are greater than the mean are set to

`1`

and time-series values that are less than or equal to the mean are set to`0`

.Return the longest sequence of successive values that are

`1`

.

## 4. `stretch_decreasing`

`stretch_decreasing`

### What it does

`stretch_decreasing`

is similar to the above, but it calculates the longest sequence of successive steps in the time series that *decrease*. Algorithmically, this is achieved in two steps:

Transform the time series into a binary sequence: each time-series value is converted to a

`1`

if it is higher than the previous time point, and`0`

if it is lower than the previous time point (starting from the second point in the time series, and thus yielding a sequence of length`N-1`

, where`N`

is the length of the original time series).Return the longest sequence of successive values that are

`0`

.

Last updated