Francisco Bischoff
14 Oct 2026

matrixprofileris the high-performance C++ engine of the Matrix Profile ecosystem. This release focuses on native parallelism, new algorithms, and safer NA handling.
Key highlights:
RcppThread replaces RcppParallel/Intel TBB β
zero-dependency, fork-safe multithreading on all platforms.contrast() β native Contrast Profile computation with
multi-threading, Pearson and Euclidean distance metrics.rfcp() & rfcp_top_k() β Relative Frequency Contrast Profile
with Top-K morphology discovery, frequency adaptation, checkpoints,
and CUDA acceleration.mstomp() β native C++ Multivariate STOMP with n_workers
support.mpdist() β native C++ MPdist (scalar and vector variants),
multi-thread.NA_integer_ β invalid profile indices now follow Rβs
canonical missing-value convention (was -1L).na_strategy for all mov_* window functions β predictable,
non-cascading NA handling.π Full API changes, breaking changes, and migration guide: MIGRATION.md
R package implementing the UCR Matrix Profile Algorithm (http://www.cs.ucr.edu/~eamonn/MatrixProfile.html) as an optimised C++17 engine.
This package provides the core computational primitives for building
and querying Matrix Profiles. Higher-level analytics (motif search,
segmentation, snippets, plotting) live in the
tsmp package, which uses
matrixprofiler as its backend.
# Install the released version from CRAN
install.packages("matrixprofiler")
# Or the development version from GitHub:
# install.packages("devtools")
# devtools::install_github("matrix-profile-foundation/matrixprofiler")
install.packages("matrixprofiler", repos = c('https://matrix-profile-foundation.r-universe.dev', 'https://cloud.r-project.org'))
By default, matrixprofiler installs as a portable, high-performance
CPU engine with multi-threading via RcppThread (zero external
dependencies, 100% CRAN compliant).
If you have an NVIDIA GPU and the CUDA Toolkit installed, you
can compile matrixprofiler with native CUDA acceleration for supported
algorithms (such as rfcp() and mpx()):
# Clone the repository
git clone https://github.com/matrix-profile-foundation/matrixprofiler.git
cd matrixprofiler
# Compile CUDA kernels and install directly into your R library
./inst/cuda/build_cuda_rcpp.sh R CMD INSTALL .
# or with devtools:
./inst/cuda/build_cuda_rcpp.sh Rscript -e 'devtools::install()'
Once installed, check if CUDA is enabled in your R session:
library(matrixprofiler)
has_cuda()
#> [1] TRUE
contrast) β Contrast profile between positive
and negative classes (Euclidean/Pearson, multi-thread)rfcp) β Relative Frequency Contrast Profile for
discriminative pattern discovery (CPU multi-threaded & CUDA GPU)rfcp_top_k) β Iterative discovery of
top-K distinct morphologies with frequency adaptation and
checkpointingn_workers
mov_mean, mov_std, mov_var,
mov_min, mov_max, muinvn, zero_crossing) with
na_strategy = c("window_na", "remove", "error") and na.rm
controlRcppParallel with RcppThread (fork-safe,
zero external dep)mstomp()) in C++mpdist()) in C++contrast()) in native C++rfcp()) and Top-K
Morphology Discovery (rfcp_top_k())NA_integer_
na_strategy for all sliding-window functionsmatrixprofiler
coreOur next step unifying the Matrix Profile implementation in several programming languages.
Visit: Matrix Profile Foundation
Available at RPubs.
Please note that the matrixprofiler project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.