R: Example synthetic database with series belonging to different...

example.database2 {TSdist} | R Documentation

## Example synthetic database with series belonging to different classes.

### Description

Example synthetic database with series belonging to 6 different classes.

### Usage

    data(example.database2);

### Format

`example.database2` a list conformed of the following two elements:

- data The 100 time series are stored in a numeric matrix, row-wise.

- classes A numerical vector of length 100 that takes values in {1,2,3,4,5,6}. Each element in the vector represents the class of one of the series.

### Details

`example.database2` is a database conformed of 100 series of length 100 obtained from 6 different classes. Each class is represented by the following function:

The class to which each series belongs is given in the `classes` vector.

- Class 1: random function

  f1(t)=80+r(t)+n(t)

- Class 2: periodic function

  f2(t)=80+15\sin(\frac{2π t + sh}{T})+n(t)

- Class 3: increasing linear trend

  f3(t)=f_3(t)=80+0.4t+n(t)+sh

- Class 4: decreasing linear trend

  f4(t)=80-0.4t+n(t)+sh

- Class 5: piecewise linear function which takes a value of 80+n(t) for the first L/2+sh of the series and a value of 90+n(t) for the rest of the points.

- Class 6: piecewise linear function which takes a value of 90+n(t) for the first L/2+sh of the series and a value of 80+n(t) for the rest of the points.

  r(t) is a random value issued from a N(0,3) distribution, L is the length of the series, 100 in this case, and T is the period and is defined as a third of the length of the series. n(t) is a random noise obtained from a N(0,2.8) distribution.. Finally, sh is an integer value that takes a random value between (-7,7) and shifts the series sh positions to the right or left, depending on the sign.

### Examples

    data(example.database2);

    ##  The "data" element of the list contains the time series, set in a row-wise format.

    plot(example.database2$data)[1,]

    ##  The "classes" element in example.database2 contains the classes of the series:

    example.database2$classes

[Package TSdist version 3.6 Index]