Search for Discord
find_discord(.mp, ...)
# S3 method for class 'MatrixProfile'
find_discord(
.mp,
data,
n_discords = 1,
n_neighbors = 3,
radius = 3,
exclusion_zone = NULL,
...
)
# S3 method for class 'PMP'
find_discord(
.mp,
data,
n_discords = 1,
n_neighbors = 3,
radius = 3,
exclusion_zone = NULL,
...
)a MatrixProfile object.
further arguments to be passed to class specific function.
the data used to build the Matrix Profile, if not embedded.
an int. Number of discords to find. (Default is 1).
an int. Number of neighbors to find. (Default is 3).
an int. Set a threshold to exclude matching neighbors with distance > current
discord distance * radius. (Default is 3).
if a number will be used instead of embedded value. (Default is NULL).
For class MatrixProfile, returns the input .mp object with a new name discord.
It contains: discord_idx, a vectorof discords found
For class PMP, returns the input .mp object with a new name discord. It contains:
discord_idx, a vector` of discords found
# Single dimension data
w <- 50
data <- mp_gait_data
mp <- tsmp(data, window_size = w, exclusion_zone = 1 / 4, verbose = 0)
mp <- find_discord(mp)
pan <- tsmp(mp_gait_data, window_size = 20:30, mode = "pmp")
#> step: 1of11 binary idx: 1 window: 20
#> step: 2of11 binary idx: 6 window: 25
#> step: 3of11 binary idx: 3 window: 22
#> step: 4of11 binary idx: 9 window: 28
#> step: 5of11 binary idx: 2 window: 21
#> step: 6of11 binary idx: 4 window: 23
#> step: 7of11 binary idx: 7 window: 26
#> step: 8of11 binary idx: 10 window: 29
#> step: 9of11 binary idx: 5 window: 24
#> step: 10of11 binary idx: 8 window: 27
#> step: 11of11 binary idx: 11 window: 30
mp <- find_discord(pan)