compute {tsmp} | R Documentation |

## Computes the Matrix Profile or Pan-Matrix Profile

### Description

Main API Function

### Usage

```
compute(
ts,
windows = NULL,
query = NULL,
sample_pct = 1,
threshold = 0.98,
n_jobs = 1L
)
```

### Arguments

`ts` |
a |

`windows` |
an |

`query` |
a |

`sample_pct` |
a |

`threshold` |
a |

`n_jobs` |
an |

### Details

Computes the exact or approximate Matrix Profile based on the sample percent specified. Currently, MPX and SCRIMP++ are used for the exact and approximate algorithms respectively. See details for more information about the arguments combinations.

When a single `windows`

is given, the Matrix Profile is computed. If a `query`

is provided, AB join is computed.
Otherwise the self-join is computed.
When multiple `windows`

or none are given, the Pan-Matrix Profile is computed. If a `threshold`

is set (it is,
by default), the upper bound will be computed and the given `windows`

or a default range (when no `windows`

), below
the upper bound will be computed.

### Value

The profile computed.

### References

Website: http://www.cs.ucr.edu/~eamonn/MatrixProfile.html

### See Also

Other Main API:
`analyze()`

,
`discords()`

,
`motifs()`

,
`visualize()`

### Examples

```
# Matrix Profile
result <- compute(mp_toy_data$data[, 1], 80)
# Pan-Matrix Profile
result <- compute(mp_toy_data$data[, 1])
```

*tsmp*version 0.4.15 Index]