API Reference¶
Lifecycle Functions¶
Device Management¶
- quickmp.get_device_count() int¶
Get the number of available devices.
- Returns:
number of VE devices, CPU: always 1)
- Return type:
Number of available devices (VE
Matrix Profile Computation¶
- quickmp.selfjoin(T: numpy.ndarray, m: int, normalize: bool = True) numpy.ndarray¶
Compute the matrix profile for time series T.
The computation is parallelized over all cores of the device. To compute the matrix profiles of many time series, selfjoin_batch() is faster.
- Parameters:
T – Time series
m – Window size
normalize – If True (default), use Z-normalized Euclidean distance. If False, use raw Euclidean distance.
- Returns:
Matrix profile
- quickmp.selfjoin_batch(T: numpy.ndarray, m: int, normalize: bool = True) numpy.ndarray¶
Compute the matrix profiles for a batch of time series of the same length.
Time series are processed in parallel, which is faster than calling selfjoin() for each time series when there are many of them.
- Parameters:
T – 2D array where each row is a time series
m – Window size
normalize – If True (default), use Z-normalized Euclidean distance. If False, use raw Euclidean distance.
- Returns:
2D array where each row is the matrix profile of the corresponding time series
- quickmp.abjoin(T1: numpy.ndarray, T2: numpy.ndarray, m: int, normalize: bool = True) numpy.ndarray¶
Compute the matrix profile between time series T1 and T2.
The computation is parallelized over all cores of the device.
- Parameters:
T1 – Time series
T2 – Time series
m – Window size
normalize – If True (default), use Z-normalized Euclidean distance. If False, use raw Euclidean distance.
- Returns:
Matrix profile
Low-Level Functions¶
- quickmp.sliding_dot_product(T: numpy.ndarray, Q: numpy.ndarray) numpy.ndarray¶
Compute the sliding dot product between time series T and Q.
- Parameters:
T – Time series
Q – Time series
- Returns:
Sliding dot product
- quickmp.compute_mean_std(T: numpy.ndarray, m: int) tuple[numpy.ndarray, numpy.ndarray]¶
Compute the mean and standard deviation of every subsequence in time series T.
- Parameters:
T – Time series
m – Window size
- Returns:
Tuple of mean and standard deviation