Package 'minirocketR'

Title: 'MiniRocket': A Very Fast (Almost) Deterministic Transform for Time Series Classification
Description: High-performance R and C++ implementation using 'OpenMP' parallelization for the 'MiniRocket' algorithm. Extracts features from univariate time series for downstream classification as described in 'Dempster et al.' (2021) (<doi:10.1145/3447548.3467231>).
Authors: Manuel Villacorta Tilve [aut, cre]
Maintainer: Manuel Villacorta Tilve <[email protected]>
License: GPL (>= 3)
Version: 0.1.0
Built: 2026-10-08 10:58:15 UTC
Source: https://github.com/cran/minirocketR

Help Index


Fit a MiniRocket Feature Transformer

Description

Fit a MiniRocket Feature Transformer

Usage

minirocket_fit(
  X,
  num_features = 10000,
  max_dilations_per_kernel = 32,
  seed = NULL
)

Arguments

X

A numeric matrix of dimensions N x L.

num_features

Integer. Target number of features (default: 10000, yields 9996).

max_dilations_per_kernel

Integer. Maximum number of dilations considered per kernel (default: 32, as in the reference MiniRocket implementation).

seed

Optional integer random seed.

Value

An object of class minirocket.

Examples

# Create a synthetic matrix of 10 time series of length 50.
set.seed(42)
X <- matrix(rnorm(10 * 50), nrow = 10, ncol = 50)

# Fit the MiniRocket model.
mod <- minirocket_fit(X, num_features = 1000, seed = 42)
print(mod)

Transform Time Series into MiniRocket Features

Description

Applies a fitted minirocket model to extract PPV feature matrices using OpenMP parallelization in C++.

Usage

minirocket_transform(object, X, num_threads = 1, ...)

Arguments

object

A fitted minirocket model object.

X

A numeric matrix of dimensions N x L.

num_threads

Integer specifying CPU threads (default 1).

...

Unused additional arguments.

Value

A numeric matrix of size N x 9996 containing PPV features (by default).

Examples

set.seed(42)
X <- matrix(rnorm(10 * 50), nrow = 10, ncol = 50)

# Training and transform.
modelo <- minirocket_fit(X, num_features = 1000, seed = 42)
X_feat <- minirocket_transform(modelo, X)

dim(X_feat)