salient_subsequences: Framework for retrieve salient subsequences from a dataset

Description Usage Arguments Details Value References Examples

View source: R/salient.R

Description

In order to allow a meaningful visualization in Multi-Dimensional Space (MDS), this function retrieves the most relevant subsequences using Minimal Description Length (MDL) framework.

Usage

1
2
3
4
5
6
7
8
salient_subsequences(
  .mp,
  data,
  n_bits = 8,
  n_cand = 10,
  exclusion_zone = NULL,
  verbose = getOption("tsmp.verbose", 2)
)

Arguments

.mp

a TSMP object of class MatrixProfile.

data

the data used to build the Matrix Profile, if not embedded.

n_bits

an int or vector of int. Number of bits for MDL discretization. (Default is 8).

n_cand

an int. number of candidate when picking the subsequence in each iteration. (Default is 10).

exclusion_zone

if a number will be used instead of embedded value. (Default is NULL).

verbose

an int. See details. (Default is 2).

Details

verbose changes how much information is printed by this function; 0 means nothing, 1 means text, 2 adds the progress bar, 3 adds the finish sound.

Value

Returns the input .mp object with a new name salient. It contains: indexes, a vector with the starting position of each subsequence, idx_bit_size, a vector with the associated bitsize for each iteration and bits the value used as input on n_bits.

References

Website: https://sites.google.com/site/salientsubs/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# toy example
data <- mp_toy_data$data[, 1]
mp <- tsmp(data, window_size = 30, verbose = 0)
mps <- salient_subsequences(mp, data, verbose = 0)
## Not run: 
# full example
data <- mp_meat_data$sub$data
w <- mp_meat_data$sub$sub_len
mp <- tsmp(data, window_size = w, verbose = 2, n_workers = 6)
mps <- salient_subsequences(mp, data, n_bits = c(4, 6, 8), verbose = 2)

## End(Not run)

franzbischoff/tsmp documentation built on March 9, 2020, 6:01 a.m.